From 2758158a4bb15b0f5ec30de92760133248afe1f8 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sun, 12 Aug 2018 17:23:58 +1000 Subject: [PATCH 001/458] 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/458] 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/458] 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/458] 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 1950a145c7d7c14167c8192b850e6edbadf67dc7 Mon Sep 17 00:00:00 2001 From: Shihpin Tseng Date: Mon, 20 Aug 2018 02:16:06 +0800 Subject: [PATCH 005/458] Fix process_combo which assign -1 to uint16_t --- quantum/process_keycode/process_combo.c | 18 +++++++++--------- quantum/process_keycode/process_combo.h | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/quantum/process_keycode/process_combo.c b/quantum/process_keycode/process_combo.c index 6e9c28e4fc04..13f8bbb33127 100644 --- a/quantum/process_keycode/process_combo.c +++ b/quantum/process_keycode/process_combo.c @@ -18,9 +18,6 @@ #include "print.h" -#define COMBO_TIMER_ELAPSED -1 - - __attribute__ ((weak)) combo_t key_combos[COMBO_COUNT] = { @@ -65,7 +62,7 @@ static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t * if (-1 == (int8_t)index) return false; /* The combos timer is used to signal whether the combo is active */ - bool is_combo_active = COMBO_TIMER_ELAPSED == combo->timer ? false : true; + bool is_combo_active = combo->is_active; if (record->event.pressed) { KEY_STATE_DOWN(index); @@ -73,9 +70,10 @@ static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t * if (is_combo_active) { if (ALL_COMBO_KEYS_ARE_DOWN) { /* Combo was pressed */ send_combo(combo->keycode, true); - combo->timer = COMBO_TIMER_ELAPSED; + combo->is_active = false; } else { /* Combo key was pressed */ combo->timer = timer_read(); + combo->is_active = true; #ifdef COMBO_ALLOW_ACTION_KEYS combo->prev_record = *record; #else @@ -99,6 +97,7 @@ static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t * send_keyboard_report(); unregister_code16(keycode); #endif + combo->is_active = false; combo->timer = 0; } @@ -106,6 +105,7 @@ static bool process_single_combo(combo_t *combo, uint16_t keycode, keyrecord_t * } if (NO_COMBO_KEYS_ARE_DOWN) { + combo->is_active = true; combo->timer = 0; } @@ -132,14 +132,14 @@ void matrix_scan_combo(void) #pragma GCC diagnostic ignored "-Warray-bounds" combo_t *combo = &key_combos[i]; #pragma GCC diagnostic pop - if (combo->timer && - combo->timer != COMBO_TIMER_ELAPSED && + if (combo->is_active && + combo->timer && timer_elapsed(combo->timer) > COMBO_TERM) { - + /* This disables the combo, meaning key events for this * combo will be handled by the next processors in the chain */ - combo->timer = COMBO_TIMER_ELAPSED; + combo->is_active = false; #ifdef COMBO_ALLOW_ACTION_KEYS process_action(&combo->prev_record, diff --git a/quantum/process_keycode/process_combo.h b/quantum/process_keycode/process_combo.h index a5dbd788a42c..a5787c9ed367 100644 --- a/quantum/process_keycode/process_combo.h +++ b/quantum/process_keycode/process_combo.h @@ -33,6 +33,7 @@ typedef struct uint8_t state; #endif uint16_t timer; + bool is_active; #ifdef COMBO_ALLOW_ACTION_KEYS keyrecord_t prev_record; #else From 3cf7f7322c24e3cab21d402f1a859b60df857603 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Wed, 29 Aug 2018 10:19:36 +1000 Subject: [PATCH 006/458] 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 007/458] 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 008/458] 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 009/458] 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 ca3564753526fc866d6195ab6b957781070a64f8 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Fri, 21 Dec 2018 14:38:21 +0100 Subject: [PATCH 010/458] Feature Unicode example code fixed. --- docs/feature_unicode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 1b083896a2b4..9d57e2fb7ab3 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -23,7 +23,7 @@ const uint32_t PROGMEM unicode_map[] = { [BANG] = 0x203D, // ‽ [IRONY] = 0x2E2E, // ⸮ [SNEK] = 0x1F40D, // 🐍 -}: +}; ``` Make sure that the order for both matches. From b21c592f1e42b016f020821ae2879d1681ee3321 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 21 Dec 2018 08:03:34 -0800 Subject: [PATCH 011/458] handwired/not_so_minidox: Configurator support (#4699) --- keyboards/handwired/not_so_minidox/info.json | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 keyboards/handwired/not_so_minidox/info.json diff --git a/keyboards/handwired/not_so_minidox/info.json b/keyboards/handwired/not_so_minidox/info.json new file mode 100644 index 000000000000..0222095024bb --- /dev/null +++ b/keyboards/handwired/not_so_minidox/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "Not So MiniDox", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 5.75, + "layouts": { + "LAYOUT": { + "key_count": 42, + "layout": [ + {"x":0, "y":0.375}, + {"x":1, "y":0.25}, + {"x":2, "y":0.125}, + {"x":3, "y":0}, + {"x":4, "y":0.125}, + {"x":5, "y":0.25}, + + {"x":8, "y":0.25}, + {"x":9, "y":0.125}, + {"x":10, "y":0}, + {"x":11, "y":0.125}, + {"x":12, "y":0.25}, + {"x":13, "y":0.375}, + + {"x":0, "y":1.375}, + {"x":1, "y":1.25}, + {"x":2, "y":1.125}, + {"x":3, "y":1}, + {"x":4, "y":1.125}, + {"x":5, "y":1.25}, + + {"x":8, "y":1.25}, + {"x":9, "y":1.125}, + {"x":10, "y":1}, + {"x":11, "y":1.125}, + {"x":12, "y":1.25}, + {"x":13, "y":1.375}, + + {"x":0, "y":2.375}, + {"x":1, "y":2.25}, + {"x":2, "y":2.125}, + {"x":3, "y":2}, + {"x":4, "y":2.125}, + {"x":5, "y":2.25}, + + {"x":8, "y":2.25}, + {"x":9, "y":2.125}, + {"x":10, "y":2}, + {"x":11, "y":2.125}, + {"x":12, "y":2.25}, + {"x":13, "y":2.375}, + + {"x":3.5, "y":4.75}, + {"x":4.5, "y":4.75}, + {"x":5.5, "y":3.75, "h":2}, + + {"x":7.5, "y":3.75, "h":2}, + {"x":8.5, "y":4.75}, + {"x":9.5, "y":4.75} + ] + } + } +} From f0863286ccde082475d9cb483354f19a4e4de67c Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Fri, 21 Dec 2018 17:33:36 +0100 Subject: [PATCH 012/458] Update keymap for planck/rev6 (#4701) * Update keymap.c * Update rules and keymap * Update keymap rules --- keyboards/planck/keymaps/sascha/keymap.c | 4 ++-- keyboards/planck/keymaps/sascha/rules.mk | 11 ++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c index 93787599c8e3..684b61f36687 100644 --- a/keyboards/planck/keymaps/sascha/keymap.c +++ b/keyboards/planck/keymaps/sascha/keymap.c @@ -26,13 +26,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ SINS │ ♥ │ ≈ │ ✓ │ ✗ │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Powr │ Rset │ BLSt │ Home │ End │ PgUp │ PgDn │ Left │ Down │ Up │ Rght │ │ + * │ Rset │ BLSt │ F1 │ Home │ End │ PgUp │ PgDn │ Left │ Down │ Up │ Rght │ │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL, KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä'), S(KC_INS) , UC(L'♥') , UC(L'≈') , UC(L'✓') , UC(L'✗') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä'), - KC_PWR , RESET , BL_STEP , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_TRNS + RESET , BL_STEP , KC_F1 , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_TRNS ) }; diff --git a/keyboards/planck/keymaps/sascha/rules.mk b/keyboards/planck/keymaps/sascha/rules.mk index d3918164df0b..276b71daa8b0 100644 --- a/keyboards/planck/keymaps/sascha/rules.mk +++ b/keyboards/planck/keymaps/sascha/rules.mk @@ -1,5 +1,14 @@ AUTO_SHIFT_ENABLE = yes AUTO_SHIFT_MODIFIERS = yes +UNICODE_ENABLE = yes + +ifeq ($(strip $(KEYBOARD)), planck/rev5) BACKLIGHT_ENABLE = yes +CONSOLE_ENABLE = no +endif +ifeq ($(strip $(KEYBOARD)), planck/rev6) +BACKLIGHT_ENABLE = no +CONSOLE_ENABLE = yes +EXTRALDFLAGS = -Wl,--build-id=none UNICODE_ENABLE = yes -DEFAULT_FOLDER = planck/rev5 +endif From af84f0ff86b6b7fd8fd77ef49393ebe964c793c0 Mon Sep 17 00:00:00 2001 From: Jeremy Herve Date: Fri, 21 Dec 2018 19:00:45 +0100 Subject: [PATCH 013/458] Keymap: Redox / jeherve: updates (#4694) * Start using send_unicode_hex_string for shrug See https://docs.qmk.fm/#/feature_unicode?id=send_unicode_hex_string * Make sure one can come back to main layer after tapping to NAV * Add 4 new keys to symbol layer ~, `, =, +, are now more accesssible. No need to reach out far from home row anymore * Add two new macro keys I did not have much use for the Expose key and the right Command key, so opted to replace those with 2 Macros: - One to invoke Alfred: https://www.alfredapp.com/ => Opt + Space - One to invoke 1password: https://1password.com/ => Cmd + Opt + \ * Update readme to mention changes in new version * Remove unneeded short definition * Shorter name for our custom key See https://github.com/qmk/qmk_firmware/pull/4694#discussion_r243341864 * Make macros one-liners See https://github.com/qmk/qmk_firmware/pull/4694#discussion_r243341487 * Switch to using eeconfig_init_user to set Unicode mode See https://github.com/qmk/qmk_firmware/pull/4694#issuecomment-449151724 --- keyboards/redox/keymaps/jeherve/keymap.c | 42 ++++++++++++----------- keyboards/redox/keymaps/jeherve/readme.md | 7 +++- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/keyboards/redox/keymaps/jeherve/keymap.c b/keyboards/redox/keymaps/jeherve/keymap.c index c2852f312c8e..f39b5a438a43 100644 --- a/keyboards/redox/keymaps/jeherve/keymap.c +++ b/keyboards/redox/keymaps/jeherve/keymap.c @@ -25,14 +25,11 @@ enum custom_keycodes { WAVE, YOSHI, THUMB_UP, - NBSP + NBSP, + INV_1P, + ALFRED }; -// Make macros a bit simpler with this shortcut. -#define TAP_ONCE(code) \ - register_code (code); \ - unregister_code (code) - // Is shift being held? Let's store this in a bool. static bool shift_held = false; @@ -40,16 +37,22 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case SHRUG: if (record->event.pressed) { - unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); } return false; break; + case INV_1P: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LGUI)SS_DOWN(X_LALT)SS_TAP(X_BSLASH)SS_UP(X_LGUI)SS_UP(X_LALT)); + } + return false; + break; + case ALFRED: + if (record->event.pressed) { + SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_SPACE)SS_UP(X_LALT)); + } + return false; + break; case YOSHI: if (record->event.pressed) { SEND_STRING(":yellow_yoshi:"); @@ -125,7 +128,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { }; // Shortcut to make keymap more readable -#define KC_CTDN LCTL(KC_DOWN) #define KC_SYQT LT(_SYMB,KC_QUOT) #define SYM_L MO(_SYMB) #define MO_INTR MO(_INTER) @@ -152,13 +154,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 , KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_EQL , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_ESC , KC_CTDN ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_BSLS , + KC_TAB ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_ESC , INV_1P ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_SCLN ,KC_BSLS , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ SYM_L ,KC_A ,KC_R ,KC_S ,KC_T ,KC_D ,M_BRACKET_LEFT, M_BRACKET_RIGHT ,KC_H ,KC_N ,KC_E ,KC_I ,KC_O ,KC_SYQT , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,TT(_NAV),TT(_SYMB), TT(_SYMB),TT(_NAV),KC_K ,KC_M ,KC_COMM ,KC_DOT ,KC_SLSH ,KC_RSFT , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ - MO_INTR ,KC_LCTL ,KC_HYPR ,KC_LALT , KC_LCMD , KC_BSPC ,KC_LCTL , KC_ENT ,KC_SPC , KC_RCMD , TT_ADJ ,KC_HYPR ,KC_RCTL ,MO_INTR + MO_INTR ,KC_LCTL ,KC_HYPR ,KC_LALT , KC_LCMD , KC_BSPC ,KC_LCTL , KC_ENT ,KC_SPC , ALFRED , TT_ADJ ,KC_HYPR ,KC_RCTL ,MO_INTR //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ ), @@ -170,7 +172,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ _______ ,KC_EXLM ,KC_AT ,KC_HASH ,KC_DLR ,KC_PERC ,KC_LCBR , KC_RCBR ,KC_CIRC ,KC_AMPR ,KC_ASTR ,KC_MINS ,KC_UNDS ,_______ , //├────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , _______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ ,_______ , + _______ ,_______ ,_______ ,KC_TILD ,KC_GRV , _______ ,_______ ,_______ , _______ ,_______ ,_______ ,KC_EQL ,KC_PLUS ,_______ ,_______ ,_______ , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ _______ ,_______ ,_______ ,_______ , _______ , _______ ,_______ , _______ ,_______ , _______ , _______ ,_______ ,_______ ,_______ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ @@ -184,7 +186,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┼────────┤ XXXXXXX ,XXXXXXX ,KC_VOLD ,KC_VOLU ,KC_MUTE ,XXXXXXX ,_______ , _______ ,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 ,XXXXXXX ,XXXXXXX ,_______ ,_______ , _______ ,_______ ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX , //├────────┼────────┼────────┼────────┼────┬───┴────┬───┼────────┼────────┤ ├────────┼────────┼───┬────┴───┬────┼────────┼────────┼────────┼────────┤ _______ ,XXXXXXX ,XXXXXXX ,XXXXXXX , XXXXXXX , XXXXXXX ,_______ , _______ ,XXXXXXX , XXXXXXX , _______ ,XXXXXXX ,XXXXXXX ,_______ //└────────┴────────┴────────┴────────┘ └────────┘ └────────┴────────┘ └────────┴────────┘ └────────┘ └────────┴────────┴────────┴────────┘ @@ -230,8 +232,8 @@ void persistent_default_layer_set(uint16_t default_layer) { } // Set unicode in Mac OS. -void matrix_init_user(void) { - set_unicode_input_mode(UC_OSX); +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_OSX); }; // Change LED colors depending on the layer. diff --git a/keyboards/redox/keymaps/jeherve/readme.md b/keyboards/redox/keymaps/jeherve/readme.md index 5afad5530a7e..515dcbd62263 100644 --- a/keyboards/redox/keymaps/jeherve/readme.md +++ b/keyboards/redox/keymaps/jeherve/readme.md @@ -1,7 +1,7 @@ # A Colemak keymap for the Redox keyboard ---- -![jeherve-redox-layout-3](https://user-images.githubusercontent.com/426388/45171716-69888200-b203-11e8-822d-7bc91f9f6c07.jpg) +![jeherve-redox-layout-4](https://user-images.githubusercontent.com/426388/50276398-2664be80-0442-11e9-86b9-fbd0f4275354.png) ---- @@ -25,6 +25,11 @@ My keymap uses 5 layers: ## Changelog +- 2018.12.20 + - 2 new Macro keys, to invoke [Alfred](https://www.alfredapp.com/) and [1Password](https://1password.com/). + - No more Right Command key or Expose key, I didn't use those much. + - Updates to use newer QMK function to call ¯\_(ツ)_/¯ + - Fix: you can now move back to the base layer when double tapping the thumb keys to switch to the Nav layer. 👍 - 2018.09.06 - Initial submission to QMK. It's alive! ⌨️ From ff8b1b9c6916a0817189a1c3079e8f2e09fc04b3 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Fri, 21 Dec 2018 17:39:10 -0800 Subject: [PATCH 014/458] Add crd's XD60 ANSI keymap (#4702) --- keyboards/xd60/keymaps/crd_ansi/README.md | 52 +++++++++++++++++++++++ keyboards/xd60/keymaps/crd_ansi/keymap.c | 30 +++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 keyboards/xd60/keymaps/crd_ansi/README.md create mode 100644 keyboards/xd60/keymaps/crd_ansi/keymap.c diff --git a/keyboards/xd60/keymaps/crd_ansi/README.md b/keyboards/xd60/keymaps/crd_ansi/README.md new file mode 100644 index 000000000000..80e45502494b --- /dev/null +++ b/keyboards/xd60/keymaps/crd_ansi/README.md @@ -0,0 +1,52 @@ +# ANSI Layout + +This is the standard ANSI keymap that I use on all of my 60% boards. This keymap +includes a single function layer available by holding the designated key on the +bottom row. + +I don't ever use Caps Lock, so that keycode is not mapped anywhere. In place of +the usual Caps Lock key, I have the following bnehaviour encoded: Escape when tapped +and Control when held. + +I also have the bottom right mod cluster mapped to navigational direction keys when tapped. +Shift = Up, Alt = Down, Ctrl = Right, Fn = Left. When held, these keys send the usual modifier +signals. + +``` +/* Base layer + * ,-----------------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backspace | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Esc/Ctrl| A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | ? | Shift | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Cmd | Space | Cmd | Fn | Alt | Ctrl | + * `-----------------------------------------------------------------------------------------' + */ +``` + +While holding the function key, you have access to the following layout. Any key +not indicated is considered "transparent" and sends the signal indicated in the +layer below. This function later gets you dedicated access to Escape and Delete +keys, function keys on numbers, WASD directions, other navigation, multimedia +controls, RGB (underglow) controls, and firmware reset (DFU mode). + +``` +/* Fn layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del | + * |-----------------------------------------------------------------------------------------+ + * | | Home| Up | End | | | | | Mute| | | Pg+ | Pg- | Reset | + * |-----------------------------------------------------------------------------------------+ + * | | Left| Down|Right| | | |Brt- |Vol- |Vol+ |Brt+ | | RGB Toggle | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |R(Bt-)|R(Bt+)|R(Rot)| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ + +``` \ No newline at end of file diff --git a/keyboards/xd60/keymaps/crd_ansi/keymap.c b/keyboards/xd60/keymaps/crd_ansi/keymap.c new file mode 100644 index 000000000000..6964ca3158b9 --- /dev/null +++ b/keyboards/xd60/keymaps/crd_ansi/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL // Function Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_FNLT LT(_FL, KC_LEFT) +#define KC_RADN RALT_T(KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_FNLT, KC_RADN, KC_RCRT + ), + [_FL] = LAYOUT_60_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_DEL, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_MOD, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; From 4d98c69e0297973789564ce508f2e8dafe69c32b Mon Sep 17 00:00:00 2001 From: Michael Pio Date: Sat, 22 Dec 2018 10:39:25 +0800 Subject: [PATCH 015/458] Update Vinta (#4705) * add support for configurator * add more layouts * fix default keymap --- keyboards/vinta/info.json | 18 +++++++++++++ keyboards/vinta/keymaps/default/keymap.c | 6 ++--- keyboards/vinta/vinta.h | 32 +++++++++++++++++++++++- 3 files changed, 52 insertions(+), 4 deletions(-) create mode 100644 keyboards/vinta/info.json diff --git a/keyboards/vinta/info.json b/keyboards/vinta/info.json new file mode 100644 index 000000000000..dd972c895def --- /dev/null +++ b/keyboards/vinta/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "vinta", + "url": "", + "maintainer": "Peioris", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_69_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":"~", "x":13, "y":0}, {"label":"|", "x":14, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Reset", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_68_tada": { + "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":"~", "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":"\u2191", "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}, {"label":"Menu", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_67_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":"~", "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":"\u2191", "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":"Ctrl", "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}] + } + } +} diff --git a/keyboards/vinta/keymaps/default/keymap.c b/keyboards/vinta/keymaps/default/keymap.c index 4e55ec308f2f..80499d73fc9e 100644 --- a/keyboards/vinta/keymaps/default/keymap.c +++ b/keyboards/vinta/keymaps/default/keymap.c @@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_69_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_BSLS, KC_GRV, 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_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_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_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, RESET, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), }; @@ -48,4 +48,4 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; -} \ No newline at end of file +} diff --git a/keyboards/vinta/vinta.h b/keyboards/vinta/vinta.h index 7f21157eeeaf..991c981c971b 100644 --- a/keyboards/vinta/vinta.h +++ b/keyboards/vinta/vinta.h @@ -22,4 +22,34 @@ { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, K4C, K4D, K4E, K4F } \ } -#endif \ No newline at end of file +#define LAYOUT_68_tada( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ + K40, K41, K42, K45, K49, K4A, K4C, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ +} + +#define LAYOUT_67_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ + K40, K41, K42, K45, K49, K4A, K4D, K4E, K4F \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, XXX, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ +} + +#endif From ea1fe35ae7c5fa026309a1d51cd90450e48c6b39 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 21 Dec 2018 19:39:48 -0800 Subject: [PATCH 016/458] Keyboard: Infinity60 refactor, Configurator support and readme update (#4707) * Infinity60: refactor - infinity60.h / keymap.c - renamed layout macro to LAYOUT_60_ansi_split_bs_rshift; removed layout macro alias - updated to #pragma once - keymaps now use #include QMK_KEYBOARD_H - keymaps/jpetermans/config.h updated to #pragma once - keymaps/jpetermans/rules.mk deleted (complete contents were deprecated make instructions) * Infinity 60%: Configurator support * Infinity60: readme update Updated the Docs links. * Infinity60: bugfix depariel keymap Had a typo. * Infinity60: edit matrix.c per @drashna - https://github.com/qmk/qmk_firmware/pull/4707#issuecomment-449540676 --- keyboards/infinity60/infinity60.h | 11 +-- keyboards/infinity60/info.json | 78 +++++++++++++++++++ keyboards/infinity60/keymaps/default/keymap.c | 10 +-- .../infinity60/keymaps/depariel/keymap.c | 16 ++-- keyboards/infinity60/keymaps/hasu/keymap.c | 12 +-- .../infinity60/keymaps/jpetermans/config.h | 7 +- .../infinity60/keymaps/jpetermans/keymap.c | 17 ++-- .../infinity60/keymaps/jpetermans/rules.mk | 4 - keyboards/infinity60/matrix.c | 19 +++++ keyboards/infinity60/readme.md | 3 +- 10 files changed, 130 insertions(+), 47 deletions(-) create mode 100644 keyboards/infinity60/info.json delete mode 100644 keyboards/infinity60/keymaps/jpetermans/rules.mk diff --git a/keyboards/infinity60/infinity60.h b/keyboards/infinity60/infinity60.h index 21b8eeba2daf..a71921045138 100644 --- a/keyboards/infinity60/infinity60.h +++ b/keyboards/infinity60/infinity60.h @@ -14,16 +14,14 @@ GNU General 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 KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" -#define LAYOUT_60_ansi_split_bs_rshift KEYMAP - #ifdef INFINITY_PROTOTYPE + /* Infinity prototype */ -#define KEYMAP( \ +#define LAYOUT_60_ansi_split_bs_rshift( \ K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K86, \ K51, K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, \ K13, K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, \ @@ -44,7 +42,7 @@ along with this program. If not, see . #else /* Infinity production */ -#define KEYMAP( \ +#define LAYOUT_60_ansi_split_bs_rshift( \ K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, \ K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, \ K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, \ @@ -64,4 +62,3 @@ along with this program. If not, see . #endif -#endif diff --git a/keyboards/infinity60/info.json b/keyboards/infinity60/info.json new file mode 100644 index 000000000000..06df911e5a0e --- /dev/null +++ b/keyboards/infinity60/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "Infinity 60%", + "keyboard_folder": "infinity60", + "url": "https://input.club/devices/infinity-keyboard/", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi_split_bs_rshift": { + "key_count": 63, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"\\", "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":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"GUI", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":6}, + {"label":"Alt", "x":10, "y":4, "w":1.5}, + {"label":"GUI", "x":11.5, "y":4}, + {"label":"Fn", "x":12.5, "y":4}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 8347c94b4850..5d310e3b295c 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -1,11 +1,11 @@ -#include "infinity60.h" +#include QMK_KEYBOARD_H const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Bksp| * |-----------------------------------------------------------| * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | * |-----------------------------------------------------------| @@ -14,7 +14,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |Gui|Alt | Space |Alt |Gui| | | * `-----------------------------------------------------------' */ - [0] = KEYMAP( + [0] = LAYOUT_60_ansi_split_bs_rshift( 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, \ @@ -34,7 +34,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |Gui|Alt | Space |Alt |Gui| | | * `-----------------------------------------------------------' */ - [1] = KEYMAP( + [1] = LAYOUT_60_ansi_split_bs_rshift( 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_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_PENT, \ diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index 57f9487f2210..d1a1a04a459e 100755 --- a/keyboards/infinity60/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -1,4 +1,4 @@ -#include "infinity60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Fn2 |Gui |Alt | Space |RAlt|Prv|PlPs|Next| * `-----------------------------------------------------------' */ - [0] = KEYMAP( + [0] = LAYOUT_60_ansi_split_bs_rshift( 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, LT(5, KC_ENT), \ @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 1: "Toggle" off SpaceFn for League of Legends */ - [1] = KEYMAP( + [1] = LAYOUT_60_ansi_split_bs_rshift( 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, \ @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 2: "Toggle" off SpaceFn for MapleRoyals */ - [2] = KEYMAP( + [2] = LAYOUT_60_ansi_split_bs_rshift( 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, \ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 3: FN layer 1 */ - [3] = KEYMAP( + [3] = LAYOUT_60_ansi_split_bs_rshift( KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, \ KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, LALT(KC_F4), KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_UP, KC_NO, KC_LPRN, KC_RPRN, KC_DEL, \ MO(6), KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_END, KC_PGDN, KC_TILD, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, \ @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 4: FN layer 2 */ - [4] = KEYMAP( + [4] = LAYOUT_60_ansi_split_bs_rshift( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_PSLS, TG(2), \ KC_CAPS, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_NO, KC_P7, KC_P8, KC_P9, KC_PAST, KC_BSPC, \ KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_PENT, \ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 5: FN layer 3 */ - [5] = KEYMAP( + [5] = LAYOUT_60_ansi_split_bs_rshift( 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_TAB , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F13, KC_F14, KC_F15, KC_F16, KC_NO, KC_TRNS, \ KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F17, KC_F18, KC_F19, KC_F20, LT(5, KC_ENT), \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 6: FN layer 4 */ - [6] = KEYMAP( + [6] = LAYOUT_60_ansi_split_bs_rshift( 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, \ LCTL(LSFT(KC_TAB)), KC_NO, LGUI(KC_UP), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ MO(6), LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index 9982078c19da..ec0d32183379 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -1,4 +1,4 @@ -#include "infinity60.h" +#include QMK_KEYBOARD_H const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer @@ -14,7 +14,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |Gui|Alt | Space |Alt |Gui| | | * `-----------------------------------------------------------' */ - [0] = KEYMAP( + [0] = LAYOUT_60_ansi_split_bs_rshift( 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, LT(3, KC_SCLN), KC_QUOT,MT(KC_RCTL, KC_ENT), \ @@ -34,7 +34,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |Gui|Alt | Space |Alt |Gui| | | * `-----------------------------------------------------------' */ - [1] = KEYMAP( + [1] = LAYOUT_60_ansi_split_bs_rshift( 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_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS,KC_BSPC, \ KC_LCTL,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_ENT, \ @@ -54,7 +54,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Gui|Alt | Space |Alt |Gui| * `-------------------------------------------' */ - [2] = KEYMAP( + [2] = 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_INS, KC_DEL, \ KC_TAB, KC_HOME,KC_PGDN,KC_UP, KC_PGUP,KC_END, KC_HOME,KC_PGDN,KC_PGUP,KC_END, KC_NO, KC_NO, KC_NO, KC_BSPC, \ KC_LCTL,KC_NO, KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_NO, KC_NO, KC_ENT, \ @@ -75,7 +75,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------' * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel */ - [3] = KEYMAP( + [3] = 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_INS, KC_DEL, \ LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R, ALT_T(KC_LEFT), ALT_T(KC_RGHT),LALT(KC_TAB), \ KC_LCTL, KC_ACL0,KC_ACL1,KC_ACL2,KC_ACL2,KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, LT(3, KC_SCLN), KC_NO, KC_ENT, \ @@ -96,7 +96,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------------------------------' * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel */ - [4] = KEYMAP( + [4] = 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_INS, KC_DEL, \ LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R,KC_BTN4,KC_BTN5,LALT(KC_TAB), \ KC_LCTL, KC_VOLD,KC_VOLU,KC_MUTE,KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, KC_BTN1,KC_NO, KC_ENT, \ diff --git a/keyboards/infinity60/keymaps/jpetermans/config.h b/keyboards/infinity60/keymaps/jpetermans/config.h index 72a2ed0810fd..1949a9ad9d71 100644 --- a/keyboards/infinity60/keymaps/jpetermans/config.h +++ b/keyboards/infinity60/keymaps/jpetermans/config.h @@ -1,11 +1,6 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - - -#include "../../config.h" +#pragma once //overrides #undef TAPPING_TOGGLE #define TAPPING_TOGGLE 2 -#endif diff --git a/keyboards/infinity60/keymaps/jpetermans/keymap.c b/keyboards/infinity60/keymaps/jpetermans/keymap.c index 59249ff72843..c99b05e4c5c0 100644 --- a/keyboards/infinity60/keymaps/jpetermans/keymap.c +++ b/keyboards/infinity60/keymaps/jpetermans/keymap.c @@ -1,9 +1,6 @@ -#include "infinity60.h" +#include QMK_KEYBOARD_H #include "led_controller.h" -//Helpful Defines -#define _______ KC_TRNS - //Define Layer Names #define _BASE 0 #define _NUMPAD 1 @@ -54,7 +51,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ /* default */ - [_BASE] = KEYMAP( \ + [_BASE] = LAYOUT_60_ansi_split_bs_rshift( \ 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_NO,\ 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, \ TT(_FNAV), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_ENT, \ @@ -63,7 +60,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* numpad */ - [_NUMPAD] = KEYMAP( \ + [_NUMPAD] = LAYOUT_60_ansi_split_bs_rshift( \ _______,_______,_______,_______,_______,_______,_______, KC_P7, KC_P8, KC_P9, KC_PSLS, _______,_______,_______,KC_NO,\ _______,_______,_______,_______,_______,_______,_______, KC_P4, KC_P5, KC_P6, KC_PAST, _______,_______,_______, \ MO(_FNAV),_______,_______,_______,_______,_______,_______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______,_______, \ @@ -72,7 +69,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* F-, arrow, and media keys */ - [_FNAV] = KEYMAP( \ + [_FNAV] = 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_NO,\ KC_CAPS,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,_______,_______,KC_DEL, \ _______,_______,KC_BTN2,_______,_______,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_INS,_______,_______, \ @@ -81,7 +78,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* media */ - [_MEDIA] = KEYMAP( \ + [_MEDIA] = LAYOUT_60_ansi_split_bs_rshift( \ _______,F(MODE_SINGLE),F(MODE_PAGE),F(MODE_FLASH),_______,_______,_______, _______, _______, _______,KC_MUTE, KC_VOLD, KC_VOLU,_______,KC_NO,\ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\ _______,_______,_______,_______,_______,F(GAME),_______, _______, _______, _______,_______, _______,_______, \ @@ -89,7 +86,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, KC_MPLY, _______,_______, _______,_______ \ ), /* ~ */ - [_TILDE] = KEYMAP( \ + [_TILDE] = LAYOUT_60_ansi_split_bs_rshift( \ KC_GRV,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,KC_NO,\ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______, \ @@ -97,7 +94,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______, _______,_______, _______,_______ \ ), /* template */ - [5] = KEYMAP( \ + [5] = LAYOUT_60_ansi_split_bs_rshift( \ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,KC_NO,\ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______,_______,\ _______,_______,_______,_______,_______,_______,_______, _______, _______, _______,_______, _______,_______, \ diff --git a/keyboards/infinity60/keymaps/jpetermans/rules.mk b/keyboards/infinity60/keymaps/jpetermans/rules.mk deleted file mode 100644 index df3d1e952fcc..000000000000 --- a/keyboards/infinity60/keymaps/jpetermans/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c index bf86591ccf8c..ba16e6900621 100644 --- a/keyboards/infinity60/matrix.c +++ b/keyboards/infinity60/matrix.c @@ -177,3 +177,22 @@ void matrix_print(void) xprintf("\n"); } } + +__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) { +} + diff --git a/keyboards/infinity60/readme.md b/keyboards/infinity60/readme.md index e77abca6427f..01f3a8a2ff5e 100644 --- a/keyboards/infinity60/readme.md +++ b/keyboards/infinity60/readme.md @@ -11,4 +11,5 @@ Make example for this keyboard (after setting up your build environment): make infinity60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + From 7bbd299fbac2cc1318ce5ec8cef18ffcf7fe8837 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 22 Dec 2018 08:23:04 -0800 Subject: [PATCH 017/458] JD40 refactor and readme update (#4710) * JD40: default keymap refactor - Removed redundant action_layer.h include - Refactored to use LAYOUT macro (from LAYOUT_kc) - Refactored to use QMK-native keycodes - Removed superseded TMK code blocks * JD40: readme cleanup Fixed and updated the links in the readme file --- keyboards/jd40/keymaps/default/keymap.c | 226 +++++------------------- keyboards/jd40/readme.md | 4 +- 2 files changed, 44 insertions(+), 186 deletions(-) diff --git a/keyboards/jd40/keymaps/default/keymap.c b/keyboards/jd40/keymaps/default/keymap.c index b4ec05505300..ff31fd6f5840 100644 --- a/keyboards/jd40/keymaps/default/keymap.c +++ b/keyboards/jd40/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#include "action_layer.h" #define _BL 0 #define _AL 1 @@ -7,189 +6,48 @@ #define _UL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT_kc( - F12, Q, W, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT, - LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT), - - [_AL] = LAYOUT_kc( - GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL, - CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT, - TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END), - - [_FL] = LAYOUT_kc( - 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, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), - - [_UL] = LAYOUT_kc( - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, FN4, FN5, FN11, FN10, 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), -}; - -enum function_id -{ - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(2), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(2, KC_CAPS), // Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(3), // Toggle Underglow Layer overlay - [4] = ACTION_FUNCTION(RGBLED_TOGGLE), //Turn on/off underglow - [5] = ACTION_FUNCTION(RGBLED_STEP_MODE), // Change underglow mode - [6] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [10] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [11] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [12] = ACTION_FUNCTION(SHIFT_ESC), + [_BL] = LAYOUT( + KC_F12, 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_UP, KC_DOT, + KC_LCTL, KC_LGUI, KC_LALT, MO(_AL), KC_SPC, KC_SPC, MO(_AL), KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_AL] = 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_CAPS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + _______, _______, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_PGUP, KC_QUOT, + _______, _______, _______, _______, TG(_UL), TG(_UL), _______, KC_HOME, KC_PGDN, KC_END + ), + + [_FL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_UL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; -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; -}; - -void matrix_scan_user(void) -{ - - // Layer LED indicators - // ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster - uint32_t layer = layer_state; - if (layer & (1 << 1)) - { - //gh60_wasd_leds_on(); - } - else - { - //gh60_wasd_leds_off(); - } - - if (layer & (1 << 2)) - { - //gh60_esc_led_on(); - } - else - { - //gh60_esc_led_off(); - } -}; - -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) - -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; - static uint8_t shift_esc_shift_mask; - // Shift + ESC = ~ - case SHIFT_ESC: - shift_esc_shift_mask = get_mods() & MODS_CTRL_MASK; - if (record->event.pressed) - { - if (shift_esc_shift_mask) - { - add_key(KC_GRV); - send_keyboard_report(); - } - else - { - add_key(KC_ESC); - send_keyboard_report(); - } - } - else - { - if (shift_esc_shift_mask) - { - del_key(KC_GRV); - send_keyboard_report(); - } - else - { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } +void matrix_scan_user(void) { + // Layer LED indicators + // ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + uint32_t layer = layer_state; + if (layer & (1 << 1)) { + //gh60_wasd_leds_on(); + } else { + //gh60_wasd_leds_off(); + } + + if (layer & (1 << 2)) { + //gh60_esc_led_on(); + } else { + //gh60_esc_led_off(); + } }; diff --git a/keyboards/jd40/readme.md b/keyboards/jd40/readme.md index f70bd9107d3c..3a92b8fb894f 100644 --- a/keyboards/jd40/readme.md +++ b/keyboards/jd40/readme.md @@ -5,10 +5,10 @@ A compact 40% keyboard. Keyboard Maintainer: QMK Community Hardware Supported: JD40 PCB -Hardware Availability: [1up](https://1upkeyboards.com/jd40-mkii-1up-keyboards-logo-pcb.html) [mechanicalkeyboards.com](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=2452) [originative](https://www.originativeco.com/products/jd40-pcb) +Hardware Availability: [1upkeyboards](https://www.1upkeyboards.com/shop/controllers/jd40-mkii-1up-keyboards-logo-pcb/), [mechanicalkeyboards.com](https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=2452), [originative](https://www.originativeco.com/products/jd40-pcb) Make example for this keyboard (after setting up your build environment): make jd40:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From 5e52eda0cacd45d2daa63dce71d7b7ceb5953368 Mon Sep 17 00:00:00 2001 From: Michishige Kaito Date: Thu, 20 Dec 2018 22:55:13 +0000 Subject: [PATCH 018/458] shell.nix: Packages relocated in upstream cleanup --- shell.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shell.nix b/shell.nix index 67efb46b7458..6ff8a7ad2d8f 100644 --- a/shell.nix +++ b/shell.nix @@ -4,6 +4,10 @@ with pkgs; let + avrbinutils = pkgsCross.avr.buildPackages.binutils; + avrlibc = pkgsCross.avr.libcCross; + gcc-arm-embedded = pkgsCross.arm-embedded.buildPackages.gcc; + avr_incflags = [ "-isystem ${avrlibc}/avr/include" "-B${avrlibc}/avr/lib/avr5" @@ -13,7 +17,7 @@ let "-B${avrlibc}/avr/lib/avr51" "-L${avrlibc}/avr/lib/avr51" ]; - avrgcc = pkgs.avrgcc.overrideAttrs (oldAttrs: rec { + avrgcc = pkgsCross.avr.buildPackages.gcc.overrideAttrs (oldAttrs: rec { name = "avr-gcc-8.1.0"; src = fetchurl { url = "mirror://gcc/releases/gcc-8.1.0/gcc-8.1.0.tar.xz"; From 2c3706611ff6ad20cc3210de837aacd4af7c7264 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 23 Dec 2018 08:36:01 -0800 Subject: [PATCH 019/458] Noxary x268: refactor and Configurator bugfix (#4713) - renamed layout macro LAYOUT_65_ansi to LAYOUT - rebuilt info.json to match LAYOUT macro --- keyboards/noxary/x268/info.json | 80 ++++++++++++++++++- .../noxary/x268/keymaps/default/keymap.c | 6 +- keyboards/noxary/x268/x268.h | 2 +- 3 files changed, 81 insertions(+), 7 deletions(-) diff --git a/keyboards/noxary/x268/info.json b/keyboards/noxary/x268/info.json index 047c39f04415..cac7559baf30 100644 --- a/keyboards/noxary/x268/info.json +++ b/keyboards/noxary/x268/info.json @@ -5,8 +5,82 @@ "width": 16, "height": 5, "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":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":15, "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":15, "y":1}, {"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":15, "y":2}, {"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":15, "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.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] - } + "LAYOUT": { + "key_count": 71, + "layout": [ + {"label":"ESC", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"MINUS", "x":11, "y":0}, + {"label":"EQUAL", "x":12, "y":0}, + {"label":"BACKSLASH", "x":13, "y":0}, + {"label":"BACKSPACE", "x":14, "y":0}, + {"label":"GRAVE", "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":"LBRACKET", "x":11.5, "y":1}, + {"label":"RBRACKET", "x":12.5, "y":1}, + {"label":"BACKSLASH", "x":13.5, "y":1, "w":1.5}, + {"label":"DELETE", "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":"SEMICOLON", "x":10.75, "y":2}, + {"label":"QUOTE", "x":11.75, "y":2}, + {"label":"ISO HASH", "x":12.75, "y":2}, + {"label":"ENTER", "x":13.75, "y":2, "w":1.25}, + {"label":"PAGE UP", "x":15, "y":2}, + {"label":"LSHIFT", "x":0, "y":3, "w":1.25}, + {"label":"ISO BACKSLASH", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"COMMA", "x":9.25, "y":3}, + {"label":"PERIOD", "x":10.25, "y":3}, + {"label":"SLASH", "x":11.25, "y":3}, + {"label":"RSHIFT", "x":12.25, "y":3, "w":1.75}, + {"label":"UP", "x":14, "y":3}, + {"label":"PAGE DOWN", "x":15, "y":3}, + {"label":"LCTRL", "x":0, "y":4, "w":1.25}, + {"label":"LGUI", "x":1.25, "y":4, "w":1.25}, + {"label":"LALT", "x":2.5, "y":4, "w":1.25}, + {"label":"SPACE", "x":3.75, "y":4, "w":6.25}, + {"label":"LALT", "x":10, "y":4}, + {"label":"FN", "x":11, "y":4}, + {"label":"RCTRL", "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/noxary/x268/keymaps/default/keymap.c b/keyboards/noxary/x268/keymaps/default/keymap.c index cb37407a7b6c..ae07f5213d7d 100644 --- a/keyboards/noxary/x268/keymaps/default/keymap.c +++ b/keyboards/noxary/x268/keymaps/default/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow|Rght| * `----------------------------------------------------------------' */ - [_BL] = LAYOUT_65_ansi( + [_BL] = 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_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_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_ENT, KC_PGUP, @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | BL_Toggle | | | | |Vol-| | * `----------------------------------------------------------------' */ - [_FL1] = LAYOUT_65_ansi( + [_FL1] = 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_PSCR, _______, RGB_TOG, RGB_VAI, RGB_SAI, RGB_HUI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, _______, RGB_VAD, RGB_SAD, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | * `----------------------------------------------------------------' */ - [_FL2] = LAYOUT_65_ansi( + [_FL2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/noxary/x268/x268.h b/keyboards/noxary/x268/x268.h index 53855e206045..9961b7dfdb17 100644 --- a/keyboards/noxary/x268/x268.h +++ b/keyboards/noxary/x268/x268.h @@ -18,7 +18,7 @@ #include "quantum.h" -#define LAYOUT_65_ansi( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ From 7e56c4bcb1bf0bad264401384d393ff0f7431d11 Mon Sep 17 00:00:00 2001 From: Adam Lee Date: Sun, 23 Dec 2018 11:39:30 -0500 Subject: [PATCH 020/458] [Miuni32] Update the # of LEDs to match the final version of PCB (#4714) * [Miuni32] Update the # of LEDs to match the final version of PCB * [Miuni32] Update link to website --- keyboards/miuni32/config.h | 2 +- keyboards/miuni32/readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/miuni32/config.h b/keyboards/miuni32/config.h index a56a818f557c..37e9113f9d69 100644 --- a/keyboards/miuni32/config.h +++ b/keyboards/miuni32/config.h @@ -161,7 +161,7 @@ along with this program. If not, see . #define RGB_DI_PIN D0 // The pin your RGB strip is wired to -#define RGBLED_NUM 7 // Number of LEDs +#define RGBLED_NUM 17 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 diff --git a/keyboards/miuni32/readme.md b/keyboards/miuni32/readme.md index 050ec8ecd76f..7fc72d601ac1 100644 --- a/keyboards/miuni32/readme.md +++ b/keyboards/miuni32/readme.md @@ -5,7 +5,7 @@ A compact 30% keyboard. Keyboard Maintainer: QMK Community Hardware Supported: miuni32 PCB -Hardware Availability: https://zealpc.net/products/miuni32 +Hardware Availability: https://bigtuna.io Make example for this keyboard (after setting up your build environment): From fc921a9c54bb28fe91219a9321f9d2c0cf7cf293 Mon Sep 17 00:00:00 2001 From: Othi Date: Mon, 24 Dec 2018 17:06:12 +0000 Subject: [PATCH 021/458] First PR for KBD6x HHKB layout keymap (#4704) * initial commit for Othi's HHKB layout keymap, covering multiple modifiers hold and vim-like support and german characters. If there's any suggestion i can be reached via mnpqraven on github or Othi#6661 on discord * added readme.md. TODO: update readme.md * changed to default quantum keycode for `KC_TRNS`, removed `PREVENT_STUCK_MODIFIERS`, fixed tap dance using one shots TODO: unicode implementation at https://docs.qmk.fm/#/feature_unicode * keymap documentaion(readme) added * unicode init TODO: figure out what made the compose sequence not running * update unicode and readme --- keyboards/kbd6x/keymaps/othi/config.h | 10 ++ keyboards/kbd6x/keymaps/othi/keymap.c | 190 +++++++++++++++++++++++++ keyboards/kbd6x/keymaps/othi/readme.md | 56 ++++++++ keyboards/kbd6x/keymaps/othi/rules.mk | 19 +++ 4 files changed, 275 insertions(+) create mode 100644 keyboards/kbd6x/keymaps/othi/config.h create mode 100644 keyboards/kbd6x/keymaps/othi/keymap.c create mode 100644 keyboards/kbd6x/keymaps/othi/readme.md create mode 100644 keyboards/kbd6x/keymaps/othi/rules.mk diff --git a/keyboards/kbd6x/keymaps/othi/config.h b/keyboards/kbd6x/keymaps/othi/config.h new file mode 100644 index 000000000000..42f68b435825 --- /dev/null +++ b/keyboards/kbd6x/keymaps/othi/config.h @@ -0,0 +1,10 @@ +#pragma once +#define ONESHOT_TAP_TOOGLE 2 +#define ONESHOT_TIMEOUT 2000 +// tap dance configurations +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 +#define PERMISSIVE_HOLD +// Fix KC_GESC conflict with Cmd+Alt+Esc on macros +#define GRAVE_ESC_GUI_OVERRIDE + diff --git a/keyboards/kbd6x/keymaps/othi/keymap.c b/keyboards/kbd6x/keymaps/othi/keymap.c new file mode 100644 index 000000000000..1e0fc8ad7ee1 --- /dev/null +++ b/keyboards/kbd6x/keymaps/othi/keymap.c @@ -0,0 +1,190 @@ +/* Copyright 2018 Othi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 + +// read README.md for rundown of what does what + +// #define BL 0 +#define CL 0 +#define NM_MODE 2 +#define VI_MODE 3 +#define FN3 4 +#define ACCENT 5 +#define ACCENT_CAP 6 + +//Unicode keymaps +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_LNX); +} +#define DE_AE UC(0x00E4) +#define DE_SS UC(0x00DF) +#define DE_OE UC(0x00F6) +#define DE_UE UC(0x00FC) +#define DE_AE_CAP UC(0x00C4) +#define DE_OE_CAP UC(0x00D6) +#define DE_UE_CAP UC(0x00DC) + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case NM_MODE: + rgblight_setrgb (0x00, 0x66, 0x00); + break; + case VI_MODE: + rgblight_setrgb (0x66, 0x66, 0x00); + break; + case ACCENT: + rgblight_setrgb (0x7A, 0x00, 0xFF); + break; + case ACCENT_CAP: + rgblight_setrgb (0x7A, 0xFF, 0xFF); + break; + default: // for any other layers, or the default layer + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + } + return state; +} + +//Tap Dance Declarations +enum { + CTL_NM = 0, + ALT_NM = 1, + SFT_NM = 2, + GUI_NM = 3 +}; + +void dance_CTL_NM_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + set_oneshot_mods(MOD_LCTL); + } else { + register_code (KC_LCTL); + layer_on(NM_MODE); + } +} + +void dance_CTL_NM_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_LCTL); + } else { + unregister_code (KC_LCTL); + layer_off(NM_MODE); + } +} + +void dance_GUI_NM_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_LGUI); + } else { + register_code (KC_LGUI); + layer_on(NM_MODE); + } +} + +void dance_GUI_NM_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_LGUI); + } else { + unregister_code (KC_LGUI); + layer_off(NM_MODE); + } +} + +void dance_ALT_NM_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_LALT); + } else { + register_code (KC_LALT); + layer_on(NM_MODE); + } +} + +void dance_ALT_NM_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_LALT); + } else { + unregister_code (KC_LALT); + layer_off(NM_MODE); + } +} + +void dance_SFT_NM_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code (KC_LSFT); + set_oneshot_mods(MOD_LSFT); + } else { + register_code (KC_LSFT); + layer_on(NM_MODE); + } +} + +void dance_SFT_NM_reset (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + unregister_code (KC_LSFT); + } else { + unregister_code (KC_LSFT); + layer_off(NM_MODE); + } +} + + +qk_tap_dance_action_t tap_dance_actions[] = { + [CTL_NM] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_CTL_NM_finished, dance_CTL_NM_reset), + [GUI_NM] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_GUI_NM_finished, dance_GUI_NM_reset), + [ALT_NM] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_ALT_NM_finished, dance_ALT_NM_reset), + [SFT_NM] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, dance_SFT_NM_finished, dance_SFT_NM_reset) +}; + +// backup +// old R3 capslock, LT(NM_MODE,KC_BSPC), +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [CL] = 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_BSLS, KC_DEL, + MT(MOD_LGUI,KC_TAB), LT(NM_MODE,KC_Q), KC_W, LT(ACCENT,KC_F), KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + MT(MOD_LCTL,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, + TD(SFT_NM), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, MT(MOD_LCTL,KC_COMM), MT(MOD_LSFT,KC_DOT), MT(MOD_LALT,KC_SLSH), LM(CL,MOD_LGUI|MOD_LSFT), TT(NM_MODE), + _______, TD(CTL_NM), TD(ALT_NM), KC_SPC, LM(CL,MOD_LGUI|MOD_LALT), OSL(ACCENT) , _______ + ), + [NM_MODE] = LAYOUT( + KC_GRV, KC_MPRV, KC_MNXT, KC_MPLY, KC_END, _______, _______, _______, _______, _______, KC_HOME, _______, _______, RESET, KC_INS, + LGUI(KC_TAB), _______, LCTL(KC_RGHT), _______, _______, _______, _______, KC_UP, KC_PGUP, _______, _______, _______, TG(CL), KC_DEL, + _______, KC_LEFT, _______, KC_RGHT, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_ENT, KC_QUOT, KC_LGUI, + KC_LSFT, _______, _______, _______, _______, LCTL(KC_LEFT), _______, _______, _______, _______, _______, TG(VI_MODE), TO(CL), + _______, TD(CTL_NM), TD(ALT_NM), KC_SPC, LM(CL,MOD_LGUI|MOD_LALT), OSL(ACCENT), _______ + ), + + [VI_MODE] = LAYOUT( + KC_GRV, KC_MPRV, KC_MNXT, KC_MPLY, LSFT(KC_END), KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, LSFT(KC_HOME), KC_F11, KC_F12, RESET, KC_INS, + LGUI(KC_TAB), _______, LSFT(LCTL(KC_RGHT)), _______, _______, _______, _______, LSFT(KC_UP), _______, _______, _______, _______, TG(CL), KC_BSPC, + _______, _______, _______, _______, _______, _______, LSFT(LCTL(KC_LEFT)), LSFT(KC_DOWN), LSFT(KC_RGHT), _______, KC_SCLN, KC_QUOT, KC_LGUI, + KC_LSFT, _______, _______, _______, _______, LSFT(LCTL(KC_LEFT)), _______, _______, _______, _______, KC_SLSH, OSM(MOD_LSFT), TO(CL), + _______, TD(CTL_NM), TD(ALT_NM), KC_SPC, LM(CL,MOD_LGUI|MOD_LALT), OSL(ACCENT), _______ + ), + [ACCENT] = LAYOUT( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, RGB_MODE_PLAIN, _______, _______, _______, _______, _______, DE_UE, _______, _______, _______, _______, _______, + _______, DE_AE, UC_Z, DE_SS, _______, _______, _______, _______, _______, _______, DE_OE, _______, _______, + OSL(ACCENT_CAP), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO(CL), + _______, _______, _______, _______, _______, _______, _______ + ), + [ACCENT_CAP] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, DE_UE_CAP, _______, _______, _______, _______, _______, + _______, DE_AE_CAP, _______, DE_SS, _______, _______, _______, _______, _______, _______, DE_OE_CAP, _______, TO(CL), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; + diff --git a/keyboards/kbd6x/keymaps/othi/readme.md b/keyboards/kbd6x/keymaps/othi/readme.md new file mode 100644 index 000000000000..95be36d057de --- /dev/null +++ b/keyboards/kbd6x/keymaps/othi/readme.md @@ -0,0 +1,56 @@ +## Othi's Universal HHKB keymap + +### Goals +- Colemak layout. If you don't use Colemak then you'll need to also change the arrow key bindigns in other layers + +- Vim-like navigation layer so you can use vim binding arrowkeys in non-vim environment + +- Good modifier support so you don't have to hold 14 modifier keys at the same time + +- RGB indicating layer change(only work with plain colors so far, don't put your rgb to pulsing or any non static animation) + +### Layers +- **CL:** + + The base layer, default is Colemak + +- **NM_MODE:** + + Vim-like arrowkeys in the home row, it's `LHNE` for *JENK Colemak* and `HJKL` for *QWERTY* + + Also `HOME`, `END` and next/prev word (`Ctrl + Left/Right`) in `0, 4, w, b` like in vim + +- **VI_MODE:** + + The same as `NM_MODE` but with `KC_LSFT` held down for mostly highlighting + +- **ACCENT + ACCENT_CAP:** + + Function row and Unicode characters + +### Modifiers and Tap Dance keys +**LHS:** + +- Any Tap Dance key with the format of `TD(XXX_NM)` act as normal XXX modifier upon hold, but will hold **and** put you to `NM_MODE` when double click hold(a tap before the hold)(eg you can produce `Alt + PgUp` by pressing `Alt + Alt + U`) + +- `KC_TAB` acts as both `KC_TAB` on tap and `KC_LGUI` on hold + +- R3 CapsLock acts as both `KC_BSPC` on tap and `KC_LCTL` on hold + +- Holding `KC_Q` also puts you into `NM_MODE` + +- Holding `KC_F` puts you into `VI_MODE` for fast function keys + +**RHS:** + +- 3 keys `KC_SCLN`, `KC_DOT` and `KC_SLSH` in `CL` layer can also be held down for respectively `KC_LCTL`, `KC_LSFT`, `KC_LALT` for easier 2-hand modifier holding + +- Right modifiers hold the selected modifier with `KC_LGUI` at the same time, mainly for i3wm, you can change this to whatever combination you want + +### Misc. functionalities + +**Unicode:** + +- In case the keyboard output the 4-digit codepoint instead of the actual unicode, you need to change the rewrite input mode of the keyboard into the EEPROM(you only have to do this if the EEPROM was cleared or your current machine use another unicode compose method other than IBus/Linux's `Ctrl + Shift + U`). Change the corresponding Input `void eeconfig_init_user(void)`. See [this](https://docs.qmk.fm/#/feature_unicode) for availble input modes. + +- **NOTE:** make sure to keep your qmk env up to date with upstream diff --git a/keyboards/kbd6x/keymaps/othi/rules.mk b/keyboards/kbd6x/keymaps/othi/rules.mk new file mode 100644 index 000000000000..9cda4109dda7 --- /dev/null +++ b/keyboards/kbd6x/keymaps/othi/rules.mk @@ -0,0 +1,19 @@ +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 = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes +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) +TAP_DANCE_ENABLE=yes + From 33483b440ce1cf6df1010597b68a94751f4807b6 Mon Sep 17 00:00:00 2001 From: ishtob Date: Mon, 24 Dec 2018 12:06:33 -0500 Subject: [PATCH 022/458] Keymap: fix userspace compile error with planck grid (#4719) --- keyboards/planck/keymaps/ishtob/keymap.c | 20 ++++++++++---------- users/ishtob/ishtob.h | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/keyboards/planck/keymaps/ishtob/keymap.c b/keyboards/planck/keymaps/ishtob/keymap.c index 082257b8956e..e036d8a5a33c 100644 --- a/keyboards/planck/keymaps/ishtob/keymap.c +++ b/keyboards/planck/keymaps/ishtob/keymap.c @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Esc | Caps | Alt | GUI |Lower | Space |Raise |NumLay| RAlt | Men | Del | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_planck_grid( +[_QWERTY] = LAYOUT_ortho_4x12_wrapper( LT_FN(KC_TAB), _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, KC_LCTL, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, CTL_ENT, KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, LT_RAI(KC_MINS), @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = LAYOUT_planck_grid( +[_COLEMAK] = LAYOUT_ortho_4x12_wrapper( LT_FN(KC_TAB), _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, KC_LCTL, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_ENT, KC_LSFT, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, LT_RAI(KC_MINS), @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = LAYOUT_planck_grid( +[_DVORAK] = LAYOUT_ortho_4x12_wrapper( LT_FN(KC_TAB), _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, KC_LCTL, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_ENT, KC_LSFT, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________, LT_RAI(KC_MINS), @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_planck_grid( +[_LOWER] = LAYOUT_ortho_4x12_wrapper( ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_GRV, KC_BSLS, _______, __________________LONG_FUNC_LEFT___________________, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE, _______, __________________LONG_FUNC_RIGHT__________________,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, @@ -96,7 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | 0 | | Left | Down | Right| NumLk| * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_planck_grid( +[_RAISE] = LAYOUT_ortho_4x12_wrapper( ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_PLUS, KC_BSLS, _______, KC_A, KC_UP, KC_D, KC_PSCR, KC_VOLU, KC_4, KC_5, KC_6, KC_PAST, KC_COLN, KC_QUOT, _______, KC_LEFT, KC_DOWN, KC_RIGHT,KC__MUTE, KC_VOLD, KC_1, KC_2, KC_3, KC_UP, KC_SLSH, _______, @@ -115,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_PLOVER] = LAYOUT_planck_grid( +[_PLOVER] = LAYOUT_ortho_4x12_wrapper( 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, @@ -133,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_FNLAYER] = LAYOUT_planck_grid( +[_FNLAYER] = LAYOUT_ortho_4x12_wrapper( _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, _______, __________________LONG_FUNC_LEFT___________________, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_QUOT, _______, __________________LONG_FUNC_RIGHT__________________,S(KC_NUHS),S(KC_NUBS),KC_LCBR, KC_RCBR, _______, @@ -151,7 +151,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | 0 | . | Exit | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_NUMLAY] = LAYOUT_planck_grid( +[_NUMLAY] = LAYOUT_ortho_4x12_wrapper( _______, KC_Q, KC_UP, KC_H, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_MINS, KC_PLUS, KC_BSPC, _______, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PAST, KC_COLN, KC_ENT, _______, KC_Z, KC_X, KC_C, KC_V, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_PDOT, KC_PSLS, _______, @@ -170,7 +170,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ -[_MOUSECURSOR] = LAYOUT_planck_grid( +[_MOUSECURSOR] = LAYOUT_ortho_4x12_wrapper( KC_ACL0, KC_ACL1, KC_ACL2, M_EMAIL,M_EMAIL2, KC_HOME, KC_PGUP, KC_WH_L, KC_MS_U, KC_WH_R, P_MPASS, P_META, _______, XXXXXXX, XXXXXXX, XXXXXXX, O_RTQ6H, KC_END , KC_PGDN, KC_MS_L, KC_MS_D, KC_MS_R, _______, O_DAYRN, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_BTN2, KC_BTN3, KC_BTN4, KC_BTN5, _______, _______, @@ -188,7 +188,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = LAYOUT_planck_grid( +[_ADJUST] = LAYOUT_ortho_4x12_wrapper( DFU, 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, DVORAK, PLOVER, _______, _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, BL_DEC, BL_INC, BL_STEP, BL_TOGG, diff --git a/users/ishtob/ishtob.h b/users/ishtob/ishtob.h index 3e4d4ffbcbc3..ced78a09d820 100644 --- a/users/ishtob/ishtob.h +++ b/users/ishtob/ishtob.h @@ -85,7 +85,6 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) -#define LAYOUT_planck_grid(...) LAYOUT_planck_grid(__VA_ARGS__) /* Blocks for each of the four major keyboard layouts From 2149f3b5889f898fecde845a03d61c1a854d9393 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 24 Dec 2018 09:19:18 -0800 Subject: [PATCH 023/458] Toad Configurator support and readme update (#4718) * Toad: Configurator support * Toad: update Docs links in readme --- keyboards/toad/info.json | 409 +++++++++++++++++++++++++++++++++++++++ keyboards/toad/readme.md | 2 +- 2 files changed, 410 insertions(+), 1 deletion(-) create mode 100644 keyboards/toad/info.json diff --git a/keyboards/toad/info.json b/keyboards/toad/info.json new file mode 100644 index 000000000000..17a37147ec89 --- /dev/null +++ b/keyboards/toad/info.json @@ -0,0 +1,409 @@ +{ + "keyboard_name": "Toad", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "key_count": 78, + "layout": [ + {"label":"K000", "x":0, "y":0}, + {"label":"K001", "x":2, "y":0}, + {"label":"K002", "x":3, "y":0}, + {"label":"K003", "x":4, "y":0}, + {"label":"K004", "x":5, "y":0}, + {"label":"K005", "x":6.5, "y":0}, + {"label":"K006", "x":7.5, "y":0}, + {"label":"K007", "x":8.5, "y":0}, + {"label":"K008", "x":9.5, "y":0}, + {"label":"K009", "x":11, "y":0}, + {"label":"K010", "x":12, "y":0}, + {"label":"K011", "x":13, "y":0}, + {"label":"K012", "x":14, "y":0}, + {"label":"K100", "x":0, "y":1.5}, + {"label":"K101", "x":1, "y":1.5}, + {"label":"K102", "x":2, "y":1.5}, + {"label":"K103", "x":3, "y":1.5}, + {"label":"K104", "x":4, "y":1.5}, + {"label":"K105", "x":5, "y":1.5}, + {"label":"K106", "x":6, "y":1.5}, + {"label":"K107", "x":7, "y":1.5}, + {"label":"K108", "x":8, "y":1.5}, + {"label":"K109", "x":9, "y":1.5}, + {"label":"K110", "x":10, "y":1.5}, + {"label":"K111", "x":11, "y":1.5}, + {"label":"K112", "x":12, "y":1.5}, + {"label":"K113", "x":13, "y":1.5}, + {"label":"K013", "x":14, "y":1.5}, + {"label":"K200", "x":0, "y":2.5, "w":1.5}, + {"label":"K201", "x":1.5, "y":2.5}, + {"label":"K202", "x":2.5, "y":2.5}, + {"label":"K203", "x":3.5, "y":2.5}, + {"label":"K204", "x":4.5, "y":2.5}, + {"label":"K205", "x":5.5, "y":2.5}, + {"label":"K206", "x":6.5, "y":2.5}, + {"label":"K207", "x":7.5, "y":2.5}, + {"label":"K208", "x":8.5, "y":2.5}, + {"label":"K209", "x":9.5, "y":2.5}, + {"label":"K210", "x":10.5, "y":2.5}, + {"label":"K211", "x":11.5, "y":2.5}, + {"label":"K212", "x":12.5, "y":2.5}, + {"label":"K213", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K300", "x":0, "y":3.5, "w":1.75}, + {"label":"K301", "x":1.75, "y":3.5}, + {"label":"K302", "x":2.75, "y":3.5}, + {"label":"K303", "x":3.75, "y":3.5}, + {"label":"K304", "x":4.75, "y":3.5}, + {"label":"K305", "x":5.75, "y":3.5}, + {"label":"K306", "x":6.75, "y":3.5}, + {"label":"K307", "x":7.75, "y":3.5}, + {"label":"K308", "x":8.75, "y":3.5}, + {"label":"K309", "x":9.75, "y":3.5}, + {"label":"K310", "x":10.75, "y":3.5}, + {"label":"K311", "x":11.75, "y":3.5}, + {"label":"K312", "x":12.75, "y":3.5}, + {"label":"K313", "x":13.75, "y":3.5, "w":1.25}, + {"label":"K400", "x":0, "y":4.5, "w":1.25}, + {"label":"K401", "x":1.25, "y":4.5}, + {"label":"K402", "x":2.25, "y":4.5}, + {"label":"K403", "x":3.25, "y":4.5}, + {"label":"K404", "x":4.25, "y":4.5}, + {"label":"K405", "x":5.25, "y":4.5}, + {"label":"K406", "x":6.25, "y":4.5}, + {"label":"K407", "x":7.25, "y":4.5}, + {"label":"K408", "x":8.25, "y":4.5}, + {"label":"K409", "x":9.25, "y":4.5}, + {"label":"K410", "x":10.25, "y":4.5}, + {"label":"K411", "x":11.25, "y":4.5}, + {"label":"K412", "x":12.25, "y":4.5, "w":1.75}, + {"label":"K413", "x":14, "y":4.5}, + {"label":"K500", "x":0, "y":5.5, "w":1.25}, + {"label":"K501", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K502", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K507", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K510", "x":10, "y":5.5, "w":1.25}, + {"label":"K511", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K512", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K513", "x":13.75, "y":5.5, "w":1.25} + ] + }, + + "LAYOUT_ansi_wk": { + "key_count": 74, + "layout": [ + {"label":"K000", "x":0, "y":0}, + {"label":"K001", "x":2, "y":0}, + {"label":"K002", "x":3, "y":0}, + {"label":"K003", "x":4, "y":0}, + {"label":"K004", "x":5, "y":0}, + {"label":"K005", "x":6.5, "y":0}, + {"label":"K006", "x":7.5, "y":0}, + {"label":"K007", "x":8.5, "y":0}, + {"label":"K008", "x":9.5, "y":0}, + {"label":"K009", "x":11, "y":0}, + {"label":"K010", "x":12, "y":0}, + {"label":"K011", "x":13, "y":0}, + {"label":"K012", "x":14, "y":0}, + {"label":"K100", "x":0, "y":1.5}, + {"label":"K101", "x":1, "y":1.5}, + {"label":"K102", "x":2, "y":1.5}, + {"label":"K103", "x":3, "y":1.5}, + {"label":"K104", "x":4, "y":1.5}, + {"label":"K105", "x":5, "y":1.5}, + {"label":"K106", "x":6, "y":1.5}, + {"label":"K107", "x":7, "y":1.5}, + {"label":"K108", "x":8, "y":1.5}, + {"label":"K109", "x":9, "y":1.5}, + {"label":"K110", "x":10, "y":1.5}, + {"label":"K111", "x":11, "y":1.5}, + {"label":"K112", "x":12, "y":1.5}, + {"label":"K013", "x":13, "y":1.5, "w":2}, + {"label":"K200", "x":0, "y":2.5, "w":1.5}, + {"label":"K201", "x":1.5, "y":2.5}, + {"label":"K202", "x":2.5, "y":2.5}, + {"label":"K203", "x":3.5, "y":2.5}, + {"label":"K204", "x":4.5, "y":2.5}, + {"label":"K205", "x":5.5, "y":2.5}, + {"label":"K206", "x":6.5, "y":2.5}, + {"label":"K207", "x":7.5, "y":2.5}, + {"label":"K208", "x":8.5, "y":2.5}, + {"label":"K209", "x":9.5, "y":2.5}, + {"label":"K210", "x":10.5, "y":2.5}, + {"label":"K211", "x":11.5, "y":2.5}, + {"label":"K212", "x":12.5, "y":2.5}, + {"label":"K213", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K300", "x":0, "y":3.5, "w":1.75}, + {"label":"K301", "x":1.75, "y":3.5}, + {"label":"K302", "x":2.75, "y":3.5}, + {"label":"K303", "x":3.75, "y":3.5}, + {"label":"K304", "x":4.75, "y":3.5}, + {"label":"K305", "x":5.75, "y":3.5}, + {"label":"K306", "x":6.75, "y":3.5}, + {"label":"K307", "x":7.75, "y":3.5}, + {"label":"K308", "x":8.75, "y":3.5}, + {"label":"K309", "x":9.75, "y":3.5}, + {"label":"K310", "x":10.75, "y":3.5}, + {"label":"K311", "x":11.75, "y":3.5}, + {"label":"K313", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K400", "x":0, "y":4.5, "w":2.25}, + {"label":"K402", "x":2.25, "y":4.5}, + {"label":"K403", "x":3.25, "y":4.5}, + {"label":"K404", "x":4.25, "y":4.5}, + {"label":"K405", "x":5.25, "y":4.5}, + {"label":"K406", "x":6.25, "y":4.5}, + {"label":"K407", "x":7.25, "y":4.5}, + {"label":"K408", "x":8.25, "y":4.5}, + {"label":"K409", "x":9.25, "y":4.5}, + {"label":"K410", "x":10.25, "y":4.5}, + {"label":"K411", "x":11.25, "y":4.5}, + {"label":"K412", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K500", "x":0, "y":5.5, "w":1.25}, + {"label":"K501", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K502", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K507", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K510", "x":10, "y":5.5, "w":1.25}, + {"label":"K511", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K512", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K513", "x":13.75, "y":5.5, "w":1.25} + ] + }, + + "LAYOUT_ansi_wkl": { + "key_count": 71, + "layout": [ + {"label":"K000", "x":0, "y":0}, + {"label":"K001", "x":2, "y":0}, + {"label":"K002", "x":3, "y":0}, + {"label":"K003", "x":4, "y":0}, + {"label":"K004", "x":5, "y":0}, + {"label":"K005", "x":6.5, "y":0}, + {"label":"K006", "x":7.5, "y":0}, + {"label":"K007", "x":8.5, "y":0}, + {"label":"K008", "x":9.5, "y":0}, + {"label":"K009", "x":11, "y":0}, + {"label":"K010", "x":12, "y":0}, + {"label":"K011", "x":13, "y":0}, + {"label":"K012", "x":14, "y":0}, + {"label":"K100", "x":0, "y":1.5}, + {"label":"K101", "x":1, "y":1.5}, + {"label":"K102", "x":2, "y":1.5}, + {"label":"K103", "x":3, "y":1.5}, + {"label":"K104", "x":4, "y":1.5}, + {"label":"K105", "x":5, "y":1.5}, + {"label":"K106", "x":6, "y":1.5}, + {"label":"K107", "x":7, "y":1.5}, + {"label":"K108", "x":8, "y":1.5}, + {"label":"K109", "x":9, "y":1.5}, + {"label":"K110", "x":10, "y":1.5}, + {"label":"K111", "x":11, "y":1.5}, + {"label":"K112", "x":12, "y":1.5}, + {"label":"K013", "x":13, "y":1.5, "w":2}, + {"label":"K200", "x":0, "y":2.5, "w":1.5}, + {"label":"K201", "x":1.5, "y":2.5}, + {"label":"K202", "x":2.5, "y":2.5}, + {"label":"K203", "x":3.5, "y":2.5}, + {"label":"K204", "x":4.5, "y":2.5}, + {"label":"K205", "x":5.5, "y":2.5}, + {"label":"K206", "x":6.5, "y":2.5}, + {"label":"K207", "x":7.5, "y":2.5}, + {"label":"K208", "x":8.5, "y":2.5}, + {"label":"K209", "x":9.5, "y":2.5}, + {"label":"K210", "x":10.5, "y":2.5}, + {"label":"K211", "x":11.5, "y":2.5}, + {"label":"K212", "x":12.5, "y":2.5}, + {"label":"K213", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K300", "x":0, "y":3.5, "w":1.75}, + {"label":"K301", "x":1.75, "y":3.5}, + {"label":"K302", "x":2.75, "y":3.5}, + {"label":"K303", "x":3.75, "y":3.5}, + {"label":"K304", "x":4.75, "y":3.5}, + {"label":"K305", "x":5.75, "y":3.5}, + {"label":"K306", "x":6.75, "y":3.5}, + {"label":"K307", "x":7.75, "y":3.5}, + {"label":"K308", "x":8.75, "y":3.5}, + {"label":"K309", "x":9.75, "y":3.5}, + {"label":"K310", "x":10.75, "y":3.5}, + {"label":"K311", "x":11.75, "y":3.5}, + {"label":"K313", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K400", "x":0, "y":4.5, "w":2.25}, + {"label":"K402", "x":2.25, "y":4.5}, + {"label":"K403", "x":3.25, "y":4.5}, + {"label":"K404", "x":4.25, "y":4.5}, + {"label":"K405", "x":5.25, "y":4.5}, + {"label":"K406", "x":6.25, "y":4.5}, + {"label":"K407", "x":7.25, "y":4.5}, + {"label":"K408", "x":8.25, "y":4.5}, + {"label":"K409", "x":9.25, "y":4.5}, + {"label":"K410", "x":10.25, "y":4.5}, + {"label":"K411", "x":11.25, "y":4.5}, + {"label":"K412", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K500", "x":0, "y":5.5, "w":1.5}, + {"label":"K502", "x":2.5, "y":5.5, "w":1.5}, + {"label":"K507", "x":4, "y":5.5, "w":7}, + {"label":"K511", "x":11, "y":5.5, "w":1.5}, + {"label":"K513", "x":13.5, "y":5.5, "w":1.5} + ] + }, + + "LAYOUT_iso_wk": { + "key_count": 75, + "layout": [ + {"label":"K000", "x":0, "y":0}, + {"label":"K001", "x":2, "y":0}, + {"label":"K002", "x":3, "y":0}, + {"label":"K003", "x":4, "y":0}, + {"label":"K004", "x":5, "y":0}, + {"label":"K005", "x":6.5, "y":0}, + {"label":"K006", "x":7.5, "y":0}, + {"label":"K007", "x":8.5, "y":0}, + {"label":"K008", "x":9.5, "y":0}, + {"label":"K009", "x":11, "y":0}, + {"label":"K010", "x":12, "y":0}, + {"label":"K011", "x":13, "y":0}, + {"label":"K012", "x":14, "y":0}, + {"label":"K100", "x":0, "y":1.5}, + {"label":"K101", "x":1, "y":1.5}, + {"label":"K102", "x":2, "y":1.5}, + {"label":"K103", "x":3, "y":1.5}, + {"label":"K104", "x":4, "y":1.5}, + {"label":"K105", "x":5, "y":1.5}, + {"label":"K106", "x":6, "y":1.5}, + {"label":"K107", "x":7, "y":1.5}, + {"label":"K108", "x":8, "y":1.5}, + {"label":"K109", "x":9, "y":1.5}, + {"label":"K110", "x":10, "y":1.5}, + {"label":"K111", "x":11, "y":1.5}, + {"label":"K112", "x":12, "y":1.5}, + {"label":"K013", "x":13, "y":1.5, "w":2}, + {"label":"K200", "x":0, "y":2.5, "w":1.5}, + {"label":"K201", "x":1.5, "y":2.5}, + {"label":"K202", "x":2.5, "y":2.5}, + {"label":"K203", "x":3.5, "y":2.5}, + {"label":"K204", "x":4.5, "y":2.5}, + {"label":"K205", "x":5.5, "y":2.5}, + {"label":"K206", "x":6.5, "y":2.5}, + {"label":"K207", "x":7.5, "y":2.5}, + {"label":"K208", "x":8.5, "y":2.5}, + {"label":"K209", "x":9.5, "y":2.5}, + {"label":"K210", "x":10.5, "y":2.5}, + {"label":"K211", "x":11.5, "y":2.5}, + {"label":"K212", "x":12.5, "y":2.5}, + {"label":"K300", "x":0, "y":3.5, "w":1.75}, + {"label":"K301", "x":1.75, "y":3.5}, + {"label":"K302", "x":2.75, "y":3.5}, + {"label":"K303", "x":3.75, "y":3.5}, + {"label":"K304", "x":4.75, "y":3.5}, + {"label":"K305", "x":5.75, "y":3.5}, + {"label":"K306", "x":6.75, "y":3.5}, + {"label":"K307", "x":7.75, "y":3.5}, + {"label":"K308", "x":8.75, "y":3.5}, + {"label":"K309", "x":9.75, "y":3.5}, + {"label":"K310", "x":10.75, "y":3.5}, + {"label":"K311", "x":11.75, "y":3.5}, + {"label":"K312", "x":12.75, "y":3.5}, + {"label":"K313", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"K400", "x":0, "y":4.5, "w":1.25}, + {"label":"K401", "x":1.25, "y":4.5}, + {"label":"K402", "x":2.25, "y":4.5}, + {"label":"K403", "x":3.25, "y":4.5}, + {"label":"K404", "x":4.25, "y":4.5}, + {"label":"K405", "x":5.25, "y":4.5}, + {"label":"K406", "x":6.25, "y":4.5}, + {"label":"K407", "x":7.25, "y":4.5}, + {"label":"K408", "x":8.25, "y":4.5}, + {"label":"K409", "x":9.25, "y":4.5}, + {"label":"K410", "x":10.25, "y":4.5}, + {"label":"K411", "x":11.25, "y":4.5}, + {"label":"K412", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K500", "x":0, "y":5.5, "w":1.25}, + {"label":"K501", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K502", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K507", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K510", "x":10, "y":5.5, "w":1.25}, + {"label":"K511", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K512", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K513", "x":13.75, "y":5.5, "w":1.25} + ] + }, + + "LAYOUT_iso_wkl": { + "key_count": 72, + "layout": [ + {"label":"K000", "x":0, "y":0}, + {"label":"K001", "x":2, "y":0}, + {"label":"K002", "x":3, "y":0}, + {"label":"K003", "x":4, "y":0}, + {"label":"K004", "x":5, "y":0}, + {"label":"K005", "x":6.5, "y":0}, + {"label":"K006", "x":7.5, "y":0}, + {"label":"K007", "x":8.5, "y":0}, + {"label":"K008", "x":9.5, "y":0}, + {"label":"K009", "x":11, "y":0}, + {"label":"K010", "x":12, "y":0}, + {"label":"K011", "x":13, "y":0}, + {"label":"K012", "x":14, "y":0}, + {"label":"K100", "x":0, "y":1.5}, + {"label":"K101", "x":1, "y":1.5}, + {"label":"K102", "x":2, "y":1.5}, + {"label":"K103", "x":3, "y":1.5}, + {"label":"K104", "x":4, "y":1.5}, + {"label":"K105", "x":5, "y":1.5}, + {"label":"K106", "x":6, "y":1.5}, + {"label":"K107", "x":7, "y":1.5}, + {"label":"K108", "x":8, "y":1.5}, + {"label":"K109", "x":9, "y":1.5}, + {"label":"K110", "x":10, "y":1.5}, + {"label":"K111", "x":11, "y":1.5}, + {"label":"K112", "x":12, "y":1.5}, + {"label":"K013", "x":13, "y":1.5, "w":2}, + {"label":"K200", "x":0, "y":2.5, "w":1.5}, + {"label":"K201", "x":1.5, "y":2.5}, + {"label":"K202", "x":2.5, "y":2.5}, + {"label":"K203", "x":3.5, "y":2.5}, + {"label":"K204", "x":4.5, "y":2.5}, + {"label":"K205", "x":5.5, "y":2.5}, + {"label":"K206", "x":6.5, "y":2.5}, + {"label":"K207", "x":7.5, "y":2.5}, + {"label":"K208", "x":8.5, "y":2.5}, + {"label":"K209", "x":9.5, "y":2.5}, + {"label":"K210", "x":10.5, "y":2.5}, + {"label":"K211", "x":11.5, "y":2.5}, + {"label":"K212", "x":12.5, "y":2.5}, + {"label":"K300", "x":0, "y":3.5, "w":1.75}, + {"label":"K301", "x":1.75, "y":3.5}, + {"label":"K302", "x":2.75, "y":3.5}, + {"label":"K303", "x":3.75, "y":3.5}, + {"label":"K304", "x":4.75, "y":3.5}, + {"label":"K305", "x":5.75, "y":3.5}, + {"label":"K306", "x":6.75, "y":3.5}, + {"label":"K307", "x":7.75, "y":3.5}, + {"label":"K308", "x":8.75, "y":3.5}, + {"label":"K309", "x":9.75, "y":3.5}, + {"label":"K310", "x":10.75, "y":3.5}, + {"label":"K311", "x":11.75, "y":3.5}, + {"label":"K312", "x":12.75, "y":3.5}, + {"label":"K313", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"K400", "x":0, "y":4.5, "w":1.25}, + {"label":"K401", "x":1.25, "y":4.5}, + {"label":"K402", "x":2.25, "y":4.5}, + {"label":"K403", "x":3.25, "y":4.5}, + {"label":"K404", "x":4.25, "y":4.5}, + {"label":"K405", "x":5.25, "y":4.5}, + {"label":"K406", "x":6.25, "y":4.5}, + {"label":"K407", "x":7.25, "y":4.5}, + {"label":"K408", "x":8.25, "y":4.5}, + {"label":"K409", "x":9.25, "y":4.5}, + {"label":"K410", "x":10.25, "y":4.5}, + {"label":"K411", "x":11.25, "y":4.5}, + {"label":"K412", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K500", "x":0, "y":5.5, "w":1.5}, + {"label":"K502", "x":2.5, "y":5.5, "w":1.5}, + {"label":"K507", "x":4, "y":5.5, "w":7}, + {"label":"K511", "x":11, "y":5.5, "w":1.5}, + {"label":"K513", "x":13.5, "y":5.5, "w":1.5} + ] + } + } +} + diff --git a/keyboards/toad/readme.md b/keyboards/toad/readme.md index 3f3bff5b5b31..de58f7202b64 100644 --- a/keyboards/toad/readme.md +++ b/keyboards/toad/readme.md @@ -10,5 +10,5 @@ Make examples for these keyboards (after setting up your build environment): make toad: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). -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. From 72d4e4bfd76b2c83b89787f8b3a8ba779a3e8d81 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Tue, 25 Dec 2018 04:14:57 +0900 Subject: [PATCH 024/458] Replace serial.c of quantum/split_common/ (#4669) * Add provisional Helix implementation to test the quantum/split_common. * copy keyboards/helix/serial.[ch] to quantum/split_common/ * Make serial.c a pure driver. Remove buffer name and buffer size from serial.c. They should be placed in the caller(matrix.c, split_utils.c). * remove quantum/split_common/serial_backward_compatibility.h * Changed array serial_master_buffer to structure serial_m2s_buffer. * Changed array serial_slave_buffer to structure serial_s2m_buffer. * Change keyboards/miniaxe/matrix.c I also made changes to quantum/split_comon/matrix.c to keyboards/miniaxe/matrix.c. Note: I contacted @ka2hiro, creator of miniaxe, and I got permission to change keyboards/miniaxe/matrix.c. * update history comment in quantum/split_common/serial.c * Revert "Add provisional Helix implementation to test the quantum/split_common." This reverts commit 168c82ef82c88e79979d9796bab9cc819cc2f685. * fix keyboards/miniaxe/matrix.c, quantum/split_common/matrix.c avr-gcc 4.9.[23] report error. avr-gcc 5.4.0, avr-gcc 7.3.0 pass. It is funny. * update comment quantum/split_common/serial.c * Reserve RGBLIGHT_SPLIT macro in quantum/split_common --- common_features.mk | 5 - keyboards/miniaxe/matrix.c | 59 +- quantum/split_common/matrix.c | 61 ++- quantum/split_common/matrix.h | 31 ++ quantum/split_common/serial.c | 505 ++++++++++++++---- quantum/split_common/serial.h | 65 ++- .../serial_backward_compatibility.h | 11 - quantum/split_common/split_util.c | 9 +- quantum/split_common/split_util.h | 3 - 9 files changed, 578 insertions(+), 171 deletions(-) create mode 100644 quantum/split_common/matrix.h delete mode 100644 quantum/split_common/serial_backward_compatibility.h diff --git a/common_features.mk b/common_features.mk index 73aab5d84598..883681324b04 100644 --- a/common_features.mk +++ b/common_features.mk @@ -263,11 +263,6 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - SERIAL_BACKWARD_COMPAT := $(wildcard $(QUANTUM_DIR)/split_common/serial_backward_compatibility.h) - ifneq ($(SERIAL_BACKWARD_COMPAT),) - CONFIG_H += $(SERIAL_BACKWARD_COMPAT) - # $(info CONFIG_H=$(CONFIG_H)) - endif OPT_DEFS += -DSPLIT_KEYBOARD QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ $(QUANTUM_DIR)/split_common/split_util.c diff --git a/keyboards/miniaxe/matrix.c b/keyboards/miniaxe/matrix.c index 55c458e1fb7b..5fec1281dfc6 100644 --- a/keyboards/miniaxe/matrix.c +++ b/keyboards/miniaxe/matrix.c @@ -32,9 +32,6 @@ along with this program. If not, see . #include "timer.h" #include "split_flags.h" -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif #ifdef BACKLIGHT_ENABLE # include "backlight.h" extern backlight_config_t backlight_config; @@ -55,6 +52,8 @@ along with this program. If not, see . static bool debouncing = false; #endif +#if defined(USE_I2C) || defined(EH) + #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)) @@ -62,6 +61,27 @@ along with this program. If not, see . # define ROW_SHIFTER ((uint8_t)1) #else # error "Currently only supports 8 COLS" +#endif + +#else // USE_SERIAL + +#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 + #endif static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -315,15 +335,39 @@ int i2c_transaction(void) { #else // USE_SERIAL + +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; + +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 + } +}; + +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)); } + int serial_transaction(void) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - if (serial_update_buffers()) { + if (soft_serial_transaction()) { return 1; } + // TODO: if MATRIX_COLS > 8 change to unpack() for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; + matrix[slaveOffset+i] = serial_s2m_buffer.smatrix[i]; } #ifdef RGBLIGHT_ENABLE @@ -332,7 +376,7 @@ int serial_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - serial_master_buffer[SERIAL_BACKLIT_START] = backlight_config.enable ? backlight_config.level : 0; + serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; #endif return 0; @@ -375,8 +419,9 @@ void matrix_slave_scan(void) { i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i]; } #else // USE_SERIAL + // TODO: if MATRIX_COLS > 8 change to pack() for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; + serial_s2m_buffer.smatrix[i] = matrix[offset+i]; } #endif matrix_slave_scan_user(); diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index d6359b51fb3a..2611376386fc 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -32,9 +32,6 @@ along with this program. If not, see . #include "timer.h" #include "split_flags.h" -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif #ifdef BACKLIGHT_ENABLE # include "backlight.h" extern backlight_config_t backlight_config; @@ -55,6 +52,8 @@ along with this program. If not, see . static bool debouncing = false; #endif +#if defined(USE_I2C) || defined(EH) + #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)) @@ -62,6 +61,27 @@ along with this program. If not, see . # define ROW_SHIFTER ((uint8_t)1) #else # error "Currently only supports 8 COLS" +#endif + +#else // USE_SERIAL + +#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 + #endif static matrix_row_t matrix_debouncing[MATRIX_ROWS]; @@ -286,24 +306,48 @@ int i2c_transaction(void) { #else // USE_SERIAL + +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; + +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 + } +}; + +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)); } + int serial_transaction(void) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - if (serial_update_buffers()) { + if (soft_serial_transaction()) { return 1; } + // TODO: if MATRIX_COLS > 8 change to unpack() for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; + matrix[slaveOffset+i] = serial_s2m_buffer.smatrix[i]; } - #ifdef RGBLIGHT_ENABLE + #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_master_buffer[SERIAL_BACKLIT_START] = backlight_config.enable ? backlight_config.level : 0; + serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0; #endif return 0; @@ -346,8 +390,9 @@ void matrix_slave_scan(void) { i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i]; } #else // USE_SERIAL + // TODO: if MATRIX_COLS > 8 change to pack() for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; + serial_s2m_buffer.smatrix[i] = matrix[offset+i]; } #endif matrix_slave_scan_user(); diff --git a/quantum/split_common/matrix.h b/quantum/split_common/matrix.h new file mode 100644 index 000000000000..b5cb45baed87 --- /dev/null +++ b/quantum/split_common/matrix.h @@ -0,0 +1,31 @@ +#ifndef SPLIT_COMMON_MATRIX_H +#define SPLIT_COMMON_MATRIX_H + +#include + +#ifdef RGBLIGHT_ENABLE +# include "rgblight.h" +#endif + +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 +} Serial_m2s_buffer_t; + +extern volatile Serial_m2s_buffer_t serial_m2s_buffer; + +void serial_master_init(void); +void serial_slave_init(void); + +#endif diff --git a/quantum/split_common/serial.c b/quantum/split_common/serial.c index 13e58d825904..4df8d103bd54 100644 --- a/quantum/split_common/serial.c +++ b/quantum/split_common/serial.c @@ -1,5 +1,10 @@ /* * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 */ #ifndef F_CPU @@ -9,17 +14,19 @@ #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 + #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 @@ -63,215 +70,477 @@ #error serial.c now support ATmega32U4 only #endif -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 +#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 (Experiment only) +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; +#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(void) { +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 serial_master_init(void) { - serial_output(); - serial_high(); +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 serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +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 master to synchronize timing with the slave. +// Used by the sender to synchronize timing with the reciver. +static void sync_recv(void) NO_INLINE; 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. + 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()); - serial_delay(); } -// Used by the slave to send a synchronization signal to the master. +// 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_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); +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 -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(); +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(); - } -} -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); + serial_low(); // sync_send() / senc_recv() need raise edge +} - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); +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(); - checksum += serial_slave_buffer[i]; + serial_write_chunk(data,8); } - serial_write_byte(checksum); - sync_send(); +} - // wait for the sync to finish sending - serial_delay(); +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; +} - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); +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 +} - 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]; +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; } - uint8_t checksum_received = serial_read_byte(); - sync_send(); + serial_delay_half1(); - serial_input(); // end transaction + 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 - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; + // 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 { - status &= ~SLAVE_DATA_CORRUPT; + *trans->status = TRANSACTION_ACCEPTED; } -} -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; + sync_recv(); //weit initiator output to high } -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. +///////// +// start transaction by initiator +// +// int soft_serial_transaction(int sstd_index) // // 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 +// 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 slave that we want to start a transaction + // signal to the target that we want to start a transaction serial_output(); serial_low(); - _delay_us(1); + _delay_us(SLAVE_INT_WIDTH_US); - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); +#ifndef SERIAL_USE_MULTI_TRANSACTION + // wait for the target response + serial_input_with_pullup(); + _delay_us(SLAVE_INT_RESPONSE_TIME); - // check if the slave is present + // check if the target is present if (serial_read_pin()) { - // slave failed to pull the line low, assume not present + // target failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; sei(); - return 1; + return TRANSACTION_NO_RESPONSE; } - // 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]; +#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); } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - if (checksum_computed != checksum_received) { - sei(); - return 1; + // 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 - 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]; + // 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); } - serial_write_byte(checksum); - sync_recv(); // always, release the line when not in use - serial_output(); - serial_high(); + sync_send(); + *trans->status = TRANSACTION_END; sei(); - return 0; + return TRANSACTION_END; } -#endif /* SOFT_SERIAL_PIN */ +#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/quantum/split_common/serial.h b/quantum/split_common/serial.h index 0b99f352d097..b6638b3bdee9 100644 --- a/quantum/split_common/serial.h +++ b/quantum/split_common/serial.h @@ -1,5 +1,5 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H +#ifndef SOFT_SERIAL_H +#define SOFT_SERIAL_H #include @@ -7,20 +7,59 @@ // Need Soft Serial defines in config.h // ///////////////////////////////////////////////////////////////// // ex. -// /* Configuration of lower interface with the lower layer(hardware) of serial.c */ // #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 // -// /* Configuration of upper interface with the upper layer of serial.c */ -// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -// #define SERIAL_MASTER_BUFFER_LENGTH 1 +// //// USE simple API (using signle-type transaction function) +// /* nothing */ +// //// USE flexible API (using multi-type transaction function) +// #define SERIAL_USE_MULTI_TRANSACTION +// +// ///////////////////////////////////////////////////////////////// -// 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]; +// 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)) -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); +// 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/quantum/split_common/serial_backward_compatibility.h b/quantum/split_common/serial_backward_compatibility.h deleted file mode 100644 index 216b6c41ffb1..000000000000 --- a/quantum/split_common/serial_backward_compatibility.h +++ /dev/null @@ -1,11 +0,0 @@ -/* serial.h backward compatibility */ - -// #ifndef SOFT_SERIAL_PIN -// #define SOFT_SERIAL_PIN D0 -// #endif - -#ifndef SERIAL_SLAVE_BUFFER_LENGTH - #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 - #define SERIAL_MASTER_BUFFER_LENGTH 1 -#endif - diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 56077e4f2023..e4475c535675 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -11,9 +11,6 @@ #include "timer.h" #include "split_flags.h" -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif #ifdef BACKLIGHT_ENABLE # include "backlight.h" #endif @@ -24,8 +21,6 @@ #if defined(USE_I2C) || defined(EH) # include "i2c.h" -#else -# include "serial.h" #endif volatile bool isLeftHand = true; @@ -112,7 +107,7 @@ void keyboard_slave_loop(void) { BACKLIT_DIRTY = false; } #else // USE_SERIAL - backlight_set(serial_master_buffer[SERIAL_BACKLIT_START]); + backlight_set(serial_m2s_buffer.backlight_level); #endif #endif // Read RGB Info @@ -137,7 +132,9 @@ void keyboard_slave_loop(void) { sei(); } #else // USE_SERIAL + #ifdef RGBLIGHT_SPLIT // Add serial implementation for RGB here + #endif #endif #endif } diff --git a/quantum/split_common/split_util.h b/quantum/split_common/split_util.h index 45e8db0f2fed..d6cf3e72a9dd 100644 --- a/quantum/split_common/split_util.h +++ b/quantum/split_common/split_util.h @@ -7,9 +7,6 @@ #include #include "eeconfig.h" -// backlight level store index in serial_master_buffer[] for slave to read -#define SERIAL_BACKLIT_START 0x00 - #define SLAVE_I2C_ADDRESS 0x32 extern volatile bool isLeftHand; From 41dee98ec4d621c04541628bda70f06e703eab34 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 24 Dec 2018 14:27:35 -0800 Subject: [PATCH 025/458] Redox: Configurator bugfix (#4721) --- keyboards/redox/info.json | 87 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/keyboards/redox/info.json b/keyboards/redox/info.json index f75d88a6beeb..f91017365a28 100644 --- a/keyboards/redox/info.json +++ b/keyboards/redox/info.json @@ -6,7 +6,92 @@ "height": 6.25, "layouts": { "LAYOUT": { - "layout": [{"label":"[L2] `", "x":0, "y":0.375, "w":1.25}, {"label":"!", "x":1.25, "y":0.375}, {"label":"@", "x":2.25, "y":0.125}, {"label":"#", "x":3.25, "y":0}, {"label":"$", "x":4.25, "y":0.125}, {"label":"%", "x":5.25, "y":0.25}, {"label":"[L1]", "x":6.25, "y":0.75}, {"label":"[L1]", "x":11.25, "y":0.75}, {"label":"^", "x":12.25, "y":0.25}, {"label":"&", "x":13.25, "y":0.125}, {"label":"*", "x":14.25, "y":0}, {"label":"(", "x":15.25, "y":0.125}, {"label":")", "x":16.25, "y":0.375}, {"label":"[L2] -", "x":17.25, "y":0.375, "w":1.25}, {"label":"Tab", "x":0, "y":1.375, "w":1.25}, {"label":"Q", "x":1.25, "y":1.375}, {"label":"W", "x":2.25, "y":1.125}, {"label":"E", "x":3.25, "y":1}, {"label":"R", "x":4.25, "y":1.125}, {"label":"T", "x":5.25, "y":1.25}, {"label":"[", "x":6.25, "y":1.75, "h":1.5}, {"label":"]", "x":11.25, "y":1.75, "h":1.5}, {"label":"Y", "x":12.25, "y":1.25}, {"label":"U", "x":13.25, "y":1.125}, {"label":"I", "x":14.25, "y":1}, {"label":"O", "x":15.25, "y":1.125}, {"label":"P", "x":16.25, "y":1.375}, {"label":"=", "x":17.25, "y":1.375, "w":1.25}, {"label":"Esc", "x":0, "y":2.375, "w":1.25}, {"label":"A", "x":1.25, "y":2.375}, {"label":"S", "x":2.25, "y":2.125}, {"label":"D", "x":3.25, "y":2}, {"label":"F", "x":4.25, "y":2.125}, {"label":"G", "x":5.25, "y":2.25}, {"label":"PgUp", "x":6.75, "y":3.75}, {"label":"End", "x":10.75, "y":3.75}, {"label":"H", "x":12.25, "y":2.25}, {"label":"J", "x":13.25, "y":2.125}, {"label":"K", "x":14.25, "y":2}, {"label":"L", "x":15.25, "y":2.125}, {"label":":", "x":16.25, "y":2.375}, {"label":"'", "x":17.25, "y":2.375, "w":1.25}, {"label":"Shift", "x":0, "y":3.375, "w":1.25}, {"label":"Z", "x":1.25, "y":3.375}, {"label":"X", "x":2.25, "y":3.125}, {"label":"C", "x":3.25, "y":3}, {"label":"V", "x":4.25, "y":3.125}, {"label":"B", "x":5.25, "y":3.25}, {"label":"PgDn", "x":7.75, "y":3.75}, {"label":"Home", "x":9.75, "y":3.75}, {"label":"N", "x":12.25, "y":3.25}, {"label":"M", "x":13.25, "y":3.125}, {"label":"<", "x":14.25, "y":3}, {"label":">", "x":15.25, "y":3.125}, {"label":"?", "x":16.25, "y":3.375}, {"label":"Shift", "x":17.25, "y":3.375, "w":1.25}, {"label":"GUI", "x":0.25, "y":4.375}, {"label":"+", "x":1.25, "y":4.375}, {"label":"-", "x":2.25, "y":4.125}, {"label":"[Alt] *", "x":3.25, "y":4}, {"label":"[Ctrl] /", "x":5.5, "y":5.25, "w":1.25}, {"label":"Backspace", "x":6.75, "y":4.75, "h":1.5}, {"label":"Del", "x":7.75, "y":4.75, "h":1.5}, {"label":"Enter", "x":9.75, "y":4.75, "h":1.5}, {"label":"Space", "x":10.75, "y":4.75, "h":1.5}, {"label":"Alt", "x":11.75, "y":5.25, "w":1.25}, {"label":"Left", "x":14.25, "y":4}, {"label":"Down", "x":15.25, "y":4.125}, {"label":"Up", "x":16.25, "y":4.375}, {"label":"Right", "x":17.25, "y":4.375}] + "layout": [ + {"label":"_Nav || `", "x":0, "y":0.375, "w":1.25}, + {"label":"1", "x":1.25, "y":0.375}, + {"label":"2", "x":2.25, "y":0.125}, + {"label":"3", "x":3.25, "y":0}, + {"label":"4", "x":4.25, "y":0.125}, + {"label":"5", "x":5.25, "y":0.25}, + + {"label":"6", "x":12.25, "y":0.25}, + {"label":"7", "x":13.25, "y":0.125}, + {"label":"8", "x":14.25, "y":0}, + {"label":"9", "x":15.25, "y":0.125}, + {"label":"0", "x":16.25, "y":0.375}, + {"label":"_Nav || -", "x":17.25, "y":0.375, "w":1.25}, + + {"label":"Tab", "x":0, "y":1.375, "w":1.25}, + {"label":"Q", "x":1.25, "y":1.375}, + {"label":"W", "x":2.25, "y":1.125}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1.125}, + {"label":"T", "x":5.25, "y":1.25}, + {"label":"MO(_SYMB)", "x":6.25, "y":0.75}, + + {"label":"MO(_SYMB)", "x":11.25, "y":0.75}, + {"label":"Y", "x":12.25, "y":1.25}, + {"label":"U", "x":13.25, "y":1.125}, + {"label":"I", "x":14.25, "y":1}, + {"label":"O", "x":15.25, "y":1.125}, + {"label":"P", "x":16.25, "y":1.375}, + {"label":"=", "x":17.25, "y":1.375, "w":1.25}, + + {"label":"Esc", "x":0, "y":2.375, "w":1.25}, + {"label":"A", "x":1.25, "y":2.375}, + {"label":"S", "x":2.25, "y":2.125}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2.125}, + {"label":"G", "x":5.25, "y":2.25}, + {"label":"[", "x":6.25, "y":1.75, "h":1.5}, + + {"label":"]", "x":11.25, "y":1.75, "h":1.5}, + {"label":"H", "x":12.25, "y":2.25}, + {"label":"J", "x":13.25, "y":2.125}, + {"label":"K", "x":14.25, "y":2}, + {"label":"L", "x":15.25, "y":2.125}, + {"label":";", "x":16.25, "y":2.375}, + {"label":"'", "x":17.25, "y":2.375, "w":1.25}, + + {"label":"Shift", "x":0, "y":3.375, "w":1.25}, + {"label":"Z", "x":1.25, "y":3.375}, + {"label":"X", "x":2.25, "y":3.125}, + {"label":"C", "x":3.25, "y":3}, + {"label":"V", "x":4.25, "y":3.125}, + {"label":"B", "x":5.25, "y":3.25}, + + {"label":"_Adjust/Page Up", "x":6.75, "y":3.75}, + {"label":"Page Down", "x":7.75, "y":3.75}, + + {"label":"Home", "x":9.75, "y":3.75}, + {"label":"_Adjust/End", "x":10.75, "y":3.75}, + + {"label":"N", "x":12.25, "y":3.25}, + {"label":"M", "x":13.25, "y":3.125}, + {"label":",", "x":14.25, "y":3}, + {"label":",", "x":15.25, "y":3.125}, + {"label":"\\", "x":16.25, "y":3.375}, + {"label":"Shift", "x":17.25, "y":3.375, "w":1.25}, + + {"label":"LGUI", "x":0.25, "y":4.375}, + {"label":"P+", "x":1.25, "y":4.375}, + {"label":"P-", "x":2.25, "y":4.125}, + {"label":"LAlt || P*", "x":3.25, "y":4}, + + {"label":"LCtrl || P/", "x":5.5, "y":5.25, "w":1.25}, + {"label":"Backspace", "x":6.75, "y":4.75, "h":1.5}, + {"label":"Delete", "x":7.75, "y":4.75, "h":1.5}, + + {"label":"Enter", "x":9.75, "y":4.75, "h":1.5}, + {"label":"Space", "x":10.75, "y":4.75, "h":1.5}, + {"label":"RAlt", "x":11.75, "y":5.25, "w":1.25}, + + {"label":"Left", "x":14.25, "y":4}, + {"label":"Down", "x":15.25, "y":4.125}, + {"label":"Up", "x":16.25, "y":4.375}, + {"label":"Right", "x":17.25, "y":4.375} + ] } } } + From 08e9fc142c89e783fdad3ecda0639bdf5c2e4c50 Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Mon, 24 Dec 2018 14:49:03 -0800 Subject: [PATCH 026/458] Add tsangan layout to dz60 with a "sane" default keymap (#4717) --- keyboards/dz60/dz60.h | 27 ++++++++++++++++++ keyboards/dz60/info.json | 4 +++ keyboards/dz60/keymaps/60_tsangan/keymap.c | 32 ++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 keyboards/dz60/keymaps/60_tsangan/keymap.c diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index 50e80bed8f9b..202bd1db4d4d 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -332,6 +332,33 @@ { k40, k41, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d, k4e } \ } +/* LAYOUT_60_tsangan + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │ 0e │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┤ + * │40 │41 │43 │46 (7u) │4b │4d │4e │ + * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ +*/ +#define LAYOUT_60_tsangan( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, 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, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \ + k40, k41, k43, k46, k4b, k4d, k4e \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, 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, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k4b, KC_NO, k4d, k4e } \ +} + /* LAYOUT_60_tsangan_hhkb * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │0e │ diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index d1139fd1fe9f..6a30234962a8 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -53,6 +53,10 @@ "key_count": 67, "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"1", "x":1, "y":0}, {"label":"2", "x":2, "y":0}, {"label":"3", "x":3, "y":0}, {"label":"4", "x":4, "y":0}, {"label":"5", "x":5, "y":0}, {"label":"6", "x":6, "y":0}, {"label":"7", "x":7, "y":0}, {"label":"8", "x":8, "y":0}, {"label":"9", "x":9, "y":0}, {"label":"0", "x":10, "y":0}, {"label":"-", "x":11, "y":0}, {"label":"=", "x":12, "y":0}, {"x":13, "y":0}, {"label":"Back Space", "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":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":";", "x":10.75, "y":2}, {"label":"'", "x":11.75, "y":2}, {"label":"#", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"\\", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":",", "x":9.25, "y":3}, {"label":".", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"Up", "x":13, "y":3}, {"label":"Del", "x":14, "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":2.25}, {"label":"Space", "x":6, "y":4, "w":1.25}, {"label":"Space", "x":7.25, "y":4, "w":2.75}, {"label":"AltGr", "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}] }, + "LAYOUT_60_tsangan": { + "keycount": 61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, "LAYOUT_60_tsangan_hhkb": { "key_count": 62, "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":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] diff --git a/keyboards/dz60/keymaps/60_tsangan/keymap.c b/keyboards/dz60/keymaps/60_tsangan/keymap.c new file mode 100644 index 000000000000..dfbc51dd9994 --- /dev/null +++ b/keyboards/dz60/keymaps/60_tsangan/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_tsangan( + 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, MO(_FL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + [_FL] = LAYOUT_60_tsangan( + 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_UP, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, KC_PGDN, _______, _______, + _______, _______, _______, _______, _______, MO(_CL), _______ + ), + [_CL] = LAYOUT_60_tsangan( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ) +}; From de78d9e1ffbeff34991413641c794a36e9fc5f9d Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Tue, 25 Dec 2018 13:42:48 -0500 Subject: [PATCH 027/458] Chibios_test/stm32_f072_onekey: Add support for reset to bootloader (#4238) * Add support for reset to bootloader Chibios_test/STM32_F072_ONEKEY wouldn't reset to bootloader on a compatible Discovery board because the Chibios library board file was lacking the __early_init(void) function necessary to read the magic key. Borrowed code from Clueboard 60, tested working. * Remove board.chcfg --- .../boards/ST_STM32F072B_DISCOVERY/board.c | 111 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 923 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + 3 files changed, 1039 insertions(+) create mode 100644 keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.mk diff --git a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..7e9f90853e3e --- /dev/null +++ b/keyboards/chibios_test/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) { +} diff --git a/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..173f7b60542b --- /dev/null +++ b/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,923 @@ +/* + 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: LSE not fitted. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#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/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/chibios_test/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/chibios_test/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 From 8e0444618fdf42301cce4467aea6de63bec3cfed Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 25 Dec 2018 11:24:47 -0800 Subject: [PATCH 028/458] XMMX refactor, Configurator support and readme update (#4722) * XMMX: matrix and keymap refactor - xmmx.h updated to use #pragma once - renamed LAYOUT_ansi_wk macro to LAYOUT_tkl_ansi - renamed LAYOUT_ansi_wkl macro to LAYOUT_tkl_ansi_wkl - renamed LAYOUT_iso_wk macro to LAYOUT_tkl_iso - renamed LAYOUT_iso_wkl macro to LAYOUT_tkl_iso_wkl * XMMX: Configurator support * XMMX: readme update --- keyboards/xmmx/info.json | 475 +++++++++++++++++++++++ keyboards/xmmx/keymaps/ansi_wk/keymap.c | 7 +- keyboards/xmmx/keymaps/ansi_wkl/keymap.c | 7 +- keyboards/xmmx/keymaps/default/keymap.c | 7 +- keyboards/xmmx/keymaps/iso_wk/keymap.c | 7 +- keyboards/xmmx/keymaps/iso_wkl/keymap.c | 7 +- keyboards/xmmx/readme.md | 10 +- keyboards/xmmx/xmmx.h | 12 +- 8 files changed, 505 insertions(+), 27 deletions(-) create mode 100644 keyboards/xmmx/info.json diff --git a/keyboards/xmmx/info.json b/keyboards/xmmx/info.json new file mode 100644 index 000000000000..28bd06bbf985 --- /dev/null +++ b/keyboards/xmmx/info.json @@ -0,0 +1,475 @@ +{ + "keyboard_name": "XMMX", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "key_count": 96, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Back Space", "x":13, "y":1.5}, + {"label":"Back Space", "x":14, "y":1.5}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"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":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":3.5, "w":1.25}, + {"x":15.25, "y":3.5}, + {"x":16.25, "y":3.5}, + {"x":17.25, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, + {"label":"Fn", "x":14, "y":4.5}, + {"x":15.25, "y":4.5}, + {"label":"Up", "x":16.25, "y":4.5}, + {"x":17.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi": { + "key_count": 87, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"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":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_ansi_wkl": { + "key_count": 84, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"~", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"@", "x":2, "y":1.5}, + {"label":"#", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"|", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"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":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":4, "y":5.5, "w":7}, + {"label":"Alt", "x":11, "y":5.5, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso": { + "key_count": 88, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"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":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"Win", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + }, + "LAYOUT_tkl_iso_wkl": { + "key_count": 85, + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"\u00ac", "x":0, "y":1.5}, + {"label":"!", "x":1, "y":1.5}, + {"label":"\"", "x":2, "y":1.5}, + {"label":"\u00a3", "x":3, "y":1.5}, + {"label":"$", "x":4, "y":1.5}, + {"label":"%", "x":5, "y":1.5}, + {"label":"^", "x":6, "y":1.5}, + {"label":"&", "x":7, "y":1.5}, + {"label":"*", "x":8, "y":1.5}, + {"label":"(", "x":9, "y":1.5}, + {"label":")", "x":10, "y":1.5}, + {"label":"_", "x":11, "y":1.5}, + {"label":"+", "x":12, "y":1.5}, + {"label":"Backspace", "x":13, "y":1.5, "w":2}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"PgUp", "x":17.25, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"{", "x":11.5, "y":2.5}, + {"label":"}", "x":12.5, "y":2.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"PgDn", "x":17.25, "y":2.5}, + {"label":"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":"~", "x":12.75, "y":3.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"|", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":"<", "x":9.25, "y":4.5}, + {"label":">", "x":10.25, "y":4.5}, + {"label":"?", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.5}, + {"label":"Space", "x":4, "y":5.5, "w":7}, + {"label":"AltGr", "x":11, "y":5.5, "w":1.5}, + {"label":"Ctrl", "x":13.5, "y":5.5, "w":1.5}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5} + ] + } + } +} + diff --git a/keyboards/xmmx/keymaps/ansi_wk/keymap.c b/keyboards/xmmx/keymaps/ansi_wk/keymap.c index abdba99ba79d..213f65a4a262 100644 --- a/keyboards/xmmx/keymaps/ansi_wk/keymap.c +++ b/keyboards/xmmx/keymaps/ansi_wk/keymap.c @@ -2,12 +2,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_ansi_wk( - 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, \ + LAYOUT_tkl_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_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,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) + ) }; + diff --git a/keyboards/xmmx/keymaps/ansi_wkl/keymap.c b/keyboards/xmmx/keymaps/ansi_wkl/keymap.c index aeb61ff2cabb..d566f1a21014 100644 --- a/keyboards/xmmx/keymaps/ansi_wkl/keymap.c +++ b/keyboards/xmmx/keymaps/ansi_wkl/keymap.c @@ -2,12 +2,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_ansi_wkl( - 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, \ + LAYOUT_tkl_ansi_wkl( + 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_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) + ) }; + diff --git a/keyboards/xmmx/keymaps/default/keymap.c b/keyboards/xmmx/keymaps/default/keymap.c index a7522fe25a27..a4c38cd54ee0 100644 --- a/keyboards/xmmx/keymaps/default/keymap.c +++ b/keyboards/xmmx/keymaps/default/keymap.c @@ -2,12 +2,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - 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, \ + 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_NUHS, KC_ENT, KC_NO, KC_NO, KC_NO, \ 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_RSFT, KC_NO, KC_UP, KC_NO, \ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) + ) }; + diff --git a/keyboards/xmmx/keymaps/iso_wk/keymap.c b/keyboards/xmmx/keymaps/iso_wk/keymap.c index 882cb224a601..a71795ccf0a8 100644 --- a/keyboards/xmmx/keymaps/iso_wk/keymap.c +++ b/keyboards/xmmx/keymaps/iso_wk/keymap.c @@ -2,12 +2,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_iso_wk( - 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, \ + LAYOUT_tkl_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_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_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_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_UP, \ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) + ) }; + diff --git a/keyboards/xmmx/keymaps/iso_wkl/keymap.c b/keyboards/xmmx/keymaps/iso_wkl/keymap.c index 18ba79e1f951..d40257177dde 100644 --- a/keyboards/xmmx/keymaps/iso_wkl/keymap.c +++ b/keyboards/xmmx/keymaps/iso_wkl/keymap.c @@ -2,12 +2,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT_iso_wkl( - 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, \ + LAYOUT_tkl_iso_wkl( + 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_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_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_UP, \ KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT - ) + ) }; + diff --git a/keyboards/xmmx/readme.md b/keyboards/xmmx/readme.md index 8f94df4b92f7..51775f241490 100644 --- a/keyboards/xmmx/readme.md +++ b/keyboards/xmmx/readme.md @@ -1,14 +1,14 @@ # XMMX -XMMX: Tenkeyless Mechanical Keyboard PCB designed to fit Filco Majestouch TKL and Cooler Master Quickfire Rapid cases +XMMX is a Tenkeyless Mechanical Keyboard PCB designed to fit Filco Majestouch TKL and Cooler Master Quickfire Rapid cases. -XMMX schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/XMMX-0447d28c1e4644b88fd04905d983684d) +XMMX schematic and PCB are available opensource under Creative Commons BY-SA 3.0 license on EasyEDA at [this link](https://easyeda.com/farmakon/XMMX-0447d28c1e4644b88fd04905d983684d). -For more informations on the XMMX please visit this [geekhack.org thread](https://geekhack.org/index.php?topic=93422.0) +For more informations on the XMMX please visit [this geekhack.org thread](https://geekhack.org/index.php?topic=93422.0). -Make examples for these keyboards (after setting up your build environment): +Make example for this keyboard (after setting up your build environment): make xmmx: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). -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/xmmx/xmmx.h b/keyboards/xmmx/xmmx.h index 22d0f1480d8d..82c3fb5882a6 100644 --- a/keyboards/xmmx/xmmx.h +++ b/keyboards/xmmx/xmmx.h @@ -1,5 +1,4 @@ -#ifndef XMMX -#define XMMX +#pragma once #include "quantum.h" @@ -21,7 +20,7 @@ } // 80% keyboard: ANSI Winkey -#define LAYOUT_ansi_wk( \ +#define LAYOUT_tkl_ansi( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ @@ -38,7 +37,7 @@ } // 80% keyboard: ANSI Winkeyless -#define LAYOUT_ansi_wkl( \ +#define LAYOUT_tkl_ansi_wkl( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, \ @@ -55,7 +54,7 @@ } // 80% keyboard: ISO Winkey -#define LAYOUT_iso_wk( \ +#define LAYOUT_tkl_iso( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ @@ -72,7 +71,7 @@ } // 80% keyboard: ISO Winkeyless -#define LAYOUT_iso_wkl( \ +#define LAYOUT_tkl_iso_wkl( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, K016, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, \ @@ -88,4 +87,3 @@ { K500, KC_NO,K502, KC_NO,KC_NO,KC_NO,KC_NO,K507, KC_NO,KC_NO,KC_NO,K511, KC_NO,K513, K514, K515, K516 } \ } -#endif From ee1be3e5b5a0259cc7d1c7a126ff7451acf3d6cb Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Tue, 25 Dec 2018 16:40:53 -0800 Subject: [PATCH 029/458] Improve diagnostics for build hashes --- .travis.yml | 3 ++- util/travis_compiled_push.sh | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7ff4060ab7c6..6cfc9e067ec8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,7 @@ install: before_script: - avr-gcc --version script: +- git rev-parse --short HEAD - make test:all AUTOGEN=false - bash util/travis_build.sh - bash util/travis_docs.sh @@ -33,7 +34,7 @@ addons: - diffutils - dos2unix - doxygen -after_success: +after_success: bash util/travis_compiled_push.sh notifications: webhooks: diff --git a/util/travis_compiled_push.sh b/util/travis_compiled_push.sh index a49908c71e47..66b3beb6cef5 100755 --- a/util/travis_compiled_push.sh +++ b/util/travis_compiled_push.sh @@ -8,6 +8,7 @@ TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE:-HEAD~1..HEAD}" set -o errexit -o nounset rev=$(git rev-parse --short HEAD) +echo "Using git hash ${rev}" if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]] ; then @@ -34,7 +35,7 @@ increment_version () part[2]=$((part[2] + 1)) new="${part[*]}" echo -e "${new// /.}" -} +} git diff --name-only -n 1 ${TRAVIS_COMMIT_RANGE} @@ -63,7 +64,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then ssh-add -D eval `ssh-agent -s` ssh-add id_rsa_qmk.fm - + # don't delete files in case not all keyboards are built # rm -f compiled/*.hex @@ -74,7 +75,7 @@ if [[ "$TRAVIS_COMMIT_MESSAGE" != *"[skip build]"* ]] ; then for file in ../qmk_firmware/keyboards/*/*/*/*/keymaps/*/*_default.hex; do mv -v "$file" "compiled/${file##*/}" || true; done bash _util/generate_keyboard_page.sh git add -A - git commit -m "generated from qmk/qmk_firmware@${rev}" + git commit -m "generated from qmk/qmk_firmware@${rev}" git push git@github.com:qmk/qmk.fm.git fi From b7d2a9f980be009f5d40950cf649ce1086b821a9 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 26 Dec 2018 07:55:42 -0800 Subject: [PATCH 030/458] S65-Plus: refactor and Configurator support (#4725) - s65_plus.h updated to #pragma once method - added info.json file --- keyboards/s65_plus/info.json | 92 +++++++++++++++++++++++++++++++++++ keyboards/s65_plus/s65_plus.h | 4 +- 2 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 keyboards/s65_plus/info.json diff --git a/keyboards/s65_plus/info.json b/keyboards/s65_plus/info.json new file mode 100644 index 000000000000..589269db9936 --- /dev/null +++ b/keyboards/s65_plus/info.json @@ -0,0 +1,92 @@ +{ + "keyboard_name": "S65-Plus", + "url": "", + "maintainer": "qmk", + "width": 18, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"ESC", "x":2, "y":0}, + {"label":"1", "x":3, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"7", "x":9, "y":0}, + {"label":"8", "x":10, "y":0}, + {"label":"9", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"MINUS", "x":13, "y":0}, + {"label":"EQUAL", "x":14, "y":0}, + {"label":"BACKSPACE", "x":15, "y":0, "w":2}, + {"label":"DELETE", "x":17, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"TAB", "x":2, "y":1, "w":1.5}, + {"label":"Q", "x":3.5, "y":1}, + {"label":"W", "x":4.5, "y":1}, + {"label":"E", "x":5.5, "y":1}, + {"label":"R", "x":6.5, "y":1}, + {"label":"T", "x":7.5, "y":1}, + {"label":"Y", "x":8.5, "y":1}, + {"label":"U", "x":9.5, "y":1}, + {"label":"I", "x":10.5, "y":1}, + {"label":"O", "x":11.5, "y":1}, + {"label":"P", "x":12.5, "y":1}, + {"label":"LBRACKET", "x":13.5, "y":1}, + {"label":"RBRACKET", "x":14.5, "y":1}, + {"label":"BACKSLASH", "x":15.5, "y":1, "w":1.5}, + {"label":"PAGEUP", "x":17, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"CAPSLOCK", "x":2, "y":2, "w":1.75}, + {"label":"A", "x":3.75, "y":2}, + {"label":"S", "x":4.75, "y":2}, + {"label":"D", "x":5.75, "y":2}, + {"label":"F", "x":6.75, "y":2}, + {"label":"G", "x":7.75, "y":2}, + {"label":"H", "x":8.75, "y":2}, + {"label":"J", "x":9.75, "y":2}, + {"label":"K", "x":10.75, "y":2}, + {"label":"L", "x":11.75, "y":2}, + {"label":"SEMICOLON", "x":12.75, "y":2}, + {"label":"QUOTE", "x":13.75, "y":2}, + {"label":"ENTER", "x":14.75, "y":2, "w":2.25}, + {"label":"PAGEDOWN", "x":17, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"LSHIFT", "x":2, "y":3, "w":2.25}, + {"label":"Z", "x":4.25, "y":3}, + {"label":"X", "x":5.25, "y":3}, + {"label":"C", "x":6.25, "y":3}, + {"label":"V", "x":7.25, "y":3}, + {"label":"B", "x":8.25, "y":3}, + {"label":"N", "x":9.25, "y":3}, + {"label":"M", "x":10.25, "y":3}, + {"label":"COMMA", "x":11.25, "y":3}, + {"label":"PERIOD", "x":12.25, "y":3}, + {"label":"SLASH", "x":13.25, "y":3}, + {"label":"RSHIFT", "x":14.25, "y":3, "w":1.75}, + {"label":"UP", "x":16, "y":3}, + {"label":"END", "x":17, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"LCTRL", "x":2, "y":4, "w":1.25}, + {"label":"LGUI", "x":3.25, "y":4, "w":1.25}, + {"label":"LALT", "x":4.5, "y":4, "w":1.25}, + {"label":"SPACE", "x":5.75, "y":4, "w":6.25}, + {"label":"RALT", "x":12, "y":4}, + {"label":"FN", "x":13, "y":4}, + {"label":"RCTRL", "x":14, "y":4}, + {"label":"LEFT", "x":15, "y":4}, + {"label":"DOWN", "x":16, "y":4}, + {"label":"RIGHT", "x":17, "y":4} + ] + } + } +} + diff --git a/keyboards/s65_plus/s65_plus.h b/keyboards/s65_plus/s65_plus.h index 2ff445f6c963..107557108578 100644 --- a/keyboards/s65_plus/s65_plus.h +++ b/keyboards/s65_plus/s65_plus.h @@ -1,5 +1,4 @@ -#ifndef S60PLUS_H -#define S60PLUS_H +#pragma once #include "quantum.h" @@ -20,4 +19,3 @@ void matrix_init_user(void); void matrix_scan_user(void); -#endif From 0c1256e60ab430402ad5dcd11f2368bb065fa958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 26 Dec 2018 17:01:26 +0100 Subject: [PATCH 031/458] Read user input properly in linux_install.sh for Gentoo (#4395) * Change spaces to tabs on two lines The rest of the file uses tabs * Read user input in a non-terrible, non-hacky way * Remove unnecessary tee call * read -p is not POSIX * Add missing $ to echo GENTOO_WARNING * Replace non-POSIX echo -n with printf * Use cd ... || exit 1 in case git clone fails * Add missing sudo Thanks @snortwolf * Undo replacing tee with >> --- util/linux_install.sh | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/util/linux_install.sh b/util/linux_install.sh index 70b389c0da54..d6e6b86cdc4f 100755 --- a/util/linux_install.sh +++ b/util/linux_install.sh @@ -32,7 +32,7 @@ if grep ID /etc/os-release | grep -qE "fedora"; then elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true - export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN + export DEBIAN_FRONTEND DEBCONF_NONINTERACTIVE_SEEN sudo apt-get update sudo apt-get install \ build-essential \ @@ -70,20 +70,18 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then wget \ zip git clone https://aur.archlinux.org/dfu-programmer.git /tmp/dfu-programmer - cd /tmp/dfu-programmer + cd /tmp/dfu-programmer || exit 1 makepkg -sic rm -rf /tmp/dfu-programmer/ elif grep ID /etc/os-release | grep -q gentoo; then - echo GENTOO_WARNING | fmt - echo -n "Proceed (y/N)? " - old_stty_cfg=$(stty -g) - stty raw -echo - answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done ) - stty $old_stty_cfg - if echo "$answer" | grep -iq "^y" ;then + echo "$GENTOO_WARNING" | fmt + printf "\nProceed (y/N)? " + read -r answer + if echo "$answer" | grep -iq "^y"; then sudo touch /etc/portage/package.use/qmkfirmware - echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware > /dev/null + # tee is used here since sudo doesn't apply to >> + echo "sys-devel/gcc multilib" | sudo tee --append /etc/portage/package.use/qmkfirmware >/dev/null sudo emerge -auN \ app-arch/unzip \ app-arch/zip \ From cfba2165413796da0e657675c67e40a8683e6107 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 27 Dec 2018 08:37:29 -0800 Subject: [PATCH 032/458] S65-Plus: fix layout macro name in info.json (#4728) --- keyboards/s65_plus/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/s65_plus/info.json b/keyboards/s65_plus/info.json index 589269db9936..14c5b08d911b 100644 --- a/keyboards/s65_plus/info.json +++ b/keyboards/s65_plus/info.json @@ -5,7 +5,7 @@ "width": 18, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_ansi": { "layout": [ {"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, From 3744a2b641628c8e1646ce743c07934314357c51 Mon Sep 17 00:00:00 2001 From: Jumail Mundekkat Date: Fri, 28 Dec 2018 03:40:33 +1100 Subject: [PATCH 033/458] Added Skog TKL support (#4727) * Added Skog TKL support * Updated manufacturer/product name --- keyboards/skog/README.md | 61 ++++ keyboards/skog/backlight.c | 211 +++++++++++++ keyboards/skog/backlight_custom.h | 13 + keyboards/skog/breathing_custom.h | 140 +++++++++ keyboards/skog/config.h | 42 +++ keyboards/skog/i2c.c | 106 +++++++ keyboards/skog/i2c.h | 25 ++ keyboards/skog/info.json | 12 + keyboards/skog/keymaps/default/keymap.c | 37 +++ keyboards/skog/matrix.c | 112 +++++++ keyboards/skog/rules.mk | 55 ++++ keyboards/skog/skog.c | 98 ++++++ keyboards/skog/skog.h | 39 +++ keyboards/skog/usbconfig.h | 396 ++++++++++++++++++++++++ 14 files changed, 1347 insertions(+) create mode 100644 keyboards/skog/README.md create mode 100644 keyboards/skog/backlight.c create mode 100644 keyboards/skog/backlight_custom.h create mode 100644 keyboards/skog/breathing_custom.h create mode 100644 keyboards/skog/config.h create mode 100644 keyboards/skog/i2c.c create mode 100644 keyboards/skog/i2c.h create mode 100644 keyboards/skog/info.json create mode 100644 keyboards/skog/keymaps/default/keymap.c create mode 100644 keyboards/skog/matrix.c create mode 100644 keyboards/skog/rules.mk create mode 100644 keyboards/skog/skog.c create mode 100644 keyboards/skog/skog.h create mode 100644 keyboards/skog/usbconfig.h diff --git a/keyboards/skog/README.md b/keyboards/skog/README.md new file mode 100644 index 000000000000..51a792b6bd22 --- /dev/null +++ b/keyboards/skog/README.md @@ -0,0 +1,61 @@ +Skog TKL by Percent +========================== + +Keyboard Maintainer: QMK Community +Hardware Supported: Skog PCB +Hardware Availability: https://geekhack.org/index.php?topic=87953.0 + +Make example for this keyboard (after setting up your build environment): + + make skog:default + +## Setting the board to bootloader mode + +If you're lucky, the programming script does this automagically for you. If +however this doesn't work for you, you need to enter the bootloader mode manually +by plugging the keyboard in while holding the bootloader key. If you did this +correctly the LEDs will blink and you'll be able to flash your firmware. + +The bootloader key is in the top-right (Pause). + +## Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD`https://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). + +## Troubleshooting + +From my experience, it's really hard to brick these boards. But these +tricks have been useful when it got stuck in a weird scenario. + +1. Try plugging the board in while holding the bootloader key. This will force + it to boot only the bootloader without loading the firmware. Once this is + done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly + to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/skog/backlight.c b/keyboards/skog/backlight.c new file mode 100644 index 000000000000..94e8126d888e --- /dev/null +++ b/keyboards/skog/backlight.c @@ -0,0 +1,211 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#include "backlight.h" +#include "quantum.h" + +#include +#include + +#include "backlight_custom.h" +#include "breathing_custom.h" + +// DEBUG +#include +#include + +// Port D: digital pins of the AVR chipset +#define NUMLOCK_PORT (1 << 0) // D0 +#define CAPSLOCK_PORT (1 << 1) // D1 +#define BACKLIGHT_PORT (1 << 4) // D4 +#define SCROLLLOCK_PORT (1 << 6) // D6 + +#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 +#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default + +#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask + +#define PWM_MAX 0xFF +#define TIMER_TOP 255 // 8 bit PWM + +extern backlight_config_t backlight_config; + +/** + * References + * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation + * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b + * Timers: http://www.avrbeginners.net/architecture/timers/timers.html + * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ + * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware + */ + +// @Override +// turn LEDs on and off depending on USB caps/num/scroll lock states. +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // turn on + DDRD |= NUMLOCK_PORT; + PORTD |= NUMLOCK_PORT; + } else { + // turn off + DDRD &= ~NUMLOCK_PORT; + PORTD &= ~NUMLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= CAPSLOCK_PORT; + PORTD |= CAPSLOCK_PORT; + } else { + DDRD &= ~CAPSLOCK_PORT; + PORTD &= ~CAPSLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRD |= SCROLLLOCK_PORT; + PORTD |= SCROLLLOCK_PORT; + } else { + DDRD &= ~SCROLLLOCK_PORT; + PORTD &= ~SCROLLLOCK_PORT; + } +} + +#ifdef BACKLIGHT_ENABLE + +// sets up Timer 1 for 8-bit PWM +void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE + // default 8 bit mode + TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH + TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW + + // clear output compare value A + // outb(OCR1AH, 0); + // outb(OCR1AL, 0); + + // clear output comparator registers for B + OCR1BH = 0; // outb(OCR1BH, 0); + OCR1BL = 0; // outb(OCR1BL, 0); +} + +bool is_init = false; +void timer1Init(void) { + // timer1SetPrescaler(TIMER1PRESCALE) + // set to DIV/64 + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; + + // reset TCNT1 + TCNT1H = 0; // outb(TCNT1H, 0); + TCNT1L = 0; // outb(TCNT1L, 0); + + // TOIE1: Timer Overflow Interrupt Enable (Timer 1); + TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); + + is_init = true; +} + +void timer1UnInit(void) { + // set prescaler back to NONE + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP + + // disable timer overflow interrupt + TIMSK &= ~_BV(TOIE1); // overflow bit? + + setPWM(0); + + is_init = false; +} + + +// handle TCNT1 overflow +//! Interrupt handler for tcnt1 overflow interrupt +ISR(TIMER1_OVF_vect, ISR_NOBLOCK) +{ + // sei(); + // handle breathing here + #ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + custom_breathing_handler(); + } + #endif +} + +// enable timer 1 PWM +// timer1PWMBOn() +void timer1PWMBEnable(void) { + // turn on channel B (OC1B) PWM output + // set OC1B as non-inverted PWM + TCCR1A |= _BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +// disable timer 1 PWM +// timer1PWMBOff() +void timer1PWMBDisable(void) { + TCCR1A &= ~_BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +void enableBacklight(void) { + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high +} + +void disableBacklight(void) { + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low +} + +void startPWM(void) { + timer1Init(); + timer1PWMBEnable(); + enableBacklight(); +} + +void stopPWM(void) { + timer1UnInit(); + disableBacklight(); + timer1PWMBDisable(); +} + +void b_led_init_ports(void) { + /* turn backlight on/off depending on user preference */ + #if BACKLIGHT_ON_STATE == 0 + // DDRx register: sets the direction of Port D + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low + #else + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high + #endif + + timer1PWMSetup(); + startPWM(); + + #ifdef BACKLIGHT_BREATHING + breathing_enable(); + #endif +} + +void b_led_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); +} + +// called every matrix scan +void b_led_task(void) { + // do nothing for now +} + +void setPWM(uint16_t xValue) { + if (xValue > TIMER_TOP) { + xValue = TIMER_TOP; + } + OCR1B = xValue; // timer1PWMBSet(xValue); +} + +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/skog/backlight_custom.h b/keyboards/skog/backlight_custom.h new file mode 100644 index 000000000000..51365fe3ba44 --- /dev/null +++ b/keyboards/skog/backlight_custom.h @@ -0,0 +1,13 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#pragma once + +#include +void b_led_init_ports(void); +void b_led_set(uint8_t level); +void b_led_task(void); +void setPWM(uint16_t xValue); + diff --git a/keyboards/skog/breathing_custom.h b/keyboards/skog/breathing_custom.h new file mode 100644 index 000000000000..71416b1b45da --- /dev/null +++ b/keyboards/skog/breathing_custom.h @@ -0,0 +1,140 @@ +/** + * Breathing effect code for PS2AVRGB boards (ATMEGA32A) + * Works in conjunction with `backlight.c`. + * + * Code adapted from `quantum.c` to register with the existing TIMER1 overflow + * handler in `backlight.c` instead of setting up its own timer. + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifdef BACKLIGHT_ENABLE +#ifdef BACKLIGHT_BREATHING + +#include "backlight_custom.h" + +#ifndef BREATHING_PERIOD +#define BREATHING_PERIOD 6 +#endif + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) + +// TODO make this share code with quantum.c + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +static bool breathing = false; + +bool is_breathing(void) { + return breathing; +} + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + +void breathing_enable(void) { + breathing = true; + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + // interrupt already registered +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + // breathing_interrupt_enable(); + breathing = true; +} + +void breathing_disable(void) { + breathing = false; + // backlight_set(get_backlight_level()); + b_led_set(get_backlight_level()); // custom implementation of backlight_set() +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +void custom_breathing_handler(void) { + uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + // breathing_interrupt_disable(); + } + + setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); +} + +#endif // BACKLIGHT_BREATHING +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/skog/config.h b/keyboards/skog/config.h new file mode 100644 index 000000000000..dea3e28e88a6 --- /dev/null +++ b/keyboards/skog/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D + +#define MANUFACTURER Percent +#define PRODUCT Skog TKL + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 14 + +#define RGBLED_NUM 2 +#define RGBLIGHT_ANIMATIONS + +#define BACKLIGHT_LEVELS 5 + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/skog/i2c.c b/keyboards/skog/i2c.c new file mode 100644 index 000000000000..a4f95213524f --- /dev/null +++ b/keyboards/skog/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// Please do not modify this file + +#include +#include + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// Please do not modify this file + +#pragma once + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + diff --git a/keyboards/skog/info.json b/keyboards/skog/info.json new file mode 100644 index 000000000000..06fad3a741bd --- /dev/null +++ b/keyboards/skog/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "skog", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/skog/keymaps/default/keymap.c b/keyboards/skog/keymaps/default/keymap.c new file mode 100644 index 000000000000..eefc24cb0d60 --- /dev/null +++ b/keyboards/skog/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} diff --git a/keyboards/skog/matrix.c b/keyboards/skog/matrix.c new file mode 100644 index 000000000000..245813dfd2de --- /dev/null +++ b/keyboards/skog/matrix.c @@ -0,0 +1,112 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1< 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_quantum(); + + return 1; +} + +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/skog/rules.mk b/keyboards/skog/rules.mk new file mode 100644 index 000000000000..bce0c442a6c8 --- /dev/null +++ b/keyboards/skog/rules.mk @@ -0,0 +1,55 @@ +# Copyright 2018 Jumail Mundekkat / MxBlue +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = full +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes + +BACKLIGHT_CUSTOM_DRIVER = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c backlight.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/skog/skog.c b/keyboards/skog/skog.c new file mode 100644 index 000000000000..3d1eb0e1a16b --- /dev/null +++ b/keyboards/skog/skog.c @@ -0,0 +1,98 @@ +/* +Copyright 2018 Jumail Mundekkat / MxBlue + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +ps2avrGB support code by Kenneth A. (bminiex/.[ch]) +*/ + +#include "skog.h" + +#include "rgblight.h" + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +#include "backlight.h" +#include "backlight_custom.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i=0; i. +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K11, K31, K41, K51, K61, K81, K91, KA1, KB1, KC1, K01, KD1, K21, K20, K30, K00, \ + \ + K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, K02, KD2 , K70, K60, K50, \ + K13 , K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, K03, KD3 , KD0, K90, K80, \ + K15 , K25, K35, K45, K55, K65, K75, K85, K95, KA5, KB5, KC5, K05 , \ + K16 , K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6 , K06, KD6, \ + K17 , K27 , K37 , K57 , K97 , KA7 , KB7 , KC7 , K07, KD7, K87 \ +){ \ + { K00, KC_NO, K20, K30, KC_NO, K50, K60, K70, K80, K90, KC_NO, KC_NO, KC_NO, KD0 }, \ + { K01, K11, K21, K31, K41, K51, K61, KC_NO, K81, K91, KA1, KB1, KC1, KD1 }, \ + { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2 }, \ + { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { K05, K15, K25, K35, K45, K55, K65, K75, K85, K95, KA5, KB5, KC5, KC_NO }, \ + { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6 }, \ + { K07, K17, K27, K37, KC_NO, K57, KC_NO, KC_NO, K87, K97, KA7, KB7, KC7, KD7 } \ +} diff --git a/keyboards/skog/usbconfig.h b/keyboards/skog/usbconfig.h new file mode 100644 index 000000000000..481d7c0b14ec --- /dev/null +++ b/keyboards/skog/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'P','e','r','c','e','n','t' +#define USB_CFG_VENDOR_NAME_LEN 7 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'S','k','o','g',' ','T','K','L' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ From fbcbf4492685108a7f257df4e06871abd9def4d7 Mon Sep 17 00:00:00 2001 From: Kyle Brown Date: Fri, 28 Dec 2018 10:31:15 -0800 Subject: [PATCH 034/458] Update feature_advanced_keycodes.md (#3672) * Update feature_advanced_keycodes.md Probably a better way to word it, but I've solved this issue on reddit several times, had to solve this for friends, ect. It's something worth being in the docs as it's a common issue, and not always intuitive. I have offered this change as I was told by several people "It was never mentioned in the docs". * Update feature_advanced_keycodes.md Clear up what was meant to be said. --- docs/feature_advanced_keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index bda497233195..8c0a22fc6720 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -21,7 +21,7 @@ Additionally, if at least one right-handed modifier is specified in a Mod Tap or # Switching and Toggling Layers -These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) +These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended. * `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).) * `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. From 93b004c943a4b13bd640fc83000e910b72cb4640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 28 Dec 2018 20:07:56 +0100 Subject: [PATCH 035/458] Keep pressed keys on layer state change (fixes #2053, #2279) (#3905) * Keep pressed keys on layer state change * Add doc comment for clear_keyboard_but_mods_and_keys * Keep pressed keys only if PREVENT_STUCK_MODIFIERS is on * Check STRICT_LAYER_RELEASE instead of PREVENT_STUCK_MODIFIERS --- tmk_core/common/action.c | 11 ++++++++++- tmk_core/common/action.h | 1 + tmk_core/common/action_layer.c | 8 ++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index 456d1e25fe4d..b99c2acaa7a9 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -898,10 +898,19 @@ void clear_keyboard(void) * FIXME: Needs documentation. */ void clear_keyboard_but_mods(void) +{ + clear_keys(); + clear_keyboard_but_mods_and_keys(); +} + +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +void clear_keyboard_but_mods_and_keys() { clear_weak_mods(); clear_macro_mods(); - clear_keys(); send_keyboard_report(); #ifdef MOUSEKEY_ENABLE mousekey_clear(); diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 5d797fd628ff..8e47e5339eda 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -94,6 +94,7 @@ void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); void clear_keyboard(void); void clear_keyboard_but_mods(void); +void clear_keyboard_but_mods_and_keys(void); void layer_switch(uint8_t new_layer); bool is_tap_key(keypos_t key); diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index b8dcb34f3a04..120ce3f51b91 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -44,7 +44,11 @@ static void default_layer_state_set(uint32_t state) default_layer_debug(); debug(" to "); default_layer_state = state; default_layer_debug(); debug("\n"); +#ifdef STRICT_LAYER_RELEASE clear_keyboard_but_mods(); // To avoid stuck keys +#else + clear_keyboard_but_mods_and_keys(); // Don't reset held keys +#endif } /** \brief Default Layer Print @@ -127,7 +131,11 @@ void layer_state_set(uint32_t state) layer_debug(); dprint(" to "); layer_state = state; layer_debug(); dprintln(); +#ifdef STRICT_LAYER_RELEASE clear_keyboard_but_mods(); // To avoid stuck keys +#else + clear_keyboard_but_mods_and_keys(); // Don't reset held keys +#endif } /** \brief Layer clear From c0859ac096f1e4251351bb0a5a04b3ae4a9451f4 Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 28 Dec 2018 16:02:53 -0500 Subject: [PATCH 036/458] Update split keyboard docs (#4735) * Remove unused I2C_MASTER_RIGHT setting * Update documentation about split keyboard options --- docs/config_options.md | 37 +++++++++++++++++++++++++++++-- quantum/split_common/serial.c | 2 +- quantum/split_common/split_util.c | 3 +-- 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 4bbc5debda0b..085ab3ee58ae 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -197,8 +197,27 @@ If you define these options you will enable the associated feature, which may in Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk -* `#define SPLIT_HAND_PIN B7` - * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace 'B7' with the pin you are using. This is optional and you can still use the EEHANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. +### Setting Handedness + +One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave. + +There are a few different ways to set handedness for split keyboards (listed in order of precedence): + +1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side +2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half +3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) +4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half + +* `#define SPLIT_HAND_PIN B7` + * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. + +* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined) + * Reads the handedness value stored in the EEPROM after `eeprom-lefthand.eep`/`eeprom-righthand.eep` has been flashed to their respective halves. + +* `#define MASTER_RIGHT` + * Master half is defined to be the right half. + +### Other Options * `#define USE_I2C` * For using I2C instead of Serial (defaults to serial) @@ -206,6 +225,20 @@ Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in yo * `#define SOFT_SERIAL_PIN D0` * When using serial, define this. `D0` or `D1`,`D2`,`D3`,`E6`. +* `#define MATRIX_ROW_PINS_RIGHT { }` +* `#define MATRIX_COL_PINS_RIGHT { }` + * If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns. + +* `#define SELECT_SOFT_SERIAL_SPEED ` (default speed is 1) + * Sets the protocol speed when using serial communication + * Speeds: + * 0: about 189kbps (Experimental only) + * 1: about 137kbps (default) + * 2: about 75kbps + * 3: about 39kbps + * 4: about 26kbps + * 5: about 20kbps + # The `rules.mk` File This is a [make](https://www.gnu.org/software/make/manual/make.html) file that is included by the top-level `Makefile`. It is used to set some information about the MCU that we will be compiling for as well as enabling and disabling certain features. diff --git a/quantum/split_common/serial.c b/quantum/split_common/serial.c index 4df8d103bd54..1315377a3459 100644 --- a/quantum/split_common/serial.c +++ b/quantum/split_common/serial.c @@ -90,7 +90,7 @@ #ifndef SELECT_SOFT_SERIAL_SPEED #define SELECT_SOFT_SERIAL_SPEED 1 -// 0: about 189kbps (Experiment only) +// 0: about 189kbps (Experimental only) // 1: about 137kbps (default) // 2: about 75kbps // 3: about 39kbps diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index e4475c535675..da04c8d3ff2c 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -36,8 +36,7 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + #ifdef(MASTER_RIGHT) isLeftHand = !has_usb(); #else isLeftHand = has_usb(); From 6b46c06018324d78bed863d823df53d71cefb2fd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 28 Dec 2018 13:37:23 -0800 Subject: [PATCH 037/458] Fix Split Common Split_util.c typo --- quantum/split_common/split_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index da04c8d3ff2c..c613f265a387 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -36,7 +36,7 @@ static void setup_handedness(void) { #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); #else - #ifdef(MASTER_RIGHT) + #ifdef MASTER_RIGHT isLeftHand = !has_usb(); #else isLeftHand = has_usb(); From 2c6c483096f2ec1f37943975e9d62b901884c835 Mon Sep 17 00:00:00 2001 From: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Sat, 29 Dec 2018 00:07:47 +0100 Subject: [PATCH 038/458] refactored cyclops keyboard project (#4734) * refactored cyclops keyboard project Moved the files into a subfolder to allow consistency in preparation for additional commits to come in the future. made some small adjustments to the configuration and keymap * Update keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cyclops/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cyclops/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/cyclops/readme.md Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> --- keyboards/cyclops/keymaps/default/keymap.c | 65 ------------------- keyboards/{ => westfoxtrot}/cyclops/config.h | 14 ++-- keyboards/{ => westfoxtrot}/cyclops/cyclops.c | 4 +- keyboards/{ => westfoxtrot}/cyclops/cyclops.h | 2 +- keyboards/{ => westfoxtrot}/cyclops/info.json | 2 +- .../cyclops/keymaps/default/config.h | 0 .../cyclops/keymaps/default/keymap.c | 53 +++++++++++++++ .../cyclops/keymaps/default/readme.md | 0 keyboards/{ => westfoxtrot}/cyclops/readme.md | 14 ++-- keyboards/{ => westfoxtrot}/cyclops/rules.mk | 10 +-- 10 files changed, 76 insertions(+), 88 deletions(-) delete mode 100644 keyboards/cyclops/keymaps/default/keymap.c rename keyboards/{ => westfoxtrot}/cyclops/config.h (97%) rename keyboards/{ => westfoxtrot}/cyclops/cyclops.c (97%) rename keyboards/{ => westfoxtrot}/cyclops/cyclops.h (98%) rename keyboards/{ => westfoxtrot}/cyclops/info.json (99%) rename keyboards/{ => westfoxtrot}/cyclops/keymaps/default/config.h (100%) create mode 100644 keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c rename keyboards/{ => westfoxtrot}/cyclops/keymaps/default/readme.md (100%) rename keyboards/{ => westfoxtrot}/cyclops/readme.md (51%) rename keyboards/{ => westfoxtrot}/cyclops/rules.mk (91%) diff --git a/keyboards/cyclops/keymaps/default/keymap.c b/keyboards/cyclops/keymaps/default/keymap.c deleted file mode 100644 index 875fbe244f24..000000000000 --- a/keyboards/cyclops/keymaps/default/keymap.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright 2018 'mechmerlin' - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include QMK_KEYBOARD_H - -// Defines the keycodes used by our macros in process_record_user -enum custom_keycodes { - QMKBEST = SAFE_RANGE, - QMKURL -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGDN, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_RGHT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_0, KC_UP, - KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_ENT, KC_DOWN), -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QMKBEST: - if (record->event.pressed) { - // when keycode QMKBEST is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode QMKBEST is released - } - break; - case QMKURL: - if (record->event.pressed) { - // when keycode QMKURL is pressed - SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); - } else { - // when keycode QMKURL is released - } - break; - } - return true; -} - -void matrix_init_user(void) { - -} - -void matrix_scan_user(void) { - -} - -void led_set_user(uint8_t usb_led) { - -} diff --git a/keyboards/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h similarity index 97% rename from keyboards/cyclops/config.h rename to keyboards/westfoxtrot/cyclops/config.h index d6b637345e52..f54f818d5339 100644 --- a/keyboards/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -1,5 +1,5 @@ /* -Copyright 2018 'mechmerlin' +Copyright 2018 westfoxtrot This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,12 +20,12 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0000 +#define VENDOR_ID 0x21FF +#define PRODUCT_ID 0x0A66 #define DEVICE_VER 0x0001 -#define MANUFACTURER You +#define MANUFACTURER westfoxtrot #define PRODUCT cyclops -#define DESCRIPTION A custom 66% keyboard +#define DESCRIPTION AEK66 /* key matrix size */ #define MATRIX_ROWS 5 @@ -187,9 +187,7 @@ along with this program. If not, see . /* #define LCD_LINES 2 //< number of visible lines of the display #define LCD_DISP_LENGTH 16 //< visibles characters per line of the display - #define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode - #if LCD_IO_MODE #define LCD_PORT PORTB //< port for the LCD lines #define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 @@ -211,4 +209,4 @@ along with this program. If not, see . /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 -// #define BOOTMAGIC_LITE_COLUMN 0 +// #define BOOTMAGIC_LITE_COLUMN 0 \ No newline at end of file diff --git a/keyboards/cyclops/cyclops.c b/keyboards/westfoxtrot/cyclops/cyclops.c similarity index 97% rename from keyboards/cyclops/cyclops.c rename to keyboards/westfoxtrot/cyclops/cyclops.c index 8a15e8950e2d..aea51e6b3496 100644 --- a/keyboards/cyclops/cyclops.c +++ b/keyboards/westfoxtrot/cyclops/cyclops.c @@ -1,4 +1,4 @@ -/* Copyright 2018 'mechmerlin' +/* Copyright 2018 westfoxtrot * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,4 +40,4 @@ void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here led_set_user(usb_led); -} +} \ No newline at end of file diff --git a/keyboards/cyclops/cyclops.h b/keyboards/westfoxtrot/cyclops/cyclops.h similarity index 98% rename from keyboards/cyclops/cyclops.h rename to keyboards/westfoxtrot/cyclops/cyclops.h index d85b4e9031cc..f32d2fd44152 100644 --- a/keyboards/cyclops/cyclops.h +++ b/keyboards/westfoxtrot/cyclops/cyclops.h @@ -1,4 +1,4 @@ -/* Copyright 2018 'mechmerlin' +/* Copyright 2018 westfoxtrot * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/keyboards/cyclops/info.json b/keyboards/westfoxtrot/cyclops/info.json similarity index 99% rename from keyboards/cyclops/info.json rename to keyboards/westfoxtrot/cyclops/info.json index e0e91222bc20..a215a8a3de7a 100644 --- a/keyboards/cyclops/info.json +++ b/keyboards/westfoxtrot/cyclops/info.json @@ -9,4 +9,4 @@ "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Page Up", "x":15.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Page Down", "x":15.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":"|", "x":1.5, "y":3}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":"<", "x":9.5, "y":3}, {"label":">", "x":10.5, "y":3}, {"label":"?", "x":11.5, "y":3}, {"x":12.5, "y":3}, {"label":"Shift", "x":13.5, "y":3}, {"label":"\u2191", "x":14.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Ctrl", "x":12.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13.5, "y":4}, {"label":"\u2193", "x":14.5, "y":4}, {"label":"\u2192", "x":15.5, "y":4}] } } -} +} \ No newline at end of file diff --git a/keyboards/cyclops/keymaps/default/config.h b/keyboards/westfoxtrot/cyclops/keymaps/default/config.h similarity index 100% rename from keyboards/cyclops/keymaps/default/config.h rename to keyboards/westfoxtrot/cyclops/keymaps/default/config.h diff --git a/keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c b/keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c new file mode 100644 index 000000000000..c850b9da061b --- /dev/null +++ b/keyboards/westfoxtrot/cyclops/keymaps/default/keymap.c @@ -0,0 +1,53 @@ +/* Copyright 2018 westfoxtrot + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_UP, + KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F11, KC_DEL, KC_HOME, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/cyclops/keymaps/default/readme.md b/keyboards/westfoxtrot/cyclops/keymaps/default/readme.md similarity index 100% rename from keyboards/cyclops/keymaps/default/readme.md rename to keyboards/westfoxtrot/cyclops/keymaps/default/readme.md diff --git a/keyboards/cyclops/readme.md b/keyboards/westfoxtrot/cyclops/readme.md similarity index 51% rename from keyboards/cyclops/readme.md rename to keyboards/westfoxtrot/cyclops/readme.md index fcf6c1546675..e026c4119471 100644 --- a/keyboards/cyclops/readme.md +++ b/keyboards/westfoxtrot/cyclops/readme.md @@ -1,13 +1,15 @@ -# Cyclops +# cyclops -66% Alps Keyboard in ISO layout. +![cyclops](https://github.com/westfoxtrot/Cyclops) -Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: 66% Alps Keyboard -Hardware Availability: A very limited number were made. +66% Alps Keyboard in ISO layout. + + Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) + Hardware Supported: Cyclops (AEKISO66) PCB + Hardware Availability: Files released here (https://github.com/westfoxtrot/Cyclops) Make example for this keyboard (after setting up your build environment): - make cyclops:default + make westfoxtrot/cyclops:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cyclops/rules.mk b/keyboards/westfoxtrot/cyclops/rules.mk similarity index 91% rename from keyboards/cyclops/rules.mk rename to keyboards/westfoxtrot/cyclops/rules.mk index bc370be0397c..10ea51391090 100644 --- a/keyboards/cyclops/rules.mk +++ b/keyboards/westfoxtrot/cyclops/rules.mk @@ -62,14 +62,14 @@ BOOTLOADER = atmel-dfu # change yes to no to disable # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover +NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) @@ -77,4 +77,4 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches -HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) \ No newline at end of file From d9abb833e54ff8981a2bc1d17c6f863b49430fcd Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Fri, 28 Dec 2018 22:27:35 -0800 Subject: [PATCH 039/458] Add my zeal60 keymap (#4732) * Add my zeal60 keymap * Temporarily remove failing community layout from zeal60 make rules * Revert "Temporarily remove failing community layout from zeal60 make rules" This reverts commit ffd0018fb1dcf3d5f90d4a226c437d4e85430cce. --- keyboards/zeal60/keymaps/crd/config.h | 29 ++++++++++++++++++++ keyboards/zeal60/keymaps/crd/keymap.c | 39 +++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 keyboards/zeal60/keymaps/crd/config.h create mode 100644 keyboards/zeal60/keymaps/crd/keymap.c diff --git a/keyboards/zeal60/keymaps/crd/config.h b/keyboards/zeal60/keymaps/crd/config.h new file mode 100644 index 000000000000..a70f9da7e6a3 --- /dev/null +++ b/keyboards/zeal60/keymaps/crd/config.h @@ -0,0 +1,29 @@ +#pragma once + +/* enable/disable LEDs based on layout */ +#undef RGB_BACKLIGHT_USE_SPLIT_BACKSPACE +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 + +#undef RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 + +#undef RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 + +#undef RGB_BACKLIGHT_USE_7U_SPACEBAR +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 1 + +#undef RGB_BACKLIGHT_USE_ISO_ENTER +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 + +#undef RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 + +#undef RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 1 + +#undef RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 3 + +#undef RGB_BACKLIGHT_EFFECT +#define RGB_BACKLIGHT_EFFECT 0 \ No newline at end of file diff --git a/keyboards/zeal60/keymaps/crd/keymap.c b/keyboards/zeal60/keymaps/crd/keymap.c new file mode 100644 index 000000000000..971782561c91 --- /dev/null +++ b/keyboards/zeal60/keymaps/crd/keymap.c @@ -0,0 +1,39 @@ +// tsangan layout for Zeal60 +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_RGLT RCMD_T(KC_LEFT) +#define KC_RADN LT(_CL, KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_ansi_split_bs_rshift( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP, MO(_FL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, XXXXXXX, KC_RGLT, KC_RADN, KC_RCRT + ), + [_FL] = LAYOUT_60_ansi_split_bs_rshift( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [_CL] = LAYOUT_60_ansi_split_bs_rshift( + _______, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, _______, _______, _______, _______, BR_DEC, BR_INC, _______, _______, + _______, _______, _______, S1_DEC, S1_INC, S2_DEC, S2_INC, _______, _______, _______, _______, ES_DEC, ES_INC, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; From 8443481aea47182683d6b26aa00548e9ebfab82e Mon Sep 17 00:00:00 2001 From: Stephen Gelman Date: Thu, 27 Dec 2018 01:15:58 -0600 Subject: [PATCH 040/458] Fix apparent typo in WhiteFox LED config It seems the led_mask is set incorrectly on the WhiteFox meaning that the LED at C9-1 (the space bar) doesn't get lit. I can't see any reason for this to be intentional so I am pretty sure it's a typo. At the very least it fixes the space bar LED for me. --- keyboards/whitefox/board_is31fl3731c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/whitefox/board_is31fl3731c.h b/keyboards/whitefox/board_is31fl3731c.h index dea643f107c6..d59b2ff43a64 100644 --- a/keyboards/whitefox/board_is31fl3731c.h +++ b/keyboards/whitefox/board_is31fl3731c.h @@ -31,7 +31,7 @@ static const uint8_t led_mask[] = { 0xFF, 0x00, /* C6-1 -> C6-16 */ 0xFF, 0x00, /* C7-1 -> C7-16 */ 0xFF, 0x00, /* C8-1 -> C8-16 */ - 0xFE, 0x00, /* C9-1 -> C9-16 */ + 0xFF, 0x00, /* C9-1 -> C9-16 */ }; // The address of the LED From e2f60eba2f5d44282a6aff35fde9076b0532c23c Mon Sep 17 00:00:00 2001 From: Menchen Date: Tue, 25 Dec 2018 20:01:54 +0100 Subject: [PATCH 041/458] Fix capkey led for dz60. --- keyboards/dz60/dz60.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/keyboards/dz60/dz60.c b/keyboards/dz60/dz60.c index b54ff0117034..8295fb432c71 100644 --- a/keyboards/dz60/dz60.c +++ b/keyboards/dz60/dz60.c @@ -23,11 +23,9 @@ void led_init_ports(void) { void led_set_kb(uint8_t usb_led) { if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); } else { - DDRB &= ~(1 << 2); - PORTB &= ~(1 << 2); + PORTB |= (1 << 2); } led_set_user(usb_led); From bb1b44132514fc30de7de77f2c6a80b8c7ba0416 Mon Sep 17 00:00:00 2001 From: Giuseppe Rota Date: Sat, 29 Dec 2018 16:04:41 +0100 Subject: [PATCH 042/458] Fix leader processing --- quantum/process_keycode/process_leader.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index 57fccdc7e78a..897e9eabf673 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -68,9 +68,7 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) { } else { if (keycode == KC_LEAD) { qk_leader_start(); - return false; } - break; } } return true; From cc7bf108a93416036e3cd4d3e129abd56dfa9350 Mon Sep 17 00:00:00 2001 From: ginjake Date: Sun, 30 Dec 2018 01:19:34 +0900 Subject: [PATCH 043/458] Keymap: add ginjake keymap for the zinc keyboard (#4741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * サンシャインぴっかぴかモード実装 * サンシャインぴっかぴかモード --- keyboards/zinc/keymaps/ginjake/config.h | 38 ++ keyboards/zinc/keymaps/ginjake/keymap.c | 368 ++++++++++++++++++++ keyboards/zinc/keymaps/ginjake/readme_jp.md | 123 +++++++ keyboards/zinc/keymaps/ginjake/rules.mk | 98 ++++++ 4 files changed, 627 insertions(+) create mode 100644 keyboards/zinc/keymaps/ginjake/config.h create mode 100644 keyboards/zinc/keymaps/ginjake/keymap.c create mode 100644 keyboards/zinc/keymaps/ginjake/readme_jp.md create mode 100644 keyboards/zinc/keymaps/ginjake/rules.mk diff --git a/keyboards/zinc/keymaps/ginjake/config.h b/keyboards/zinc/keymaps/ginjake/config.h new file mode 100644 index 000000000000..4dcb0724ff75 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/config.h @@ -0,0 +1,38 @@ +/* +This is the c configuration file for the keymap + +Copyright 2018 monksoffunk +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once +// if you need more program area, try uncomment follow line +#include "serial_config_simpleapi.h" + +// place overrides here +// Selection of RGBLIGHT MODE to use. +#if defined(LED_ANIMATIONS) + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + //#define RGBLIGHT_EFFECT_RGB_TEST + //#define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/zinc/keymaps/ginjake/keymap.c b/keyboards/zinc/keymaps/ginjake/keymap.c new file mode 100644 index 000000000000..323d2c7d4416 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/keymap.c @@ -0,0 +1,368 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +rgblight_config_t RGB_current_config; +#endif + +extern uint8_t is_master; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum layer_number { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, + BACKLIT, + KANA, + EISU, + RGBRST, + AQOURS, //サンシャインぴっかぴかモード +}; + +#ifdef RGBLIGHT_ENABLE + //9色に変化するLEDのHSV各パラメータ + int aqours_h[] = { 26, 340, 150, 0, 199, 220, 53, 265, 322}; + int aqours_s[] = {255, 165, 255, 255, 255, 350, 255, 255, 255}; + int aqours_v[] = {255, 255, 255, 255, 255, 255, 255, 255, 255}; + const int NEXT_COLOR_TIME = 2400; //次の色に切り替わるまでの時間 + const int NEXT_CHANGE_TARGET_TIME = 100; //次のキーに色が伝播するまでの時間 + bool aqours_mode = false; + int aqours_next_color_timer_count = 0; + int aqours_num = 0; + int target_col = 0; + + //keyのmatrixの位置とLEDの番号を紐づける + int combined_key_to_led[] = + { + 0,1,2,3,4,5, + 11,10,9,8,7,6, + 12,13,14,15,16,17, + 23,22,21,20,19,18 + }; +#endif + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { \ + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc |ADJUST| Win | Alt |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x12( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_ESC, ADJUST, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_COLEMAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + * `-----------------------------------------' `-----------------------------------------' + */ + [_DVORAK] = LAYOUT_ortho_4x12( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_DEL, \ + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + KC_ESC, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | - | _ | + | { | } | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | Home | End | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ + [_LOWER] = LAYOUT_ortho_4x12( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, _______, _______, _______, _______, _______, KC_MINS, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | F12 | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' `-----------------------------------------' + */ + [_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset|RGBRST|Aud on|Audoff| | | |Qwerty|Colemk|Dvorak| | Ins | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |AQOURS|RGB ON| HUE+ | SAT+ | VAL+ | Mac | | Win | - | = |Print |ScLock|Pause | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | MODE | HUE- | SAT- | VAL- | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | EISU | EISU | EISU | | KANA | KANA | Home |PageDn|PageUp| End | + * `-----------------------------------------' `-----------------------------------------' + */ + [_ADJUST] = LAYOUT_ortho_4x12( \ + _______, RESET, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_INS, \ + AQOURS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, AG_NORM, AG_SWAP, KC_MINS, KC_EQL, KC_PSCR, KC_SLCK, KC_PAUS,\ + _______, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______,\ + _______, _______, _______, EISU, EISU, EISU, KANA, KANA, KC_HOME, KC_PGDN, KC_PGUP, KC_END\ + ) +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGB_current_config.mode); + #endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(16); + #endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change + #endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(15); + #endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + #ifdef RGBLIGHT_ENABLE + rgblight_mode_noeeprom(RGB_current_config.mode); // revert RGB to initial mode prior to RGB mode change + #endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode_noeeprom(RGB_current_config.mode); + rgblight_step(); + RGB_current_config.mode = rgblight_config.mode; + } + #endif + return false; + break; + + case EISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case AQOURS: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + aqours_mode = !aqours_mode; + } + #endif + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_config = rgblight_config; + } + #endif + break; + } + return true; +} + +#ifdef RGBLIGHT_ENABLE + + void aqours_led(void) { + aqours_next_color_timer_count++; + //一定間隔で色が変化 + if (aqours_next_color_timer_count > NEXT_COLOR_TIME) { + aqours_num++; + aqours_next_color_timer_count = 0; + target_col = 0; + if (aqours_num == sizeof(aqours_h) / sizeof(int)) { + aqours_num = 0; + } + } + + //キー毎に時間差で色が変化していく + if (aqours_next_color_timer_count % NEXT_CHANGE_TARGET_TIME == 0) { + if (target_col < MATRIX_COLS) { + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[11 - target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[12 + target_col]); + sethsv(aqours_h[aqours_num], aqours_s[aqours_num], aqours_v[aqours_num], (LED_TYPE *)&led[23 - target_col]); + target_col++; + rgblight_set(); + } + } + } +#endif + +void matrix_scan_user(void) { + #ifdef RGBLIGHT_ENABLE + if (aqours_mode) { + aqours_led(); + } + #endif +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_init(); + RGB_current_config = rgblight_config; + #endif +} diff --git a/keyboards/zinc/keymaps/ginjake/readme_jp.md b/keyboards/zinc/keymaps/ginjake/readme_jp.md new file mode 100644 index 000000000000..f6e91f0c8909 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/readme_jp.md @@ -0,0 +1,123 @@ +# The Default Zinc Layout +## 配列 + +### Qwerty配列 + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | Fn | Alt | Win |Lower |Space | | Space| Raise| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Colemak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| Z | X | C | V | B | | K | M | , | . | / |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `------------------------------------------ ------------------------------------------' +``` + +### Dvorak + +``` + ,-----------------------------------------. ,-----------------------------------------. + | Tab | ' | , | . | P | Y | | F | G | C | R | L | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Ctrl | A | O | E | U | I | | D | H | T | N | S | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | | B | M | W | V | Z |Enter | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc |ADJUST| Alt | Win |LOWER |Space | | Space| RAISE| Left | Down | Up | Right| + `-----------------------------------------' `-----------------------------------------' +``` + + +## コンパイルの仕方 + +コンパイルは、qmk_firmware のトップディレクトリで行います。 + +``` +$ cd qmk_firmware +``` +qmk_firmwareでは各キーボードのコンパイルは、`<キーボード名>:<キーマップ名>`という指定で行います。 + +``` +$ make zinc:default +``` + +キーボードへの書き込みまで同時に行うには下記のように`:avrdude`を付けます。 + +``` +$ make zinc:default:avrdude +``` + +コンパイル結果と中間生成物を消去したい場合は以下のようにします。 + +``` +$ make zinc:default:clean +``` + +## カスタマイズ + +コマンドラインからオプションを指定してビルドすることが出来ます。 + +``` +# Zinc keyboard 'default' keymap: convenient command line option +make ZINC= zinc:defualt +# option= back | under | na | ios +# ex. +# make ZINC=under zinc:defualt +# make ZINC=under,ios zinc:defualt +# make ZINC=back zinc:default +# make ZINC=back,na zinc:default +# make ZINC=back,ios zinc:default +``` + +あるいは`qmk_firmware/keyboards/zinc/rev1/keymaps/default/rules.mk` の以下の部分を直接編集して機能を有効化してください。 + +``` +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + + +``` + +## RGB backlight を有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +LED_BACK_ENABLE = yes # LED backlight (Enable SK6812mini backlight) +``` + + +## RGB Underglow を有効にする + +rules.mk の下記の部分を編集して no を yes に変更してください。 +``` +LED_UNDERGLOW_ENABLE = yes # LED underglow (Enable WS2812 RGB underlight.) +``` + + +## iPad/iPhoneサポートを有効にする。 + +rules.mk の下記の部分を編集して no を yes に変更してください。 +RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。 + +``` +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +``` \ No newline at end of file diff --git a/keyboards/zinc/keymaps/ginjake/rules.mk b/keyboards/zinc/keymaps/ginjake/rules.mk new file mode 100644 index 000000000000..2dcefc0016d0 --- /dev/null +++ b/keyboards/zinc/keymaps/ginjake/rules.mk @@ -0,0 +1,98 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +define ZINC_CUSTOMISE_MSG + $(info Zinc customize) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) +endef + +# Zinc keyboard customize +LED_BACK_ENABLE = no # LED backlight (Enable SK6812mini backlight) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +Link_Time_Optimization = no # if firmware size over limit, try this option + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +### Zinc keyboard 'default' keymap: convenient command line option +## make ZINC= zinc:defualt +## option= back | under | na | ios +## ex. +## make ZINC=under zinc:defualt +## make ZINC=under,ios zinc:defualt +## make ZINC=back zinc:default +## make ZINC=back,na zinc:default +## make ZINC=back,ios zinc:default + +ifneq ($(strip $(ZINC)),) + ifeq ($(findstring back,$(ZINC)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(ZINC)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(ZINC)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(ZINC)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(info ) +endif + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call ZINC_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) +# OPT_DEFS += -DRGBLIGHT_ANIMATIONS + OPT_DEFS += -DLED_ANIMATIONS + +endif + +ifeq ($(strip $(Link_Time_Optimization)),yes) + EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) From c043edd13871b9ec96cf495b9423da8df7f36965 Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Sun, 30 Dec 2018 07:53:02 -0800 Subject: [PATCH 044/458] Keymap: Wanleg 5x5 Keymap changes (#4738) * config fixes (including for issue #3678) * put back audio * jj40 backlighting setup * jj40 backlighting setup * rules.mk fix * jj40 backlighting settings * iris setup * iris setup * iris setup * iris setup * iris setup - onehand * remove commented-out section * edits due to #4403 * xd75 testing * fix 5x15 layout issues with 5x5 bluetooth & xd75 * commenting out unused placeholders * change iris to more wanleg-like 4x12 layout * formatting changes * onehand layout cleanup/fix * revert temp change * create centre numpad option * 1st working version * change keypad numbers to regular numbers - doesn't work otherwise * adding comparison files, no change to core * fixed 5x5 with cleave * fixed 5x5 with cleave * switch mouse scroll buttons * clean up left/right/centre pad placement in 5x15 layouts * minor comment change * Update layouts/community/ortho_5x15/wanleg/keymap.c Co-Authored-By: wanleg <32079073+wanleg@users.noreply.github.com> * Update layouts/community/ortho_5x15/wanleg/keymap.c Co-Authored-By: wanleg <32079073+wanleg@users.noreply.github.com> * Update layouts/community/ortho_5x15/wanleg/keymap.c Co-Authored-By: wanleg <32079073+wanleg@users.noreply.github.com> * revert to original --- layouts/community/ortho_5x15/wanleg/keymap.c | 137 ++++++++++++------- users/wanleg/rules.mk | 9 ++ users/wanleg/tapdances.c | 4 +- users/wanleg/wanleg.c | 58 +------- users/wanleg/wanleg.h | 69 ++-------- 5 files changed, 109 insertions(+), 168 deletions(-) diff --git a/layouts/community/ortho_5x15/wanleg/keymap.c b/layouts/community/ortho_5x15/wanleg/keymap.c index 51b020fcde54..a98f61988cfa 100644 --- a/layouts/community/ortho_5x15/wanleg/keymap.c +++ b/layouts/community/ortho_5x15/wanleg/keymap.c @@ -1,26 +1,71 @@ #include QMK_KEYBOARD_H #include "wanleg.h" -#define _________________BLANK_75__________________ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ #define _________________BLANK_50__________________ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -#define _________________Num_Row_75________________ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK + +#if defined(PADC) +#define LAYOUT_75_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) \ + LAYOUT_ortho_5x15_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + K00, K01, K02, K03, K04, K05, K0c, K0d, K0e, K06, K07, K08, K09, K0a, K0b, \ + K10, K11, K12, K13, K14, K15, K1c, K1d, K1e, K16, K17, K18, K19, K1a, K1b, \ + K20, K21, K22, K23, K24, K25, K2c, K2d, K2e, K26, K27, K28, K29, K2a, K2b, \ + K30, K31, K32, K33, K34, K35, K3c, K3d, K3e, K36, K37, K38, K39, K3a, K3b \ + ) + +#elif defined(PADL) +#define LAYOUT_75_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) \ + LAYOUT_ortho_5x15_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + K0c, K0d, K0e, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, \ + K1c, K1d, K1e, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, \ + K2c, K2d, K2e, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, \ + K3c, K3d, K3e, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b \ + ) + +#else +#define LAYOUT_75_base( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) \ + LAYOUT_ortho_5x15_wrapper( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NLCK, QWERTY, GHERKIN, FUNCTION, \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, K0d, K0e, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, K1d, K1e, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, K2d, K2e, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, K3d, K3e \ + ) +#endif + +#define LAYOUT_75_base_wrapper(...) LAYOUT_75_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #if defined(KEYBOARD_40percentclub_5x5) -[GK75] = LAYOUT_ortho_5x15_wrapper( - _________________Num_Row_75________________, QWERTY75, XXXXXXX, FUNCTION75, - _______________GherkinLike_0_______________, KC_KP_7, KC_KP_8, KC_KP_9, - _______________GherkinLike_1_______________, KC_KP_4, KC_KP_5, KC_KP_6, - TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM75, KC_V), LT(ETC75, KC_B), KC_N, LT(DIR75, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT), KC_KP_1, KC_KP_2, KC_KP_3, - TD(RST_TAP_DANCE), GHERKIN50, KC_LALT, NUMPAD, NUMBER75, ETCETERA75, KC_SPC,DIRECTION75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT +[_GK] = LAYOUT_75_base_wrapper( + _______________GherkinLike_0_______________, KC_7, KC_8, KC_9, + _______________GherkinLike_1_______________, KC_4, KC_5, KC_6, + TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V), LT(ETC, KC_B), KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT), KC_1, KC_2, KC_3, + TD(RST_TAP_DANCE), GHERKIN50, KC_LALT, NUMPAD, NUMBER, ETCETERA, KC_SPC,DIRECTION, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_0, KC_0, KC_DOT ), [GK50] = LAYOUT_ortho_5x10_wrapper( - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, + KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______________Gherkin_Row_0_______________, _______________Gherkin_Row_1_______________, _______________Gherkin_Row_2_______________, - TD(RST_TAP_DANCE), GHERKIN75, NUMPAD, gNUMBER, gETCETERA, KC_SPC,gDIRECTION, KC_RGUI, KC_RALT, KC_RGUI + TD(RST_TAP_DANCE), GHERKIN, NUMPAD, gNUMBER, gETCETERA, KC_SPC,gDIRECTION, KC_RGUI, KC_RALT, KC_RGUI ), [gNUM] = LAYOUT_ortho_5x10_wrapper( @@ -65,9 +110,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), #endif #else - /* Gherkin 75 + /* Gherkin * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | | FN | + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | gherkin| FN | * |-----------------------------------------------------------------------------------------------------------+--------+--------+--------| * | | 7 | 8 | 9 | * | |--------+--------+--------| @@ -78,17 +123,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | 0 | 0 | . | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[GK75] = LAYOUT_ortho_5x15_wrapper( - _________________Num_Row_75________________, QWERTY75, XXXXXXX, FUNCTION75, - _______________GherkinLike_0_______________, KC_KP_7, KC_KP_8, KC_KP_9, - _______________GherkinLike_1_______________, KC_KP_4, KC_KP_5, KC_KP_6, - TD(TD_SFT_CAPS), SFT_T(KC_Z), KC_X, KC_C, LT(NUM75, KC_V), LT(ETC75, KC_B), KC_N, LT(DIR75, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC), SFT_T(KC_ENT), KC_KP_1, KC_KP_2, KC_KP_3, - KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, NUMBER75, ETCETERA75, KC_SPC,DIRECTION75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT +[_GK] = LAYOUT_75_base_wrapper( + _______________GherkinLike_0_______________, KC_7, KC_8, KC_9, + _______________GherkinLike_1_______________, KC_4, KC_5, KC_6, + _______________GherkinLike_2_______________, KC_1, KC_2, KC_3, + _______________GherkinLike_3_______________, KC_0, KC_0, KC_DOT ), #endif - /* QWERTY 75 +/* QWERTY * .--------------------------------------------------------------------------------------------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| gherkin| | FN | + * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | NUMLOCK| qwerty | gherkin| FN | * |-----------------------------------------------------------------------------------------------------------+--------+--------+--------| * | | 7 | 8 | 9 | * | |--------+--------+--------| @@ -99,17 +143,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | 0 | 0 | . | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[QW75] = LAYOUT_ortho_5x15_wrapper( - _________________Num_Row_75________________, GHERKIN75, XXXXXXX, FUNCTION75, - _______________Qwerty_Row__0_______________, KC_KP_7, KC_KP_8, KC_KP_9, - _______________Qwerty_Row__1_______________, KC_KP_4, KC_KP_5, KC_KP_6, - _______________Qwerty_Row__2_______________, KC_KP_1, KC_KP_2, KC_KP_3, - KC_LCTL, KC_LGUI, KC_LALT, KC_LALT, SUBTER75, KC_LSFT, KC_SPC, SUPRA75, KC_RGUI, KC_RALT, KC_DEL, KC_RCTL, KC_KP_0, KC_KP_0, KC_KP_DOT +[_QW] = LAYOUT_75_base_wrapper( + _______________Qwerty_Row__0_______________, KC_7, KC_8, KC_9, + _______________Qwerty_Row__1_______________, KC_4, KC_5, KC_6, + _______________Qwerty_Row__2_______________, KC_1, KC_2, KC_3, + _______________Qwerty_Row__3_______________, KC_0, KC_0, KC_DOT ), - /* SUBTER75 + /* SUBTER * .--------------------------------------------------------------------------------------------------------------------------------------. - * | SUBTER ROW 0 LAYOUT | | | | + * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------+--------+-----------------| * | | / | * | - | * | |--------+--------+--------| @@ -120,15 +163,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[SUB75] = LAYOUT_ortho_5x15_wrapper( - _______________SUBTER_Row__0_______________, _______, _______, _______, +[SUB] = LAYOUT_75_base_wrapper( _______________SUBTER_Row__0_______________, KC_PSLS, KC_PAST, KC_PMNS, - _______________SUBTER_Row__1_______________, _______, _______, KC_PPLS, + _______________SUBTER_Row__1_______________, _______, _______, KC_PPLS, _______________SUBTER_Row__2_______________, _______, _______, KC_PENT, - _______, _______, GHERKIN75, _______, _______, _______, KC_ENT, KC_LSFT, _______, _______, _______, _______, _______, _______, _______ + _______________SUBTER_Row__3_______________, _______, _______, _______ ), -/* SUPRA75 +/* SUPRA * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| @@ -141,15 +183,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[SUP75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[SUP] = LAYOUT_75_base_wrapper( ________________SUPRA_Row_0________________, _______, _______, _______, ________________SUPRA_Row_1________________, _______, _______, _______, ________________SUPRA_Row_2________________, _______, _______, _______, - _________________BLANK_75__________________ + ________________SUPRA_Row_3________________, _______, _______, _______ ), -/* Gherkin 75 Numbers +/* Gherkin Numbers * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -162,15 +203,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[NUM75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[NUM] = LAYOUT_75_base_wrapper( _______________NUMBERS_Row_0_______________, KC_PSLS, KC_PAST, KC_PMNS, _______________NUMBERS_Row_1_______________, _______, _______, KC_PPLS, _______________NUMBERS_Row_2_______________, _______, _______, KC_PENT, _______________NUMBERS_Row_3_______________, _______, _______, _______ ), -/* Gherkin 75 Et Cetera +/* Gherkin Et Cetera * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -183,15 +223,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[ETC75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[ETC] = LAYOUT_75_base_wrapper( ______________ETCETERA_Row__0______________, _______, _______, _______, ______________ETCETERA_Row__1______________, _______, _______, _______, ______________ETCETERA_Row__2______________, _______, _______, _______, ______________ETCETERA_Row__3______________, _______, _______, _______ ), -/* Gherkin 75 Directional Keys +/* Gherkin Directional Keys * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |-----------------------------------------------------------------------------------------------------------|--------+-----------------| @@ -204,16 +243,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[DIR75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, +[DIR] = LAYOUT_75_base_wrapper( _____________DIRECTIONS_Row__0_____________, _______, _______, _______, _____________DIRECTIONS_Row__1_____________, _______, _______, _______, _____________DIRECTIONS_Row__2_____________, _______, _______, _______, - _______, _______, QWERTY75, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _____________DIRECTIONS_Row__3_____________, _______, _______, _______ ), -/* FUNCTION 75 +/* FUNCTION * .--------------------------------------------------------------------------------------------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| @@ -226,9 +264,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | MS BT1 | | | | | | MOUS L | MOUS D | MOUS R | * '--------------------------------------------------------------------------------------------------------------------------------------' */ -[FN75] = LAYOUT_ortho_5x15_wrapper( - _________________BLANK_75__________________, - _________________BLANK_75__________________, +[_FN] = LAYOUT_75_base_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, _______, _______, KC_WH_U, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_INC, BL_DEC, _______, _______, KC_MS_U, KC_WH_D, _______, _______, _______, _______, _______, _______, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk index c6569594b303..b069cd8d3874 100644 --- a/users/wanleg/rules.mk +++ b/users/wanleg/rules.mk @@ -27,4 +27,13 @@ ifeq ($(strip $(BT)), yes) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +endif + +#move numpad to Left/Centre/Right(default) on 5x15 boards +#example usage: make 4x4:wanleg padc=yes +ifeq ($(strip $(padc)), yes) + OPT_DEFS += -DPADC +endif +ifeq ($(strip $(padl)), yes) + OPT_DEFS += -DPADL endif \ No newline at end of file diff --git a/users/wanleg/tapdances.c b/users/wanleg/tapdances.c index e5051f9ee6aa..1be5636dc7bc 100644 --- a/users/wanleg/tapdances.c +++ b/users/wanleg/tapdances.c @@ -168,7 +168,7 @@ void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) { LYR75tap_state.state = cur_dance(state); switch (LYR75tap_state.state) { case SINGLE_TAP: register_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(GK75); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; case DOUBLE_SINGLE_TAP: register_code(KC_PSLS); unregister_code(KC_PSLS); register_code(KC_PSLS); } } @@ -176,7 +176,7 @@ void LYR75_finished (qk_tap_dance_state_t *state, void *user_data) { void LYR75_reset (qk_tap_dance_state_t *state, void *user_data) { switch (LYR75tap_state.state) { case SINGLE_TAP: unregister_code(KC_PSLS); break; - case DOUBLE_TAP: set_single_persistent_default_layer(GK75); break; + case DOUBLE_TAP: set_single_persistent_default_layer(_GK); break; case DOUBLE_SINGLE_TAP: unregister_code(KC_PSLS); } LYR75tap_state.state = 0; diff --git a/users/wanleg/wanleg.c b/users/wanleg/wanleg.c index 4e60c422fae2..274c74f728c8 100644 --- a/users/wanleg/wanleg.c +++ b/users/wanleg/wanleg.c @@ -29,18 +29,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case QWERTY75: - if (record->event.pressed) { - set_single_persistent_default_layer(QW75); - } - return false; - break; - case GHERKIN75: - if (record->event.pressed) { - set_single_persistent_default_layer(GK75); - } - return false; - break; case NUMPAD: if (record->event.pressed) { set_single_persistent_default_layer(PAD); @@ -117,51 +105,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case SUBTER75: - if (record->event.pressed) { - layer_on(SUB75); - } else { - layer_off(SUB75); - } - return false; - break; - case SUPRA75: - if (record->event.pressed) { - layer_on(SUP75); - } else { - layer_off(SUP75); - } - return false; - break; - case NUMBER75: - if (record->event.pressed) { - layer_on(NUM75); - } else { - layer_off(NUM75); - } - return false; - break; - case DIRECTION75: - if (record->event.pressed) { - layer_on(DIR75); - } else { - layer_off(DIR75); - } - return false; - break; - case ETCETERA75: - if (record->event.pressed) { - layer_on(ETC75); - } else { - layer_off(ETC75); - } - return false; - break; - case FUNCTION75: + case FUNCTION: if (record->event.pressed) { - layer_on(FN75); + layer_on(_FN); } else { - layer_off(FN75); + layer_off(_FN); } return false; break; diff --git a/users/wanleg/wanleg.h b/users/wanleg/wanleg.h index c2644cd6c40f..9d07760a7bd9 100644 --- a/users/wanleg/wanleg.h +++ b/users/wanleg/wanleg.h @@ -11,72 +11,33 @@ enum userspace_layers { gETC, _GK, _QW, - QW75, - GK75, ONE, SUB, SUP, NUM, DIR, ETC, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, + _FN, PAD, GK50, }; -#elif KEYBOARD_xd75 +#elif KEYBOARD_40percentclub_5x5 enum userspace_layers { - GK75 = 0, - QW75, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, - gGK, + GK50 = 0, _GK, _QW, PAD, - ONE, - SUB, - SUP, - NUM, - DIR, - ETC, - gNUM, - gDIR, - gETC, - GK50, -}; -#elif KEYBOARD_40percentclub_5x5 -enum userspace_layers { - GK50 = 0, gNUM, gDIR, gETC, - GK75, - QW75, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, - PAD, gGK, - _GK, - _QW, ONE, SUB, SUP, NUM, DIR, ETC, + _FN, }; #else enum userspace_layers { @@ -93,14 +54,7 @@ enum userspace_layers { gNUM, gDIR, gETC, - QW75, - GK75, - SUB75, - SUP75, - NUM75, - DIR75, - ETC75, - FN75, + _FN, GK50, }; #endif @@ -109,8 +63,6 @@ enum userspace_custom_keycodes { gGHERKIN = SAFE_RANGE, GHERKIN, QWERTY, - QWERTY75, - GHERKIN75, ONEHAND, SUBTER, SUPRA, @@ -120,12 +72,7 @@ enum userspace_custom_keycodes { gNUMBER, gDIRECTION, gETCETERA, - SUBTER75, - SUPRA75, - NUMBER75, - DIRECTION75, - ETCETERA75, - FUNCTION75, + FUNCTION, NUMPAD, GHERKIN50, @@ -215,14 +162,14 @@ enum { /* Et Cetera * .-----------------------------------------------------------------------------------------. - * | ` | mUP | | | RESET | SHIFT | mScrUp | mScrDn | | \ | + * | ` | mUP | | | RESET | SHIFT | mScrDn | mScrUp | | \ | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | Sft//Cp| CAPS | | | | C-A-D | mScrL | mScrR | ALT | DEL | * '-----------------------------------------------------------------------------------------' */ -#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_U, KC_WH_D, _______, KC_BSLS +#define _______________Gherkin_ETC_0_______________ KC_GRV, KC_MS_U, _______,_______, RESET, KC_RSFT, KC_WH_D, KC_WH_U, _______, KC_BSLS #define _______________Gherkin_ETC_1_______________ KC_MS_L, KC_MS_D, KC_MS_R,_______, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT #define _______________Gherkin_ETC_2_______________ TD(TD_SFT_CAPS),KC_CAPS, _______,_______, _______, LALT(LCTL(KC_DEL)), KC_WH_L, KC_WH_R, KC_LALT, KC_DEL From c2390bf32156884d6825686c7f13f9c621bab366 Mon Sep 17 00:00:00 2001 From: Matthew Lyon Date: Sun, 30 Dec 2018 07:54:10 -0800 Subject: [PATCH 045/458] Keymap: mattly: more tweaks (#4746) --- keyboards/planck/keymaps/mattly/keymap.c | 94 +++++++++++------------- 1 file changed, 42 insertions(+), 52 deletions(-) diff --git a/keyboards/planck/keymaps/mattly/keymap.c b/keyboards/planck/keymaps/mattly/keymap.c index 2495f8a19c00..baa7d9fbf7c8 100644 --- a/keyboards/planck/keymaps/mattly/keymap.c +++ b/keyboards/planck/keymaps/mattly/keymap.c @@ -24,7 +24,6 @@ enum planck_layers { _NUMBER, _SYMBOL, _FUNC, - _ADJUST }; enum planck_keycodes { @@ -33,11 +32,10 @@ enum planck_keycodes { #define SPC_SHF MT(MOD_LSFT, KC_SPC) -#define ENT_FUN LT(_FUNC, KC_ENT) -#define ESC_FUN LT(_FUNC, KC_ESC) +#define ESC_HYP MT(MOD_HYPR, KC_ESC) #define TAB_NUM LT(_NUMBER, KC_TAB) #define BSP_SYM LT(_SYMBOL, KC_BSPC) -#define DEL_ADJ LT(_ADJUST, KC_DEL) +#define DEL_WRP MT(MOD_LCTL | MOD_LALT | MOD_LGUI, KC_DEL) #define SYMLOCK TG(_SYMBOL) #define NUMLOCK TG(_NUMBER) @@ -48,18 +46,25 @@ enum planck_keycodes { #define ONE_HYP OSM(MOD_HYPR) #define ONE_MEH OSM(MOD_MEH) #define ONE_WRP OSM(MOD_LCTL | MOD_LALT | MOD_LGUI) - -#define A_CTRL MT(MOD_LCTL, KC_A) -#define S_ALT MT(MOD_LALT, KC_S) -#define D_GUI MT(MOD_LGUI, KC_D) -#define F_SHFT MT(MOD_LSFT, KC_F) -#define G_NUM LT(_NUMBER, KC_G) -#define H_NAV LT(_SYMBOL, KC_H) -#define J_SHFT MT(MOD_RSFT, KC_J) -#define K_GUI MT(MOD_RGUI, KC_K) -#define L_ALT MT(MOD_RALT, KC_L) +#define ONE_WOA OSM(MOD_LCTL | MOD_LGUI | MOD_LSFT) +#define ONE_DER OSM(MOD_LALT | MOD_LGUI | MOD_LSFT) + +#define A_CTRL MT(MOD_LCTL, KC_A) +#define S_ALT MT(MOD_LALT, KC_S) +#define D_GUI MT(MOD_LGUI, KC_D) +#define F_SHFT MT(MOD_LSFT, KC_F) +#define J_SHFT MT(MOD_RSFT, KC_J) +#define K_GUI MT(MOD_RGUI, KC_K) +#define L_ALT MT(MOD_RALT, KC_L) #define MINSCTL MT(MOD_RCTL, KC_MINS) -#define SCL_CTL MT(MOD_RCTL, KC_SCLN) + +#define ENT_CTL MT(MOD_LCTL, KC_ENT) +#define LT_ALT MT(MOD_LALT, KC_LEFT) +#define DN_GUI MT(MOD_LGUI, KC_DOWN) +#define RT_SHFT MT(MOD_LSFT, KC_RGHT) +#define N4_SHFT MT(MOD_RSFT, KC_4) +#define N5_GUI MT(MOD_RGUI, KC_5) +#define N6_ALT MT(MOD_RALT, KC_6) #define BWORD LALT(KC_LEFT) #define FWORD LALT(KC_RIGHT) @@ -68,6 +73,8 @@ enum planck_keycodes { #define PWIN LGUI(LSFT(KC_GRV)) #define NTAB LGUI(LSFT(KC_RBRC)) #define PTAB LGUI(LSFT(KC_LBRC)) +#define NAVBACK LGUI(KC_LBRC) +#define NAVFWD LGUI(KC_RBRC) #define XMSNCTL HYPR(KC_F14) #define XDSKTOP HYPR(KC_F15) @@ -82,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | | | | | | | | | | | | | |------|------|------|------|------|------|------|------|------|------|------|------| | ( | a | s | d | f | g | h | j | k | l | ; | ' | - | | CTRL | ALT | GUI | SHIFT| NUMBR| SYMBL| SHIFT| GUI | ALT | CTRL | | + | | CTRL | ALT | GUI | SHIFT| | | SHIFT| GUI | ALT | CTRL | | |------|------|------|------|------|------|------|------|------|------|------|------| | [ | z | x | c | v | b | n | m | , | . | / | > | | | | | | | | | | | | | | @@ -92,71 +99,54 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = LAYOUT_planck_grid( KC_HASH, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SCLN, - KC_LPRN, A_CTRL, S_ALT, D_GUI, F_SHFT, G_NUM, H_NAV, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, + KC_LPRN, A_CTRL, S_ALT, D_GUI, F_SHFT, KC_G, KC_H, J_SHFT, K_GUI, L_ALT, MINSCTL, KC_QUOT, KC_LBRC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RABK, - KC_CAPS, ONE_ALT, ONE_GUI, ESC_FUN, TAB_NUM, SPC_SHF, SPC_SHF, BSP_SYM, DEL_ADJ, ONE_HYP, ONE_MEH, ONE_WRP + NUMLOCK, MO(_FUNC), ONE_MEH, ESC_HYP, TAB_NUM, SPC_SHF, SPC_SHF, BSP_SYM, DEL_WRP, ONE_WRP, ONE_DER, SYMLOCK ), /* Symbol - | | & | ` | ~ | [ | ] | < | > | + | | | | - | - | | $ | % | = | ( | ) | | : | ! | @ | * | ' | - | | | ^ | # | { | } | | " | | | \ | | | - | | | | | LOCK | | .... | | | | | + | | & | ` | ~ | [ | ] | < | > | + | | | | | + | | $ | % | = | ( | ) | ; | : | ! | @ | _ | | + | | | ^ | # | { | } | ' | " | | | \ | ? | | + | | | | | | | .... | | | | | */ [_SYMBOL] = LAYOUT_planck_grid( - _______, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, _______, - _______, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_ASTR, _______, - _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, XXXXXXX, _______, - _______, _______, _______, _______, SYMLOCK, _______, _______, _______, _______, _______, _______, _______ + KC_ESC, KC_AMPR, KC_GRV, KC_TILD, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_PLUS, KC_ASTR, XXXXXXX, KC_DEL, + KC_ENT, KC_DLR, KC_PERC, KC_EQL, KC_LPRN, KC_RPRN, KC_SCLN, KC_COLN, KC_EXLM, KC_AT, KC_UNDS, KC_BSPC, + _______, XXXXXXX, KC_CIRC, KC_HASH, KC_LCBR, KC_RCBR, KC_QUOT, KC_DQUO, KC_PIPE, KC_BSLS, KC_QUES, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), /* Number | | |<-word| up |word->| PgUp | . | 7 | 8 | 9 | + | * | | | Enter| left | down | right| PgDn | 0 | 4 | 5 | 6 | - | / | | | Bksp | Home | tab | End | Del | , | 1 | 2 | 3 | = | % | - | | | | | .... | | LOCK | | : | $ | | + | | | | | .... | | | | : | $ | | */ [_NUMBER] = LAYOUT_planck_grid( - XXXXXXX, _______, BWORD, KC_UP, FWORD, KC_PGUP, KC_DOT, KC_7, KC_8, KC_9, KC_PLUS, KC_ASTR, - XXXXXXX, KC_ENT , KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_0, KC_4, KC_5, KC_6, KC_MINS, KC_SLSH, + XXXXXXX, XXXXXXX, BWORD, KC_UP, FWORD, KC_PGUP, KC_DOT, KC_7, KC_8, KC_9, KC_PLUS, KC_ASTR, + KC_CAPS, ENT_CTL, LT_ALT, DN_GUI, RT_SHFT, KC_PGDN, KC_0, N4_SHFT, N5_GUI, N6_ALT, MINSCTL, KC_SLSH, XXXXXXX, KC_BSPC, KC_HOME, KC_TAB, KC_END, KC_DEL, KC_COMM, KC_1, KC_2, KC_3, KC_EQL, KC_PERC, - _______, _______, _______, _______, _______, _______, _______, NUMLOCK, _______, KC_COLN, KC_DLR, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COLN, KC_DLR, _______ ), /* Function - * | | Mctl | Pspc | Nwin | Nspc | Desk | | F7 | F8 | F9 | F10 | F13 | - * | | Nctr | Ptab | Pwin | Ntab | | | F4 | F5 | F6 | F11 | F14 | + * | Reset| Mctl | Pspc | Nwin | Nspc | Desk | | F7 | F8 | F9 | F10 | F13 | + * | Debug| Nctr | Ptab | Pwin | Ntab | Back | Fwd | F4 | F5 | F6 | F11 | F14 | * | Mute | Vol- | Vol+ | Trk- | Trk+ | Play | | F1 | F2 | F3 | F12 | F15 | * | | | | | | | | | | | | | */ [_FUNC] = LAYOUT_planck_grid( - XXXXXXX, XMSNCTL, XPRVSPC, NWIN, XNXTSPC, XDSKTOP, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F13, - XXXXXXX, XNOTIFY, PTAB, PWIN, NTAB, XXXXXXX, XXXXXXX, KC_F4, KC_F5, KC_F6, KC_F11, KC_F14, + RESET, XMSNCTL, XPRVSPC, NWIN, XNXTSPC, XDSKTOP, XXXXXXX, KC_F7, KC_F8, KC_F9, KC_F10, KC_F13, + DEBUG, XNOTIFY, PTAB, PWIN, NTAB, NAVBACK, NAVFWD, KC_F4, KC_F5, KC_F6, KC_F11, KC_F14, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, KC_MPLY, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F12, KC_F15, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | Reset| Debug| | | | | | | | | | | - * | | | | | | | | | | | | | - * | | | | | | | | | | | | | - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT_planck_grid( - RESET, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - - }; #ifdef AUDIO_ENABLE #endif uint32_t layer_state_set_user(uint32_t state) { - /* state = update_tri_layer_state(state, _SYMBOL, _NUMBER, _ADJUST); */ + state = update_tri_layer_state(state, _SYMBOL, _NUMBER, _FUNC); return state; } From 46b4b4407ff6e23d0799b0f902e61f1fe3645a9a Mon Sep 17 00:00:00 2001 From: satt99 <39004890+satt99@users.noreply.github.com> Date: Mon, 31 Dec 2018 01:34:06 +0900 Subject: [PATCH 046/458] Comet46 add support for OLED (#4745) * Add OLED support for Comet46 * fix length of char "name" of keylogger.c * update ssd1306 * fix rules.mk * update led-receiver keymap * Update OLED related code * add mod_state_reader & modify led_state_reader * Update OLED related files * Update kemaps * Update readme * change default-oled-display to default * Add OSM compatibility to mod_state_reader * Code formatting * Use PROGMEM to store code_to_name * Clean up satt keymap * Rename default-led keymap to defult-rgbled --- keyboards/comet46/comet46.c | 8 - keyboards/comet46/comet46.h | 40 -- keyboards/comet46/config.h | 12 +- keyboards/comet46/i2c.c | 162 +++++++++ keyboards/comet46/i2c.h | 49 +++ .../comet46/keymaps/default-rgbled/keymap.c | 226 ++++++++++++ .../comet46/keymaps/default-rgbled/readme.md | 3 + keyboards/comet46/keymaps/default/config.h | 31 ++ keyboards/comet46/keymaps/default/keymap.c | 189 +++++++++- keyboards/comet46/keymaps/default/readme.md | 3 + keyboards/comet46/keymaps/default/rules.mk | 5 + .../comet46/keymaps/satt/action_pseudo_lut.c | 212 +++++------ keyboards/comet46/keymaps/satt/config.h | 34 ++ keyboards/comet46/keymaps/satt/keymap.c | 256 ++++++++----- .../comet46/keymaps/satt/keymap_jis2us.h | 46 +-- keyboards/comet46/keymaps/satt/rules.mk | 29 +- keyboards/comet46/lib/glcdfont.c | 148 ++++++++ keyboards/comet46/lib/host_led_state_reader.c | 15 + keyboards/comet46/lib/keylogger.c | 294 +++++++++++++++ keyboards/comet46/lib/modifier_state_reader.c | 18 + keyboards/comet46/readme.md | 5 +- keyboards/comet46/rules.mk | 16 +- keyboards/comet46/ssd1306.c | 344 ++++++++++++++++++ keyboards/comet46/ssd1306.h | 91 +++++ 24 files changed, 1906 insertions(+), 330 deletions(-) create mode 100644 keyboards/comet46/i2c.c create mode 100644 keyboards/comet46/i2c.h create mode 100644 keyboards/comet46/keymaps/default-rgbled/keymap.c create mode 100644 keyboards/comet46/keymaps/default-rgbled/readme.md create mode 100644 keyboards/comet46/keymaps/default/config.h create mode 100644 keyboards/comet46/keymaps/default/readme.md create mode 100644 keyboards/comet46/keymaps/default/rules.mk create mode 100644 keyboards/comet46/keymaps/satt/config.h create mode 100644 keyboards/comet46/lib/glcdfont.c create mode 100644 keyboards/comet46/lib/host_led_state_reader.c create mode 100644 keyboards/comet46/lib/keylogger.c create mode 100644 keyboards/comet46/lib/modifier_state_reader.c create mode 100644 keyboards/comet46/ssd1306.c create mode 100644 keyboards/comet46/ssd1306.h diff --git a/keyboards/comet46/comet46.c b/keyboards/comet46/comet46.c index 20dcfab83c97..0710b8e330d9 100644 --- a/keyboards/comet46/comet46.c +++ b/keyboards/comet46/comet46.c @@ -4,19 +4,11 @@ void uart_init(void) { SERIAL_UART_INIT(); } -void led_init(void) { - DDRD |= (1<<1); - PORTD |= (1<<1); - DDRF |= (1<<4) | (1<<5); - PORTF |= (1<<4) | (1<<5); -} - void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up matrix_init_user(); uart_init(); - led_init(); } void matrix_scan_kb(void) { diff --git a/keyboards/comet46/comet46.h b/keyboards/comet46/comet46.h index 7d6d6d513b87..07dad0a00144 100644 --- a/keyboards/comet46/comet46.h +++ b/keyboards/comet46/comet46.h @@ -6,46 +6,6 @@ #include "backlight.h" #include -#define red_led_off PORTF |= (1<<5) -#define red_led_on PORTF &= ~(1<<5) -#define blu_led_off PORTF |= (1<<4) -#define blu_led_on PORTF &= ~(1<<4) -#define grn_led_off PORTD |= (1<<1) -#define grn_led_on PORTD &= ~(1<<1) - -#define set_led_off red_led_off; grn_led_off; blu_led_off -#define set_led_red red_led_on; grn_led_off; blu_led_off -#define set_led_blue red_led_off; grn_led_off; blu_led_on -#define set_led_green red_led_off; grn_led_on; blu_led_off -#define set_led_yellow red_led_on; grn_led_on; blu_led_off -#define set_led_magenta red_led_on; grn_led_off; blu_led_on -#define set_led_cyan red_led_off; grn_led_on; blu_led_on -#define set_led_white red_led_on; grn_led_on; blu_led_on - -/* -#define LED_B 5 -#define LED_R 6 -#define LED_G 7 - -#define all_leds_off PORTF &= ~(1<. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -65,6 +59,12 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +// Define masks for modifiers +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + //UART settings for communication with the RF microcontroller #define SERIAL_UART_BAUD 1000000 #define SERIAL_UART_DATA UDR1 diff --git a/keyboards/comet46/i2c.c b/keyboards/comet46/i2c.c new file mode 100644 index 000000000000..4bee5c639829 --- /dev/null +++ b/keyboards/comet46/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency 400kHz +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/comet46/keymaps/default-rgbled/keymap.c b/keyboards/comet46/keymaps/default-rgbled/keymap.c new file mode 100644 index 000000000000..d446d50d0508 --- /dev/null +++ b/keyboards/comet46/keymaps/default-rgbled/keymap.c @@ -0,0 +1,226 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +enum comet46_layers +{ + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | S | D | F | G | Esc | | Del | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | | } | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_ESC, KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Colemak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | R | S | T | D | Esc | | Del | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | | } | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_ESC, KC_DEL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Dvorak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | O | E | U | I | Esc | | Del | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | { | | } | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_DVORAK] = LAYOUT( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_DEL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCBR, KC_RCBR, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Lower + * ,-----------------------------------------+ +-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | | | | ` | \ | - | = | [ | ] | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | | | | ~ | | | _ | + | { | } | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_LOWER] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Raise + * ,-----------------------------------------+ +-----------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | End | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | PgDn | PgUp | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_RAISE] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * ,-----------------------------------------+ +-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Qwerty| |Colemk| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Reset | |Dvorak| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET, DVORAK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ) +}; + + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +} + +// settings for LED on receiver +void led_init(void) { + DDRD |= (1<<1); + PORTD |= (1<<1); + DDRF |= (1<<4) | (1<<5); + PORTF |= (1<<4) | (1<<5); +} + +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + +void matrix_init_user(void) { + led_init(); +} + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + uint8_t default_layer = biton32(eeconfig_read_default_layer()); + switch (layer) { + case _LOWER: + set_led_red; + break; + case _RAISE: + set_led_blue; + break; + case _ADJUST: + set_led_magenta; + break; + default: + switch (default_layer) { + case _COLEMAK: + set_led_white; + break; + case _DVORAK: + set_led_yellow; + break; + default: + set_led_green; + break; + } + break; + } +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } + return true; +} diff --git a/keyboards/comet46/keymaps/default-rgbled/readme.md b/keyboards/comet46/keymaps/default-rgbled/readme.md new file mode 100644 index 000000000000..40cc74433765 --- /dev/null +++ b/keyboards/comet46/keymaps/default-rgbled/readme.md @@ -0,0 +1,3 @@ +## default-led + +A keymap that is compatible with mitosis-type receivers, which use RGB LED for layer indication. diff --git a/keyboards/comet46/keymaps/default/config.h b/keyboards/comet46/keymaps/default/config.h new file mode 100644 index 000000000000..7873cf5a72a3 --- /dev/null +++ b/keyboards/comet46/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +// #include "../../config.h" + +/* Use I2C or Serial */ + +#define USE_I2C +#define SSD1306OLED + +#endif diff --git a/keyboards/comet46/keymaps/default/keymap.c b/keyboards/comet46/keymaps/default/keymap.c index b03ece4e9529..c87492e4b948 100644 --- a/keyboards/comet46/keymaps/default/keymap.c +++ b/keyboards/comet46/keymaps/default/keymap.c @@ -2,6 +2,10 @@ // This is the canonical layout file for the Quantum project. If you want to add another keyboard, #include QMK_KEYBOARD_H +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -9,13 +13,18 @@ // entirely and just use numbers. enum comet46_layers { - _QWERTY, - _LOWER, - _RAISE, + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST, }; enum custom_keycodes { QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, LOWER, RAISE, }; @@ -46,6 +55,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT ), + /* Colemak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | R | S | T | D | Esc | | Del | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | | } | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_ESC, KC_DEL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + + /* Dvorak + * ,-----------------------------------------+ +-----------------------------------------. + * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Ctl | A | O | E | U | I | Esc | | Del | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | { | | } | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | GUI | Lower| Space| | Enter| Raise| Alt | + * +--------------------/ \--------------------+ + */ + [_DVORAK] = LAYOUT( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_ESC, KC_DEL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LCBR, KC_RCBR, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_LALT + ), + /* Lower * ,-----------------------------------------+ +-----------------------------------------. * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | @@ -70,7 +115,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| * | | F1 | F2 | F3 | F4 | F5 | F6 | | | Left | Down | Up |Right | End | | * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | | | | | | + * | | F7 | F8 | F9 | F10 | F11 | F12 | | Home | | PgDn | PgUp | | | | * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| * | | | | | | | | * +--------------------/ \--------------------+ @@ -78,26 +123,134 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, _______, - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * ,-----------------------------------------+ +-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Qwerty| |Colemk| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+------+------| + * | | | | | | |Reset | |Dvorak| | | | | | | + * |------+------+------+------+------+------+------+ +------+------+------+------+------+-------------| + * | | | | | | | | + * +--------------------/ \--------------------+ + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, RESET, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// You need to add source files to SRC in rules.mk when using OLED display functions +void set_keylog(uint16_t keycode); +const char *read_keylog(void); +const char *read_modifier_state(void); +const char *read_host_led_state(void); + +void matrix_init_user(void) { + iota_gfx_init(false); // turns on the display +} + void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - switch (layer) { - case _QWERTY: - set_led_green; - break; - case _RAISE: - set_led_blue; - break; - case _LOWER: - set_led_red; - break; + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void render_status(struct CharacterMatrix *matrix) { + // Layer state + char layer_str[22]; + matrix_write(matrix, "Layer: "); + uint8_t layer = biton32(layer_state); + uint8_t default_layer = biton32(eeconfig_read_default_layer()); + switch (layer) { + case _QWERTY: + switch (default_layer) { + case _QWERTY: + snprintf(layer_str, sizeof(layer_str), "Qwerty"); + break; + case _COLEMAK: + snprintf(layer_str, sizeof(layer_str), "Colemak"); + break; + case _DVORAK: + snprintf(layer_str, sizeof(layer_str), "Dvorak"); + break; default: - set_led_green; - break; + snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer); + break; + } + break; + case _RAISE: + snprintf(layer_str, sizeof(layer_str), "Raise"); + break; + case _LOWER: + snprintf(layer_str, sizeof(layer_str), "Lower"); + break; + case _ADJUST: + snprintf(layer_str, sizeof(layer_str), "Adjust"); + break; + default: + snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); + } + matrix_write_ln(matrix, layer_str); + // Last entered keycode + matrix_write_ln(matrix, read_keylog()); + // Modifier state + matrix_write_ln(matrix, read_modifier_state()); + // Host Keyboard LED Status + matrix_write(matrix, read_host_led_state()); +} + + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + render_status(&matrix); + matrix_update(&display, &matrix); +} + +#endif//SSD1306OLED + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef SSD1306OLED + if (record->event.pressed) { + set_keylog(keycode); } + #endif + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + break; + } + return true; } diff --git a/keyboards/comet46/keymaps/default/readme.md b/keyboards/comet46/keymaps/default/readme.md new file mode 100644 index 000000000000..b0085d2a626e --- /dev/null +++ b/keyboards/comet46/keymaps/default/readme.md @@ -0,0 +1,3 @@ +## default-oled-display + +A keymap that is compatible with receivers with an OLED display. diff --git a/keyboards/comet46/keymaps/default/rules.mk b/keyboards/comet46/keymaps/default/rules.mk new file mode 100644 index 000000000000..3fa01f96af59 --- /dev/null +++ b/keyboards/comet46/keymaps/default/rules.mk @@ -0,0 +1,5 @@ +# If you want to change display settings of the OLED, you need to change the following lines +SRC += ./lib/glcdfont.c \ + ./lib/keylogger.c \ + ./lib/modifier_state_reader.c \ + ./lib/host_led_state_reader.c diff --git a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c index 5664d4d2a54d..0ac7133591f2 100644 --- a/keyboards/comet46/keymaps/satt/action_pseudo_lut.c +++ b/keyboards/comet46/keymaps/satt/action_pseudo_lut.c @@ -10,133 +10,133 @@ static uint8_t send_key_shift_bit[SHIFT_BIT_SIZE]; * Memo: Using other layer keymap to get keycode */ void action_pseudo_lut(keyrecord_t *record, uint8_t base_keymap_id, const uint16_t (*keymap)[2]) { - uint8_t prev_shift; - uint16_t keycode; - uint16_t pseudo_keycode; + uint8_t prev_shift; + uint16_t keycode; + uint16_t pseudo_keycode; - /* get keycode from keymap you specified */ - keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); + /* get keycode from keymap you specified */ + keycode = keymap_key_to_keycode(base_keymap_id, record->event.key); - prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); + prev_shift = keyboard_report->mods & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)); - if (record->event.pressed) { - /* when magic commands entered, keycode does not converted */ - if (IS_COMMAND()) { - if (prev_shift) { - add_shift_bit(keycode); - } - register_code(keycode); - return; - } + if (record->event.pressed) { + /* when magic commands entered, keycode does not converted */ + if (IS_COMMAND()) { + if (prev_shift) { + add_shift_bit(keycode); + } + register_code(keycode); + return; + } - if (prev_shift) { - pseudo_keycode = convert_keycode(keymap, keycode, true); - dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); - add_shift_bit(keycode); + if (prev_shift) { + pseudo_keycode = convert_keycode(keymap, keycode, true); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + add_shift_bit(keycode); - if (IS_LSFT(pseudo_keycode)) { - register_code(QK_LSFT ^ pseudo_keycode); - } else { - /* delete shift mod temporarily */ - del_mods(prev_shift); - send_keyboard_report(); - register_code(pseudo_keycode); - add_mods(prev_shift); - send_keyboard_report(); - } - } else { - pseudo_keycode = convert_keycode(keymap, keycode, false); - dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); + if (IS_LSFT(pseudo_keycode)) { + register_code(QK_LSFT ^ pseudo_keycode); + } else { + /* delete shift mod temporarily */ + del_mods(prev_shift); + send_keyboard_report(); + register_code(pseudo_keycode); + add_mods(prev_shift); + send_keyboard_report(); + } + } else { + pseudo_keycode = convert_keycode(keymap, keycode, false); + dprintf("pressed: %02X, converted: %04X\n", keycode, pseudo_keycode); - if (IS_LSFT(pseudo_keycode)) { - add_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - register_code(QK_LSFT ^ pseudo_keycode); - /* on Windows, prevent key repeat to avoid unintended output */ - unregister_code(QK_LSFT ^ pseudo_keycode); - del_weak_mods(MOD_BIT(KC_LSFT)); - send_keyboard_report(); - } else { - register_code(pseudo_keycode); - } - } + if (IS_LSFT(pseudo_keycode)) { + add_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + register_code(QK_LSFT ^ pseudo_keycode); + /* on Windows, prevent key repeat to avoid unintended output */ + unregister_code(QK_LSFT ^ pseudo_keycode); + del_weak_mods(MOD_BIT(KC_LSFT)); + send_keyboard_report(); + } else { + register_code(pseudo_keycode); + } + } + } else { + if (get_shift_bit(keycode)) { + del_shift_bit(keycode); + pseudo_keycode = convert_keycode(keymap, keycode, true); } else { - if (get_shift_bit(keycode)) { - del_shift_bit(keycode); - pseudo_keycode = convert_keycode(keymap, keycode, true); - } else { - pseudo_keycode = convert_keycode(keymap, keycode, false); - } - dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); + pseudo_keycode = convert_keycode(keymap, keycode, false); + } + dprintf("released: %02X, converted: %04X\n", keycode, pseudo_keycode); - if (IS_LSFT(pseudo_keycode)) { - unregister_code(QK_LSFT ^ pseudo_keycode); - } else { - unregister_code(pseudo_keycode); - } + if (IS_LSFT(pseudo_keycode)) { + unregister_code(QK_LSFT ^ pseudo_keycode); + } else { + unregister_code(pseudo_keycode); } + } } uint16_t convert_keycode(const uint16_t (*keymap)[2], uint16_t keycode, bool shift_modded) { - uint16_t pseudo_keycode; + uint16_t pseudo_keycode; - switch (keycode) { - case KC_A ... KC_CAPSLOCK: -#if defined(__AVR__) - if (shift_modded) { - pseudo_keycode = pgm_read_word(&keymap[keycode][1]); - } else { - pseudo_keycode = pgm_read_word(&keymap[keycode][0]); - } -#else - if (shift_modded) { - pseudo_keycode = keymap[keycode][1]; - } else { - pseudo_keycode = keymap[keycode][0]; - } -#endif - /* if undefined, use got keycode as it is */ - if (pseudo_keycode == 0x00) { - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - } - break; - default: - if (shift_modded) { - pseudo_keycode = S(keycode); - } else { - pseudo_keycode = keycode; - } - break; - } - return pseudo_keycode; + switch (keycode) { + case KC_A ... KC_CAPSLOCK: + #if defined(__AVR__) + if (shift_modded) { + pseudo_keycode = pgm_read_word(&keymap[keycode][1]); + } else { + pseudo_keycode = pgm_read_word(&keymap[keycode][0]); + } + #else + if (shift_modded) { + pseudo_keycode = keymap[keycode][1]; + } else { + pseudo_keycode = keymap[keycode][0]; + } + #endif + /* if undefined, use got keycode as it is */ + if (pseudo_keycode == 0x00) { + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + } + break; + default: + if (shift_modded) { + pseudo_keycode = S(keycode); + } else { + pseudo_keycode = keycode; + } + break; + } + return pseudo_keycode; } uint8_t get_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); - } else { - dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); - return 0; - } + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + return send_key_shift_bit[keycode >> 3] & (1 << (keycode & 7)); + } else { + dprintf("get_shift_bit: Can't get shift bit. keycode: %02X\n", keycode); + return 0; + } } void add_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); - } else { - dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); - } + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] |= (1 << (keycode & 7)); + } else { + dprintf("add_shift_bit: Can't add shift bit. keycode: %02X\n", keycode); + } } void del_shift_bit(uint16_t keycode) { - if ((keycode >> 3) < SHIFT_BIT_SIZE) { - send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); - } else { - dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); - } + if ((keycode >> 3) < SHIFT_BIT_SIZE) { + send_key_shift_bit[keycode >> 3] &= ~(1 << (keycode & 7)); + } else { + dprintf("del_shift_bit: Can't delete shift bit. keycode: %02X\n", keycode); + } } diff --git a/keyboards/comet46/keymaps/satt/config.h b/keyboards/comet46/keymaps/satt/config.h new file mode 100644 index 000000000000..c99de2cf804a --- /dev/null +++ b/keyboards/comet46/keymaps/satt/config.h @@ -0,0 +1,34 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* Use I2C or Serial */ + +#define USE_I2C +#define SSD1306OLED + +#endif diff --git a/keyboards/comet46/keymaps/satt/keymap.c b/keyboards/comet46/keymaps/satt/keymap.c index 7e728e5d08e8..eec40eff49c4 100644 --- a/keyboards/comet46/keymaps/satt/keymap.c +++ b/keyboards/comet46/keymaps/satt/keymap.c @@ -4,64 +4,96 @@ #include QMK_KEYBOARD_H #include "keymap_jis2us.h" #include "action_pseudo_lut.h" +#include "keymap_jp.h" +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. enum comet46_layers { - _QWERTY, - _LOWER, - _RAISE, - _PSEUDO_US, - _PSEUDO_US_LOWER, - _PSEUDO_US_RAISE, - _ADJUST + _QWERTY, + _LOWER, + _RAISE, + _PSEUDO_US, + _PSEUDO_US_LOWER, + _PSEUDO_US_RAISE, + _ADJUST }; enum custom_keycodes { QWERTY = SAFE_RANGE, PSEUDO_US, + JIS2US, }; -#define KC_LWR MO(_LOWER) -#define KC_RSE MO(_RAISE) +// JIS keycodes +#define KC_JZHT JP_ZHTG // hankaku/zenkaku|kanzi +#define KC_JCIR JP_CIRC // ^, ~ +#define KC_JAT JP_AT // @, ` +#define KC_JLBR JP_LBRC // [, { +#define KC_JCOL JP_COLN // :, * +#define KC_JRBR JP_RBRC // ], } +#define KC_JBSL JP_BSLS // \, _ +#define KC_JMHE JP_MHEN // muhenkan +#define KC_JHEN JP_HENK // henkan +#define KC_JKAN JP_KANA // katakana/hiragana|ro-mazi +#define KC_JMKA JP_MKANA //kana on MacOSX +#define KC_JMEI JP_MEISU //eisu on MacOSX +#define KC_JAMP JP_AMPR // & +#define KC_JQUO JP_QUOT // ' +#define KC_JLPR JP_LPRN // ( +#define KC_JRPR JP_RPRN // ) +#define KC_JEQL JP_EQL // = +#define KC_JTIL JP_TILD // ~ +#define KC_JPIP JP_PIPE // | +#define KC_JGRV JP_GRV // ` +#define KC_JLCB JP_LCBR // { +#define KC_JPLU JP_PLUS // + +#define KC_JAST JP_ASTR // * +#define KC_JRCB JP_RCBR // } +#define KC_JUND JP_UNDS // _ + +// Layer related keycodes +#define KC_LWR MO(_LOWER) +#define KC_RSE MO(_RAISE) #define KC_P_LW MO(_PSEUDO_US_LOWER) #define KC_P_RS MO(_PSEUDO_US_RAISE) #define KC_QWRT QWERTY #define KC_P_US PSEUDO_US +#define KC_J2US JIS2US + +// Special keycodes #define KC_SPCT CTL_T(KC_SPC) #define KC_ENSF SFT_T(KC_ENT) -#define KC_SFTA SFT_T(KC_A) -#define KC_CTSF S(KC_LCTL) +#define KC_CAEC MT(MOD_LCTL | MOD_LALT, KC_ESC) +#define KC_CSTB C_S_T(KC_TAB) #define KC_IMON ALT_T(KC_F13) #define KC_IMOF GUI_T(KC_F14) -#define KC_SRO S(KC_RO) -#define KC_SYEN S(KC_JYEN) #define KC_CAD LCA(KC_DEL) #define KC_RST RESET -#define LONGPRESS_DELAY 150 - // Fillers to make layering more clear -#define KC_ KC_TRNS +#define KC_ KC_TRNS #define KC_XXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc( + [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. - ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL , + CAEC, Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - TAB ,SFTA, S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,BSPC, + CSTB, A , S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,BSPC, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - CTSF, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,QUOT, + LSFT, Z , X , C , V , B ,LBRC, RBRC, N , M ,COMM,DOT ,SLSH,QUOT, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| IMOF,LWR ,SPCT, ENSF,RSE ,IMON // +----+----+---/ \---+----+----+ ), - [_LOWER] = LAYOUT_kc( + [_LOWER] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN, , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| @@ -69,60 +101,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , F7 , F8 , F9 , F10, F11, F12, TILD,PIPE,UNDS,PLUS,LCBR,RCBR, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_RAISE] = LAYOUT_kc( + [_RAISE] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| , , , , , , , XXXX,LEFT,DOWN, UP ,RGHT,END , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , HOME,XXXX,XXXX,XXXX,XXXX,XXXX, , + , , , , , , , HOME,XXXX,PGDN,PGUP,XXXX,XXXX, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_PSEUDO_US] = LAYOUT_kc( + [_PSEUDO_US] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. - ESC , Q , W , E , R , T , Y , U , I , O , P ,DEL , + CAEC, Q , W , E , R , T , Y , U , I , O , P ,DEL , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - TAB ,SFTA, S , D , F , G ,ASTR, LPRN, H , J , K , L ,FN0 ,BSPC, + CSTB, A , S , D , F , G ,JLPR, JRPR, H , J , K , L ,J2US,BSPC, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - CTSF, Z , X , C , V , B ,FN0 , FN0 , N , M ,COMM,DOT ,SLSH,FN0 , + LSFT, Z , X , C , V , B ,J2US, J2US, N , M ,COMM,DOT ,SLSH,J2US, //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| IMOF,P_LW,SPCT, ENSF,P_RS,IMON // +----+----+---/ \---+----+----+ ), - [_PSEUDO_US_LOWER] = LAYOUT_kc( + [_PSEUDO_US_LOWER] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. - ,EXLM,LBRC,HASH,DLR ,PERC, EQL ,CIRC, DQT,ASTR,LPRN, , + ,EXLM,JAT ,HASH,DLR ,PERC, JCIR,JAMP,JAST,JLPR,JRPR, , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - , F1 , F2 , F3 , F4 , F5 , F6 , LCBR,JYEN,MINS,UNDS,RBRC,BSLS, , + , F1 , F2 , F3 , F4 , F5 , F6 , JGRV,JBSL,MINS,JEQL,JLBR,JRBR, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , F7 , F8 , F9 , F10, F11, F12, PLUS,SYEN,SRO ,COLN,RCBR,PIPE, , + , F7 , F8 , F9 , F10, F11, F12, JTIL,JPIP,JUND,JPLU,JLCB,JRCB, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_PSEUDO_US_RAISE] = LAYOUT_kc( + [_PSEUDO_US_RAISE] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| - , , , , , , GRV, XXXX,LEFT,DOWN, UP ,RGHT,END , , + , , , , , ,JZHT, XXXX,LEFT,DOWN, UP ,RGHT,END , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , HOME,XXXX,XXXX,XXXX,XXXX,XXXX, , + , , , , , , , HOME,XXXX,PGDN,PGUP,XXXX,XXXX, , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ), - [_ADJUST] = LAYOUT_kc( + [_ADJUST] = LAYOUT_kc( //,----+----+----+----+----+----+ +----+----+----+----+----+----. , , , , , , , , , , , , //|----+----+----+----+----+----+----+ +----+----+----+----+----+----+----| @@ -130,90 +162,130 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , , , , , ,RST , P_US, , , , , , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , + , , , , , // +----+----+---/ \---+----+----+ ) }; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _PSEUDO_US_LOWER: + case _PSEUDO_US_RAISE: + return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); + break; + default: + return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); + break; + } +} -/* - * user defined action function - */ -enum function_id { - PSEUDO_US_FUNCTION, -}; +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) - { - case PSEUDO_US_FUNCTION: - action_pseudo_lut(record, _QWERTY, keymap_jis2us); - break; - } -} +// You need to add source files to SRC in rules.mk when using OLED display functions +void set_keylog(uint16_t keycode); +const char *read_keylog(void); +const char *read_modifier_state(void); +const char *read_host_led_state(void); -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(PSEUDO_US_FUNCTION), -}; +void matrix_init_user(void) { + iota_gfx_init(false); // turns on the display +} void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + iota_gfx_task(); // this is what updates the display continuously +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void render_status(struct CharacterMatrix *matrix) { + // Layer state + char layer_str[22]; + matrix_write(matrix, "Layer: "); + uint8_t layer = biton32(layer_state); + uint8_t default_layer = biton32(eeconfig_read_default_layer()); switch (layer) { - case _LOWER: - set_led_red; - break; + case _QWERTY: + switch (default_layer) { + case _QWERTY: + snprintf(layer_str, sizeof(layer_str), "Qwerty"); + break; + case _PSEUDO_US: + snprintf(layer_str, sizeof(layer_str), "Psuedo_US"); + break; + default: + snprintf(layer_str, sizeof(layer_str), "Undef-%d", default_layer); + break; + } + break; case _RAISE: - set_led_blue; - break; - case _PSEUDO_US_LOWER: - set_led_yellow; - break; + snprintf(layer_str, sizeof(layer_str), "Raise"); + break; + case _LOWER: + snprintf(layer_str, sizeof(layer_str), "Lower"); + break; case _PSEUDO_US_RAISE: - set_led_cyan; - break; + snprintf(layer_str, sizeof(layer_str), "P_US_Raise"); + break; + case _PSEUDO_US_LOWER: + snprintf(layer_str, sizeof(layer_str), "P_US_Lower"); + break; case _ADJUST: - set_led_magenta; - break; + snprintf(layer_str, sizeof(layer_str), "Adjust"); + break; default: - set_led_green; - break; + snprintf(layer_str, sizeof(layer_str), "Undef-%d", layer); } -}; + matrix_write_ln(matrix, layer_str); + // Last entered keycode + matrix_write_ln(matrix, read_keylog()); + // Modifier state + matrix_write_ln(matrix, read_modifier_state()); + // Host Keyboard LED Status + matrix_write(matrix, read_host_led_state()); +} -uint32_t layer_state_set_user(uint32_t state) { - switch (biton32(state)) { - case _PSEUDO_US: - return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); - break; - case _PSEUDO_US_LOWER: - return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); - break; - case _PSEUDO_US_RAISE: - return update_tri_layer_state(state, _PSEUDO_US_RAISE, _PSEUDO_US_LOWER, _ADJUST); - break; - default: - return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); - break; +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + +#if DEBUG_TO_SCREEN + if (debug_enable) { + return; } +#endif + + matrix_clear(&matrix); + render_status(&matrix); + matrix_update(&display, &matrix); } +#endif//SSD1306OLED + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef SSD1306OLED + if (record->event.pressed) { + set_keylog(keycode); + } + #endif switch (keycode) { case QWERTY: if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } - return false; break; case PSEUDO_US: if (record->event.pressed) { set_single_persistent_default_layer(_PSEUDO_US); } - return false; + break; + case JIS2US: + action_pseudo_lut(record, _QWERTY, keymap_jis2us); break; } return true; diff --git a/keyboards/comet46/keymaps/satt/keymap_jis2us.h b/keyboards/comet46/keymaps/satt/keymap_jis2us.h index cf2bd4f0e842..e32a0579aa09 100644 --- a/keyboards/comet46/keymaps/satt/keymap_jis2us.h +++ b/keyboards/comet46/keymaps/satt/keymap_jis2us.h @@ -3,30 +3,30 @@ /* keymap for convert from JIS to US */ const uint16_t PROGMEM keymap_jis2us[][2] = { - [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ + [KC_A ... KC_CAPS] = { 0x00, 0x00 }, /* default value */ - [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ - [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ - [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ - [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ - [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ - [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ - [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ - [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ - [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ - [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ - [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ - [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ - [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ - [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ - [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ - [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ - [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ - [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ - [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ - [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ - [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ - [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ + [KC_1] = { KC_1, KC_EXLM }, /* 1 and ! -> 1 and ! */ + [KC_2] = { KC_2, KC_LBRC }, /* 2 and " -> 2 and @ */ + [KC_3] = { KC_3, KC_HASH }, /* 3 and # -> 3 and # */ + [KC_4] = { KC_4, KC_DLR }, /* 4 and $ -> 4 and $ */ + [KC_5] = { KC_5, KC_PERC }, /* 5 and % -> 5 and % */ + [KC_6] = { KC_6, KC_EQL }, /* 6 and & -> 6 and ^ */ + [KC_7] = { KC_7, KC_CIRC }, /* 7 and ' -> 7 and & */ + [KC_8] = { KC_8, KC_DQT }, /* 8 and ( -> 8 and * */ + [KC_9] = { KC_9, KC_ASTR }, /* 9 and ) -> 9 and ( */ + [KC_0] = { KC_0, KC_LPRN }, /* 0 and (no assign) -> 0 and ) */ + [KC_MINS] = { KC_MINS, S(KC_RO) }, /* - and = -> - and _ */ + [KC_EQL] = { KC_UNDS, KC_COLN }, /* ^ and ~ -> = and + */ + [KC_LBRC] = { KC_RBRC, KC_RCBR }, /* @ and ` -> [ and { */ + [KC_RBRC] = { KC_BSLS, KC_PIPE }, /* [ and { -> ] and } */ + [KC_BSLS] = { KC_JYEN, S(KC_JYEN) }, /* ] and } -> / and | */ + [KC_NUHS] = { KC_NUHS, S(KC_NUHS) }, /* (no assign) */ + [KC_SCLN] = { KC_SCLN, KC_QUOT }, /* ; and + -> ; and : */ + [KC_QUOT] = { KC_AMPR, KC_AT }, /* : and * -> ' and " */ + [KC_GRV] = { KC_LCBR, KC_PLUS }, /* (no assign) -> ` and ~ */ + [KC_COMM] = { KC_COMM, KC_LT }, /* , and < -> , and < */ + [KC_DOT] = { KC_DOT, KC_GT }, /* . and > -> . and > */ + [KC_SLSH] = { KC_SLSH, KC_QUES }, /* / and ? -> / and ? */ }; #endif diff --git a/keyboards/comet46/keymaps/satt/rules.mk b/keyboards/comet46/keymaps/satt/rules.mk index dc4355c78f41..5839b778b888 100644 --- a/keyboards/comet46/keymaps/satt/rules.mk +++ b/keyboards/comet46/keymaps/satt/rules.mk @@ -1,26 +1,7 @@ SRC += action_pseudo_lut.c -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -ONEHAND_ENABLE = no # Enable one-hand typing - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +# If you want to change display settings of the OLED, you need to change the following lines +SRC += ./lib/glcdfont.c \ + ./lib/keylogger.c \ + ./lib/modifier_state_reader.c \ + ./lib/host_led_state_reader.c diff --git a/keyboards/comet46/lib/glcdfont.c b/keyboards/comet46/lib/glcdfont.c new file mode 100644 index 000000000000..e912d2233c42 --- /dev/null +++ b/keyboards/comet46/lib/glcdfont.c @@ -0,0 +1,148 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00 +}; +#endif // FONT5X7_H diff --git a/keyboards/comet46/lib/host_led_state_reader.c b/keyboards/comet46/lib/host_led_state_reader.c new file mode 100644 index 000000000000..864b1e24475f --- /dev/null +++ b/keyboards/comet46/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "comet46.h" + +char host_led_state_str[22]; + +const char *read_host_led_state(void) { + uint8_t leds = host_keyboard_leds(); + + snprintf(host_led_state_str, sizeof(host_led_state_str), "Lock: %s%s%s", + (leds & (1 << USB_LED_CAPS_LOCK)) ? "CAPL " : "", + (leds & (1 << USB_LED_SCROLL_LOCK)) ? "SCRL " : "", + (leds & (1 << USB_LED_NUM_LOCK)) ? "NUML" : ""); + + return host_led_state_str; +} diff --git a/keyboards/comet46/lib/keylogger.c b/keyboards/comet46/lib/keylogger.c new file mode 100644 index 000000000000..184f601095a1 --- /dev/null +++ b/keyboards/comet46/lib/keylogger.c @@ -0,0 +1,294 @@ +#include + +#ifdef __AVR__ + #include + #include +#else + #define PROGMEM +#endif + +#define NUM_USB_HID_KEYCODES 255 +#define LEN_KEYCODE_STR 4 + +char keylog[22] = {"KC: ID: "}; + +// Quick and dirty way to display USB HID keycodes used in QMK +// USB HID keycodes from 0x0000 to 0x00FF are stored in a 4x256+1 length char +const char code_to_name[] PROGMEM = { + "NO " //0x00 + "TRNS" + "? " + "? " + "A " + "B " + "C " + "D " + "E " + "F " + "G " + "H " + "I " + "J " + "K " + "L " + "M " //0x10 + "N " + "O " + "P " + "Q " + "R " + "S " + "T " + "U " + "V " + "W " + "X " + "Y " + "Z " + "1 " + "2 " + "3 " //0x20 + "4 " + "5 " + "6 " + "7 " + "8 " + "9 " + "0 " + "ENT " + "ESC " + "BSPC" + "TAB " + "SPC " + "MINS" + "EQL " + "LBRC" + "RBRC" //0x30 + "BSLS" + "NUHS" + "SCLN" + "QUOT" + "GRV " + "COMM" + "DOT " + "SLSH" + "CAPS" + "F1 " + "F2 " + "F3 " + "F4 " + "F5 " + "F6 " + "F7 " //0x40 + "F8 " + "F9 " + "F10 " + "F11 " + "F12 " + "PSCR" + "SLCK" + "PAUS" + "INS " + "HOME" + "PGUP" + "DEL " + "END " + "PGDN" + "RGHT" + "LEFT" //0x50 + "DOWN" + "UP " + "NLCK" + "PSLS" + "PAST" + "PMNS" + "PPLS" + "PENT" + "P1 " + "P2 " + "P3 " + "P4 " + "P5 " + "P6 " + "P7 " + "P8 " //0x60 + "P9 " + "P0 " + "PDOT" + "NUBS" + "APP " + "POW " + "PEQL" + "F13 " + "F14 " + "F15 " + "F16 " + "F17 " + "F18 " + "F19 " + "F20 " + "F21 " //0x70 + "F22 " + "F23 " + "F24 " + "EXEC" + "HELP" + "MENU" + "SLCT" + "STOP" + "AGIN" + "UNDO" + "CUT " + "COPY" + "PSTE" + "FIND" + "_MUT" + "_VUP" //0x80 + "_VDN" + "LCAP" + "LNUM" + "LSCR" + "PCMM" + "PEQA" + "INT1" + "INT2" + "INT3" + "INT4" + "INT5" + "INT6" + "INT7" + "INT8" + "INT9" + "LAN1" //0x90 + "LAN2" + "LAN3" + "LAN4" + "LAN5" + "LAN6" + "LAN7" + "LAN8" + "LAN9" + "ERAS" + "SYSR" + "CNCL" + "CLR " + "PRIR" + "RTRN" + "SEP " + "OUT " //0xA0 + "OPER" + "CLRA" + "CSEL" + "ESEL" + "PWR " //0xA5 + "SLEP" + "WAKE" + "MUTE" + "VOLU" + "VOLD" + "MNXT" + "MPRV" + "MSTP" + "MPLY" + "MSEL" + "EJCT" //0xB0 + "MAIL" + "CALC" + "MYCM" + "WSCH" + "WHOM" + "WBAK" + "WFWD" + "WSTP" + "WREF" + "WFAV" + "MFFD" + "MRWD" + "BRIU" + "BRID" + "? " + "FN0 " //0xC0 + "FN1 " + "FN2 " + "FN3 " + "FN4 " + "FN5 " + "FN6 " + "FN7 " + "FN8 " + "FN9 " + "FN10" + "FN11" + "FN12" + "FN13" + "FN14" + "FN15" + "FN16" //0xD0 + "FN17" + "FN18" + "FN19" + "FN20" + "FN21" + "FN22" + "FN23" + "FN24" + "FN25" + "FN26" + "FN27" + "FN28" + "FN29" + "FN30" + "FN31" + "LCTL" //0xE0 + "LSFT" + "LALT" + "LGUI" + "RCTL" + "RSFT" + "RALT" + "RGUI" + "? " + "? " + "? " + "? " + "? " + "? " + "? " + "? " + "MS_U" //0xF0 + "MS_D" + "MS_L" + "MS_R" + "BTN1" + "BTN2" + "BTN3" + "BTN4" + "BTN5" + "WH_U" + "WH_D" + "WH_L" + "WH_R" + "ACL0" + "ACL1" + "ACL2" +}; + +void set_keylog(uint16_t keycode) +{ + char name[LEN_KEYCODE_STR+1] = "? "; + + if (keycode <= NUM_USB_HID_KEYCODES) { + for (uint8_t k = 0; k < LEN_KEYCODE_STR; k++) { + name[k] = pgm_read_byte_near(code_to_name + keycode * LEN_KEYCODE_STR + k); + } + } else if (keycode > NUM_USB_HID_KEYCODES) { + snprintf(name, sizeof(name), "QMK "); + } + + // update keylog + snprintf(keylog, sizeof(keylog), "KC: %s ID: %d", name, keycode); +} + +const char *read_keylog(void) { + return keylog; +} diff --git a/keyboards/comet46/lib/modifier_state_reader.c b/keyboards/comet46/lib/modifier_state_reader.c new file mode 100644 index 000000000000..518eef92a623 --- /dev/null +++ b/keyboards/comet46/lib/modifier_state_reader.c @@ -0,0 +1,18 @@ +#include +#include "comet46.h" + +char modifier_state_str[22]; + +const char *read_modifier_state(void) { + uint8_t modifiers = get_mods(); + uint8_t one_shot = get_oneshot_mods(); + + snprintf(modifier_state_str, sizeof(modifier_state_str), "Mod: %s%s%s%s", + (modifiers & MODS_CTRL_MASK || one_shot & MODS_CTRL_MASK) ? "CTL " : "", + (modifiers & MODS_GUI_MASK || one_shot & MODS_GUI_MASK) ? "GUI " : "", + (modifiers & MODS_ALT_MASK || one_shot & MODS_ALT_MASK) ? "ALT " : "", + (modifiers & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) ? "SFT" : "" + ); + + return modifier_state_str; +} diff --git a/keyboards/comet46/readme.md b/keyboards/comet46/readme.md index 8df27183d05c..3db64d291ba6 100644 --- a/keyboards/comet46/readme.md +++ b/keyboards/comet46/readme.md @@ -1,6 +1,6 @@ # Comet46 -![Comet46](https://user-images.githubusercontent.com/39004890/42418180-d5bb188c-82d5-11e8-99fa-65020ce5ac5d.jpg) +![Comet46](https://user-images.githubusercontent.com/39004890/50396817-a1660600-07af-11e9-8611-3156c635db43.jpg) A split wireless 40% column-staggered keyboard @@ -13,4 +13,5 @@ Make example for this keyboard (after setting up your build environment): make comet46:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + diff --git a/keyboards/comet46/rules.mk b/keyboards/comet46/rules.mk index 648b8b20087f..897cc9b8c67f 100644 --- a/keyboards/comet46/rules.mk +++ b/keyboards/comet46/rules.mk @@ -1,12 +1,8 @@ - -OPT_DEFS += -DCOMET46_ORTHO_===PROMICRO -COMET46_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) - # # project specific files -SRC = matrix.c - - +SRC += matrix.c \ + i2c.c \ + ssd1306.c + # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -24,8 +20,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - -# # LUFA specific # # Target architecture (see library "Board Types" documentation). @@ -48,7 +42,7 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina +# BOOTLOADER = caterina # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT diff --git a/keyboards/comet46/ssd1306.c b/keyboards/comet46/ssd1306.c new file mode 100644 index 000000000000..4330c8497db2 --- /dev/null +++ b/keyboards/comet46/ssd1306.c @@ -0,0 +1,344 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +static const unsigned char font[] PROGMEM; + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 60000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + i2c_master_init(); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/comet46/ssd1306.h b/keyboards/comet46/ssd1306.h new file mode 100644 index 000000000000..ea8c9232805d --- /dev/null +++ b/keyboards/comet46/ssd1306.h @@ -0,0 +1,91 @@ +#pragma once + +#include +#include +#include "pincontrol.h" +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file From 3ddec14eb8c1b666df381573c6db8a4b2fda035f Mon Sep 17 00:00:00 2001 From: Giuseppe Rota Date: Sat, 29 Dec 2018 15:48:01 +0100 Subject: [PATCH 047/458] Register the interrupting keycode in the tap dance state struct --- quantum/process_keycode/process_tap_dance.c | 2 ++ quantum/process_keycode/process_tap_dance.h | 1 + 2 files changed, 3 insertions(+) diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c index b55ace5ba837..16d33dddeee5 100644 --- a/quantum/process_keycode/process_tap_dance.c +++ b/quantum/process_keycode/process_tap_dance.c @@ -131,6 +131,7 @@ void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record) { if (keycode == action->state.keycode && keycode == last_td) continue; action->state.interrupted = true; + action->state.interrupting_keycode = keycode; process_tap_dance_action_on_dance_finished (action); reset_tap_dance (&action->state); } @@ -209,5 +210,6 @@ void reset_tap_dance (qk_tap_dance_state_t *state) { state->count = 0; state->interrupted = false; state->finished = false; + state->interrupting_keycode = 0; last_td = 0; } diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h index 8b0a47c49b7f..ca12f4746e33 100644 --- a/quantum/process_keycode/process_tap_dance.h +++ b/quantum/process_keycode/process_tap_dance.h @@ -27,6 +27,7 @@ typedef struct uint8_t oneshot_mods; uint8_t weak_mods; uint16_t keycode; + uint16_t interrupting_keycode; uint16_t timer; bool interrupted; bool pressed; From 0c0e208a36300660f3d568d52ae3155becf92893 Mon Sep 17 00:00:00 2001 From: takashiski Date: Mon, 31 Dec 2018 07:53:09 +0900 Subject: [PATCH 048/458] define brainfuck keymap (#4742) * define brainfuck keymap * Update keyboards/namecard2x4/keymaps/brainfuck/readme.md Co-Authored-By: takashiski --- .../namecard2x4/keymaps/brainfuck/config.h | 19 ++++++ .../namecard2x4/keymaps/brainfuck/keymap.c | 59 +++++++++++++++++++ .../namecard2x4/keymaps/brainfuck/readme.md | 12 ++++ 3 files changed, 90 insertions(+) create mode 100644 keyboards/namecard2x4/keymaps/brainfuck/config.h create mode 100644 keyboards/namecard2x4/keymaps/brainfuck/keymap.c create mode 100644 keyboards/namecard2x4/keymaps/brainfuck/readme.md diff --git a/keyboards/namecard2x4/keymaps/brainfuck/config.h b/keyboards/namecard2x4/keymaps/brainfuck/config.h new file mode 100644 index 000000000000..dbacdcce5803 --- /dev/null +++ b/keyboards/namecard2x4/keymaps/brainfuck/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 takashiski + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/namecard2x4/keymaps/brainfuck/keymap.c b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c new file mode 100644 index 000000000000..287e011def4a --- /dev/null +++ b/keyboards/namecard2x4/keymaps/brainfuck/keymap.c @@ -0,0 +1,59 @@ +/* Copyright 2018 takashiski + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H +#include "keymap_jp.h" + +enum Layer +{ + JP, + EN, + CONFIG +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[JP] = LAYOUT( + JP_LT,JP_GT,JP_PLUS,JP_MINS,\ + LT(CONFIG,JP_DOT),JP_COMM,JP_LBRC,LT(CONFIG,JP_RBRC)\ + ), +[EN] = LAYOUT( + KC_LT,KC_GT,KC_PLUS,KC_MINS,\ + LT(CONFIG,KC_DOT),KC_COMM,KC_LBRC,LT(CONFIG,KC_RBRC)\ + ), +[CONFIG]= LAYOUT( + KC_NO,DF(JP),DF(JP),KC_NO,\ + KC_TRNS,DF(EN),DF(JP),KC_TRNS\ + ) + +}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/namecard2x4/keymaps/brainfuck/readme.md b/keyboards/namecard2x4/keymaps/brainfuck/readme.md new file mode 100644 index 000000000000..7fee17acd9c5 --- /dev/null +++ b/keyboards/namecard2x4/keymaps/brainfuck/readme.md @@ -0,0 +1,12 @@ +# keymap for brainfuck + + This keymap is specialized for the brainfuck programming language. + +| < | > | + | - | +| . | , | [ | ] | + +and when you hold . or ], change config layer. + +default layer is for JP keyboard(logical pairing). +you can choose EN keyboard(typewrite pairing). + From b7688590b8a252f7497e3f78d569b98ae62ab177 Mon Sep 17 00:00:00 2001 From: David Dai Date: Mon, 31 Dec 2018 08:42:58 -0800 Subject: [PATCH 049/458] Change rgblight_get_mode & rgb_matrix_get_mode's return type to uint8_t. (#4747) * Change rgblight_get_mode's return type to uint8_t. Since rgblight_get_mode() is just returning rgblight_config_t.mode, it should match rgblight_config_t.mode's type: uint8_t. * Update rgb_matrix_get_mode to return uint8_t. --- keyboards/mxss/rgblight.c | 2 +- quantum/rgb_matrix.c | 2 +- quantum/rgb_matrix.h | 2 +- quantum/rgblight.c | 2 +- quantum/rgblight.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index da7959c6a85c..73f94f3ab0ad 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -234,7 +234,7 @@ void rgblight_step_reverse(void) { rgblight_mode(mode); } -uint32_t rgblight_get_mode(void) { +uint8_t rgblight_get_mode(void) { if (!rgblight_config.enable) { return false; } diff --git a/quantum/rgb_matrix.c b/quantum/rgb_matrix.c index 82d36177b5bd..2ed36304dca5 100644 --- a/quantum/rgb_matrix.c +++ b/quantum/rgb_matrix.c @@ -973,7 +973,7 @@ void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_config.mode = mode; } -uint32_t rgb_matrix_get_mode(void) { +uint8_t rgb_matrix_get_mode(void) { return rgb_matrix_config.mode; } diff --git a/quantum/rgb_matrix.h b/quantum/rgb_matrix.h index 0cfeb4e069a8..e43532d11e77 100644 --- a/quantum/rgb_matrix.h +++ b/quantum/rgb_matrix.h @@ -180,7 +180,7 @@ void rgb_matrix_increase_speed(void); void rgb_matrix_decrease_speed(void); void rgb_matrix_mode(uint8_t mode); void rgb_matrix_mode_noeeprom(uint8_t mode); -uint32_t rgb_matrix_get_mode(void); +uint8_t rgb_matrix_get_mode(void); #ifndef RGBLIGHT_ENABLE #define rgblight_toggle() rgb_matrix_toggle() diff --git a/quantum/rgblight.c b/quantum/rgblight.c index ae5dca18844e..23420ddd87dd 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -234,7 +234,7 @@ void rgblight_step_reverse(void) { rgblight_step_reverse_helper(true); } -uint32_t rgblight_get_mode(void) { +uint8_t rgblight_get_mode(void) { if (!rgblight_config.enable) { return false; } diff --git a/quantum/rgblight.h b/quantum/rgblight.h index 99ede43c5b53..65dda3f5215f 100644 --- a/quantum/rgblight.h +++ b/quantum/rgblight.h @@ -167,7 +167,7 @@ void rgblight_enable(void); void rgblight_disable(void); void rgblight_step(void); void rgblight_step_reverse(void); -uint32_t rgblight_get_mode(void); +uint8_t rgblight_get_mode(void); void rgblight_mode(uint8_t mode); void rgblight_set(void); void rgblight_update_dword(uint32_t dword); From 7f0def77a201bd419517332581dbc2cc3b0bd7eb Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 31 Dec 2018 08:45:44 -0800 Subject: [PATCH 050/458] Move Split Common VPATH addition (#4716) Specifically, only add the split_common folder to COMMON_VPATH if the feature is eanbled, to prevent issues with compilation --- common.mk | 1 - common_features.mk | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 272d170e6883..aea29a7a20e2 100644 --- a/common.mk +++ b/common.mk @@ -21,5 +21,4 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras COMMON_VPATH += $(QUANTUM_PATH)/audio COMMON_VPATH += $(QUANTUM_PATH)/process_keycode COMMON_VPATH += $(QUANTUM_PATH)/api -COMMON_VPATH += $(QUANTUM_PATH)/split_common COMMON_VPATH += $(DRIVER_PATH) diff --git a/common_features.mk b/common_features.mk index 883681324b04..c86e8bbfe397 100644 --- a/common_features.mk +++ b/common_features.mk @@ -268,4 +268,5 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) $(QUANTUM_DIR)/split_common/split_util.c QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c + COMMON_VPATH += $(QUANTUM_PATH)/split_common endif From 40383089d035f69101851831f756508271fff103 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 31 Dec 2018 14:29:56 -0800 Subject: [PATCH 051/458] Keymap: Update for Drashna code - Proton C Prep Edition (#4708) * Make CRKBD keylogger output actually show tap keys * check MT/LT for twinkling * Add ortho 5x12 support for fractal keyboard * Use newer interface for setting pins/ports * Remove custom unicode methods * Reomve unicode input info * Odd rules issue * Redefine REST note to be more pleasing * Properly disable PM LEDs with GPIO commands * Update gitlab CI yaml file * Remove extra mod tap check * Remove initial state on ergodox glow * Rev6 Cleanup * Fix KC_MAKE macro * Update GitLab CI yaml file * More GitLab CI changes * One final GitLab CI change * Remove unneeded unicode support * Optimize KC_MAKE --- keyboards/crkbd/keymaps/drashna/keymap.c | 24 +-- keyboards/iris/keymaps/drashna/keymap.c | 10 +- keyboards/orthodox/keymaps/drashna/keymap.c | 10 +- keyboards/viterbi/keymaps/drashna/keymap.c | 11 +- layouts/community/ergodox/drashna/keymap.c | 10 +- layouts/community/ergodox/drashna/rules.mk | 2 +- .../community/ergodox/drashna_glow/rules.mk | 2 + layouts/community/ortho_4x12/drashna/config.h | 5 +- layouts/community/ortho_4x12/drashna/keymap.c | 13 +- layouts/community/ortho_5x12/drashna/config.h | 16 ++ layouts/community/ortho_5x12/drashna/keymap.c | 156 ++++++++++++++++++ layouts/community/ortho_5x12/drashna/rules.mk | 23 +++ users/drashna/.gitlab-ci.yml | 70 +++++++- users/drashna/config.h | 8 +- users/drashna/process_records.c | 41 ++--- users/drashna/rgb_stuff.c | 5 +- users/drashna/rules.mk | 13 -- users/drashna/send_unicode.c | 112 ------------- users/drashna/wrappers.h | 1 + 19 files changed, 339 insertions(+), 193 deletions(-) create mode 100644 layouts/community/ortho_5x12/drashna/config.h create mode 100644 layouts/community/ortho_5x12/drashna/keymap.c create mode 100644 layouts/community/ortho_5x12/drashna/rules.mk delete mode 100644 users/drashna/send_unicode.c diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 282ee2572534..678fd33b5757 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -88,16 +88,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_keymap(void) { - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif - - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif + + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); + #endif } //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h @@ -126,10 +128,10 @@ const char code_to_name[60] = { void set_keylog(uint16_t keycode, keyrecord_t *record) { char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } if (keycode < 60) { name = code_to_name[keycode]; } - // update keylog snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index ba6f18edde5a..d89656b7ea66 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -89,9 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 346ca4f12343..9373d851dcf8 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -97,9 +97,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index a343205197ee..9ca14961be56 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -87,10 +87,13 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index df9be62b7779..45860b8740e5 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -20,7 +20,6 @@ along with this program. If not, see . #ifdef UNICODEMAP_ENABLE #include "drashna_unicode.h" #endif // UNICODEMAP_ENABLE -extern uint8_t input_mode; #ifdef RGB_MATRIX_ENABLE extern bool g_suspend_state; @@ -425,17 +424,12 @@ void rgb_matrix_indicators_user(void) { } void matrix_init_keymap(void) { +#if 0 #ifdef RGB_MATRIX_KEYPRESSES rgblight_mode(RGB_MATRIX_MULTISPLASH); #else rgblight_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON); #endif - - input_mode = 2; -} - -#else -void matrix_init_keymap(void) { - input_mode = 2; +#endif } #endif //RGB_MATRIX_INIT diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 8bf53950e479..31488108b98e 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,6 +1,6 @@ TAP_DANCE_ENABLE = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no diff --git a/layouts/community/ergodox/drashna_glow/rules.mk b/layouts/community/ergodox/drashna_glow/rules.mk index 3b317224a6a4..c8941391ea14 100644 --- a/layouts/community/ergodox/drashna_glow/rules.mk +++ b/layouts/community/ergodox/drashna_glow/rules.mk @@ -7,3 +7,5 @@ ifneq (,$(findstring ergodox_ez,$(KEYBOARD))) RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = yes endif + +COMMAND_ENABLE = no diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 8658802d8394..0b0110dfa9f0 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) @@ -61,5 +60,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 205d12d8c3e0..5d32189342d9 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE ) @@ -219,4 +219,15 @@ void rgb_matrix_indicators_user(void) { void matrix_init_keymap(void) { rgblight_mode(RGB_MATRIX_MULTISPLASH); } +#else //RGB_MATRIX_INIT + +void matrix_init_keymap(void) { + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); + #endif +} #endif //RGB_MATRIX_INIT diff --git a/layouts/community/ortho_5x12/drashna/config.h b/layouts/community/ortho_5x12/drashna/config.h new file mode 100644 index 000000000000..e41dadc60155 --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/config.h @@ -0,0 +1,16 @@ +#pragma once + + +/* ws2812 RGB LED */ +#if defined(KEYBOARD_fractal) + #define RGB_DI_PIN D2 + #undef RGBLED_NUM + #define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 29 // Number of LEDs + #undef RGBLIGHT_HUE_STEP + #define RGBLIGHT_HUE_STEP 8 + #undef RGBLIGHT_SAT_STEP + #define RGBLIGHT_SAT_STEP 8 + #undef RGBLIGHT_VAL_STEP + #define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c new file mode 100644 index 000000000000..bf0907a513dd --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/keymap.c @@ -0,0 +1,156 @@ +/* Copyright 2015-2017 Jack Humbert + * Modified by KeyPCB for the Fractal keyboard + * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "drashna.h" + +#define LAYOUT_ortho_5x12_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ + ) \ + LAYOUT_ortho_5x12_wrapper( \ + KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ + KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ + KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ + KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, CTL_T(K3A), KC_ENT, \ + KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ) +#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ +), + +[_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ +), + +[_DVORAK] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ +), + +[_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper( + ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ +), + +[_MODS] = LAYOUT_ortho_5x12_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_5x12_wrapper( \ + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_PIPE, + KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, _______, + _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_5x12_wrapper( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, + KC_DEL, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, + _______, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_ortho_5x12_wrapper( \ + KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, + VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, + _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, + _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + + +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + } + return true; +}; + +void matrix_init_keymap(void) { +#ifdef KEYBOARD_fractal + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); +#endif +} diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk new file mode 100644 index 000000000000..160419fcce43 --- /dev/null +++ b/layouts/community/ortho_5x12/drashna/rules.mk @@ -0,0 +1,23 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +TAP_DANCE_ENABLE = no +AUDIO_ENABLE = yes +ifneq (,$(findstring fractal,$(KEYBOARD))) # Make sure it IS the Planck Light + RGB_MATRIX_ENABLE = no + AUDIO_ENABLE = no + RGBLIGHT_ENABLE = yes + RGBLIGHT_TWINKLE = yes + BOOTLOADER = qmk-dfu +endif + +ifeq ($(strip $(PROTOCOL)), VUSB) +NKRO_ENABLE = no +else +NKRO_ENABLE = yes +endif + + +MACROS_ENABLED = no diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index bd693babc3ad..9b18d44fb32e 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml @@ -1,26 +1,78 @@ stages: + - test - build + - deploy -qmk_firmware: +Tests: + stage: test + variables: + GIT_SUBMODULE_STRATEGY: recursive + tags: + - linux + image: ubuntu:18.10 + before_script: + - apt-get update -qy + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - avr-gcc --version + - uname -a + script: + - make test:all + - make planck/rev6:default + +QMK Firmware Defaults: + stage: deploy + variables: + GIT_SUBMODULE_STRATEGY: recursive + tags: + - linux + image: ubuntu:18.10 + before_script: + - apt-get update -qy + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - avr-gcc --version + - uname -a + script: + - make test:all + - make all:default -j16 + +Drashna Firmware: stage: build variables: GIT_SUBMODULE_STRATEGY: recursive tags: - linux - image: ubuntu + image: ubuntu:18.10 + before_script: + - apt-get update -qy + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - avr-gcc --version + script: + - make iris/rev2:drashna iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" + paths: + - ./*.hex + - ./*.bin + expire_in: 1 month + +Firmware Deploy: + stage: deploy + dependencies: + - Drashna Firmware + variables: + GIT_SUBMODULE_STRATEGY: recursive + tags: + - linux + image: ubuntu:18.10 before_script: - apt-get update -qy - - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util diffutils gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip + - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip - avr-gcc --version script: - - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna:production + - make iris/rev2:drashna:production iris/rev2:drashna_old:production ergodox_ez:drashna ergodox_ez:drashna_glow viterbi/rev1:drashna:production orthodox/rev1:drashna:production orthodox/rev3:drashna:production crkbd:drashna:production planck/light:drashna planck/rev6:drashna fractal:drashna:production artifacts: name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG" paths: - ./*.hex - ./*.bin - only: - - master - - drashna_keymaps - - merge-requests - - branches + expire_in: 1 month diff --git a/users/drashna/config.h b/users/drashna/config.h index a338512300e1..827b1b8acedf 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -14,8 +14,12 @@ #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f // #ifdef RGBLIGHT_ENABLE // #define NO_MUSIC_MODE -// #endif //RGBLIGHT_ENABLE -#endif +// #endif //RGBLIGHT_ENABLE/ +#ifndef __arm__ +#undef NOTE_REST +#define NOTE_REST 1.00f +#endif // !__arm__ +#endif // !AUDIO_ENABLE #ifdef RGBLIGHT_ENABLE #define RGBLIGHT_SLEEP diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 5e311e60e86e..17d7dc01c52a 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -51,27 +51,30 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { - uint8_t temp_mod = get_mods(); - uint8_t temp_osm = get_oneshot_mods(); - clear_mods(); clear_oneshot_mods(); - send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); - if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { - #if defined(__ARM__) - send_string_with_delay_P(PSTR(":dfu-util"), 10); - #elif defined(BOOTLOADER_DFU) - send_string_with_delay_P(PSTR(":dfu"), 10); - #elif defined(BOOTLOADER_HALFKAY) - send_string_with_delay_P(PSTR(":teensy"), 10); - #elif defined(BOOTLOADER_CATERINA) - send_string_with_delay_P(PSTR(":avrdude"), 10); - #endif // bootloader options - } + #if !defined(KEYBOARD_viterbi) + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); clear_oneshot_mods(); + #endif + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), MACRO_TIMER); #if defined(KEYBOARD_viterbi) - send_string_with_delay_P(PSTR(":dfu"), 10); + send_string_with_delay_P(PSTR(":dfu" SS_TAP(X_ENTER)), MACRO_TIMER); + #else + if (temp_mod & MODS_SHIFT_MASK || temp_osm & MODS_SHIFT_MASK) { + #if defined(__arm__) + send_string_with_delay_P(PSTR(":dfu-util"), MACRO_TIMER); + #elif defined(BOOTLOADER_DFU) + send_string_with_delay_P(PSTR(":dfu"), MACRO_TIMER); + #elif defined(BOOTLOADER_HALFKAY) + send_string_with_delay_P(PSTR(":teensy"), MACRO_TIMER); + #elif defined(BOOTLOADER_CATERINA) + send_string_with_delay_P(PSTR(":avrdude"), MACRO_TIMER); + #endif // bootloader options + } + if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), MACRO_TIMER); } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), MACRO_TIMER); + set_mods(temp_mod); #endif - if (temp_mod & MODS_CTRL_MASK || temp_osm & MODS_CTRL_MASK) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); } - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); - set_mods(temp_mod); } break; diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index d238c20651dc..7d00604b4e7f 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -200,7 +200,10 @@ void start_rgb_light(void) { bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + switch (keycode) { #ifdef RGBLIGHT_TWINKLE case KC_A ... KC_SLASH: case KC_F1 ... KC_F12: diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 5f243b007649..6d8612e71ae8 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -42,16 +42,3 @@ ifdef CONSOLE_ENABLE OPT_DEFS += -DKEYLOGGER_ENABLE endif endif - - -ifeq ($(strip $(UCIS_ENABLE)), yes) - SRC += send_unicode.c -endif - -ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += send_unicode.c -endif - -ifeq ($(strip $(UNICODE_ENABLE)), yes) - SRC += send_unicode.c -endif diff --git a/users/drashna/send_unicode.c b/users/drashna/send_unicode.c deleted file mode 100644 index ff35368da7f5..000000000000 --- a/users/drashna/send_unicode.c +++ /dev/null @@ -1,112 +0,0 @@ -// Written by konstantin: vomindoraan -#include "send_unicode.h" -#include -#include - -__attribute__((weak)) -void send_unicode_hex_string(const char* str) { - if (!str) { return; } // Safety net - - while (*str) { - // Find the next code point (token) in the string - for (; *str == ' '; str++); - size_t n = strcspn(str, " "); // Length of the current token - char code_point[n+1]; - strncpy(code_point, str, n); - code_point[n] = '\0'; // Make sure it's null-terminated - - // Normalize the code point: make all hex digits lowercase - for (char *p = code_point; *p; p++) { - *p = tolower((unsigned char)*p); - } - - // Send the code point as a Unicode input string - unicode_input_start(); - send_string(code_point); - unicode_input_finish(); - - str += n; // Move to the first ' ' (or '\0') after the current token - } -} - -// (ノಠ痊ಠ)ノ彡┻━┻ -// send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); - -//Old code -// (╯°□°)╯ ︵ ┻━┻ - #if 0 - register_code(KC_RSFT); - tap(KC_9); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - process_unicode((0x25A1 | QK_UNICODE), record); // Mouth - process_unicode((0x00B0 | QK_UNICODE), record); // Eye - register_code(KC_RSFT); - tap(KC_0); - unregister_code(KC_RSFT); - process_unicode((0x256F | QK_UNICODE), record); // Arm - tap(KC_SPC); - process_unicode((0x0361 | QK_UNICODE), record); // Flippy - tap(KC_SPC); - process_unicode((0x253B | QK_UNICODE), record); // Table - process_unicode((0x2501 | QK_UNICODE), record); // Table - process_unicode((0x253B | QK_UNICODE), record); // Table - #endif - - -// If you need a good converter: https://r12a.github.io/app-conversion/ -uint8_t saved_mods; - -void unicode_input_start (void) { - // save current mods - saved_mods = get_mods(); // Save current mods - clear_mods(); // Unregister mods to start from a clean state - - switch(get_unicode_input_mode()) { - case UC_OSX: - register_code(KC_LALT); - break; - case UC_OSX_RALT: - register_code(KC_RALT); - break; - case UC_LNX: - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - break; - case UC_WIN: - register_code(KC_LALT); - register_code(KC_PPLS); - unregister_code(KC_PPLS); - break; - case UC_WINC: - register_code(KC_RALT); - unregister_code(KC_RALT); - register_code(KC_U); - unregister_code(KC_U); - break; - } - wait_ms(UNICODE_TYPE_DELAY); -} - -void unicode_input_finish (void) { - switch(get_unicode_input_mode()) { - case UC_OSX: - case UC_WIN: - unregister_code(KC_LALT); - break; - case UC_OSX_RALT: - unregister_code(KC_RALT); - break; - case UC_LNX: - register_code(KC_SPC); - unregister_code(KC_SPC); - break; - } - - set_mods(saved_mods); // Reregister previously set mods -} diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index b45359f676b8..070a5a0a4a6f 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -14,6 +14,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro. #define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__) #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) +#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) /* Blocks for each of the four major keyboard layouts From 134a69f4ada6b50d98cb233c30cce05ddc39c1cd Mon Sep 17 00:00:00 2001 From: Frank Tackitt Date: Mon, 31 Dec 2018 15:55:48 -0700 Subject: [PATCH 052/458] Keyboard: Enable defaults for Sol (#4751) The enables RGB, Mousekeys, and Extrakeys for users of config.qmk.fm --- keyboards/sol/rules.mk | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/keyboards/sol/rules.mk b/keyboards/sol/rules.mk index f53e5b21fcc5..aa18721b6ceb 100644 --- a/keyboards/sol/rules.mk +++ b/keyboards/sol/rules.mk @@ -52,19 +52,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. CUSTOM_MATRIX = yes From c71c078dff74ea3047410c855f6e42bad7281f8c Mon Sep 17 00:00:00 2001 From: lbibass Date: Wed, 2 Jan 2019 11:42:03 -0500 Subject: [PATCH 053/458] Added brightness controls and Media controls to my keymap. (#4760) * Added my Mechmini2 layout to qmk. * Added more info to the readme. * Made changes. * Update keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c Co-Authored-By: lbibass * Update keyboards/mechmini/v2/keymaps/lbibass_split_space/keymap.c Co-Authored-By: lbibass * Added brightness and volume controls to MechMini 625 layout. --- .../v2/keymaps/lbibass_625_space/keymap.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c b/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c index 40bfc42de0f7..fba582e1b78a 100755 --- a/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c +++ b/keyboards/mechmini/v2/keymaps/lbibass_625_space/keymap.c @@ -4,6 +4,7 @@ #define _FN1 2 #define _FN2 3 #define _WIN 1 +#define _FN3 4 //Tap Dance Declarations enum { @@ -22,10 +23,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(OSL(2), KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, GUI_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_ENT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(TD_DOTCOM), OSL(2), OSM(MOD_RSFT), - KC_ESC, KC_LALT, KC_LCTL, KC_SPC, KC_RGUI, RGB_TOG), + KC_ESC, KC_LALT, KC_LCTL, KC_SPC, KC_RGUI, MO(4)), [_WIN] = LAYOUT_625_space( LT(OSL(2), KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_ENT), + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(4, KC_ENT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, TD(TD_DOTCOM), OSL(2), OSM(MOD_RSFT), KC_ESC, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RGB_TOG), [_FN1] = LAYOUT_625_space( @@ -35,14 +36,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_FN2] = LAYOUT_625_space( + KC_PWR, KC_BRID, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_MRWD, KC_MPLY, KC_MFFD, KC_MUTE, RESET, + MT(KC_LGUI, KC_ESC), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TG(1), KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FN3] = LAYOUT_625_space( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, MT(KC_LGUI, KC_ESC), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, TG(1), KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; - - - - - From 7b5fa4b13e332bab476b65565d63708b306d000a Mon Sep 17 00:00:00 2001 From: Frank Tackitt Date: Wed, 2 Jan 2019 10:16:55 -0700 Subject: [PATCH 054/458] Keymap: Add userspace for @kageurufu (#4752) * Add userspace for @kageurufu * Remove custom keycodes for layer keys Add some common defaults for my rules.mk --- keyboards/sol/keymaps/kageurufu/keymap.c | 346 +++--------------- keyboards/sol/keymaps/kageurufu/readme.md | 47 --- keyboards/zen/keymaps/kageurufu/keymap.c | 62 ++++ users/kageurufu/config.h | 4 + users/kageurufu/custom_rgb.c | 18 + users/kageurufu/custom_rgb.h | 3 + users/kageurufu/kageurufu.c | 12 + users/kageurufu/kageurufu.h | 5 + users/kageurufu/layouts.h | 58 +++ users/kageurufu/process_records.c | 44 +++ users/kageurufu/process_records.h | 27 ++ .../config.h => users/kageurufu/readme.md | 13 +- users/kageurufu/rules.mk | 15 + 13 files changed, 294 insertions(+), 360 deletions(-) delete mode 100644 keyboards/sol/keymaps/kageurufu/readme.md create mode 100644 keyboards/zen/keymaps/kageurufu/keymap.c create mode 100644 users/kageurufu/config.h create mode 100644 users/kageurufu/custom_rgb.c create mode 100644 users/kageurufu/custom_rgb.h create mode 100644 users/kageurufu/kageurufu.c create mode 100644 users/kageurufu/kageurufu.h create mode 100644 users/kageurufu/layouts.h create mode 100644 users/kageurufu/process_records.c create mode 100644 users/kageurufu/process_records.h rename keyboards/sol/keymaps/kageurufu/config.h => users/kageurufu/readme.md (78%) create mode 100644 users/kageurufu/rules.mk diff --git a/keyboards/sol/keymaps/kageurufu/keymap.c b/keyboards/sol/keymaps/kageurufu/keymap.c index 822256d85fb0..9ea89db0589a 100644 --- a/keyboards/sol/keymaps/kageurufu/keymap.c +++ b/keyboards/sol/keymaps/kageurufu/keymap.c @@ -1,69 +1,35 @@ #include QMK_KEYBOARD_H +#include "kageurufu.h" #ifdef PROTOCOL_LUFA #include "lufa.h" #include "split_util.h" #endif -#ifdef SSD1306OLED - #include "common/ssd1306.h" -#endif extern keymap_config_t keymap_config; - -#ifdef RGBLIGHT_ENABLE -//Following line allows macro to read current RGB settings -extern rgblight_config_t rgblight_config; -#endif - extern uint8_t is_master; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -enum layer_number { - _QWERTY = 0, - _COLEMAK, - _FN, - _ADJ -}; - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - FN, - ADJ, - BACKLIT, - RGBRST -}; - -enum macro_keycodes { - KC_SAMPLEMACRO, -}; - -#define FN_ESC LT(_FN, KC_ESC) - -// Define your non-alpha grouping in this define's LAYOUT, and all your BASE_LAYERS will share the same mod/macro columns - /* Base Layout - * ,------------------------------------------------. ,------------------------------------------------. - * | ` | | | | | | | | | | | | | | BkSp | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Tab | | | | | | | | | | | | | | \ | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Esc | | | | | | | | | | | | | | ' | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Sft( | | | | | | | | | | | | | | Sft) | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | Win | Win | Alt | FN | Space| RGB | | FN | FN | - | = | Down | PgUp | PgDn | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Space| Bksp | | Enter| Space| - * `-------------' `--------=----' - */ -#define BASE_LAYOUT( \ +/* Base Layout + * ,------------------------------------------------. ,------------------------------------------------. + * | ` | | | | | | | | | | | | | | BkSp | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Tab | | | | | | | | | | | | | | \ | + * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| + * | Esc | | | | | | | | | | | | | | ' | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Sft( | | | | | | | | | | | | | | Sft) | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | Win | Win | Alt | FN | Space| RGB | | FN | FN | - | = | Down | PgUp | PgDn | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Space| Bksp | | Enter| Space| + * `-------------' `--------=----' + */ +#define EXPAND_LAYOUT(...) LAYOUT(__VA_ARGS__) +#define _BASE_LAYOUT( \ _00, _01, _02, _03, _04, _05, _06, _07, _08, _09, \ _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, \ _20, _21, _22, _23, _24, _25, _26, _27, _28, _29 \ ) \ -LAYOUT( \ +EXPAND_LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, RGB_MOD, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_TAB, _00, _01, _02, _03, _04, KC_LBRC, KC_RBRC, _05, _06, _07, _08, _09, KC_BSLS, \ FN_ESC, _10, _11, _12, _13, _14, RGB_SAI, RGB_VAI, _15, _16, _17, _18, _19, KC_QUOT, \ @@ -71,265 +37,43 @@ LAYOUT( \ KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN, KC_SPC, FN, FN, KC_SPC, KC_MINS, KC_EQL, KC_DOWN, KC_PGUP, KC_PGDN, \ KC_VOLD, KC_VOLU, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_VOLD, KC_VOLU \ ) +#define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | E | R | T | | | | Y | U | I | O | P | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | S | D | F | G | | | | H | J | K | L | ; | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | V | B | | | | N | M | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | - * `-------------' `--------=----' - */ + [_QWERTY] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ - KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH \ + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, \ + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, \ + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ \ ), - /* Colemak - * ,------------------------------------------------. ,------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | Q | W | F | P | B | | | | J | L | U | Y | ; | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | | A | R | S | T | G | | | | K | N | E | I | O | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | Z | X | C | D | V | [ | | ] | M | H | , | . | / | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | | | | | | - * `-------------' `--------=----' - */ [_COLEMAK] = BASE_LAYOUT( \ - KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ - KC_A, KC_R, KC_S, KC_T, KC_G, KC_K, KC_N, KC_E, KC_I, KC_O, \ - KC_Z, KC_X, KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, KC_DOT, KC_SLSH + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, \ + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, \ + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ \ ), + [_COLEMAK_DH] = BASE_LAYOUT( \ + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, \ + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, \ + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ \ + ), - /* FN - * ,------------------------------------------------. ,------------------------------------------------. - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Ctrl | A | O | E | U | I | | | | D | H | T | N | S | / | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | [ | | ] | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | ADJ | Esc | Alt | GUI | EISU |Lower |Space | |Space |FN | KANA | Left | Down | Up |Right | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Lower |Space | |Space |FN | - * `-------------' `------------' - */ - [_FN] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, KC_PGDN, KC_UP, KC_PGUP, _______, KC_LBRC, _______, _______, KC_RBRC, KC_7, KC_UP, KC_9, KC_0, KC_HOME, \ - ADJ, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_RBRC, KC_END, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______, \ - _______, _______, _______, _______, ADJ, _______, ADJ, ADJ, ADJ, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ - KC_VOLD, KC_VOLU, _______, KC_DEL, _______, _______, KC_VOLD, KC_VOLU \ + [_FN] = EXPAND_LAYOUT( \ + ________________FUNCTION_L1________________, _______, KC_PSCR, ________________FUNCTION_R1________________, \ + ________________FUNCTION_L2________________, _______, _______, ________________FUNCTION_R2________________, \ + ________________FUNCTION_L3________________, _______, _______, ________________FUNCTION_R3________________, \ + ________________FUNCTION_L4________________, _______, _______, ________________FUNCTION_R4________________, \ + ________________FUNCTION_L5________________, ADJ, ADJ, ________________FUNCTION_R5________________, \ + KC_VOLD, KC_VOLU, _______, KC_DEL, _______, _______, KC_VOLD, KC_VOLU \ ), - /* ADJ - * ,------------------------------------------------. ,------------------------------------------------. - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------|------| |------|------+------+------+------+------+------| - * | Ctrl | A | O | E | U | I | | | | D | H | T | N | S | / | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | [ | | ] | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |ADJ| Esc | Alt | GUI | EISU |Lower |Space | |Space |FN | KANA | Left | Down | Up |Right | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * |Lower |Space | |Space |FN | - * `-------------' `------------' - */ - - [_ADJ] = LAYOUT( \ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, RGB_SAD, RGB_VAI, RGB_SAI, RESET, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ + [_ADJ] = EXPAND_LAYOUT( \ + _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \ + _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \ + _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \ + _________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \ + _________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \ KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_VOLD, KC_VOLU \ ) }; - - -// define variables for reactive RGB -bool TOG_STATUS = false; -int RGB_current_mode; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - //uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); - - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - set_single_persistent_default_layer(_QWERTY); - } - return false; - break; - case COLEMAK: - if(record->event.pressed) { - set_single_persistent_default_layer(_COLEMAK); - } - return false; - break; - case FN: - if (record->event.pressed) { - layer_on(_FN); - } else { - layer_off(_FN); - } - return false; - break; - case ADJ: - if (record->event.pressed) { - layer_on(_ADJ); - } else { - layer_off(_ADJ); - } - return false; - break; - //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released - case RGBRST: - #ifdef RGBLIGHT_ENABLE - if (record->event.pressed) { - eeconfig_update_rgblight_default(); - rgblight_enable(); - RGB_current_mode = rgblight_config.mode; - } - #endif - break; - } - return true; -} - -void matrix_init_user(void) { - #ifdef RGBLIGHT_ENABLE - RGB_current_mode = rgblight_config.mode; - #endif - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - led_test_init(); - iota_gfx_task(); // this is what updates the display continuously - #endif -} - - -//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h -#ifdef SSD1306OLED - -// hook point for 'led_test' keymap -// 'default' keymap's led_test_init() is empty function, do nothing -// 'led_test' keymap's led_test_init() force rgblight_mode_noeeprom(35); -__attribute__ ((weak)) -void led_test_init(void) {} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_FN (1<<_FN) -#define L_ADJ (1<<_ADJ) -#define L_ADJ_TRI (L_ADJ|L_FN) - -static void render_logo(struct CharacterMatrix *matrix) { - - static char logo[]={ - 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, - 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, - 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, - 0}; - matrix_write(matrix, logo); - //matrix_write_P(&matrix, PSTR(" Split keyboard kit")); -} - - - -void render_status(struct CharacterMatrix *matrix) { - - // Render to mode icon - static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; - if(keymap_config.swap_lalt_lgui==false){ - matrix_write(matrix, logo[0][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[0][1]); - }else{ - matrix_write(matrix, logo[1][0]); - matrix_write_P(matrix, PSTR("\n")); - matrix_write(matrix, logo[1][1]); - } - - // Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(matrix, PSTR("\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(matrix, PSTR("Default")); - break; - case L_FN: - matrix_write_P(matrix, PSTR("FN")); - break; - case L_ADJ: - case L_ADJ_TRI: - matrix_write_P(matrix, PSTR("ADJ")); - break; - default: - matrix_write(matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if(record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + } + #endif + break; + } + + + return process_record_keymap(keycode, record) && +#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) + process_record_rgb(keycode, record) && +#endif // RGBLIGHT_ENABLE; + true; +} + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + + +__attribute__ ((weak)) +bool process_record_rgb(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/users/kageurufu/process_records.h b/users/kageurufu/process_records.h new file mode 100644 index 000000000000..d1c50a4112b4 --- /dev/null +++ b/users/kageurufu/process_records.h @@ -0,0 +1,27 @@ +#pragma once +#include "kageurufu.h" + +#define FN_ESC LT(_FN, KC_ESC) +#define FN MO(_FN) +#define ADJ MO(_ADJ) + +enum layer_number { + _QWERTY = 0, + _COLEMAK, + _COLEMAK_DH, + _FN, + _ADJ, + ADDITIONAL_LAYER +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + CMAK_DH, + RGBRST, + KAGEURUFU_SAFE_RANGE +}; + + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); +bool process_record_rgb(uint16_t keycode, keyrecord_t *record); diff --git a/keyboards/sol/keymaps/kageurufu/config.h b/users/kageurufu/readme.md similarity index 78% rename from keyboards/sol/keymaps/kageurufu/config.h rename to users/kageurufu/readme.md index 452cdda82351..57dd85d6bed4 100644 --- a/keyboards/sol/keymaps/kageurufu/config.h +++ b/users/kageurufu/readme.md @@ -1,8 +1,4 @@ -/* -This is the c configuration file for the keymap - -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2018- Franklyn Tackitt franklyn@tackitt.net @kageurufu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -16,10 +12,3 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . -*/ - -#pragma once - - -// place overrides here - diff --git a/users/kageurufu/rules.mk b/users/kageurufu/rules.mk new file mode 100644 index 000000000000..1bd16e2626c6 --- /dev/null +++ b/users/kageurufu/rules.mk @@ -0,0 +1,15 @@ +SRC += kageurufu.c \ + process_records.c \ + custom_rgb.c + +# Link time optimization, should save on firmware size +EXTRAFLAGS += -flto + + +# Some usual defaults +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +RGBLIGHT_ENABLE = yes +RGBLIGHT_ANIMATIONS = yes From a7b1b146d12cce1858db59c1d99ce84fb37fc59e Mon Sep 17 00:00:00 2001 From: Jacob Jerrell Date: Wed, 2 Jan 2019 11:23:42 -0600 Subject: [PATCH 055/458] Keymap: Bocaj Layout and Userspace Refactor (#4753) * Bocaj Layout Revamp * Pull in Upstream (#1) * Various tweaks for some Input:Club build processes * change KEYMAP to LAYOUT for all new keyboards made using this script * Add support for rev3 of the Atom47 (#2672) * Added support for rev3 of the Atom47 * Updated Atom47 readme's * Fix redefine error on rev2 and add maartenwut's keymap * Fix redefine error on LEdiodes keymap * Add Nyquist keymap (#2692) * nyquist * danielhklein nyquist setup * shift left controls * remove readme * cleanup before pr * ready for pr * Adds Phantom TKL support (#2696) * Add an info.json to phantom keyboard * Add layouts - KEYMAP_WINKEYLESS - KEYMAP_7BIT - KEYMAP_ISO - KEYMAP_ISO_WINKEYLESS * Add key_counts * Add 2 missing F-Row keys * Add TKC1800 info.json Created an info.json for the tkc1800. * Clueboard 60 info.json - adds - LAYOUT_60_ansi - LAYOUT_60_iso - KEYMAP_AEK - KEYMAP - LAYOUT_60_ansi_split_bs_rshift * Add the Speedo keyboard * Fix KC60 info.json file (#2707) * change KEYMAP to LAYOUT in all the KC60 files * Redo the info.json file * Small fixes to TKC1800 - adjust F-row to use 0.25 spacing - split left shift - add key_count * Fix some Configurator Warnings regarding LAYOUT vs KEYMAP (#2708) * change diverge 3 KC_KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for handwired arrow pad * change M10A to LAYOUT for m10-a * Change KC_KEYMAP to LAYOUT_kc and KEYMAP to LAYOUT for mf68 * change KC_KEYMAP to LAYOUT for nano * Refactor to LAYOUT * refactor to LAYOUT-ansi and LAYOUT_iso for s65 * LAYOUT conversions for lfkkeyboards * missed a few renames * mini1800 for lfkeyobards support of LAYOUT * Improve state/chord handling and clean up namespace Some values that can never, ever, change were held in local variables, rather than in PROGMEM. Fixed. Change "pressed" to a signed int so the test for < 0 makes sense, and to avoid possible weird failure modes in the case where a key release comes in when pressed is already zero. (Shouldn't happen, sure, but computers are weird.) A lot of things in process_steno had external linkage for no particular reason. They've been marked static. Stuff still builds. Distinguish between currently-held keys and keys that have been held, and expose these values through a nicely-named API so other code could, say, check on the current set of steno chording in order to make displays. Also in passing fix up the "state" value having external linkage so it could clash with other people's variable declarations. The API also provides hooks for key processing and steno chord events, so you can monitor those events without having to run in matrix_scan_user and recheck the values directly. Also document these. There is no path through processing a key that doesn't end with a return false, so the nested return foo() are gone and we just return false. * Pull information from config.h and rules.mk (#2711) * Pull information from config.h and rules.mk * Readd the kbd75 maintainer * Remove obsolete info.json entries (#2712) * Clean up some long-standing errors when populating the API (#2715) * More Configurator Warning Fixes (#2716) * mf68_ble did not have the correct .c and .h files * Fix JC65 KEYMAP to LAYOUT * Change KEYMAP to LAYOUT for s60_x * Convert KEYMAP to LAYOUT for lets_split boards * Convert KEYMAP to LAYOUT * more fixes to keymap for iris * convert KEYMAP to LAYOUT for levinson keyboard * change losinggeneration's KEYMAP to LAYOUT * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for nyquist * convert KEYMAP to LAYOUT * convert KEYMAP to LAYOUT for viterbi * convert KEYMAP to LAYOUT * convert KEYMAP and its subsidiries to the LAYOUT standard * convert KEYMAP and its subsidiries to the new LAYOUT standard * Normacos keymap for let's split keyboard (#2691) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * hhkb jp personal keymap (#2698) * Add JJ40 Cockpit personal keymap (#2713) * Add JJ40 Cockpit keymap * Fix lower layer symbols * Add readme for "major" keyboards to eliminate more QMK Configurator errors (#2718) * add readme to ktype keyboard * add readme to m10a * add readme to mini1800 * add readme to parent directory * Revert "Pull in Upstream (#1)" This reverts commit eeba0cec17ccb636e4225eed88aeae72b99f5e45. * Updates to Bocaj Files - Gave up on Tap Dance for ' -> ' + Added another 'Secret' + Add ' -> ' to the Swap Hands key + Add Swap Hands to the ' -> ' key + Made Hand Swapping a momentary toggle - Removed Auto Shift + Added Layer Toggle to KC_QUOTE for the _TOOLS layer - Disabled Tap Dance * Merge remote-tracking branch 'upstream/master' * Updates to Bocaj Added Game Layers, Removed Unused Macros * Removed 'secrets.h' * Updates to Bocaj Remove 'secrets'. Remove 'sendstring_workman.h' and set related layer back to qwerty due to macro compatibility issues * Total revisioning of keymap and layout structure * Missed readme.md file * Bocaj - Permissive Hold setting enabled * Switching from ErgoDox EZ centric configuration to the layout/user approach * Bocaj - Create Userspace and Ergodox layout * Update settings.json * Pushing local updates * Reverting .vscode/settings.json * Adds pretty_osx and _win wrappers * Utilize Windows and Mac Wrappers * Update layouts/community/ergodox/bocaj/keymap.c * Updates to Bocaj keymap.c - Extended pretty_osx and pretty_win wrappers to allow modification of the bottom rows and thumb clusters. - Fixed already wrapped layouts to align with the change - Wrapped _NUMS and _CLICKY layers with the _osx wrapper because I main with a Mac * Updates to Bocaj Small documentation updates, added KC_MAKE from Drashna's layout, added KC_LOCK back to the diablo layer. * Add LShift to _Adjust layer * Minor changes to bocaj Put wrappers in userspace and added RESET keycode to the Adjust layer * Updates to Bocaj config & keymap; Fixed problem with process_leader.c - Made lots of changes to the bocaj layout and userspace - Pulled in latest upstream/master - Attempted to compile with latest and found an unneccessary `break` in process_leader.c * Bocaj - Updates to Layout and Userspace * Adjust LEADER_TIMEOUT to 350 * Put KC_GRAVE on _ADJUST layer * Eliminate _LOWER layer and associated definitions * Adjusted layer indicating LEDs to match changes * Fixed Diablo leader sequence * Added build info leader sequence * Got rid of obsoleted IGNORE_MOD_TAP_INTERRUPT/PERMISSIVE_HOLD/PREVENT_STUCK_MODIFIERS (may add STRICT_LAYER_RELEASE in the future) * Remove type_traits Not sure what in my VSCode config always brings this one in * refactor stage 1 * Bocaj Refactor Phase II * Made LED_2 brighter if both CTRL & GUI are being held * Enabled unicode because I got it to work in Mac OS * Finalized Build Info leader combination after testing in Mac OS * Not sure why KC_D3_1 was set to ASDF if !TAP_DANCE_ENABLE. So I changed that back * Experienced issues with `EXTRAFLAGS += -flto` using Docker in MacOS. Not sure what it does, but I don't seem to be missing anything * Wrote obligatory readme.md files and mentioned Drashna too many times... I don't think I can actually take credit for much of anything here. * Updates to Bocaj Made LED changes, added LM_DFLT which is similar to the grave macro, enabled retro tapping, working on a unicode idea -- currently fails to build. * Bocaj Refactor Phase 3 Part 2 - Continuation of implementing unicode switching based on default layer - Slight adjustments to _DIABLO and base wrapper because LM_DFLT macro didn't function as I'd hoped * Slight adjustment to KC_MAKE --- layouts/community/ergodox/bocaj/config.h | 4 +- layouts/community/ergodox/bocaj/keymap.c | 292 +++++++++------------- layouts/community/ergodox/bocaj/readme.md | 37 +++ layouts/community/ergodox/bocaj/rules.mk | 5 + users/bocaj/bocaj.c | 200 ++++++++------- users/bocaj/bocaj.h | 190 +++++--------- users/bocaj/config.h | 5 +- users/bocaj/process_records.c | 149 +++++++++++ users/bocaj/process_records.h | 52 ++++ users/bocaj/readme.md | 110 +++++++- users/bocaj/rules.mk | 30 ++- users/bocaj/send_unicode.c | 106 ++++++++ users/bocaj/send_unicode.h | 71 ++++++ users/bocaj/tap_dances.c | 1 - users/bocaj/tap_dances.h | 12 + users/bocaj/wrappers.h | 37 +++ 16 files changed, 896 insertions(+), 405 deletions(-) create mode 100644 layouts/community/ergodox/bocaj/readme.md create mode 100644 users/bocaj/process_records.c create mode 100644 users/bocaj/process_records.h create mode 100644 users/bocaj/send_unicode.c create mode 100644 users/bocaj/send_unicode.h create mode 100644 users/bocaj/wrappers.h diff --git a/layouts/community/ergodox/bocaj/config.h b/layouts/community/ergodox/bocaj/config.h index 78350f603366..bc1d20a626a8 100644 --- a/layouts/community/ergodox/bocaj/config.h +++ b/layouts/community/ergodox/bocaj/config.h @@ -2,5 +2,5 @@ #include QMK_KEYBOARD_CONFIG_H -#undef PRODUCT -#define PRODUCT BocajEZ - Frankensteined ErgoDox EZ +#define LEADER_TIMEOUT 250 +#define LEADER_PER_KEY_TIMING diff --git a/layouts/community/ergodox/bocaj/keymap.c b/layouts/community/ergodox/bocaj/keymap.c index fbe0fca65386..cb78e7aae7fe 100644 --- a/layouts/community/ergodox/bocaj/keymap.c +++ b/layouts/community/ergodox/bocaj/keymap.c @@ -1,5 +1,5 @@ /* -Copyright 2018 Jacob Jerrell jacob.jerrell@gmail.com @JacobJerrell +Copyright 2018 Jacob Jerrell @JacobJerrell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14,97 +14,99 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ + #include QMK_KEYBOARD_H #include "bocaj.h" +#define LAYOUT_ergodox_pretty_base( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ + ) \ + LAYOUT_ergodox_pretty_wrapper( \ + KC_ESC, __________________NUMBER_LEFT_______________, JJ_ARRW, KC_MINS, __________________NUMBER_RIGHT______________, KC_EQUAL, \ + KC_DEL, K01, K02, K03, K04, K05, KC_LPRN, KC_RPRN, K06, K07, K08, K09, K0A, KC_BSLASH, \ + KC_NUMS, K11, SFT_T(K12), K13, ALT_T(K14), K15, K16, ALT_T(K17), K18, SFT_T(K19), K1A, KC_QUOT, \ + OS_LSFT, CTL_T(K21), K22, K23, K24, K25, HYP_LBK, MEH_RBK, K26, K27, K28, K29, CTL_T(K2A), KC_RSFT, \ + KC_GAME,KC_NUMS, TT(_LOWER), KC_UP, KC_LEFT, KC_RIGHT, KC_DOWN, UC_DISA,KC_GAME, KC_ADJS, \ + KC_APP,KC_HOME, KC_END,KC_ESC, \ + UC_FLIP, UC_TABL, \ + KC_SPACE,KC_BSPACE,KC_LEAD, UC_SHRG,KC_TAB,KC_LWEN \ +) + +#define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Hardware Workman - http://www.keyboard-layout-editor.com/#/gists/7a07cb982ec3597ba3e3d947554225f1 - .---------------------------------------------. .---------------------------------------------. - | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | - !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! - | DEL | Q | D | R | W | B | ( | ! ) | J | F | U | P | ; | \ | - !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | NUMS | A | S | H | T | G |-------! !-------! Y | N | E | O | I | ' | - !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! - | SHIFT | Z | X | M | C | V | [ | ! ] | K | L | , | . | / | SHIFT | - '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | - '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | END | ! PGDN | ! ENTER ! - ! SPACE ! BSPCE !-------! !-------! TAB ! / ! - | | | COPY | ! PASTE | | LOWER | - '-----------------------' '-----------------------' + /* Workman - http://www.keyboard-layout-editor.com/#/gists/7a07cb982ec3597ba3e3d947554225f1 + .---------------------------------------------. .---------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | + !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! + | DEL | Q | D | R | W | B | ( | ! ) | J | F | U | P | ; | \ | + !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! + | NUMS | A | S | H | T | G |-------! !-------! Y | N | E | O | I | ' | + !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! + | SHIFT | Z | X | M | C | V | [ | ! ] | K | L | , | . | / | SHIFT | + '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' + | | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | |GAME | ADJ | + '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' + .-------+-------+-------! !-------+-------+-------. + ! ! | END | ! PGDN | ! ENTER ! + ! SPACE ! BSPCE !-------! !-------! TAB ! / ! + | | | COPY | ! PASTE | | LOWER | + '-----------------------' '-----------------------' */ - [_HWRKMN] = LAYOUT_ergodox_pretty_wrapper( - KC_ESC, _______________________NUMBER_LEFT_______________________, JJ_ARRW, KC_MINUS,_______________________NUMBER_RIGHT______________________, KC_EQUAL, - KC_DEL, _______________________HWORKMAN_L1_______________________, KC_LPRN, KC_RPRN, _______________________HWORKMAN_R1_______________________, KC_BSLS, - KC_NUMS,_______________________HWORKMAN_L2_______________________, _______________________HWORKMAN_R2_______________________, KC_QUOTE, - KC_LSFT,_______________________HWORKMAN_L3_______________________, HYP_LBK, MEH_RBK, _______________________HWORKMAN_R3_______________________, KC_RSFT, - ___________________ERGODOX_BOTTOM_LEFT___________________, ___________________ERGODOX_BOTTOM_RIGHT__________________, - ______________________ERGODOX_THUMBS_____________________ + [_WORKMAN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________WORKMAN_L1_________________, _________________WORKMAN_R1_________________, + _________________WORKMAN_L2_________________, _________________WORKMAN_R2_________________, + _________________WORKMAN_L3_________________, _________________WORKMAN_R3_________________ ), -/* Software Workman / QWERTY - http://www.keyboard-layout-editor.com/#/gists/b6c016a22a9d31381a276a603a42fe5f - .---------------------------------------------. .---------------------------------------------. - | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | - !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! - | DEL | Q | W | E | R | T | ( | ! ) | Y | U | I | O | P | \ | - !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | NUMS | A | S | D | F | G |-------! !-------! H | J | K | L | ; | ' | - !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! - | SHIFT | Z | X | C | V | B | [ | ! ] | N | M | , | . | / | SHIFT | - '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | - '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | END | ! PGDN | ! ENTER ! - ! SPACE ! BSPCE !-------! !-------! TAB ! / ! - | | | COPY | ! PASTE | | LOWER | - '-----------------------' '-----------------------' -*/ - [_SWRKMN] = LAYOUT_ergodox_pretty_wrapper( - KC_ESC, _______________________NUMBER_LEFT_______________________, JJ_ARRW, KC_MINUS,_______________________NUMBER_RIGHT______________________, KC_EQUAL, - KC_DEL, _______________________SWORKMAN_L1_______________________, KC_LPRN, KC_RPRN, _______________________SWORKMAN_R1_______________________, KC_BSLS, - KC_NUMS,_______________________SWORKMAN_L2_______________________, _______________________SWORKMAN_R2_______________________, KC_QUOTE, - KC_LSFT,_______________________SWORKMAN_L3_______________________, HYP_LBK, MEH_RBK, _______________________SWORKMAN_R3_______________________, KC_RSFT, - ___________________ERGODOX_BOTTOM_LEFT___________________, ___________________ERGODOX_BOTTOM_RIGHT__________________, - ______________________ERGODOX_THUMBS_____________________ + [_WINWORKMAN] = LAYOUT_ergodox_pretty_base_wrapper( + _________________WORKMAN_L1_________________, _________________WORKMAN_R1_________________, + ________________WWORKMAN_L2_________________, ________________WWORKMAN_R2_________________, + _________________WORKMAN_L3_________________, _________________WORKMAN_R3_________________ ), -/* Lower - http://www.keyboard-layout-editor.com/#/gists/f1d745a88d1c48ab55e095efd9e7a43a - .---------------------------------------------. .---------------------------------------------. - | ESC | | | | | | -> | ! - | | | | | | = | - !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! - | DEL | ! | @ | # | $ | % | ( | ! ) | ^ | & | * | ( | ) | \ | - !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | ` | 1 | 2 | 3 | 4 | 5 |-------! !-------! 6 | 7 | 8 | 9 | 0 | ' | - !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! - | SHIFT | | | | | | [ | ! ] | | | | | | SHIFT | - '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | - '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | END | ! PGDN | ! ENTER ! - ! SPACE ! BSPCE !-------! !-------! TAB ! / ! - | | | COPY | ! PASTE | | LOWER | - '-----------------------' '-----------------------' +/* QWERTY - http://www.keyboard-layout-editor.com/#/gists/b6c016a22a9d31381a276a603a42fe5f + .---------------------------------------------. .---------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | -> | ! - | 6 | 7 | 8 | 9 | 0 | = | + !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! + | DEL | Q | W | E | R | T | ( | ! ) | Y | U | I | O | P | \ | + !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! + | NUMS | A | S | D | F | G |-------! !-------! H | J | K | L | ; | ' | + !-------+-----+-----+-----x-----x-----! HYP ! ! MEH !-----x-----x-----+-----+-----+-------! + | SHIFT | Z | X | C | V | B | [ | ! ] | N | M | , | . | / | SHIFT | + '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' + | GAME | NUM | LWR | UP | LFT | .---------------. .---------------. ! RGT | DWN | | | ADJ | + '------------------------------' | APP | HOME | ! PGUP | ESC | '------------------------------' + .-------+-------+-------! !-------+-------+-------. + ! ! | END | ! PGDN | ! ENTER ! + ! SPACE ! BSPCE !-------! !-------! TAB ! / ! + | | | COPY | ! PASTE | | LOWER | + '-----------------------' '-----------------------' */ + [_QWERTY] = LAYOUT_ergodox_pretty_base_wrapper( + _________________QWERTY_L1__________________, _________________QWERTY_R1__________________, + _________________QWERTY_L2__________________, _________________QWERTY_R2__________________, + _________________QWERTY_L3__________________, _________________QWERTY_R3__________________ + ), [_LOWER] = LAYOUT_ergodox_pretty_wrapper( - _______,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, _______, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, - _______,_______________________SPECIAL_LEFT______________________, _______, _______, _______________________SPECIAL_RIGHT_____________________, _______, - KC_GRV ,_______________________NUMBER_LEFT_______________________, _______________________NUMBER_RIGHT______________________, _______, - _______,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, _______, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, _______, - _________________________________________________________, _________________________________________________________, - ______________________ERGODOX_THUMBS_____________________ + KC_F11 ,__________________FUNCTION_LEFT_____________, _______, _______, __________________FUNCTION_RIGHT____________, KC_F12, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, KC_PAST, _______, + LM_GRAVE, _______, KC_LEFT, KC_DOWN,KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, KC_PPLS, _______, + OS_LSFT,____________________BLANK___________________, _______, _______, _______, KC_1, KC_2, KC_3, KC_PMNS, _______, + ____________________BLANK___________________, KC_0, KC_PDOT, KC_COMM,KC_PEQL, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), - /* Adjust - http://www.keyboard-layout-editor.com/#/gists/dedeae17b35a5d5f745a42aaea78f007 +/* Adjust - http://www.keyboard-layout-editor.com/#/gists/dedeae17b35a5d5f745a42aaea78f007 .---------------------------------------------. .---------------------------------------------. - | | | | | | | EPRM | ! EPRM | | | | | | | + | MAKE | | | | | | RESET | ! EPRM | | | | | | | !-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! | | | | | | | | ! | | | | | | | !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | | 🔇 | 🔉 | 🔊 | LCK | |-------! !-------! | | | | | SWRKM | + | | 🔇 | 🔉 | 🔊 | LCK | |-------! !-------! | | | | | QWRTY | !-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! - | | | | | | | | ! | | | | | | HWRKM | + | | | | | | | | ! | | | | | WIN | WRKMN | '-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' | | | | | | .---------------. .---------------. ! | | | | | '------------------------------' | | | ! | | '------------------------------' @@ -115,101 +117,66 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { '-----------------------' '-----------------------' */ [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, KC_EPRM, KC_EPRM, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX,KC__MUTE, KC__VOLDOWN, KC__VOLUP, MC_LOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SWRK, - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HWRK, - XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - ______________________ERGODOX_THUMBS_____________________ - ), - [_NUMS] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, - XXXXXXX,XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, XXXXXXX, - _______,XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, XXXXXXX, - LM_SHFT,XXXXXXX, XXXXXXX, XXXXXXX, JJ_COPY, JJ_PSTE, XXXXXXX, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, XXXXXXX, - XXXXXXX,_______,XXXXXXX,XXXXXXX,XXXXXXX, KC_KP_0, KC_PDOT, KC_COMM, KC_PEQL, XXXXXXX, - _______, _______, _______,_______, - _______, _______, - KC_LALT,KC_LGUI,_______, _______,_______,_______ - ), - [_NMOD] = LAYOUT_ergodox_pretty_wrapper( - XXXXXXX,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, - XXXXXXX,XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, - XXXXXXX,XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, - LM_SHFT,XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, - XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, _______, _______, _______, _______, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, - XXXXXXX, XXXXXXX, - KC_LALT,KC_LGUI,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX + KC_MAKE, ____________________BLANK___________________, KC_RST, KC_EPRM, ____________________BLANK___________________, XXXXXXX, + _______, ____________________BLANK___________________, _______, _______, ____________________BLANK___________________, XXXXXXX, + _______,KC__MUTE,KC__VOLDOWN,KC__VOLUP,MC_LOCK,_______, ____________________BLANK___________________, KC_MQWR, + _______, ____________________BLANK___________________, _______, _______, _______, _______, _______, _______, KC_WWRK, KC_MWRK, + ____________________BLANK___________________, ____________________BLANK___________________, + _______, _______, _______, _______, + _______, _______, + _______, _______, _______, _______, _______, _______ ), -// Diablo - http://www.keyboard-layout-editor.com/#/gists/28476e4237e77d4835ac8a9d7e5f9b2c [_DIABLO] = LAYOUT_ergodox_pretty_wrapper( - KC_ESC , XXXXXXX , XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX ,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_TAB , KC_Q ,ALT_T(KC_S), KC_I , KC_F , KC_J ,KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_LOCK, KC_1 , KC_2 , KC_3 , KC_4 ,KC_DCLR , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - KC_LSFT, KC_D3_1 , KC_D3_2 , KC_D3_3 , KC_D3_4 , KC_T ,KC_MINS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, XXXXXXX , XXXXXXX , XXXXXXX , KC_M , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, - XXXXXXX, XXXXXXX, - KC_BTN1,KC_BTN2,KC_ENTER, XXXXXXX,XXXXXXX,XXXXXXX + KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_NO, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, + KC_TAB, KC_S, KC_F, KC_I, KC_M, KC_T, KC_ENTER, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_Q, KC_1, KC_2, KC_3, KC_4, KC_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_LOCK, KC_NO, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, + _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, + KC_L, KC_J, KC_NO, KC_NO, + KC_F, KC_NO, + SFT_T(KC_SPACE), ALT_T(KC_Q), KC_DCLR, KC_PGDN, KC_DEL, KC_ENT ) }; bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { - uint8_t default_layer = 0; - default_layer = eeconfig_read_default_layer(); - switch (keycode) { - case KC_SWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_SWRKMN); - layer_move(default_layer); - ergodox_blink_all_leds(); - ergodox_blink_all_leds(); - } - return false; - break; - case KC_HWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_HWRKMN); - layer_move(default_layer); - ergodox_blink_all_leds(); - ergodox_blink_all_leds(); - } - return false; - break; - case KC_EPRM: - if (!record->event.pressed) { - ergodox_blink_all_leds(); - eeconfig_init(); - } - return false; - break; - case MC_LOCK: - if (!record->event.pressed) { - layer_move(default_layer); - SEND_STRING(SS_LCTRL(SS_LGUI("q"))); - } - return false; - break; - } return true; } void matrix_init_keymap(void) {}; void matrix_scan_keymap(void) { + uint8_t modifiers = get_mods(); + uint8_t led_usb_state = host_keyboard_leds(); + uint8_t one_shot = get_oneshot_mods(); uint8_t layer = biton32(layer_state); + ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); + switch (layer) { - /* - Lights are treated as binary here for easy identification. - LED1 = 4; LED2 = 2; LED1 = 1 - This allows for up to 8 identified layers (default layers being no lights on) - Which is way more than I should ever need - */ + case _WORKMAN: + case _QWERTY: + case _WINWORKMAN: + if (modifiers & MODS_SHIFT_MASK || led_usb_state & (1< @JacobJerrell + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + #include "bocaj.h" -#include "eeprom.h" -#include "version.h" -#include "tap_dances.h" -static uint16_t copy_paste_timer; userspace_config_t userspace_config; +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + #define BOCAJ_UNICODE_MODE UC_OSX +#else + // set to 2 for UC_WIN, set to 4 for UC_WINC + #define BOCAJ_UNICODE_MODE 2 +#endif -/* *** *** *** *** * - * Helper Functions * - * *** *** *** *** */ void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; // Add reconfigurable functions here, for keymap customization @@ -36,10 +52,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } __attribute__ ((weak)) -bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { - return true; -} - +void matrix_scan_secrets(void) {} __attribute__ ((weak)) uint32_t layer_state_set_keymap (uint32_t state) { @@ -57,7 +70,14 @@ void led_set_keymap(uint8_t usb_led) {} // Call user matrix init, set default RGB colors and then // call the keymap's init function void matrix_init_user(void) { - userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE); + userspace_config.raw = eeconfig_read_user(); + + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(BOCAJ_UNICODE_MODE); + get_unicode_input_mode(); + #endif //UNICODE_ENABLE + + matrix_init_keymap(); } @@ -78,6 +98,18 @@ void suspend_wakeup_init_user(void) #endif } +void eeconfig_init_user(void) { + userspace_config.raw = 0; + eeconfig_update_user(userspace_config.raw); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(BOCAJ_UNICODE_MODE); + get_unicode_input_mode(); + #else + eeprom_update_byte(EECONFIG_UNICODEMODE, BOCAJ_UNICODE_MODE); + #endif +} + +LEADER_EXTERNS(); // No global matrix scan code, so just run keymap's matrix // scan function void matrix_scan_user(void) { @@ -86,6 +118,68 @@ void matrix_scan_user(void) { has_ran_yet = true; startup_user(); } + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + // Mac Save (Leader -> s) + SEQ_ONE_KEY(KC_S) { + SEND_STRING(SS_LGUI("s")); + } + + // Mac copy line down (Leader -> d, d) + SEQ_TWO_KEYS(KC_D, KC_D) { + register_code(KC_LSHIFT); + register_code(KC_HOME); + unregister_code(KC_HOME); + unregister_code(KC_LSHIFT); + SEND_STRING(SS_LGUI("c")); + tap(KC_END); + tap(KC_ENTER); + SEND_STRING(SS_LGUI("v")); + } + + // Mac copy line up (Leader -> u, u) + SEQ_TWO_KEYS(KC_U, KC_U) { + register_code(KC_LSHIFT); + register_code(KC_HOME); + unregister_code(KC_HOME); + unregister_code(KC_LSHIFT); + SEND_STRING(SS_LGUI("c")); + tap(KC_UP); + tap(KC_END); + tap(KC_ENTER); + SEND_STRING(SS_LGUI("v")); + } + + // Mac VS Debug + SEQ_ONE_KEY(KC_D) { + tap(KC_F5); + } + + // Mac VS Stop Debug + SEQ_TWO_KEYS(KC_S, KC_D) { + register_code(KC_LSHIFT); + tap(KC_F5); + unregister_code(KC_LSHIFT); + } + + // Start Diablo 3 + SEQ_ONE_KEY(KC_3) { + SEND_STRING(SS_LCTRL(" ")); + SEND_STRING("Diablo"); + tap(KC_ENTER); + } + + SEQ_ONE_KEY(KC_B) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION " "); + tap(KC_ENTER); + SEND_STRING ("Built at: " QMK_BUILDDATE); + } +#ifndef NO_SECRETS + matrix_scan_secrets(); +#endif // !NO_SECRETS + } #ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); @@ -93,85 +187,3 @@ void matrix_scan_user(void) { matrix_scan_keymap(); } - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - /* uint8_t default_layer = 0; - default_layer = eeconfig_read_default_layer(); */ - switch (keycode) { - case JJ_COPY: - if (!record->event.pressed) { - SEND_STRING(SS_LGUI("c")); - } - return false; - break; - case JJ_PSTE: - if (!record->event.pressed) { - SEND_STRING(SS_LGUI("v")); - } - return false; - break; - case JJ_ARRW: - if (!record->event.pressed) { - SEND_STRING("->"); - } - return false; - break; /* - case KC_SWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_SWRKMN); - layer_move(default_layer); - //ergodox_blink_all_leds(); - //ergodox_blink_all_leds(); - } - return false; - break; - case KC_HWRK: - if (!record->event.pressed) { - set_single_persistent_default_layer(_HWRKMN); - layer_move(default_layer); - //ergodox_blink_all_leds(); - //ergodox_blink_all_leds(); - } - return false; - break; - case KC_EPRM: - if (!record->event.pressed) { - //ergodox_blink_all_leds(); - eeconfig_init(); - } - return false; - break; - case MC_LOCK: - if (!record->event.pressed) { - layer_move(default_layer); - SEND_STRING(SS_LCTRL(SS_LGUI("q"))); - } - return false; - break; */ - case KC_DCLR: -#ifdef TAP_DANCE_ENABLE - if (record->event.pressed) { - uint8_t dtime; - for (dtime = 0; dtime < 4; dtime++) { - diablo_key_time[dtime] = diablo_times[0]; - } - } -#endif // !TAP_DANCE_ENABLE - return false; - break; - case KC_CCCV: - if (record->event.pressed) { - copy_paste_timer = timer_read(); - } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy - SEND_STRING(SS_LGUI("c")); - } else { - SEND_STRING(SS_LGUI("v")); - } - } - return false; - break; - } - return process_record_keymap(keycode, record); -} - diff --git a/users/bocaj/bocaj.h b/users/bocaj/bocaj.h index 7b537397f07e..04991a0150e7 100644 --- a/users/bocaj/bocaj.h +++ b/users/bocaj/bocaj.h @@ -1,141 +1,85 @@ -#ifndef USERSPACE -#define USERSPACE +/* +Copyright 2018 Jacob Jerrell @JacobJerrell +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once #include "quantum.h" +#include "version.h" +#include "eeprom.h" +#include "wrappers.h" +#include "process_records.h" +#ifdef TAP_DANCE_ENABLE + #include "tap_dances.h" +#endif // TAP_DANCE_ENABLE -/* *** *** *** *** *** * - * Define layer names * - * *** *** *** *** *** */ +/* Layer Names */ enum userspace_layers { - _HWRKMN = 0, - _SWRKMN, + _WORKMAN = 0, + _WINWORKMAN, + _QWERTY, _LOWER, _ADJUST, - _NUMS, - _NMOD, - _DIABLO + _DIABLO, }; -#define EECONFIG_USERSPACE (uint8_t *)19 +#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + #define BOCAJ_UNICODE_MODE UC_OSX +#else + // set to 2 for UC_WIN, set to 4 for UC_WINC + #define BOCAJ_UNICODE_MODE 2 +#endif + +/* +define modifiers here, since MOD_* doesn't seem to work for these + */ +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + +bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed); +bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); +bool send_game_macro(const char *str, keyrecord_t *record, bool override); +void matrix_init_keymap(void); +void shutdown_keymap(void); +void suspend_power_down_keymap(void); +void suspend_wakeup_init_keymap(void); +void matrix_scan_keymap(void); +uint32_t layer_state_set_keymap (uint32_t state); +uint32_t default_layer_state_set_keymap (uint32_t state); +void led_set_keymap(uint8_t usb_led); +void eeconfig_init_keymap(void); +void tap(uint16_t keycode); + typedef union { uint8_t raw; } userspace_config_t; -/* *** *** *** *** *** *** * - * Define Custom Keycodes * - * *** *** *** *** *** *** */ -enum userspace_custom_keycodes { - KC_EPRM = SAFE_RANGE, // can always be here - KC_SWRK, - KC_HWRK, - KC_VRSN, - JJ_COPY, - JJ_PSTE, - JJ_ARRW, - KC_CCCV, - MC_LOCK, - KC_DCLR, - NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes -}; - -// Space Cadet Hyper/Meh and [/] -#define HYP_LBK ALL_T(KC_LBRACKET) -#define MEH_RBK MEH_T(KC_RBRACKET) - -// Layout beauti-/simpli-fication -#define KC_LWEN LT(_LOWER, KC_ENTER) -#define KC_ADJS TT(_ADJUST) -#define KC_NUMS TT(_NUMS) -#define LM_SHFT LM(_NMOD, MOD_LSFT) -#define XXXXXXX KC_NO -#define _______ KC_TRNS - -void tap(uint16_t keycode); - -/* *** *** *** *** *** *** * - * Diablo 3 Macro Handling * - * *** *** *** *** *** *** */ +extern userspace_config_t userspace_config; // If Tap Dancing is enabled, we manage that here. // If it is not, then we define the KC_D3_# codes gracefully #ifdef TAP_DANCE_ENABLE -enum { - TD_D3_1 = 0, - TD_D3_2, - TD_D3_3, - TD_D3_4, -}; - -#define KC_D3_1 TD(TD_D3_1) -#define KC_D3_2 TD(TD_D3_2) -#define KC_D3_3 TD(TD_D3_3) -#define KC_D3_4 TD(TD_D3_4) + #define KC_D3_1 TD(TD_D3_1) + #define KC_D3_2 TD(TD_D3_2) + #define KC_D3_3 TD(TD_D3_3) + #define KC_D3_4 TD(TD_D3_4) #else // !TAP_DANCE_ENABLE -#define KC_D3_1 KC_1 -#define KC_D3_2 KC_2 -#define KC_D3_3 KC_3 -#define KC_D3_4 KC_4 + #define KC_D3_1 KC_1 + #define KC_D3_2 KC_2 + #define KC_D3_3 KC_3 + #define KC_D3_4 KC_4 #endif // TAP_DANCE_ENABLE - -// Wrapper for handling of keymap 'blocks' -// not 100% sure what this first part does. Credit to Drashna -#if (!defined(LAYOUT) && defined(KEYMAP)) -#define LAYOUT KEYMAP -#endif - -#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) -/* Pretty Layout -.---------------------------------------------. .---------------------------------------------. -| 1 | 2 | 3 | 4 | 5 | 6 | 7 | ! 8 | 9 | 10 | 11 | 12 | 13 | 14 | -!-------+-----+-----+-----+-----+-------------! !-------+-----+-----+-----+-----+-----+-------! -| 15 | 16 | 17 | 18 | 19 | 20 | 21 | ! 22 | 23 | 24 | 25 | 26 | 27 | 28 | -!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! -| 29 | 30 | 31 | 32 | 33 | 34 |-------! !-------! 35 | 36 | 37 | 38 | 39 | 40 | -!-------+-----+-----+-----x-----x-----! ! ! !-----x-----x-----+-----+-----+-------! -| 41 | 42 | 43 | 44 | 45 | 46 | 47 | ! 48 | 49 | 50 | 51 | 52 | 53 | 54 | -'-------+-----+-----+-----+-----+-------------' '-------------+-----+-----+-----+-----+-------' - | 55 | 56 | 57 | 58 | 59 | .---------------. .---------------. ! 60 | 61 | 62 | 63 | 64 | - '------------------------------' | 65 | 66 | ! 67 | 68 | '------------------------------' - .-------+-------+-------! !-------+-------+-------. - ! ! | 69 | ! 70 | ! ! - ! ! !-------! !-------! ! ! - | 71 | 72 | 73 | ! 74 | 75 | 76 | - '-----------------------' '-----------------------' -*/ - -#define _______________________SWORKMAN_L1_______________________ KC_Q, KC_W, KC_E, KC_R, KC_T -#define _______________________SWORKMAN_L2_______________________ KC_A, SFT_T(KC_S), GUI_T(KC_D), ALT_T(KC_F), KC_G -#define _______________________SWORKMAN_L3_______________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B - -#define _______________________SWORKMAN_R1_______________________ KC_Y, KC_U, KC_I, KC_O, KC_P -#define _______________________SWORKMAN_R2_______________________ KC_H, ALT_T(KC_J), GUI_T(KC_K), SFT_T(KC_L), KC_SCLN -#define _______________________SWORKMAN_R3_______________________ KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH) - -// Hardware Driven Workman -#define _______________________HWORKMAN_L1_______________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _______________________HWORKMAN_L2_______________________ KC_A, SFT_T(KC_S), GUI_T(KC_H), ALT_T(KC_T), KC_G -#define _______________________HWORKMAN_L3_______________________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V - -#define _______________________HWORKMAN_R1_______________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _______________________HWORKMAN_R2_______________________ KC_Y, ALT_T(KC_N), GUI_T(KC_E), SFT_T(KC_O), KC_I -#define _______________________HWORKMAN_R3_______________________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH) - -#define ___________________ERGODOX_BOTTOM_LEFT___________________ TT(_DIABLO), KC_NUMS, TT(_LOWER), KC_UP, KC_LEFT -#define ___________________ERGODOX_BOTTOM_RIGHT__________________ KC_RIGHT, KC_DOWN, XXXXXXX, XXXXXXX, TT(_ADJUST) - -#define _______________________NUMBER_LEFT_______________________ KC_1, KC_2, KC_3, KC_4, KC_5 -#define _______________________NUMBER_RIGHT______________________ KC_6, KC_7, KC_8, KC_9, KC_0 - -#define _______________________SPECIAL_LEFT______________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _______________________SPECIAL_RIGHT_____________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN - -#define _________________________________________________________ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS -#define XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX KC_NO, KC_NO, KC_NO, KC_NO, KC_NO - -// LEFT | RIGHT -#define ______________________ERGODOX_THUMBS_____________________ KC_APP,KC_HOME, KC_PGUP,KC_ESC, \ - KC_END, KC_PGDOWN, \ - KC_SPACE,KC_BSPACE,JJ_COPY, JJ_PSTE,KC_TAB,KC_LWEN - - -#endif // !USERSPACE diff --git a/users/bocaj/config.h b/users/bocaj/config.h index 0e726598cdfe..1956ea6d9657 100644 --- a/users/bocaj/config.h +++ b/users/bocaj/config.h @@ -10,12 +10,15 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD +#define PREVENT_STUCK_MODIFIERS #ifdef TAPPING_TERM #undef TAPPING_TERM #endif // TAPPING_TERM #define TAPPING_TERM 175 +#define RETRO_TAPPING + // Disable action_get_macro and fn_actions, since we don't use these // and it saves on space in the firmware. #ifndef NO_DEBUG @@ -27,6 +30,4 @@ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#define DISABLE_LEADER - #define MACRO_TIMER 5 diff --git a/users/bocaj/process_records.c b/users/bocaj/process_records.c new file mode 100644 index 000000000000..c36683f8ba86 --- /dev/null +++ b/users/bocaj/process_records.c @@ -0,0 +1,149 @@ +#include "bocaj.h" +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; +uint16_t grave_layer_timer; +uint16_t heal_layer_timer; + +__attribute__ ((weak)) +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} + +// Defines actions tor my global custom keycodes. Defined in bocaj.h file +// Then runs the _keymap's record handler if not processed here +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case KC_MWRK: + if (!record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(0); + #endif + layer_move(0); + ergodox_blink_all_leds(); + } + break; + case KC_WWRK: + if (!record->event.pressed) { + set_single_persistent_default_layer(_WINWORKMAN); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(4); + #endif + layer_move(0); + ergodox_blink_all_leds(); + } + break; + case KC_MQWR: + if (!record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE)) + set_unicode_input_mode(0); + #endif + layer_move(0); + ergodox_blink_all_leds(); + } + break; + case MC_LOCK: + if (!record->event.pressed) { + layer_move(0); + SEND_STRING(SS_LCTRL(SS_LGUI("q"))); + } + break; + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + if (!record->event.pressed) { + uint8_t temp_mod = get_mods(); + uint8_t temp_osm = get_oneshot_mods(); + clear_mods(); + clear_oneshot_mods(); + if (biton32(default_layer_state) == _WINWORKMAN) { + send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), 10); + } else { + send_string_with_delay_P(PSTR("util/docker_build.sh " QMK_KEYBOARD ":" QMK_KEYMAP), 10); + } + if (temp_mod & MODS_SHIFT_MASK) { + send_string_with_delay_P(PSTR(":teensy"), 10); + } + if (temp_mod & MODS_CTRL_MASK) { + send_string_with_delay_P(PSTR(" -j8 --output-sync"), 10); + } + send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), 10); + set_mods(temp_mod); + layer_move(0); + } + break; + case KC_DCLR: // reset all Diablo timers, disabling them +#ifdef TAP_DANCE_ENABLE + if (record->event.pressed) { + uint8_t dtime; + for (dtime = 0; dtime < 4; dtime++) { + diablo_key_time[dtime] = diablo_times[0]; + } + } +#endif // TAP_DANCE_ENABLE + break; + case JJ_ARRW: + if (!record->event.pressed) { + SEND_STRING("->"); + } + return false; + break; + case LM_GRAVE: + if (record->event.pressed) { + grave_layer_timer = timer_read(); + } else { + if (timer_elapsed(grave_layer_timer) < TAPPING_TERM) { + uint8_t temp_mod = get_mods(); + uint8_t one_shot = get_oneshot_mods(); + clear_mods(); + if (temp_mod & MODS_SHIFT_MASK || one_shot & MODS_SHIFT_MASK) { + register_code(KC_LSFT); + tap(KC_GRAVE); + unregister_code(KC_LSFT); + } else { + tap(KC_GRAVE); + } + set_mods(temp_mod); + } else { + layer_move(0); + } + } + return false; + break; + case KC_CCCV: + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + SEND_STRING(SS_LGUI("c")); + } else { + SEND_STRING(SS_LGUI("v")); + } + } + return false; + break; +#ifdef UNICODE_ENABLE + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + } + break; + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029"); + } + break; + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); + } + break; + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_hex_string("0CA0 005F 0CA0"); + } + break; +#endif + } + return process_record_keymap(keycode, record); +} diff --git a/users/bocaj/process_records.h b/users/bocaj/process_records.h new file mode 100644 index 000000000000..248df13e1b67 --- /dev/null +++ b/users/bocaj/process_records.h @@ -0,0 +1,52 @@ +#pragma once +#include "bocaj.h" + +#if defined(KEYMAP_SAFE_RANGE) + #define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE +#else + #define PLACEHOLDER_SAFE_RANGE SAFE_RANGE +#endif + +enum userspace_custom_keycodes { + KC_EPRM = PLACEHOLDER_SAFE_RANGE, // can always be here + KC_MWRK, + KC_WWRK, + KC_MQWR, + KC_VRSN, + LM_GRAVE, // Shift if held, layer change if tapped + JJ_COPY, + JJ_PSTE, + JJ_ARRW, + KC_CCCV, + MC_LOCK, + KC_DCLR, + KC_MAKE, + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record); + +// One Shot +#define OS_LSFT OSM(MOD_LSFT) + +// Space Cadet Hyper/Meh and [/] +#define HYP_LBK ALL_T(KC_LBRACKET) +#define MEH_RBK MEH_T(KC_RBRACKET) + +#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc ) + +// Layout beauti-/simpli-fication +#define KC_LWEN LT(_LOWER, KC_ENTER) +#define KC_ADJS TT(_ADJUST) +#define KC_NUMS TT(_LOWER) +#define KC_GAME TT(_DIABLO) +#define XXXXXXX KC_NO +#define _______ KC_TRNS + +// Other Keycodes +#define KC_RST RESET +#define KC_BS KC_BSLASH diff --git a/users/bocaj/readme.md b/users/bocaj/readme.md index bab6d7337ffd..669299cb0dfb 100644 --- a/users/bocaj/readme.md +++ b/users/bocaj/readme.md @@ -1,14 +1,102 @@ -Copyright 2018 Jacob Jerrell jacob.jerrell@gmail.com @JacobJerrell +# Overview -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. +My personal QMK userspace. First, I must say that the credit for a majority of the code found here belongs to Drashna and/or the people he derived his code from. My Ergodox layout is briefly described in its respective folder. As for explaining this userspace, you could honestly go to Drashna's userspace and read his well put together readme. Regardless, I am mostly writing this as an excercise for myself to better understand what is going on, and where applicable, describe things that I innovated on my own. -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. +## Bocaj.c -You should have received a copy of the GNU General Public License -along with this program. If not, see . +### Unicode + +I've always had difficulty implementing unicode in QMK, all of this code is literally copy/pasted from Drashna's userspace and lies dormant here until I can take the time to figure it out. + +Update: Got it to work in Mac OS which is more important to me than Windows (probably pretty easy to figure out at this point). So I'm a happy table flipping person now! + +(ノಠ痊ಠ)ノ彡┻━┻ + +┬─┬ノ( º _ ºノ) + +### Tap Macro + +Not sure why this doesn't exist in QMK already (maybe it does?) + +```c +void tap(uint16_t keycode){ register_code(keycode); unregister_code(keycode); }; +``` + +### *_keymap functions + +We're running *_user functions in the userspace, that way we can add to or reconfigure at the keyboard level. Any *_user functions should call the equivalent *_keymap function at the end. If the *_keymap function isn't defined in the keymap, the `__attribute__ ((weak))` will prevent build problems. + +### Startup/Suspend/Shutdown Functions + +I have no idea what these do. Non-Ergodox keyboard functions? + +### Matrix Scan User + +Leader key defines, Diablo macro ancillary function, run matrix_scan_keymap. + +#### Leader Key + +I've always been interested in this feature, but I've had 0 experience with applications that have similar behavior. My implementation seeks to implement features that I feel VS2017 lacks + +## Secrets + +Hacked Drashna's secret macro implementation to work with the leader key instead. +TODO: Finish documentation + +## Bocaj.h + +Layer defines, some macro ancillary defines, setup Diablo macros and failsafe + +## Process_Records.c/.h + +Again, taking ideas from Drashna to make maintenance simpler. A couple of things that I'm proud of here, but nothing really ground breaking. + +* Features + * Change default layer + * KC_MWRK, KC_WWRK, KC_MQWR + * MacOS Lock Screen Macro + * Make macro (Credit: Drashna) + * Need to reconfigure so it runs the docker command if one of the Mac OS layers are default because the AVR install fails on the corporate laptop + * Arrow macro (->) because I find myself telling people how to get to something quite frequently and typing this manually requires moving the right hand to the top-left of the ergodox and then to the bottom right, which feels unnatural. + * LM_GRAVE + * While combining _NUMS and _LOWER, I also needed a place to put F1-12 keys. This required me to relocate the grave key. The most comfortable place to put it was over a key that I frequently use to toggle the numpad. I do have other ways to get to/from this layer but my mind has been wired to use them for different workflows, so I would sit here frozen for a moment trying to tell my fingers where to go + * How it works + * A timer starts when pressed down + * If the timer at release was less than the TAPPING_TERM define + * Get mods + * If Shift was held or one-shot shift was active + * Send `~` + * Else + * Send ` + * Else (timer at released was greater than the TAPPING_TERM define) + * Move to the default layer + * KC_CCCV + * Another neat idea I found in Drashna's userspace... highly underutilized in my layout but the inspiration for LM_GRAVE was obviously derived from this code + * Unicode stuff + * All I've ever wanted was a table-flip macro... I managed to get about half of it to work before I gave up and disabled it + +## Send_Unicode.c/.h + +I have some basic understanding of this, Drashna may already have it documented in his userspace. I'll put it in my own words when I get around to making it work and understanding it better. + +## Tap_Dances.c/h + +Again, building on Drashna's userspace organization to simplify maintenance of a heavily configured layout. This is all the stuff for the Diablo 3 macros that spam a given skill (1-4) every ~1 second + +## Wrappers.h + +Traditionally, you would put all of this into the \.h file. But I liked the idea of separating it to simplify modification in the future. + +### GUI_CTR(os, kc) + +A notable mention in this file is the GUI_CTR(os, kc) custom keycode defined in process_records.h as: + +```c +#define GUI_CTR(os, kc) MT( (os == 0) ? (MOD_LGUI) : (MOD_LCTL), kc ) +``` + +I tried several things before coming to this one-liner conclusion. I believe it is quite elegant and it definitely solves the problem I had (separate wrappers for Windows/MacOS layers). But I would love to make this into something more intuitive, like a macro that detects which layer you're on and sends the applicable hotkey when held, or keycode when tapped. Ultimately, I was too tired of thinking about it to come up with a solution like that at this time. + +Anyhow, if you set `os == 1`, it sends the Windows CTRL hotkey when held. If you set `os == 0`, it sends the Mac OS GUI hotkey when held. If tapped, it sends the keycode. + +This is effectively a slightly more advanced `MOD_T(kc)` keycode. diff --git a/users/bocaj/rules.mk b/users/bocaj/rules.mk index 17d2772a7c0c..9ed8c250a306 100644 --- a/users/bocaj/rules.mk +++ b/users/bocaj/rules.mk @@ -1,5 +1,33 @@ -SRC += bocaj.c +SRC += bocaj.c \ + process_records.c + +ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") + SRC += secrets.c +endif ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) SRC += tap_dances.c endif + +# Caused problems when building via docker on Mac OS +# EXTRAFLAGS += -flto + +ifeq ($(strip $(NO_SECRETS)), yes) + OPT_DEFS += -DNO_SECRETS +endif + +ifeq ($(strip $(MACROS_ENABLED)), yes) + OPT_DEFS += -DMACROS_ENABLED +endif + +ifeq ($(strip $(UCIS_ENABLE)), yes) + SRC += send_unicode.c +endif + +ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) + SRC += send_unicode.c +endif + +ifeq ($(strip $(UNICODE_ENABLE)), yes) + SRC += send_unicode.c +endif diff --git a/users/bocaj/send_unicode.c b/users/bocaj/send_unicode.c new file mode 100644 index 000000000000..b1290f6319e7 --- /dev/null +++ b/users/bocaj/send_unicode.c @@ -0,0 +1,106 @@ +// Written by konstantin: vomindoraan +#include "send_unicode.h" +#include +#include + +__attribute__((weak)) +void send_unicode_hex_string(const char* str) { + if (!str) { return; } // Safety net + + while (*str) { + // Find the next code point (token) in the string + for (; *str == ' '; str++); + size_t n = strcspn(str, " "); // Length of the current token + char code_point[n+1]; + strncpy(code_point, str, n); + code_point[n] = '\0'; // Make sure it's null-terminated + + // Normalize the code point: make all hex digits lowercase + for (char *p = code_point; *p; p++) { + *p = tolower((unsigned char)*p); + } + + // Send the code point as a Unicode input string + unicode_input_start(); + send_string(code_point); + unicode_input_finish(); + + str += n; // Move to the first ' ' (or '\0') after the current token + } +} + +// (ノಠ痊ಠ)ノ彡┻━┻ +// send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); + +//Old code +// (╯°□°)╯ ︵ ┻━┻ + #if 0 + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F | QK_UNICODE), record); // Arm + process_unicode((0x00B0 | QK_UNICODE), record); // Eye + process_unicode((0x25A1 | QK_UNICODE), record); // Mouth + process_unicode((0x00B0 | QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F | QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361 | QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B | QK_UNICODE), record); // Table + process_unicode((0x2501 | QK_UNICODE), record); // Table + process_unicode((0x253B | QK_UNICODE), record); // Table + #endif + + +// If you need a good converter: https://r12a.github.io/app-conversion/ +uint8_t saved_mods; + +void unicode_input_start (void) { + // save current mods + saved_mods = get_mods(); // Save current mods + clear_mods(); // Unregister mods to start from a clean state + + switch(get_unicode_input_mode()) { + case UC_OSX: + register_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_U); + unregister_code(KC_U); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + break; + case UC_WIN: + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + break; + case UC_WINC: + register_code(KC_RALT); + unregister_code(KC_RALT); + register_code(KC_U); + unregister_code(KC_U); + break; + } + wait_ms(UNICODE_TYPE_DELAY); +} + +void unicode_input_finish (void) { + switch(get_unicode_input_mode()) { + case UC_OSX: + case UC_WIN: + unregister_code(KC_LALT); + break; + case UC_LNX: + register_code(KC_SPC); + unregister_code(KC_SPC); + break; + } + + set_mods(saved_mods); // Reregister previously set mods +} diff --git a/users/bocaj/send_unicode.h b/users/bocaj/send_unicode.h new file mode 100644 index 000000000000..818b6e571b21 --- /dev/null +++ b/users/bocaj/send_unicode.h @@ -0,0 +1,71 @@ +#pragma once + +#include "quantum.h" + +void send_unicode_hex_string(const char* str); + +/* use X(n) to call the */ +#ifdef UNICODEMAP_ENABLE +enum unicode_name { + THINK, // thinking face 🤔 + GRIN, // grinning face 😊 + SMRK, // smirk 😏 + WEARY, // good shit 😩 + UNAMU, // unamused 😒 + + SNEK, // snke 🐍 + PENGUIN, // 🐧 + DRAGON, // 🐉 + MONKEY, // 🐒 + CHICK, // 🐥 + BOAR, // 🐗 + + OKOK, // 👌 + EFFU, // 🖕 + INUP, // 👆 + THUP, // 👍 + THDN, // 👎 + + BBB, // dat B 🅱 + POO, // poop 💩 + HUNDR, // 100 💯 + EGGPL, // EGGPLANT 🍆 + WATER, // wet 💦 + TUMBLER, // 🥃 + + LIT, // fire 🔥 + BANG, // ‽ + IRONY, // ⸮ + DEGREE // ° +}; + + +const uint32_t PROGMEM unicode_map[] = { + [THINK] = 0x1F914, + [GRIN] = 0x1F600, + [BBB] = 0x1F171, + [POO] = 0x1F4A9, + [HUNDR] = 0x1F4AF, + [SMRK] = 0x1F60F, + [WEARY] = 0x1F629, + [EGGPL] = 0x1F346, + [WATER] = 0x1F4A6, + [LIT] = 0x1F525, + [UNAMU] = 0x1F612, + [SNEK] = 0x1F40D, + [PENGUIN] = 0x1F427, + [BOAR] = 0x1F417, + [MONKEY] = 0x1F412, + [CHICK] = 0x1F425, + [DRAGON] = 0x1F409, + [OKOK] = 0x1F44C, + [EFFU] = 0x1F595, + [INUP] = 0x1F446, + [THDN] = 0x1F44E, + [THUP] = 0x1F44D, + [TUMBLER] = 0x1F943, + [BANG] = 0x0203D, + [IRONY] = 0x02E2E, + [DEGREE] = 0x000B0 + }; +#endif // UNICODEMAP_ENABLE diff --git a/users/bocaj/tap_dances.c b/users/bocaj/tap_dances.c index 10767db453c9..a9628a345dcb 100644 --- a/users/bocaj/tap_dances.c +++ b/users/bocaj/tap_dances.c @@ -1,4 +1,3 @@ -#include "bocaj.h" #include "tap_dances.h" diff --git a/users/bocaj/tap_dances.h b/users/bocaj/tap_dances.h index 8935753f6cf7..5b1277ec5803 100644 --- a/users/bocaj/tap_dances.h +++ b/users/bocaj/tap_dances.h @@ -1,3 +1,6 @@ +#pragma once +#include "bocaj.h" + //define diablo macro timer variables extern uint16_t diablo_timer[4]; extern uint8_t diablo_times[]; @@ -5,3 +8,12 @@ extern uint8_t diablo_key_time[4]; void run_diablo_macro_check(void); + +#ifdef TAP_DANCE_ENABLE +enum { + TD_D3_1 = 0, + TD_D3_2, + TD_D3_3, + TD_D3_4 +}; +#endif // TAP_DANCE_ENABLE diff --git a/users/bocaj/wrappers.h b/users/bocaj/wrappers.h new file mode 100644 index 000000000000..379edaad2957 --- /dev/null +++ b/users/bocaj/wrappers.h @@ -0,0 +1,37 @@ +#pragma once +#include "bocaj.h" + +#if (!defined(LAYOUT) && defined(KEYMAP)) +#define LAYOUT KEYMAP +#endif + +#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) +#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__) + +#define _________________QWERTY_L1__________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2__________________ KC_A, KC_S, GUI_CTR(0, KC_D), KC_F, KC_G +#define _________________QWERTY_L3__________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1__________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2__________________ KC_H, KC_J, GUI_CTR(0, KC_K), KC_L, KC_SCLN +#define _________________QWERTY_R3__________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +// Hardware Driven Workman +#define _________________WORKMAN_L1_________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(0, KC_H), KC_T, KC_G // GUI_CTR(0, kc) behaves as GUI_T(kc) +#define ________________WWORKMAN_L2_________________ KC_A, KC_S, GUI_CTR(1, KC_H), KC_T, KC_G // GUI_CTR(1, kc) behaves as CTR_T(kc) +#define _________________WORKMAN_L3_________________ KC_Z, KC_X, KC_M, KC_C, KC_V + +#define _________________WORKMAN_R1_________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(0, KC_E), KC_O, KC_I // GUI_CTR(0, kc) behaves as GUI_T(kc) +#define ________________WWORKMAN_R2_________________ KC_Y, KC_N, GUI_CTR(1, KC_E), KC_O, KC_I // GUI_CTR(1, kc) behaves as CTR_T(kc) +#define _________________WORKMAN_R3_________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH + + +#define __________________NUMBER_LEFT_______________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define __________________NUMBER_RIGHT______________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define __________________FUNCTION_LEFT_____________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define __________________FUNCTION_RIGHT____________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ____________________BLANK___________________ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS From 484c85bd0dd1141bfc12ecada44da92a8f2e78f6 Mon Sep 17 00:00:00 2001 From: ishtob Date: Wed, 2 Jan 2019 16:30:59 -0500 Subject: [PATCH 056/458] Adding default settings for ERM motors for Hadron v3 haptic feedback (#4761) * adding default settings to support 3v ERM vibration motors * set default settings of haptic motor for LV061228B-L64-A 2v LRA * update ishtob keymap and fix config settings --- keyboards/hadron/ver3/config.h | 30 ++++++++++++------- keyboards/hadron/ver3/keymaps/ishtob/keymap.c | 2 +- keyboards/hadron/ver3/mcuconf.h | 2 +- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 11288f7a5762..7db5003043fd 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -148,13 +148,26 @@ #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ +/* default 3V ERM vibration motor voltage and library*/ +#if FB_ERM_LRA == 0 +#define RATED_VOLTAGE 3 +#define V_RMS 2.3 +#define V_PEAK 3.30 +/* Library Selection */ +#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +/* default 2V LRA voltage and library */ +#elif FB_ERM_LRA == 1 #define RATED_VOLTAGE 2 #define V_RMS 2.0 #define V_PEAK 2.85 -#define F_LRA 205 +#define F_LRA 200 /* Library Selection */ #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ +#endif + + /* Control 1 register settings */ #define DRIVE_TIME 25 #define AC_COUPLE 0 @@ -179,14 +192,11 @@ #define ZC_DET_TIME 0 #define AUTO_CAL_TIME 3 -//#define WS2812_LED_N 2 -//#define RGBLED_NUM WS2812_LED_N -//#define WS2812_TIM_N 2 -//#define WS2812_TIM_CH 2 -//#define PORT_WS2812 GPIOA -//#define PIN_WS2812 15 -//#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) -//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP -//#define WS2812_EXTERNAL_PULLUP +//#define RGBLIGHT_ANIMATIONS + +//#define RGBLED_NUM 10 +//#define RGB_DI_PIN B5 +//#define DRIVER_LED_TOTAL RGBLED_NUM +//#define RGB_MATRIX_KEYPRESSES #endif diff --git a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c index 530508b010b7..641c0162473f 100644 --- a/keyboards/hadron/ver3/keymaps/ishtob/keymap.c +++ b/keyboards/hadron/ver3/keymaps/ishtob/keymap.c @@ -82,7 +82,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper( KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_PIPE, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, KC_F6, KC_UNDS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______,_______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), diff --git a/keyboards/hadron/ver3/mcuconf.h b/keyboards/hadron/ver3/mcuconf.h index 36f8ca2252a4..d0776b04639e 100644 --- a/keyboards/hadron/ver3/mcuconf.h +++ b/keyboards/hadron/ver3/mcuconf.h @@ -159,7 +159,7 @@ #define STM32_I2C_BUSY_TIMEOUT 50 #define STM32_I2C_I2C1_IRQ_PRIORITY 10 #define STM32_I2C_I2C2_IRQ_PRIORITY 10 -#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_USE_DMA FALSE #define STM32_I2C_I2C1_DMA_PRIORITY 1 #define STM32_I2C_I2C2_DMA_PRIORITY 1 #define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") From 526bc4c7cc6b4a7701d317bb66b8bb5fa6c9c87f Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Fri, 4 Jan 2019 03:05:33 +1100 Subject: [PATCH 057/458] Keyboard: add snagpad and trainstation keyboards (#4755) * add snagpad * Update keyboards/snagpad/kb.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename kb.c to snagpad.c * Update and rename kb.h to snagpad.h * Update snagpad.h * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update README.md * Add files via upload * Update info.json * Update keymap.c * Update snagpad.h * Delete snagpad_numpad.json * Delete snagpad_ortho.json * Update README.md * Update keyboards/snagpad/info.json Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * add tradestation * --all * Did something weird messing with git -_- hopefully fixed * Update keyboards/tradestation/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update snagpad.h * Update rules.mk * Update keymap.c * fixed merge conflict, updated to LAYOUT_numpad_5x4 * relocated to handwire, updated naming, added layouts to rules.mk * Update keyboards/handwired/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename LICENSE to license * Rename README.md to readme.md * Rename LICENSE to license * Rename README.md to readme.md * Update info.json * Update keymap.c * Update info.json --- keyboards/handwired/tradestation/config.h | 52 +++++ keyboards/handwired/tradestation/info.json | 15 ++ .../tradestation/keymaps/default/keymap.c | 61 ++++++ keyboards/handwired/tradestation/license | 201 ++++++++++++++++++ keyboards/handwired/tradestation/readme.md | 25 +++ keyboards/handwired/tradestation/rules.mk | 65 ++++++ .../handwired/tradestation/tradestation.c | 1 + .../handwired/tradestation/tradestation.h | 27 +++ keyboards/snagpad/config.h | 56 +++++ keyboards/snagpad/info.json | 17 ++ keyboards/snagpad/keymaps/default/keymap.c | 63 ++++++ keyboards/snagpad/license | 201 ++++++++++++++++++ keyboards/snagpad/readme.md | 21 ++ keyboards/snagpad/rules.mk | 65 ++++++ keyboards/snagpad/snagpad.c | 1 + keyboards/snagpad/snagpad.h | 30 +++ 16 files changed, 901 insertions(+) create mode 100644 keyboards/handwired/tradestation/config.h create mode 100644 keyboards/handwired/tradestation/info.json create mode 100644 keyboards/handwired/tradestation/keymaps/default/keymap.c create mode 100644 keyboards/handwired/tradestation/license create mode 100644 keyboards/handwired/tradestation/readme.md create mode 100644 keyboards/handwired/tradestation/rules.mk create mode 100644 keyboards/handwired/tradestation/tradestation.c create mode 100644 keyboards/handwired/tradestation/tradestation.h create mode 100644 keyboards/snagpad/config.h create mode 100644 keyboards/snagpad/info.json create mode 100644 keyboards/snagpad/keymaps/default/keymap.c create mode 100644 keyboards/snagpad/license create mode 100644 keyboards/snagpad/readme.md create mode 100644 keyboards/snagpad/rules.mk create mode 100644 keyboards/snagpad/snagpad.c create mode 100644 keyboards/snagpad/snagpad.h diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/handwired/tradestation/config.h new file mode 100644 index 000000000000..346577a922ba --- /dev/null +++ b/keyboards/handwired/tradestation/config.h @@ -0,0 +1,52 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT Trade Station + #define DESCRIPTION A Pro Micro-powered macropad layout by Didier Luximon. 1/8U gap space top two rows and 1/4U gap between 2U bottom two rows. + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, C6, D4, D0 } +#define MATRIX_COL_PINS { F7, B1, D7, E6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS + #define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/handwired/tradestation/info.json new file mode 100644 index 000000000000..f26d4ec371f8 --- /dev/null +++ b/keyboards/handwired/tradestation/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Tradestation", + "url": "", + "maintainer": "Flehrad", + "bootloader": "", + "width": 4.3, + "height": 4.5, + "layouts": { + "LAYOUT_tradestation": { + "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25, "w":2}, {"x":2.25, "y":2.25, "w":2}, {"x":0, "y":3.5, "w":2}, {"x":2.25, "y":3.5, "w":2}] + }, + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25}, {"x":3.25, "y":2.25}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2.25, "y":3.5}, {"x":3.25, "y":3.5}] + } +} diff --git a/keyboards/handwired/tradestation/keymaps/default/keymap.c b/keyboards/handwired/tradestation/keymaps/default/keymap.c new file mode 100644 index 000000000000..3497dcb94110 --- /dev/null +++ b/keyboards/handwired/tradestation/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ortho_4x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT_tradestation( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS), +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/handwired/tradestation/license b/keyboards/handwired/tradestation/license new file mode 100644 index 000000000000..261eeb9e9f8b --- /dev/null +++ b/keyboards/handwired/tradestation/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/handwired/tradestation/readme.md b/keyboards/handwired/tradestation/readme.md new file mode 100644 index 000000000000..69c0331a92cc --- /dev/null +++ b/keyboards/handwired/tradestation/readme.md @@ -0,0 +1,25 @@ +# Tradestation +QMK for Tradestation Macropad + +This macropad was layout designed by Didier Luximon + +This PCB supports an overall 4x4 matrix with unique spacing. +* Top two rows are 1U keys with 1/8U spacing +* Bottom two rows are available with 4x2 1U as clusters of 2x1U or as 2x2 2U, spaced with 1/4U + +For QMK Configurator, the info.json is utilised. +- For 2U keys , the first 1u row/column key assignment is the same as the 2u position. + +Build requires a pro micro. + +Can be built as single PCB with custom case, or as two PCB style with standoffs. + +If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast + +Check out our: + +YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) + +Podcast (www.libsyn.com/theboardpodcast) + +Patreon (www.patreon.com/theboardpodcast) diff --git a/keyboards/handwired/tradestation/rules.mk b/keyboards/handwired/tradestation/rules.mk new file mode 100644 index 000000000000..9d49888b5fb8 --- /dev/null +++ b/keyboards/handwired/tradestation/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + LAYOUTS = ortho_4x4 diff --git a/keyboards/handwired/tradestation/tradestation.c b/keyboards/handwired/tradestation/tradestation.c new file mode 100644 index 000000000000..a3285a2cc870 --- /dev/null +++ b/keyboards/handwired/tradestation/tradestation.c @@ -0,0 +1 @@ +#include "tradestation.h" diff --git a/keyboards/handwired/tradestation/tradestation.h b/keyboards/handwired/tradestation/tradestation.h new file mode 100644 index 000000000000..15e40e3b5196 --- /dev/null +++ b/keyboards/handwired/tradestation/tradestation.h @@ -0,0 +1,27 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_4x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ +} + +#define LAYOUT_tradestation( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K22, \ + K30, K32 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, KC_NO, K22, KC_NO }, \ + { K30, KC_NO, K32, KC_NO } \ +} diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h new file mode 100644 index 000000000000..a14ead67fb1c --- /dev/null +++ b/keyboards/snagpad/config.h @@ -0,0 +1,56 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT Snagpad +#define DESCRIPTION A Pro Micro-Powered 5x4 macropad/numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +//#define STRICT_LAYER_RELEASE + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json new file mode 100644 index 000000000000..4faa1d2c0fc7 --- /dev/null +++ b/keyboards/snagpad/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "Snagpad", + "url": "", + "maintainer": "Flehrad", + + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] + }, + "LAYOUT_numpad_5x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] + + } + } +} diff --git a/keyboards/snagpad/keymaps/default/keymap.c b/keyboards/snagpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..7645b435c14d --- /dev/null +++ b/keyboards/snagpad/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT_numpad_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/snagpad/license b/keyboards/snagpad/license new file mode 100644 index 000000000000..261eeb9e9f8b --- /dev/null +++ b/keyboards/snagpad/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/snagpad/readme.md b/keyboards/snagpad/readme.md new file mode 100644 index 000000000000..eeafceba9a71 --- /dev/null +++ b/keyboards/snagpad/readme.md @@ -0,0 +1,21 @@ +# Snagpad +QMK for Snagpad + +This PCB can be used as a standard numpad, or a ortho 5x4 macropad. + +For QMK Configurator, the info.json is utilised. +- For 2U keys on numpad, the first 1u row/column key assignment is the same as the 2u position. + +Build requires a pro micro. + +Can be built as single PCB with custom case, or as two PCB style with standoffs. + +If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast + +Check out our: + +YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) + +Podcast (www.libsyn.com/theboardpodcast) + +Patreon (www.patreon.com/theboardpodcast) diff --git a/keyboards/snagpad/rules.mk b/keyboards/snagpad/rules.mk new file mode 100644 index 000000000000..624ed262ec77 --- /dev/null +++ b/keyboards/snagpad/rules.mk @@ -0,0 +1,65 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +LAYOUTS = ortho_5x4 numpad_5x4 diff --git a/keyboards/snagpad/snagpad.c b/keyboards/snagpad/snagpad.c new file mode 100644 index 000000000000..ce7e50b387b5 --- /dev/null +++ b/keyboards/snagpad/snagpad.c @@ -0,0 +1 @@ +#include "snagpad.h" diff --git a/keyboards/snagpad/snagpad.h b/keyboards/snagpad/snagpad.h new file mode 100644 index 000000000000..d6a62ddf7efc --- /dev/null +++ b/keyboards/snagpad/snagpad.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K13, \ + K30, K31, K32, \ + K40, K42, K33 \ +) { \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO }, \ + { K30, K31, K32, K33 }, \ + { K40, KC_NO, K42, KC_NO } \ +} From 6cb2d7ba6dc19fe579fac856fbce36be0f8384f6 Mon Sep 17 00:00:00 2001 From: Gam3cat <31171909+Gam3cat@users.noreply.github.com> Date: Thu, 3 Jan 2019 08:12:58 -0800 Subject: [PATCH 058/458] Keymap updates (#4706) * adding my keymap * update keymap * adding gamecat keymap for jc65 keyboard * updating jc65-gamecat keymap * updating jc65-gamecat keymap * updating jc65-gamecat keymap * updating jc65-gamecat keymap * M10a keymap and M65a updates * keymap updates * keymap updates * M10a/M65a keymap updates * M10a/M65a keymap updates * Delete test.txt * M65 keymap update * M65 keymap update * M65 keymap update * M65/M10 keymap updates * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65/M10 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * M65 keymap update * Set theme jekyll-theme-cayman * Set theme jekyll-theme-slate * M65 keymap update * M10a/M65a keymap updates * M10a keymap update * M65a keymap update * M65a keymap update * M65a keymap update * M65a readme update * M65a/M10a updates * M65a readme updates * M65a/M10a updates * M65A update * M65A update * M65A update * M65A update * M65A/M10A keymap update * M10A keymap update * Set theme jekyll-theme-tactile * M10A keymap update * M65A keymap.c update * M65 keymap added LED backlight toggle, inc/dec to adjust layer. * M65 keymap/readme updates. * M65 keymap fix * M65 keymap update * remove theme * fix comments/readme * update keymap * LED backlight update, guess based on reading atmega32u4 documentation for DDRB/PORTB regs, believe DDRB should only be written to once not every time CAPS is hit, but really not too sure. * LED backlight update, guess based on reading atmega32u4 documentation for DDRB/PORTB regs, believe DDRB should only be written to once not every time CAPS is hit, but really not too sure. * M65 keymap update * Updated M65, M10, and gonNerd keymaps. * update * del * keymap updates M65, M10, gonnerd * update keymaps * adding back readme that somehow got removed. * updated keymap * update keymap * add back readme * Added h87a keymap, updated m10a/jc65/gonnerd * Update h87a keymap * Updates after feedback * Updates after feedback * Updates after feedback * Updates after feedback --- keyboards/gonnerd/keymaps/gam3cat/config.h | 8 +- keyboards/gonnerd/keymaps/gam3cat/keymap.c | 351 +++++++++--------- keyboards/gonnerd/keymaps/gam3cat/readme.md | 106 +++--- keyboards/gonnerd/keymaps/gam3cat/rules.mk | 27 +- keyboards/h87a/keymaps/gam3cat/config.h | 10 + keyboards/h87a/keymaps/gam3cat/keymap.c | 292 +++++++++++++++ keyboards/h87a/keymaps/gam3cat/readme.md | 114 ++++++ keyboards/h87a/keymaps/gam3cat/rules.mk | 24 ++ keyboards/jc65/v32u4/keymaps/gam3cat/config.h | 6 +- keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c | 229 ++++++------ .../jc65/v32u4/keymaps/gam3cat/readme.md | 54 ++- keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk | 30 +- keyboards/m10a/keymaps/gam3cat/keymap.c | 199 +++++----- keyboards/m10a/keymaps/gam3cat/readme.md | 10 +- keyboards/m10a/keymaps/gam3cat/rules.mk | 27 +- 15 files changed, 966 insertions(+), 521 deletions(-) create mode 100644 keyboards/h87a/keymaps/gam3cat/config.h create mode 100644 keyboards/h87a/keymaps/gam3cat/keymap.c create mode 100644 keyboards/h87a/keymaps/gam3cat/readme.md create mode 100644 keyboards/h87a/keymaps/gam3cat/rules.mk diff --git a/keyboards/gonnerd/keymaps/gam3cat/config.h b/keyboards/gonnerd/keymaps/gam3cat/config.h index d86da86e40b6..334beb0ac2bb 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/config.h +++ b/keyboards/gonnerd/keymaps/gam3cat/config.h @@ -1,6 +1,10 @@ -#include "../../config.h" +#pragma once + +//Force NKRO to be enabled. +#define FORCE_NKRO + //GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut. -#define GRAVE_ESC_CTRL_OVERRIDE +//#define GRAVE_ESC_CTRL_OVERRIDE //Delay matrix scan for tap dance, reduce to activate modifier keys faster. //#define TAPPING_TERM 200 diff --git a/keyboards/gonnerd/keymaps/gam3cat/keymap.c b/keyboards/gonnerd/keymaps/gam3cat/keymap.c index 3e43d67d504d..f01dd920e7a5 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/keymap.c +++ b/keyboards/gonnerd/keymaps/gam3cat/keymap.c @@ -11,13 +11,16 @@ enum layers { _AL, // Adjust Layer }; -enum gonnerd_keycodes { +enum custom_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_SP4 }; +extern backlight_config_t backlight_config; + #include "dynamic_macro.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define FN_CAPS LT(_FL, KC_CAPS) #define KC_DMR1 DYN_REC_START1 #define KC_DMR2 DYN_REC_START2 @@ -25,47 +28,44 @@ enum gonnerd_keycodes { #define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMRS DYN_REC_STOP -static uint8_t current_layer; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer, mostly standard TKL QWERTY layout. - * .-----------------------------------------------------------------------. - * |Esc||||| F1| F2| F3| F4||| F5| F6| F7| F8||| F9|F10|F11|F12|PSc|SLk|Pau| - * |-----------------------------------------------------------|-----------| - * | ~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins|Hom|PgU| - * |-----------------------------------------------------------|-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del|End|PgD| - * |-----------------------------------------------------------|-----------| - * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return | | - * |-----------------------------------------------------------|-----------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up| | - * |-----------------------------------------------------------|-----------| - * |Ctrl |||||Win | Space |RAlt |||||Ctrl |Lft|Dwn|Rgt| - * *-----------------------------------------------------------------------* + /*#### _BL: Base Layer - Standard TKL QWERTY layout. + * .-----------------------------------------------------------------------. + * |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| + * |-----------------------------------------------------------|-----------| + * |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| + * |-----------------------------------------------------------|-----------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| + * |-----------------------------------------------------------|-----------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | + * |-----------------------------------------------------------|-----------| + * |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | + * |-----------------------------------------------------------|-----------| + * |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| + * *-----------------------------------------------------------------------* */ [_BL] = LAYOUT_tkl( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ - FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), - - /* _WL: Workman Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | -| =| | | | | - * |-----------------------------------------------------------|-----------| - * | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| S| H| T| G| Y| N| E| O| I| '| | | - * |-----------------------------------------------------------|-----------| - * | | Z| X| M| C| V| K| L| ,| .| /| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _WL: Workman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |H |T |G |Y |N |E |O |I |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |M |C |V |K |L |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_WL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -75,21 +75,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _NL: Norman Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | -| =| | | | | - * |-----------------------------------------------------------|-----------| - * | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| S| E| T| G| Y| N| I| O| H| '| | | - * |-----------------------------------------------------------|-----------| - * | | Z| X| C| V| B| P| M| ,| .| /| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _NL: Norman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |E |T |G |Y |N |I |O |H |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |P |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_NL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -99,21 +98,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _DL: Dvorak Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | [| ]| | | | | - * |-----------------------------------------------------------|-----------| - * | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| O| E| U| I| D| H| T| N| S| -| | | - * |-----------------------------------------------------------|-----------| - * | | ;| Q| J| K| X| B| M| W| V| Z| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _DL: Dvorak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |[ |] | | | | | + * |-----------------------------------------------------------|-----------| + * | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |O |E |U |I |D |H |T |N |S |- | | | + * |-----------------------------------------------------------|-----------| + * | |; |Q |J |K |X |B |M |W |V |Z | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_DL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -123,21 +121,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _CL: Colmak Layer. - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | -| =| | | | | - * |-----------------------------------------------------------|-----------| - * | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | | | - * |-----------------------------------------------------------|-----------| - * | | A| R| S| T| D| H| N| E| I| O| '| | | - * |-----------------------------------------------------------|-----------| - * | | Z| X| C| V| B| K| M| ,| .| /| | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _CL: Colmak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |R |S |T |D |H |N |E |I |O |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |K |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* */ [_CL] = LAYOUT_tkl( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -147,142 +144,126 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), - - /* _FL: Function Layer. - * M0 opens Chrome - * .-----------------------------------------------------------------------. - * | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | - * .-----------------------------------------------------------|-----------| - * | M0| | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * |Fn_AL| | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * |FnCaps| | | | | | |Lft|Dwn|Up |Rgt| | | | - * |-----------------------------------------------------------|-----------| - * | | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| |WBk| |WFw| - * *-----------------------------------------------------------------------* + /*#### _FL: Function Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | + * .-----------------------------------------------------------|-----------| + * |Web| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * |Fn_AL| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | |Lft|Dwn|Up |Rgt| | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | SP4 | |Fn | |WBk| |WFw| + * *-----------------------------------------------------------------------* */ [_FL] = LAYOUT_tkl( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, \ - M(0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_WEB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ MO(_AL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ - XXXXXXX, XXXXXXX, KC_MENU, M(1), XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_WBAK, XXXXXXX, KC_WFWD \ + XXXXXXX, XXXXXXX, KC_MENU, KC_SP4, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_WBAK, XXXXXXX, KC_WFWD \ ), - - /* _AL: Adjust Layer. - * Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. - * .-----------------------------------------------------------------------. - * |Rst||||| | | | ||| | | | ||| | | | | | | | - * .-----------------------------------------------------------|-----------| - * |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| - * |-----------------------------------------------------------|-----------| - * |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| - * |-----------------------------------------------------------|-----------| - * |FnCaps| | |_DL| | | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * | | | |_CL| |_BL|_NL| | | | | | | | | | - * |-----------------------------------------------------------|-----------| - * | ||||| | | ||||| | | | | - * *-----------------------------------------------------------------------* + /*#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. + * .-----------------------------------------------------------------------. + * |Rst||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + * |-----------------------------------------------------------|-----------| + * |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| + * |-----------------------------------------------------------|-----------| + * | | | |_DL| | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | |_CL| |_BL|_NL| | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | |Fn | | | | | + * *-----------------------------------------------------------------------* */ [_AL] = LAYOUT_tkl( \ RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - F(0), RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMR1, KC_DMP1, \ + QMK_REV, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMR1, KC_DMP1, \ _______, DF(_BL), DF(_WL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMRS, KC_DMR2, KC_DMP2, \ - _______, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_CL), XXXXXXX, DF(_BL), DF(_NL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: if (record->event.pressed) { - return MACRO(I(0), D(LGUI), T(R), U(LGUI), END); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); } - else { + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); SEND_STRING("chrome.exe\n"); - return false; } - break; - case 1: + return false; + break; + case KC_SP4: if (record->event.pressed) { - return MACRO(I(0), T(SPC), T(SPC), T(SPC), T(SPC), END); + SEND_STRING (" "); } - else { - return false; - } - break; + return false; + break; } - return MACRO_NONE; -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING ("[QMK:" QMK_KEYBOARD ":" QMK_KEYMAP ":" QMK_VERSION "]"); - } - break; + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); } void matrix_init_user(void) { #ifdef BACKLIGHT_ENABLE - backlight_level(0); + custom_backlight_level(0); #endif } -// Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (current_layer == layer) { - } - else { - current_layer = layer; - switch (layer) { - case 0: - backlight_level(0); - break; - case 1: - backlight_level(1); - break; - case 2: - backlight_level(1); - break; - case 3: - backlight_level(1); - break; - case 4: - backlight_level(1); - break; - case 5: - backlight_level(2); - break; - case 6: - backlight_level(3); - break; - default: - backlight_level(0); - break; - } - } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Enable Dynamic Macros. - if (!process_record_dynamic_macro(keycode, record)) { - return false; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _BL: + custom_backlight_level(0); + break; + case _WL: + case _NL: + case _DL: + case _CL: + custom_backlight_level(1); + break; + case _FL: + custom_backlight_level(2); + break; + case _AL: + custom_backlight_level(3); + break; + default: + custom_backlight_level(0); + break; } - return true; + return state; +} + +void led_set_user(uint8_t usb_led) { + } diff --git a/keyboards/gonnerd/keymaps/gam3cat/readme.md b/keyboards/gonnerd/keymaps/gam3cat/readme.md index 181369790a59..8630ea2966c0 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/readme.md +++ b/keyboards/gonnerd/keymaps/gam3cat/readme.md @@ -1,120 +1,114 @@ # Keymap Maintainer: Gam3cat make gonnerd:gam3cat ## Layout Config: -2u backspace, 2.25u left shift/enter, 1.75u right shift. -2x1.5u, 1x7.0u, 2x1.5u, 3x1u bottom row. - - FN_CAPS = MO(_FL) when held, CAPS when tapped. - GRAVE_ESC + GUI = ` - GRAVE_ESC + SHIFT = ~ +2u backspace, 2.25u lshift/enter, [2.75u rshift] or [1.75u rshift, 1u Fn]. +[1.5u, 1u, 1.5u 1x7.0u, 1.5u, 1u, 1.5u, 3x1u] or [2x1.5u, 1x7.0u, 2x1.5u, 3x1u] bottom row. ## Base Layer Selection: -(Caps+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak +(Fn+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak ### Base Layer Options: - _BL: Base Layer, mostly standard TKL QWERTY layout. +#### _BL: Base Layer - Standard TKL QWERTY layout. .-----------------------------------------------------------------------. - |Esc||||| F1| F2| F3| F4||| F5| F6| F7| F8||| F9|F10|F11|F12|PSc|SLk|Pau| + |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| |-----------------------------------------------------------|-----------| - | ~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins|Hom|PgU| + |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| |-----------------------------------------------------------|-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del|End|PgD| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| |-----------------------------------------------------------|-----------| - |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return | | + |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | |-----------------------------------------------------------|-----------| - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | Up| | + |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | |-----------------------------------------------------------|-----------| - |Ctrl |||||Win | Space |RAlt |||||Ctrl |Lft|Dwn|Rgt| + |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| *-----------------------------------------------------------------------* - - _WL: Workman Layer. + +#### _WL: Workman Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | -| =| | | | | + | | | | | | | | | | | |- |= | | | | | |-----------------------------------------------------------|-----------| - | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | | | + | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | |-----------------------------------------------------------|-----------| - | | A| S| H| T| G| Y| N| E| O| I| '| | | + | |A |S |H |T |G |Y |N |E |O |I |' | | | |-----------------------------------------------------------|-----------| - | | Z| X| M| C| V| K| L| ,| .| /| | | | | | + | |Z |X |M |C |V |K |L |, |. |/ | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _NL: Norman Layer. + +#### _NL: Norman Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | -| =| | | | | + | | | | | | | | | | | |- |= | | | | | |-----------------------------------------------------------|-----------| - | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | | | + | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | |-----------------------------------------------------------|-----------| - | | A| S| E| T| G| Y| N| I| O| H| '| | | + | |A |S |E |T |G |Y |N |I |O |H |' | | | |-----------------------------------------------------------|-----------| - | | Z| X| C| V| B| P| M| ,| .| /| | | | | | + | |Z |X |C |V |B |P |M |, |. |/ | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _DL: Dvorak Layer. + +#### _DL: Dvorak Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | [| ]| | | | | + | | | | | | | | | | | |[ |] | | | | | |-----------------------------------------------------------|-----------| - | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | | | + | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | |-----------------------------------------------------------|-----------| - | | A| O| E| U| I| D| H| T| N| S| -| | | + | |A |O |E |U |I |D |H |T |N |S |- | | | |-----------------------------------------------------------|-----------| - | | ;| Q| J| K| X| B| M| W| V| Z| | | | | | + | |; |Q |J |K |X |B |M |W |V |Z | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _CL: Colmak Layer. + +#### _CL: Colmak Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - | | | | | | | | | | | | -| =| | | | | + | | | | | | | | | | | |- |= | | | | | |-----------------------------------------------------------|-----------| - | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | | | + | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | |-----------------------------------------------------------|-----------| - | | A| R| S| T| D| H| N| E| I| O| '| | | + | |A |R |S |T |D |H |N |E |I |O |' | | | |-----------------------------------------------------------|-----------| - | | Z| X| C| V| B| K| M| ,| .| /| | | | | | + | |Z |X |C |V |B |K |M |, |. |/ | | | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | | | | | | | *-----------------------------------------------------------------------* - - _FL: Function Layer. - M0 opens Chrome + +#### _FL: Function Layer. .-----------------------------------------------------------------------. | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | .-----------------------------------------------------------|-----------| - | M0| | | | | | | | | | | | | | | | | + |Web| | | | | | | | | | | | | | | | | |-----------------------------------------------------------|-----------| - | | | | | | | | | | | | | | | | | | + |Fn_AL| | | | | | | | | | | | | | | | | |-----------------------------------------------------------|-----------| | | | | | | | |Lft|Dwn|Up |Rgt| | | | |-----------------------------------------------------------|-----------| - | | | | | | | | | | | | | | | | | + | | | | | | | | | | | | |Fn | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| |WBk| |WFw| + | | | | SP4 | |Fn | |WBk| |WFw| *-----------------------------------------------------------------------* - - _AL: Adjust Layer. - Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. + +#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. .-----------------------------------------------------------------------. |Rst||||| | | | ||| | | | ||| | | | | | | | .-----------------------------------------------------------|-----------| - |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| |-----------------------------------------------------------|-----------| |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| |-----------------------------------------------------------|-----------| - |FnCaps| | |_DL| | | | | | | | | | | + | | | |_DL| | | | | | | | | | | |-----------------------------------------------------------|-----------| - | | | |_CL| |_BL|_NL| | | | | | | | | | + | | | |_CL| |_BL|_NL| | | | | |Fn | | | | |-----------------------------------------------------------|-----------| - | ||||| | | ||||| | | | | + | | | | | |Fn | | | | | *-----------------------------------------------------------------------* diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk index a226838424ff..6eab033cc0c0 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk +++ b/keyboards/gonnerd/keymaps/gam3cat/rules.mk @@ -2,20 +2,23 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+1500) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/h87a/keymaps/gam3cat/config.h b/keyboards/h87a/keymaps/gam3cat/config.h new file mode 100644 index 000000000000..334beb0ac2bb --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/config.h @@ -0,0 +1,10 @@ +#pragma once + +//Force NKRO to be enabled. +#define FORCE_NKRO + +//GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut. +//#define GRAVE_ESC_CTRL_OVERRIDE + +//Delay matrix scan for tap dance, reduce to activate modifier keys faster. +//#define TAPPING_TERM 200 diff --git a/keyboards/h87a/keymaps/gam3cat/keymap.c b/keyboards/h87a/keymaps/gam3cat/keymap.c new file mode 100644 index 000000000000..2a4e5ca41012 --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/keymap.c @@ -0,0 +1,292 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +enum layers { + _BL = 0, // Base Layer + _WL, // Workman Layer + _NL, // Norman Layer + _DL, // Dvorak Layer + _CL, // Base Layer + _FL, // Function Layer + _AL, // Adjust Layer +}; + +enum custom_keycodes { + DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_SP4 +}; + +extern backlight_config_t backlight_config; + +#include "dynamic_macro.h" +#define FN_CAPS LT(_FL, KC_CAPS) +#define KC_DMR1 DYN_REC_START1 +#define KC_DMR2 DYN_REC_START2 +#define KC_DMP1 DYN_MACRO_PLAY1 +#define KC_DMP2 DYN_MACRO_PLAY2 +#define KC_DMRS DYN_REC_STOP + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /*#### _BL: Base Layer - Standard TKL QWERTY layout. + * .-----------------------------------------------------------------------. + * |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| + * |-----------------------------------------------------------|-----------| + * |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| + * |-----------------------------------------------------------|-----------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| + * |-----------------------------------------------------------|-----------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | + * |-----------------------------------------------------------|-----------| + * |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | + * |-----------------------------------------------------------|-----------| + * |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| + * *-----------------------------------------------------------------------* + */ + [_BL] = LAYOUT_all( \ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FL), KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + /*#### _WL: Workman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |H |T |G |Y |N |E |O |I |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |M |C |V |K |L |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_WL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______, _______, _______, _______, \ + _______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______, _______, \ + _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _NL: Norman Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |S |E |T |G |Y |N |I |O |H |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |P |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_NL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______, _______, _______, _______, \ + _______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______, _______, \ + _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _DL: Dvorak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |[ |] | | | | | + * |-----------------------------------------------------------|-----------| + * | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |O |E |U |I |D |H |T |N |S |- | | | + * |-----------------------------------------------------------|-----------| + * | |; |Q |J |K |X |B |M |W |V |Z | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_DL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, \ + _______, KC_QUOT, KC_COMM, KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L , KC_SLSH, KC_EQL , _______, _______, _______, _______, \ + _______, KC_A , KC_O , KC_E , KC_U , KC_I , KC_D , KC_H , KC_T , KC_N , KC_S , KC_MINS, _______, _______, \ + _______, _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _CL: Colmak Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * | | | | | | | | | | | |- |= | | | | | + * |-----------------------------------------------------------|-----------| + * | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | + * |-----------------------------------------------------------|-----------| + * | |A |R |S |T |D |H |N |E |I |O |' | | | + * |-----------------------------------------------------------|-----------| + * | |Z |X |C |V |B |K |M |, |. |/ | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | + * *-----------------------------------------------------------------------* + */ + [_CL] = LAYOUT_all( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_Q , KC_W , KC_F , KC_P , KC_G , KC_J , KC_L , KC_U , KC_Y , KC_SCLN, _______, _______, _______, _______, _______, _______, \ + _______, KC_A , KC_R , KC_S , KC_T , KC_D , KC_H , KC_N , KC_E , KC_I , KC_O , _______, _______, _______, \ + _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /*#### _FL: Function Layer. + * .-----------------------------------------------------------------------. + * | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | + * .-----------------------------------------------------------|-----------| + * |Web| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * |Fn_AL| | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | |Lft|Dwn|Up |Rgt| | | | + * |-----------------------------------------------------------|-----------| + * | | | | | | | | | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | SP4 | |Fn | |WBk| |WFw| + * *-----------------------------------------------------------------------* + */ + [_FL] = LAYOUT_all( \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_WEB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + MO(_AL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ + XXXXXXX, XXXXXXX, KC_MENU, KC_SP4, XXXXXXX, _______, XXXXXXX, XXXXXXX, KC_WBAK, XXXXXXX, KC_WFWD \ + ), + /*#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. + * .-----------------------------------------------------------------------. + * |Rst||||| | | | ||| | | | ||| | | | | | | | + * .-----------------------------------------------------------|-----------| + * |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + * |-----------------------------------------------------------|-----------| + * |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| + * |-----------------------------------------------------------|-----------| + * | | | |_DL| | | | | | | | | | | + * |-----------------------------------------------------------|-----------| + * | | | |_CL| |_BL|_NL| | | | | |Fn | | | | + * |-----------------------------------------------------------|-----------| + * | | | | | |Fn | | | | | + * *-----------------------------------------------------------------------* + */ + [_AL] = LAYOUT_all( \ + RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + QMK_REV, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMR1, KC_DMP1, \ + _______, DF(_BL), DF(_WL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMRS, KC_DMR2, KC_DMP2, \ + XXXXXXX, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_CL), XXXXXXX, DF(_BL), DF(_NL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); + } + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); + SEND_STRING("chrome.exe\n"); + } + return false; + break; + case KC_SP4: + if (record->event.pressed) { + SEND_STRING (" "); + } + return false; + break; + } + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); +} + +void matrix_init_user(void) { + #ifdef BACKLIGHT_ENABLE + custom_backlight_level(0); + #endif + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + rgblight_sethsv_noeeprom(180,100,100); + #endif +} + +void matrix_scan_user(void) { + +} + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _BL: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,255); + break; + case _WL: + case _NL: + case _DL: + case _CL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(230,255,255); + break; + case _FL: + custom_backlight_level(2); + rgblight_sethsv_noeeprom(280,255,255); + break; + case _AL: + custom_backlight_level(3); + rgblight_sethsv_noeeprom(350,255,255); + break; + default: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,100); + break; + } + return state; +} + +void led_init_ports(void) { + DDRD |= (1<<5); // OUT + DDRE |= (1<<6); // OUT +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= (1 << 5); PORTD &= ~(1 << 5); + } else { + DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + } + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRE |= (1 << 6); PORTE &= ~(1 << 6); + } else { + DDRE &= ~(1 << 6); PORTE &= ~(1 << 6); + } +} diff --git a/keyboards/h87a/keymaps/gam3cat/readme.md b/keyboards/h87a/keymaps/gam3cat/readme.md new file mode 100644 index 000000000000..5eb4c7d611e7 --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/readme.md @@ -0,0 +1,114 @@ +# Keymap Maintainer: Gam3cat +make h87a:gam3cat +## Layout Config: +2u backspace, 2.25u lshift/enter, [2.75u rshift] or [1.75u rshift, 1u Fn]. +[1.5u, 1u, 1.5u 1x7.0u, 1.5u, 1u, 1.5u, 3x1u] or [2x1.5u, 1x7.0u, 2x1.5u, 3x1u] bottom row. + +## Base Layer Selection: +(Fn+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak + +### Base Layer Options: +#### _BL: Base Layer - Standard TKL QWERTY layout. + .-----------------------------------------------------------------------. + |Esc|||||F1 |F2 |F3 |F4 |||F5 |F6 |F7 |F8 |||F9 |F10|F11|F12|PSc|SLk|Pau| + |-----------------------------------------------------------|-----------| + |~ |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins|Hom|PgU| + |-----------------------------------------------------------|-----------| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del|End|PgD| + |-----------------------------------------------------------|-----------| + |Caps |A |S |D |F |G |H |J |K |L |; |' |Return | | + |-----------------------------------------------------------|-----------| + |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Fn | | Up| | + |-----------------------------------------------------------|-----------| + |Ctrl |Win|Alt | Space |RAlt |Fn |Ctrl |Lft|Dwn|Rgt| + *-----------------------------------------------------------------------* + +#### _WL: Workman Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |- |= | | | | | + |-----------------------------------------------------------|-----------| + | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |S |H |T |G |Y |N |E |O |I |' | | | + |-----------------------------------------------------------|-----------| + | |Z |X |M |C |V |K |L |, |. |/ | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _NL: Norman Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |- |= | | | | | + |-----------------------------------------------------------|-----------| + | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |S |E |T |G |Y |N |I |O |H |' | | | + |-----------------------------------------------------------|-----------| + | |Z |X |C |V |B |P |M |, |. |/ | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _DL: Dvorak Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |[ |] | | | | | + |-----------------------------------------------------------|-----------| + | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |O |E |U |I |D |H |T |N |S |- | | | + |-----------------------------------------------------------|-----------| + | |; |Q |J |K |X |B |M |W |V |Z | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _CL: Colmak Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + | | | | | | | | | | | |- |= | | | | | + |-----------------------------------------------------------|-----------| + | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | | | + |-----------------------------------------------------------|-----------| + | |A |R |S |T |D |H |N |E |I |O |' | | | + |-----------------------------------------------------------|-----------| + | |Z |X |C |V |B |K |M |, |. |/ | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | + *-----------------------------------------------------------------------* + +#### _FL: Function Layer. + .-----------------------------------------------------------------------. + | ||||| | | | ||| | | | ||| |VlM|VlD|VlU| | | | + .-----------------------------------------------------------|-----------| + |Web| | | | | | | | | | | | | | | | | + |-----------------------------------------------------------|-----------| + |Fn_AL| | | | | | | | | | | | | | | | | + |-----------------------------------------------------------|-----------| + | | | | | | | |Lft|Dwn|Up |Rgt| | | | + |-----------------------------------------------------------|-----------| + | | | | | | | | | | | | |Fn | | | | + |-----------------------------------------------------------|-----------| + | | | | SP4 | |Fn | |WBk| |WFw| + *-----------------------------------------------------------------------* + +#### _AL: Adjust Layer - Keymap select, LED backlight, and Dynamic Macro settings. + .-----------------------------------------------------------------------. + |Rst||||| | | | ||| | | | ||| | | | | | | | + .-----------------------------------------------------------|-----------| + |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| | |MR1|MP1| + |-----------------------------------------------------------|-----------| + |Fn_AL|_BL|_WL| | | | | | | | | | | | MS|MR2|MP2| + |-----------------------------------------------------------|-----------| + | | | |_DL| | | | | | | | | | | + |-----------------------------------------------------------|-----------| + | | | |_CL| |_BL|_NL| | | | | |Fn | | | | + |-----------------------------------------------------------|-----------| + | | | | | |Fn | | | | | + *-----------------------------------------------------------------------* diff --git a/keyboards/h87a/keymaps/gam3cat/rules.mk b/keyboards/h87a/keymaps/gam3cat/rules.mk new file mode 100644 index 000000000000..85b2b41a6bc4 --- /dev/null +++ b/keyboards/h87a/keymaps/gam3cat/rules.mk @@ -0,0 +1,24 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+1500) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/config.h b/keyboards/jc65/v32u4/keymaps/gam3cat/config.h index d86da86e40b6..e4df94be7017 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/config.h +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/config.h @@ -1,4 +1,8 @@ -#include "../../config.h" +#pragma once + +//Force NKRO to be enabled. +#define FORCE_NKRO + //GRAVE_ESC override for CTRL+SHIFT+ESC Windows task manager shortcut. #define GRAVE_ESC_CTRL_OVERRIDE diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c index af45fb608f10..aa5709a373cb 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/keymap.c @@ -11,13 +11,16 @@ enum layers { _AL, // Adjust Layer }; -enum jc65_keycodes { +enum custom_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_SP4 }; +extern backlight_config_t backlight_config; + #include "dynamic_macro.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define FN_CAPS LT(_FL, KC_CAPS) #define KC_DMR1 DYN_REC_START1 #define KC_DMR2 DYN_REC_START2 @@ -25,18 +28,16 @@ enum jc65_keycodes { #define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMRS DYN_REC_STOP -static uint8_t current_layer; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* _BL: Base Layer, mostly standard 65% QWERTY layout. + /*#### _BL: Base Layer - Mostly standard 65% QWERTY layout. * .---------------------------------------------------------------. - * |GrE| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins| + * |GrE|1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins| * |---------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del| * |---------------------------------------------------------------| - * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return |PgU| + * |FnCaps|A |S |D |F |G |H |J |K |L |; |' |Return |PgU| * |---------------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Up |PgD| * |---------------------------------------------------------------| * |Ctrl|Gui |Alt | Space |RAlt |Ctrl |Lft|Dwn|Rgt| * *---------------------------------------------------------------* @@ -48,16 +49,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - - /* _WL: Workman Layer. + /*#### _WL: Workman Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | -| =| | | + * | | | | | | | | | | | |- |= | | | * |---------------------------------------------------------------| - * | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | + * | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | * |---------------------------------------------------------------| - * | | A| S| H| T| G| Y| N| E| O| I| '| | | + * | |A |S |H |T |G |Y |N |E |O |I |' | | | * |---------------------------------------------------------------| - * | | Z| X| M| C| V| K| L| ,| .| /| | | | + * | |Z |X |M |C |V |K |L |, |. |/ | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -69,16 +69,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _NL: Norman Layer. + /*#### _NL: Norman Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | -| =| | | + * | | | | | | | | | | | |- |= | | | * |---------------------------------------------------------------| - * | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | + * | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | * |---------------------------------------------------------------| - * | | A| S| E| T| G| Y| N| I| O| H| '| | | + * | |A |S |E |T |G |Y |N |I |O |H |' | | | * |---------------------------------------------------------------| - * | | Z| X| C| V| B| P| M| ,| .| /| | | | + * | |Z |X |C |V |B |P |M |, |. |/ | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -90,16 +89,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _DL: Dvorak Layer. + /*#### _DL: Dvorak Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | [| ]| | | + * | | | | | | | | | | | |[ |] | | | * |---------------------------------------------------------------| - * | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | + * | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | * |---------------------------------------------------------------| - * | | A| O| E| U| I| D| H| T| N| S| -| | | + * | |A |O |E |U |I |D |H |T |N |S |- | | | * |---------------------------------------------------------------| - * | | ;| Q| J| K| X| B| M| W| V| Z| | | | + * | |; |Q |J |K |X |B |M |W |V |Z | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -111,16 +109,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_SCLN, KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _CL: Colmak Layer. + /*#### _CL: Colmak Layer. * .---------------------------------------------------------------. - * | | | | | | | | | | | | -| =| | | + * | | | | | | | | | | | |- |= | | | * |---------------------------------------------------------------| - * | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | + * | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | * |---------------------------------------------------------------| - * | | A| R| S| T| D| H| N| E| I| O| '| | | + * | |A |R |S |T |D |H |N |E |I |O |' | | | * |---------------------------------------------------------------| - * | | Z| X| C| V| B| K| M| ,| .| /| | | | + * | |Z |X |C |V |B |K |M |, |. |/ | | | | * |---------------------------------------------------------------| * | | | | | | | | | | * *---------------------------------------------------------------* @@ -132,11 +129,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_K , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - - /* _FL: Function Layer. - * M0 opens Chrome + /*#### _FL: Function Layer. * .---------------------------------------------------------------. - * |M0 | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|SLock |PSc| + * |Web|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|SLock |PSc| * |---------------------------------------------------------------| * |Fn_AL| | | | | | | | | | | | | |Pau| * |---------------------------------------------------------------| @@ -144,21 +139,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |---------------------------------------------------------------| * | | | | | | | | | | | |VlMute|VlU|End| * |---------------------------------------------------------------| - * | | |Menu| | | |WBk|VlD|WFw| + * | | |Menu| SP4 | | |WBk|VlD|WFw| * *---------------------------------------------------------------* */ [_FL] = LAYOUT( - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_SLCK, KC_PSCR, + KC_WEB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_SLCK, KC_PSCR, MO(_AL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLU, KC_END, - XXXXXXX, XXXXXXX, KC_MENU, M(1), M(1), M(1), XXXXXXX, XXXXXXX, XXXXXXX, KC_WBAK, KC_VOLD, KC_WFWD + XXXXXXX, XXXXXXX, KC_MENU, KC_SP4, KC_SP4, KC_SP4, XXXXXXX, XXXXXXX, XXXXXXX, KC_WBAK, KC_VOLD, KC_WFWD ), - - /* _AL: Adjust Layer. - * Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. + /*#### _AL: Adjust Layer - Keymap select, RGB Underglow, LED backlight, and Dynamic Macro settings. * .---------------------------------------------------------------. - * |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| + * |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| * |---------------------------------------------------------------| * |Fn_AL|_BL|_WL| | | | | | | | | | | |MR1| * |---------------------------------------------------------------| @@ -170,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * *---------------------------------------------------------------* */ [_AL] = LAYOUT( - F(0), RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMP1, + QMK_REV, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, XXXXXXX, BL_TOGG, BL_DEC, BL_INC, XXXXXXX, XXXXXXX, KC_DMP1, _______, DF(_BL), DF(_WL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMR1, _______, XXXXXXX, XXXXXXX, DF(_DL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMRS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF(_CL), XXXXXXX, DF(_BL), DF(_NL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_DMR2, @@ -178,102 +171,96 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: if (record->event.pressed) { - return MACRO(I(0), D(LGUI), T(R), U(LGUI), END); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); } - else { + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); SEND_STRING("chrome.exe https://geekhack.org/index.php?topic=86756.new;topicseen#new\n"); - return false; } - break; - case 1: + return false; + break; + case KC_SP4: if (record->event.pressed) { - return MACRO(I(0), T(SPC), T(SPC), T(SPC), T(SPC), END); + SEND_STRING (" "); } - else { - return false; - } - break; + return false; + break; } - return MACRO_NONE; -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING ("[QMK:" QMK_KEYBOARD ":" QMK_KEYMAP ":" QMK_VERSION "]"); - } - break; + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); } void matrix_init_user(void) { #ifdef BACKLIGHT_ENABLE - backlight_level(0); + custom_backlight_level(0); #endif #ifdef RGBLIGHT_ENABLE rgblight_mode(1); - rgblight_sethsv(180,100,100); + rgblight_sethsv_noeeprom(180,100,100); #endif } -// Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (current_layer == layer) { - } - else { - current_layer = layer; - switch (layer) { - case 0: - backlight_level(0); - rgblight_sethsv(180,100,255); - break; - case 1: - backlight_level(1); - rgblight_sethsv(180,95,240); - break; - case 2: - backlight_level(1); - rgblight_sethsv(180,90,225); - break; - case 3: - backlight_level(1); - rgblight_sethsv(180,85,210); - break; - case 4: - backlight_level(1); - rgblight_sethsv(180,80,195); - break; - case 5: - backlight_level(2); - rgblight_sethsv(230,255,255); - break; - case 6: - backlight_level(3); - rgblight_sethsv(350,255,255); - break; - default: - backlight_level(0); - rgblight_sethsv(180,100,100); - break; - } - } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Enable Dynamic Macros. - if (!process_record_dynamic_macro(keycode, record)) { - return false; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _BL: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,255); + break; + case _WL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,95,240); + break; + case _NL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,90,225); + break; + case _DL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,85,210); + break; + case _CL: + custom_backlight_level(1); + rgblight_sethsv_noeeprom(180,80,195); + break; + case _FL: + custom_backlight_level(2); + rgblight_sethsv_noeeprom(230,255,255); + break; + case _AL: + custom_backlight_level(3); + rgblight_sethsv_noeeprom(350,255,255); + break; + default: + custom_backlight_level(0); + rgblight_sethsv_noeeprom(180,100,100); + break; } - return true; + return state; +} + +void led_set_user(uint8_t usb_led) { + } diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md b/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md index 88b65dbbb7bd..e79ce4ff7fd6 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/readme.md @@ -13,76 +13,74 @@ make jc65/v32u4:gam3cat (Caps+TAB+( )): (Q)WERTY, (W)orkman, (N)orman, (D)vorak, (C)olmak ### Base Layer Options: -#### _BL: Base Layer, mostly standard 65% QWERTY layout. +#### _BL: Base Layer - Mostly standard 65% QWERTY layout. .---------------------------------------------------------------. - |GrE| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins| + |GrE|1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backsp |Ins| |---------------------------------------------------------------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|Del| + |Tab |Q |W |E |R |T |Y |U |I |O |P |[ |] |\ |Del| |---------------------------------------------------------------| - |FnCaps| A| S| D| F| G| H| J| K| L| ;| '|Return |PgU| + |FnCaps|A |S |D |F |G |H |J |K |L |; |' |Return |PgU| |---------------------------------------------------------------| - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + |Shift |Z |X |C |V |B |N |M |, |. |/ |Shift |Up |PgD| |---------------------------------------------------------------| |Ctrl|Gui |Alt | Space |RAlt |Ctrl |Lft|Dwn|Rgt| *---------------------------------------------------------------* #### _WL: Workman Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | -| =| | | + | | | | | | | | | | | |- |= | | | |---------------------------------------------------------------| - | | Q| D| R| W| B| J| F| U| P| ;| [| ]| \| | + | |Q |D |R |W |B |J |F |U |P |; |[ |] |\ | | |---------------------------------------------------------------| - | | A| S| H| T| G| Y| N| E| O| I| '| | | + | |A |S |H |T |G |Y |N |E |O |I |' | | | |---------------------------------------------------------------| - | | Z| X| M| C| V| K| L| ,| .| /| | | | + | |Z |X |M |C |V |K |L |, |. |/ | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* #### _NL: Norman Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | -| =| | | + | | | | | | | | | | | |- |= | | | |---------------------------------------------------------------| - | | Q| W| D| F| K| J| U| R| L| ;| [| ]| \| | + | |Q |W |D |F |K |J |U |R |L |; |[ |] |\ | | |---------------------------------------------------------------| - | | A| S| E| T| G| Y| N| I| O| H| '| | | + | |A |S |E |T |G |Y |N |I |O |H |' | | | |---------------------------------------------------------------| - | | Z| X| C| V| B| P| M| ,| .| /| | | | + | |Z |X |C |V |B |P |M |, |. |/ | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* #### _DL: Dvorak Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | [| ]| | | + | | | | | | | | | | | |[ |] | | | |---------------------------------------------------------------| - | | '| ,| .| P| Y| F| G| C| R| L| /| =| \| | + | |' |, |. |P |Y |F |G |C |R |L |/ |= |\ | | |---------------------------------------------------------------| - | | A| O| E| U| I| D| H| T| N| S| -| | | + | |A |O |E |U |I |D |H |T |N |S |- | | | |---------------------------------------------------------------| - | | ;| Q| J| K| X| B| M| W| V| Z| | | | + | |; |Q |J |K |X |B |M |W |V |Z | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* #### _CL: Colmak Layer. .---------------------------------------------------------------. - | | | | | | | | | | | | -| =| | | + | | | | | | | | | | | |- |= | | | |---------------------------------------------------------------| - | | Q| W| F| P| G| J| L| U| Y| ;| [| ]| \| | + | |Q |W |F |P |G |J |L |U |Y |; |[ |] |\ | | |---------------------------------------------------------------| - | | A| R| S| T| D| H| N| E| I| O| '| | | + | |A |R |S |T |D |H |N |E |I |O |' | | | |---------------------------------------------------------------| - | | Z| X| C| V| B| K| M| ,| .| /| | | | + | |Z |X |C |V |B |K |M |, |. |/ | | | | |---------------------------------------------------------------| | | | | | | | | | | *---------------------------------------------------------------* -### Function Layer: (hold Caps to access) - M0 opens Chrome #### _FL: Function Layer. .---------------------------------------------------------------. - |M0 | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|SLock |PSc| + |Web|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|SLock |PSc| |---------------------------------------------------------------| |Fn_AL| | | | | | | | | | | | | |Pau| |---------------------------------------------------------------| @@ -90,14 +88,12 @@ make jc65/v32u4:gam3cat |---------------------------------------------------------------| | | | | | | | | | | | |VlMute|VlU|End| |---------------------------------------------------------------| - | | |Menu| | | |WBk|VlD|WFw| + | | |Menu| SP4 | | |WBk|VlD|WFw| *---------------------------------------------------------------* -### Adjust Layer: (hold Caps+TAB to access) - Default keymap, RGB Underglow, LED backlight, and Dynamic Macro settings. -#### _AL: Adjust Layer. +#### _AL: Adjust Layer - Keymap select, RGB Underglow, LED backlight, and Dynamic Macro settings. .---------------------------------------------------------------. - |Ver|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| + |Rev|Tog|Mod|H- |H+ |S- |S+ |V- |V+ | |BLT|BL-|BL+| |MP1| |---------------------------------------------------------------| |Fn_AL|_BL|_WL| | | | | | | | | | | |MR1| |---------------------------------------------------------------| diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index c0a3ac69c3aa..85b2b41a6bc4 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -1,6 +1,24 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - -BACKLIGHT_ENABLE=yes -//TAP_DANCE_ENABLE=yes +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+1500) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common diff --git a/keyboards/m10a/keymaps/gam3cat/keymap.c b/keyboards/m10a/keymaps/gam3cat/keymap.c index 8f4c878da5e0..8ee35d50abfc 100644 --- a/keyboards/m10a/keymaps/gam3cat/keymap.c +++ b/keyboards/m10a/keymaps/gam3cat/keymap.c @@ -1,6 +1,4 @@ -#include "m10a.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "version.h" extern keymap_config_t keymap_config; @@ -18,46 +16,48 @@ enum layers { _L9 }; -enum m10a_keycodes { +enum custom_keycodes { DYNAMIC_MACRO_RANGE = SAFE_RANGE, + QMK_REV, + KC_WEB, + KC_WCLS }; +extern backlight_config_t backlight_config; + #include "dynamic_macro.h" -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define FN_ZERO LT(_L9, KC_0) +#define FN_ZERO LT(_L9, KC_KP_0) #define KC_DMR1 DYN_REC_START1 #define KC_DMR2 DYN_REC_START2 #define KC_DMP1 DYN_MACRO_PLAY1 #define KC_DMP2 DYN_MACRO_PLAY2 #define KC_DMRS DYN_REC_STOP -static uint8_t current_layer; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* .-----------. .-----------. .-----------. .-----------. .-----------. - * | 7| 8| 9| | +| -| *| | ^| &| !| |VLU|Ver|WFD| |VLU|NXT|FFD| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | 4| 5| 6| | /| %| ,| | D| E| F| |MUT|C-W|CHR| |MUT|STP|PLY| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | 1| 2| 3| | .| =|Ent| | A| B| C| |VLD|CMP|WBK| |VLD|PRV|RWD| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * |L0 | _L9/0| |L1 | _L9 | |L2 | _L9 | |L3 | _L9 | |L4 | _L9 | - * *-----------* *-----------* *-----------* *-----------* *-----------* - * .-----------. .-----------. .-----------. .-----------. .-----------. - * | | | | | | | | |MP1| |MP2| | | |RST| |_L6|_L7|_L8| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | | | | | | | | | |MRS| | | | | | |_L3|_L4|_L5| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * | | | | | | | | |MR1| |MR2| | | | | |_L0|_L1|_L2| - * |-----------| |-----------| |-----------| |-----------| |-----------| - * |L5 | _L9 | |L6 | _L9 | |L7 | _L9 | |L8 | _L9 | |L9 | | - * *-----------* *-----------* *-----------* *-----------* *-----------* + /*## Layout Config: + * .-----------. .-----------. .-----------. .-----------. .-----------. + * |7 |8 |9 | |+ |- |* | |^ |& |! | |VLU|Ver|WFD| |VLU|NXT|FFD| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |4 |5 |6 | |/ |% |, | |D |E |F | |MUT|C-W|CHR| |MUT|STP|PLY| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |1 |2 |3 | |. |= |Ent| |A |B |C | |VLD|CMP|WBK| |VLD|PRV|RWD| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |#L0|_L9/0 | |#L1|_L9 | |#L2|_L9 | |#L3|_L9 | |#L4|_L9 | + * *-----------* *-----------* *-----------* *-----------* *-----------* + * .-----------. .-----------. .-----------. .-----------. .-----------. + * | | | | | | | | |MP1| |MP2| | | |RST| |_L6|_L7|_L8| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * | | | | | | | | | |MRS| | | | | | |_L3|_L4|_L5| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * | | | | | | | | |MR1| |MR2| | | | | |_L0|_L1|_L2| + * |-----------| |-----------| |-----------| |-----------| |-----------| + * |#L5|_L9 | |#L6|_L9 | |#L7|_L9 | |#L8|_L9 | |#L9| | + * *-----------* *-----------* *-----------* *-----------* *-----------* */ - [_L0] = {{KC_7, KC_8, KC_9 }, {KC_4, KC_5, KC_6 }, {KC_1, KC_2, KC_3 }, {XXXXXXX, XXXXXXX, FN_ZERO}}, + [_L0] = {{KC_KP_7, KC_KP_8, KC_KP_9}, {KC_KP_4, KC_KP_5, KC_KP_6}, {KC_KP_1, KC_KP_2, KC_KP_3}, {XXXXXXX, XXXXXXX, FN_ZERO}}, [_L1] = {{KC_PPLS, KC_PMNS, KC_PAST}, {KC_PSLS, KC_PERC, KC_COMM}, {KC_PDOT, KC_EQL, KC_PENT}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L2] = {{KC_CIRC, KC_AMPR, KC_EXLM}, {S(KC_D), S(KC_E), S(KC_F)}, {S(KC_A), S(KC_B), S(KC_C)}, {XXXXXXX, XXXXXXX, MO(_L9)}}, - [_L3] = {{KC_VOLU, F(0), KC_WFWD}, {KC_MUTE, M(1), M(0) }, {KC_VOLD, KC_MYCM, KC_WBAK}, {XXXXXXX, XXXXXXX, MO(_L9)}}, + [_L3] = {{KC_VOLU, QMK_REV, KC_WFWD}, {KC_MUTE, KC_WCLS, KC_WEB }, {KC_VOLD, KC_MYCM, KC_WBAK}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L4] = {{KC_VOLU, KC_MNXT, KC_MFFD}, {KC_MUTE, KC_MSTP, KC_MPLY}, {KC_VOLD, KC_MPRV, KC_MRWD}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L5] = {{_______, _______, _______}, {_______, _______, _______}, {_______, _______, _______}, {XXXXXXX, XXXXXXX, MO(_L9)}}, [_L6] = {{_______, _______, _______}, {_______, _______, _______}, {_______, _______, _______}, {XXXXXXX, XXXXXXX, MO(_L9)}}, @@ -66,96 +66,93 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_L9] = {{DF(_L6), DF(_L7), DF(_L8)}, {DF(_L3), DF(_L4), DF(_L5)}, {DF(_L0), DF(_L1), DF(_L2)}, {XXXXXXX, XXXXXXX, _______}}, }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMK_REV: if (record->event.pressed) { - return MACRO(I(10), D(LGUI), T(R), U(LGUI), END); + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP "@" QMK_VERSION ":" QMK_BUILDDATE); } - else { + return false; + break; + case KC_WEB: + if (record->event.pressed) { + SEND_STRING(SS_LGUI("r")); + wait_ms(100); SEND_STRING("chrome.exe\n"); - return false; } - break; - case 1: + return false; + break; + case KC_WCLS: if (record->event.pressed) { - return MACRO(I(10), D(LCTL), T(W), U(LCTL), END); + SEND_STRING (SS_LCTRL("w")); } - break; + return false; + break; } - return MACRO_NONE; -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING ("[Keyboard: " QMK_KEYBOARD "] -- [QMK Version: " QMK_VERSION "] -- [Keymap: " QMK_KEYMAP "]"); - } - break; + // Dynamic Macros. + if (!process_record_dynamic_macro(keycode, record)) { + return false; } + return true; +} + +void custom_backlight_level(uint8_t level) { + if (level > BACKLIGHT_LEVELS) + level = BACKLIGHT_LEVELS; + backlight_config.level = level; + backlight_config.enable = !!backlight_config.level; + backlight_set(backlight_config.level); } void matrix_init_user(void) { #ifdef BACKLIGHT_ENABLE - backlight_level(0); + custom_backlight_level(0); #endif } -// Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - if (current_layer == layer) { - } - else { - current_layer = layer; - switch (layer) { - case 0: - backlight_level(0); - break; - case 1: - backlight_level(1); - break; - case 2: - backlight_level(2); - break; - case 3: - backlight_level(3); - break; - case 4: - backlight_level(4); - break; - case 5: - backlight_level(5); - break; - case 6: - backlight_level(6); - break; - case 7: - backlight_level(6); - break; - case 8: - backlight_level(6); - break; - case 9: - backlight_level(0); - break; - default: - backlight_level(0); - break; - } - } } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Enable Dynamic Macros. - if (!process_record_dynamic_macro(keycode, record)) { - return false; +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case _L0: + custom_backlight_level(0); + break; + case _L1: + custom_backlight_level(1); + break; + case _L2: + custom_backlight_level(2); + break; + case _L3: + custom_backlight_level(3); + break; + case _L4: + custom_backlight_level(4); + break; + case _L5: + custom_backlight_level(5); + break; + case _L6: + custom_backlight_level(6); + break; + case _L7: + custom_backlight_level(6); + break; + case _L8: + custom_backlight_level(6); + break; + case _L9: + custom_backlight_level(0); + break; + default: + custom_backlight_level(0); + break; } - return true; + return state; +} + +void led_set_user(uint8_t usb_led) { + } diff --git a/keyboards/m10a/keymaps/gam3cat/readme.md b/keyboards/m10a/keymaps/gam3cat/readme.md index 879a6c5a3771..5c68e8c8936a 100644 --- a/keyboards/m10a/keymaps/gam3cat/readme.md +++ b/keyboards/m10a/keymaps/gam3cat/readme.md @@ -2,13 +2,13 @@ make m10a:gam3cat ## Layout Config: .-----------. .-----------. .-----------. .-----------. .-----------. - | 7| 8| 9| | +| -| *| | ^| &| !| |VLU|Ver|WFD| |VLU|NXT|FFD| + |7 |8 |9 | |+ |- |* | |^ |& |! | |VLU|Ver|WFD| |VLU|NXT|FFD| |-----------| |-----------| |-----------| |-----------| |-----------| - | 4| 5| 6| | /| %| ,| | D| E| F| |MUT|C-W|CHR| |MUT|STP|PLY| + |4 |5 |6 | |/ |% |, | |D |E |F | |MUT|C-W|CHR| |MUT|STP|PLY| |-----------| |-----------| |-----------| |-----------| |-----------| - | 1| 2| 3| | .| =|Ent| | A| B| C| |VLD|CMP|WBK| |VLD|PRV|RWD| + |1 |2 |3 | |. |= |Ent| |A |B |C | |VLD|CMP|WBK| |VLD|PRV|RWD| |-----------| |-----------| |-----------| |-----------| |-----------| - |L0 | _L9/0| |L1 | _L9 | |L2 | _L9 | |L3 | _L9 | |L4 | _L9 | + |#L0|_L9/0 | |#L1|_L9 | |#L2|_L9 | |#L3|_L9 | |#L4|_L9 | *-----------* *-----------* *-----------* *-----------* *-----------* .-----------. .-----------. .-----------. .-----------. .-----------. | | | | | | | | |MP1| |MP2| | | |RST| |_L6|_L7|_L8| @@ -17,5 +17,5 @@ make m10a:gam3cat |-----------| |-----------| |-----------| |-----------| |-----------| | | | | | | | | |MR1| |MR2| | | | | |_L0|_L1|_L2| |-----------| |-----------| |-----------| |-----------| |-----------| - |L5 | _L9 | |L6 | _L9 | |L7 | _L9 | |L8 | _L9 | |L9 | | + |#L5|_L9 | |#L6|_L9 | |#L7|_L9 | |#L8|_L9 | |#L9| | *-----------* *-----------* *-----------* *-----------* *-----------* diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index 457a3d01d4a4..00515a31e9e7 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -1,3 +1,24 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +TAP_DANCE_ENABLE = no # Enable TapDance functionality +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+1500) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # Nkey Rollover - If this doesn't work, add this to config.h: #define FORCE_NKRO +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = no # Enable extended unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +#VARIABLE_TRACE = no # Use this to debug changes to variable values +API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) +KEY_LOCK_ENABLE = no # This enables key lock(+260) +SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common From e76bf17d36c3e23d4c780ab7dd0a10b5883889a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Thu, 3 Jan 2019 17:13:55 +0100 Subject: [PATCH 059/458] Remove redundant, language-specific aliases for KC_ALGR (#4720) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use standard KC_ALGR, remove language-specific redefinitions * Use ALGR instead of ALTGR in BÉPO and Canadian multilingual keymaps * Remove BE_LALT, BE_LGUI aliases --- keyboards/contra/keymaps/maxr1998/keymap.c | 4 +- keyboards/ergodox_ez/keymaps/skug/keymap.c | 2 +- .../handwired/reddot/keymaps/default/keymap.c | 4 +- .../lets_split/keymaps/DE_simple/keymap.c | 2 +- keyboards/planck/keymaps/skug/keymap.c | 2 +- keyboards/preonic/keymaps/jacwib/keymap.c | 4 +- keyboards/satan/keymaps/dende_iso/keymap.c | 2 +- keyboards/xd75/keymaps/germanized/config.h | 3 - layouts/community/ergodox/bepo/keymap.c | 2 +- layouts/community/ergodox/bepo_csa/keymap.c | 12 +- .../ergodox/dvorak_svorak_a5/keymap.c | 2 +- .../community/ergodox/swedish-lindhe/keymap.c | 2 +- layouts/community/ergodox/swedish/keymap.c | 2 +- quantum/keymap_extras/keymap_belgian.h | 6 - quantum/keymap_extras/keymap_bepo.h | 150 +++++++++--------- .../keymap_canadian_multilingual.h | 46 +++--- quantum/keymap_extras/keymap_fr_ch.h | 3 - quantum/keymap_extras/keymap_french.h | 3 - quantum/keymap_extras/keymap_german.h | 3 - quantum/keymap_extras/keymap_german_ch.h | 3 - quantum/keymap_extras/keymap_hungarian.h | 3 - quantum/keymap_extras/keymap_italian.h | 6 - quantum/keymap_extras/keymap_neo2.h | 2 +- quantum/keymap_extras/keymap_nordic.h | 3 - quantum/keymap_extras/keymap_slovenian.h | 3 - quantum/keymap_extras/keymap_spanish.h | 3 - quantum/keymap_extras/keymap_uk.h | 3 - users/spacebarracecar/spacebarracecar.c | 4 +- users/spacebarracecar/spacebarracecar.h | 4 +- 29 files changed, 116 insertions(+), 172 deletions(-) diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 87bf33894891..4d731c08b499 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -127,11 +127,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; case NR_L3: if (record->event.pressed) { - register_code(DE_ALGR); + register_code(KC_ALGR); layer_on(_NUMROW_L3); } else { layer_off(_NUMROW_L3); - unregister_code(DE_ALGR); + unregister_code(KC_ALGR); } return false; default: diff --git a/keyboards/ergodox_ez/keymaps/skug/keymap.c b/keyboards/ergodox_ez/keymaps/skug/keymap.c index d17990481e55..b3696f3a980b 100644 --- a/keyboards/ergodox_ez/keymaps/skug/keymap.c +++ b/keyboards/ergodox_ez/keymaps/skug/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), LT(SYMB, NO_AE), KC_WFWD, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC, - KC_SPC, KC_BSPC, NO_ALGR, NO_ASTR, CTL_T(NO_TILD), + KC_SPC, KC_BSPC, KC_ALGR, NO_ASTR, CTL_T(NO_TILD), KC_HOME, NO_CIRC, KC_PGUP, KC_UP, KC_DOWN, KC_LGUI, ALT_T(KC_ESC), CTL_T(KC_ENT) diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c index c67cc0e4c5d8..73aeff225228 100755 --- a/keyboards/handwired/reddot/keymaps/default/keymap.c +++ b/keyboards/handwired/reddot/keymaps/default/keymap.c @@ -8,14 +8,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\ KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\ KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\ - FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, FR_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), [1] = KEYMAP( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\ KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\ KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\ - FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, FR_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), }; diff --git a/keyboards/lets_split/keymaps/DE_simple/keymap.c b/keyboards/lets_split/keymaps/DE_simple/keymap.c index d329bea4c045..e801c241e1f1 100644 --- a/keyboards/lets_split/keymaps/DE_simple/keymap.c +++ b/keyboards/lets_split/keymaps/DE_simple/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, \ KC_TAB, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, DE_PLUS, DE_HASH, \ KC_LSFT, DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, KC_ENT , \ - KC_LCTL, KC_LALT, DE_ALGR, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LALT, KC_ALGR, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower diff --git a/keyboards/planck/keymaps/skug/keymap.c b/keyboards/planck/keymaps/skug/keymap.c index 29324a09e499..86a1de767b19 100644 --- a/keyboards/planck/keymaps/skug/keymap.c +++ b/keyboards/planck/keymaps/skug/keymap.c @@ -60,7 +60,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , NO_AA , UTILITY, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , NO_OSLH, NO_AE , KC_LSPO, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , NO_MINS, KC_RSPC, - LFT_CTR, KC_LALT, KC_LGUI, NO_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, NO_ALGR, NO_ASTR, RGT_CTR + LFT_CTR, KC_LALT, KC_LGUI, NO_AT , ESC_LOW, KC_ENT , KC_SPC , BSP_RAI, _______, KC_ALGR, NO_ASTR, RGT_CTR ), /* Raise diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c index 0b63abce1716..ffd588945593 100644 --- a/keyboards/preonic/keymaps/jacwib/keymap.c +++ b/keyboards/preonic/keymaps/jacwib/keymap.c @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, \ KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS, \ - KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LALT, KC_LGUI, KC_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH, \ KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS, \ - KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + KC_LCTL, KC_LALT, KC_LGUI, KC_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Mac Lower diff --git a/keyboards/satan/keymaps/dende_iso/keymap.c b/keyboards/satan/keymaps/dende_iso/keymap.c index 205e9cb77d55..be1bfd23aada 100644 --- a/keyboards/satan/keymaps/dende_iso/keymap.c +++ b/keyboards/satan/keymaps/dende_iso/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, \ FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, KC_DELETE, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, DE_ALGR, KC_RGUI, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_ALGR, KC_RGUI, KC_APP, KC_RCTL), /* Keymap _FNK: Function Keys diff --git a/keyboards/xd75/keymaps/germanized/config.h b/keyboards/xd75/keymaps/germanized/config.h index 379b954714ad..dd3f32275be7 100644 --- a/keyboards/xd75/keymaps/germanized/config.h +++ b/keyboards/xd75/keymaps/germanized/config.h @@ -27,9 +27,6 @@ //Tap Dancing #define TAPPING_TERM 200 -// Alt gr -#define DE_ALGR KC_RALT - // normal characters #define DE_Z KC_Y #define DE_Y KC_Z diff --git a/layouts/community/ergodox/bepo/keymap.c b/layouts/community/ergodox/bepo/keymap.c index c33c3c255029..6ea8cba681ab 100644 --- a/layouts/community/ergodox/bepo/keymap.c +++ b/layouts/community/ergodox/bepo/keymap.c @@ -50,7 +50,7 @@ KC_ESC, KC_INS, KC_LGUI, KC_LCTL, KC_LALT, KC_CAPSLOCK, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_NUMLOCK, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, - BP_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, + KC_ALGR, KC_RCTL, KC_RGUI, KC_PSCREEN, KC_PAUSE, DF(AZ_B), DF(BEPO), MO(NUMK), MO(FNAV), KC_RSHIFT, KC_ENTER), diff --git a/layouts/community/ergodox/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c index 9526ea3f77b9..125301d443f4 100644 --- a/layouts/community/ergodox/bepo_csa/keymap.c +++ b/layouts/community/ergodox/bepo_csa/keymap.c @@ -105,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, - BP_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, + KC_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, KC_LEFT, KC_RGHT, KC_UP, @@ -449,14 +449,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(DOWN(CSA_ALTGR), D(SCLN), END); + return MACRO(DOWN(KC_ALGR), D(SCLN), END); case M_SCLN: return MACRO(D(SCLN), END); case M_GRV: - return MACRO(I(75), DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); + return MACRO(I(75), DOWN(KC_ALGR), TYPE(CSA_DCRC), UP(KC_ALGR), T(SPACE), END); case M_NBSP: // use weak mod such that pressing another key will not be affected - add_weak_mods(MOD_BIT(CSA_ALTGR)); + add_weak_mods(MOD_BIT(KC_ALGR)); return MACRO(D(SPACE), END); } } else { @@ -466,11 +466,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code(KC_1 + (id - M_1)); break; case M_DEGR: - return MACRO(UP(CSA_ALTGR), U(SCLN), END); + return MACRO(UP(KC_ALGR), U(SCLN), END); case M_SCLN: return MACRO(U(SCLN), END); case M_NBSP: - del_weak_mods(MOD_BIT(CSA_ALTGR)); + del_weak_mods(MOD_BIT(KC_ALGR)); return MACRO(U(SPACE), END); } } diff --git a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c index 2668fce86621..98df73289338 100644 --- a/layouts/community/ergodox/dvorak_svorak_a5/keymap.c +++ b/layouts/community/ergodox/dvorak_svorak_a5/keymap.c @@ -171,7 +171,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, - NO_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, + KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_ENT, KC_SPACE diff --git a/layouts/community/ergodox/swedish-lindhe/keymap.c b/layouts/community/ergodox/swedish-lindhe/keymap.c index e977ab994871..a46408793afb 100644 --- a/layouts/community/ergodox/swedish-lindhe/keymap.c +++ b/layouts/community/ergodox/swedish-lindhe/keymap.c @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, KC_DELT, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSFT, - NO_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, + KC_ALGR, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_TAB, LT(MDIA, KC_ENT) diff --git a/layouts/community/ergodox/swedish/keymap.c b/layouts/community/ergodox/swedish/keymap.c index d2b9b40d1f64..0cda8511f7cc 100644 --- a/layouts/community/ergodox/swedish/keymap.c +++ b/layouts/community/ergodox/swedish/keymap.c @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_H, KC_J, KC_K, KC_L, LT(MDIA, NO_OSLH), GUI_T(NO_AE), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(NO_MINS), KC_RSFT, KC_UP, KC_DOWN, NO_CIRC, NO_ASTR, KC_FN1, - NO_ALGR, CTL_T(KC_ESC), + KC_ALGR, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT ), diff --git a/quantum/keymap_extras/keymap_belgian.h b/quantum/keymap_extras/keymap_belgian.h index 573fa2e8a4d0..ab89fbabfe62 100644 --- a/quantum/keymap_extras/keymap_belgian.h +++ b/quantum/keymap_extras/keymap_belgian.h @@ -18,12 +18,6 @@ #include "keymap.h" -#define BE_LGUI KC_LALT -#define BE_LALT KC_LGUI - -// Alt gr -#define BE_ALGR KC_RALT - // Normal characters // Line 1 #define BE_SUP2 KC_GRV diff --git a/quantum/keymap_extras/keymap_bepo.h b/quantum/keymap_extras/keymap_bepo.h index e6545a7a83af..8d7b36ca3d13 100644 --- a/quantum/keymap_extras/keymap_bepo.h +++ b/quantum/keymap_extras/keymap_bepo.h @@ -19,12 +19,6 @@ #include "keymap.h" -// Alt gr -#ifndef ALTGR -#define ALTGR(kc) ALGR(kc) -#endif -#define BP_ALGR KC_RALT - // Normal characters // First row (on usual keyboards) #define BP_DOLLAR KC_GRAVE // $ @@ -139,138 +133,138 @@ // AltGr-ed characters // First row -#define BP_EN_DASH ALTGR(BP_DOLLAR) // – +#define BP_EN_DASH ALGR(BP_DOLLAR) // – #define BP_NDSH BP_EN_DASH -#define BP_EM_DASH ALTGR(KC_1) // — +#define BP_EM_DASH ALGR(KC_1) // — #define BP_MDSH BP_EM_DASH -#define BP_LESS ALTGR(KC_2) // < -#define BP_GREATER ALTGR(KC_3) // > +#define BP_LESS ALGR(KC_2) // < +#define BP_GREATER ALGR(KC_3) // > #define BP_GRTR BP_GREATER -#define BP_LBRACKET ALTGR(KC_4) // [ +#define BP_LBRACKET ALGR(KC_4) // [ #define BP_LBRC BP_LBRACKET -#define BP_RBRACKET ALTGR(KC_5) // ] +#define BP_RBRACKET ALGR(KC_5) // ] #define BP_RBRC BP_RBRACKET -#define BP_CIRCUMFLEX ALTGR(KC_6) // ^ +#define BP_CIRCUMFLEX ALGR(KC_6) // ^ #define BP_CIRC BP_CIRCUMFLEX -#define BP_PLUS_MINUS ALTGR(KC_7) // ± +#define BP_PLUS_MINUS ALGR(KC_7) // ± #define BP_PSMS BP_PLUS_MINUS -#define BP_MATH_MINUS ALTGR(KC_8) // − +#define BP_MATH_MINUS ALGR(KC_8) // − #define BP_MMNS BP_MATH_MINUS -#define BP_OBELUS ALTGR(KC_9) // ÷ +#define BP_OBELUS ALGR(KC_9) // ÷ #define BP_OBEL BP_OBELUS // more conventional name of the symbol #define BP_DIVISION_SIGN BP_OBELUS #define BP_DVSN BP_DIVISION_SIGN -#define BP_TIMES ALTGR(KC_0) // × +#define BP_TIMES ALGR(KC_0) // × #define BP_TIMS BP_TIMES -#define BP_DIFFERENT ALTGR(BP_EQUAL) // ≠ +#define BP_DIFFERENT ALGR(BP_EQUAL) // ≠ #define BP_DIFF BP_DIFFERENT -#define BP_PERMILLE ALTGR(BP_PERCENT) // ‰ +#define BP_PERMILLE ALGR(BP_PERCENT) // ‰ #define BP_PMIL BP_PERMILLE // Second row -#define BP_PIPE ALTGR(BP_B) // | -#define BP_DEAD_ACUTE ALTGR(BP_E_ACUTE) // dead ´ +#define BP_PIPE ALGR(BP_B) // | +#define BP_DEAD_ACUTE ALGR(BP_E_ACUTE) // dead ´ #define BP_DACT BP_DEAD_ACUTE -#define BP_AMPERSAND ALTGR(BP_P) // & +#define BP_AMPERSAND ALGR(BP_P) // & #define BP_AMPR BP_AMPERSAND -#define BP_OE_LIGATURE ALTGR(BP_O) // œ +#define BP_OE_LIGATURE ALGR(BP_O) // œ #define BP_OE BP_OE_LIGATURE -#define BP_DEAD_GRAVE ALTGR(BP_E_GRAVE) // ` +#define BP_DEAD_GRAVE ALGR(BP_E_GRAVE) // ` #define BP_DGRV BP_DEAD_GRAVE -#define BP_INVERTED_EXCLAIM ALTGR(BP_DEAD_CIRCUMFLEX) // ¡ +#define BP_INVERTED_EXCLAIM ALGR(BP_DEAD_CIRCUMFLEX) // ¡ #define BP_IXLM BP_INVERTED_EXCLAIM -#define BP_DEAD_CARON ALTGR(BP_V) // dead ˇ +#define BP_DEAD_CARON ALGR(BP_V) // dead ˇ #define BP_DCAR BP_DEAD_CARON -#define BP_ETH ALTGR(BP_D) // ð -#define BP_DEAD_SLASH ALTGR(BP_L) // dead / +#define BP_ETH ALGR(BP_D) // ð +#define BP_DEAD_SLASH ALGR(BP_L) // dead / #define BP_DSLH BP_DEAD_SLASH -#define BP_IJ_LIGATURE ALTGR(BP_J) // ij +#define BP_IJ_LIGATURE ALGR(BP_J) // ij #define BP_IJ BP_IJ_LIGATURE -#define BP_SCHWA ALTGR(BP_Z) // ə +#define BP_SCHWA ALGR(BP_Z) // ə #define BP_SCWA BP_SCHWA -#define BP_DEAD_BREVE ALTGR(BP_W) // dead ˘ +#define BP_DEAD_BREVE ALGR(BP_W) // dead ˘ #define BP_DBRV BP_DEAD_BREVE // Third row -#define BP_AE_LIGATURE ALTGR(BP_A) // æ +#define BP_AE_LIGATURE ALGR(BP_A) // æ #define BP_AE BP_AE_LIGATURE -#define BP_U_GRAVE ALTGR(BP_U) // ù +#define BP_U_GRAVE ALGR(BP_U) // ù #define BP_UGRV BP_U_GRAVE -#define BP_DEAD_TREMA ALTGR(BP_I) // dead ¨ (trema/umlaut/diaresis) +#define BP_DEAD_TREMA ALGR(BP_I) // dead ¨ (trema/umlaut/diaresis) #define BP_DTRM BP_DEAD_TREMA -#define BP_EURO ALTGR(BP_E) // € -#define BP_TYPOGRAPHICAL_APOSTROPHE ALTGR(BP_COMMA) // ’ +#define BP_EURO ALGR(BP_E) // € +#define BP_TYPOGRAPHICAL_APOSTROPHE ALGR(BP_COMMA) // ’ #define BP_TAPO BP_TYPOGRAPHICAL_APOSTROPHE -#define BP_COPYRIGHT ALTGR(BP_C) // © +#define BP_COPYRIGHT ALGR(BP_C) // © #define BP_CPRT BP_COPYRIGHT -#define BP_THORN ALTGR(BP_T) // þ +#define BP_THORN ALGR(BP_T) // þ #define BP_THRN BP_THORN -#define BP_SHARP_S ALTGR(BP_S) // ß +#define BP_SHARP_S ALGR(BP_S) // ß #define BP_SRPS BP_SHARP_S -#define BP_REGISTERED_TRADEMARK ALTGR(BP_R) // ® +#define BP_REGISTERED_TRADEMARK ALGR(BP_R) // ® #define BP_RTM BP_REGISTERED_TRADEMARK -#define BP_DEAD_TILDE ALTGR(BP_N) // dead ~ +#define BP_DEAD_TILDE ALGR(BP_N) // dead ~ #define BP_DTLD BP_DEAD_TILDE -#define BP_DEAD_MACRON ALTGR(BP_M) // dead ¯ +#define BP_DEAD_MACRON ALGR(BP_M) // dead ¯ #define BP_DMCR BP_DEAD_MACRON -#define BP_DEAD_CEDILLA ALTGR(BP_C_CEDILLA) // dead ¸ +#define BP_DEAD_CEDILLA ALGR(BP_C_CEDILLA) // dead ¸ #define BP_DCED BP_DEAD_CEDILLA // Fourth row -#define BP_NONUS_SLASH ALTGR(BP_E_CIRCUMFLEX) // / on non-us backslash key (102nd key, ê in bépo) +#define BP_NONUS_SLASH ALGR(BP_E_CIRCUMFLEX) // / on non-us backslash key (102nd key, ê in bépo) #define BP_NUSL BP_NONUS_SLASH -#define BP_BACKSLASH ALTGR(BP_A_GRAVE) /* \ */ +#define BP_BACKSLASH ALGR(BP_A_GRAVE) /* \ */ #define BP_BSLS BP_BACKSLASH -#define BP_LEFT_CURLY_BRACE ALTGR(BP_Y) // { +#define BP_LEFT_CURLY_BRACE ALGR(BP_Y) // { #define BP_LCBR BP_LEFT_CURLY_BRACE -#define BP_RIGHT_CURLY_BRACE ALTGR(BP_X) // } +#define BP_RIGHT_CURLY_BRACE ALGR(BP_X) // } #define BP_RCBR BP_RIGHT_CURLY_BRACE -#define BP_ELLIPSIS ALTGR(BP_DOT) // … +#define BP_ELLIPSIS ALGR(BP_DOT) // … #define BP_ELPS BP_ELLIPSIS -#define BP_TILDE ALTGR(BP_K) // ~ +#define BP_TILDE ALGR(BP_K) // ~ #define BP_TILD BP_TILDE -#define BP_INVERTED_QUESTION ALTGR(BP_QUESTION) // ¿ +#define BP_INVERTED_QUESTION ALGR(BP_QUESTION) // ¿ #define BP_IQST BP_INVERTED_QUESTION -#define BP_DEAD_RING ALTGR(BP_Q) // dead ° +#define BP_DEAD_RING ALGR(BP_Q) // dead ° #define BP_DRNG BP_DEAD_RING -#define BP_DEAD_GREEK ALTGR(BP_G) // dead Greek key (following key will make a Greek letter) +#define BP_DEAD_GREEK ALGR(BP_G) // dead Greek key (following key will make a Greek letter) #define BP_DGRK BP_DEAD_GREEK -#define BP_DAGGER ALTGR(BP_H) // † +#define BP_DAGGER ALGR(BP_H) // † #define BP_DAGR BP_DAGGER -#define BP_DEAD_OGONEK ALTGR(BP_F) // dead ˛ +#define BP_DEAD_OGONEK ALGR(BP_F) // dead ˛ #define BP_DOGO BP_DEAD_OGONEK // Space bar -#define BP_UNDERSCORE ALTGR(KC_SPACE) // _ +#define BP_UNDERSCORE ALGR(KC_SPACE) // _ #define BP_UNDS BP_UNDERSCORE // AltGr-Shifted characters (different from capitalised AltGr-ed characters) // First row -#define BP_PARAGRAPH ALTGR(BP_HASH) // ¶ +#define BP_PARAGRAPH ALGR(BP_HASH) // ¶ #define BP_PARG BP_PARAGRAPH -#define BP_LOW_DOUBLE_QUOTE ALTGR(BP_1) // „ +#define BP_LOW_DOUBLE_QUOTE ALGR(BP_1) // „ #define BP_LWQT BP_LOW_DOUBLE_QUOTE -#define BP_LEFT_DOUBLE_QUOTE ALTGR(BP_2) // “ +#define BP_LEFT_DOUBLE_QUOTE ALGR(BP_2) // “ #define BP_LDQT BP_LEFT_DOUBLE_QUOTE -#define BP_RIGHT_DOUBLE_QUOTE ALTGR(BP_3) // ” +#define BP_RIGHT_DOUBLE_QUOTE ALGR(BP_3) // ” #define BP_RDQT BP_RIGHT_DOUBLE_QUOTE -#define BP_LESS_OR_EQUAL ALTGR(BP_4) // ≤ +#define BP_LESS_OR_EQUAL ALGR(BP_4) // ≤ #define BP_LEQL BP_LESS_OR_EQUAL -#define BP_GREATER_OR_EQUAL ALTGR(BP_5) // ≥ +#define BP_GREATER_OR_EQUAL ALGR(BP_5) // ≥ #define BP_GEQL BP_GREATER_OR_EQUAL -// nothing on ALTGR(BP_6) -#define BP_NEGATION ALTGR(BP_7) // ¬ +// nothing on ALGR(BP_6) +#define BP_NEGATION ALGR(BP_7) // ¬ #define BP_NEGT BP_NEGATION -#define BP_ONE_QUARTER ALTGR(BP_8) // ¼ +#define BP_ONE_QUARTER ALGR(BP_8) // ¼ #define BP_1QRT BP_ONE_QUARTER -#define BP_ONE_HALF ALTGR(BP_9) // ½ +#define BP_ONE_HALF ALGR(BP_9) // ½ #define BP_1HLF BP_ONE_HALF -#define BP_THREE_QUARTERS ALTGR(BP_0) // ¾ +#define BP_THREE_QUARTERS ALGR(BP_0) // ¾ #define BP_3QRT BP_THREE_QUARTERS -#define BP_MINUTES ALTGR(BP_DEGREE) // ′ +#define BP_MINUTES ALGR(BP_DEGREE) // ′ #define BP_MNUT BP_MINUTES -#define BP_SECONDS ALTGR(BP_GRAVE) // ″ +#define BP_SECONDS ALGR(BP_GRAVE) // ″ #define BP_SCND BP_SECONDS // Second row @@ -278,7 +272,7 @@ #define BP_BPIP BP_BROKEN_PIPE #define BP_DEAD_DOUBLE_ACUTE LSFT(BP_DEAD_ACUTE) // ˝ #define BP_DDCT BP_DEAD_DOUBLE_ACUTE -#define BP_SECTION ALTGR(LSFT(BP_P)) // § +#define BP_SECTION ALGR(LSFT(BP_P)) // § #define BP_SECT BP_SECTION // LSFT(BP_DEAD_GRAVE) is actually the same character as LSFT(BP_PERCENT) #define BP_GRAVE_BIS LSFT(BP_DEAD_GRAVE) // ` @@ -289,35 +283,35 @@ #define BP_DDTA BP_DEAD_DOT_ABOVE #define BP_DEAD_CURRENCY LSFT(BP_EURO) // dead ¤ (next key will generate a currency code like ¥ or £) #define BP_DCUR BP_DEAD_CURRENCY -#define BP_DEAD_HORN LSFT(ALTGR(BP_COMMA)) // dead ̛ +#define BP_DEAD_HORN LSFT(ALGR(BP_COMMA)) // dead ̛ #define BP_DHRN BP_DEAD_HORN -#define BP_LONG_S LSFT(ALTGR(BP_C)) // ſ +#define BP_LONG_S LSFT(ALGR(BP_C)) // ſ #define BP_LNGS BP_LONG_S #define BP_TRADEMARK LSFT(BP_REGISTERED_TRADEMARK) // ™ #define BP_TM BP_TRADEMARK -#define BP_ORDINAL_INDICATOR_O LSFT(ALTGR(BP_M)) // º +#define BP_ORDINAL_INDICATOR_O LSFT(ALGR(BP_M)) // º #define BP_ORDO BP_ORDINAL_INDICATOR_O #define BP_DEAD_COMMA LSFT(BP_DEAD_CEDILLA) // dead ˛ #define BP_DCOM BP_DEAD_COMMA // Fourth row -#define BP_LEFT_QUOTE LSFT(ALTGR(BP_Y)) // ‘ +#define BP_LEFT_QUOTE LSFT(ALGR(BP_Y)) // ‘ #define BP_LQOT BP_LEFT_QUOTE -#define BP_RIGHT_QUOTE LSFT(ALTGR(BP_X)) // ’ +#define BP_RIGHT_QUOTE LSFT(ALGR(BP_X)) // ’ #define BP_RQOT BP_RIGHT_QUOTE -#define BP_INTERPUNCT LSFT(ALTGR(BP_DOT)) // · +#define BP_INTERPUNCT LSFT(ALGR(BP_DOT)) // · #define BP_IPCT BP_INTERPUNCT -#define BP_DEAD_HOOK_ABOVE LSFT(ALTGR(BP_QUESTION)) // dead ̉ +#define BP_DEAD_HOOK_ABOVE LSFT(ALGR(BP_QUESTION)) // dead ̉ #define BP_DHKA BP_DEAD_HOOK_ABOVE #define BP_DEAD_UNDERDOT LSFT(BP_DEAD_RING) // dead ̣ #define BP_DUDT BP_DEAD_UNDERDOT #define BP_DOUBLE_DAGGER LSFT(BP_DAGGER) // ‡ #define BP_DDGR BP_DOUBLE_DAGGER -#define BP_ORDINAL_INDICATOR_A LSFT(ALTGR(BP_F)) // ª +#define BP_ORDINAL_INDICATOR_A LSFT(ALGR(BP_F)) // ª #define BP_ORDA BP_ORDINAL_INDICATOR_A // Space bar -#define BP_NARROW_NON_BREAKING_SPACE ALTGR(BP_NON_BREAKING_SPACE) +#define BP_NARROW_NON_BREAKING_SPACE ALGR(BP_NON_BREAKING_SPACE) #define BP_NNBS BP_NARROW_NON_BREAKING_SPACE #endif diff --git a/quantum/keymap_extras/keymap_canadian_multilingual.h b/quantum/keymap_extras/keymap_canadian_multilingual.h index fbeef218741f..2b5b95d6fab9 100644 --- a/quantum/keymap_extras/keymap_canadian_multilingual.h +++ b/quantum/keymap_extras/keymap_canadian_multilingual.h @@ -13,19 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KEYMAP_CANADIAN_MULTILINGUAG_H -#define KEYMAP_CANADIAN_MULTILINGUAG_H +#ifndef KEYMAP_CANADIAN_MULTILINGUAL_H +#define KEYMAP_CANADIAN_MULTILINGUAL_H #include "keymap.h" -// Alt gr -#ifndef ALTGR -#define ALTGR(kc) ALGR(kc) -#endif - -#define CSA_ALTGR KC_RALT -#define CSA_ALGR CSA_ALTGR - #ifndef GR2A #define GR2A(kc) RCTL(kc) #endif @@ -75,43 +67,43 @@ // Alt Gr-ed characters // First row -#define CSA_PIPE ALTGR(CSA_SLASH) // | -#define CSA_CURRENCY ALTGR(KC_4) // ¤ +#define CSA_PIPE ALGR(CSA_SLASH) // | +#define CSA_CURRENCY ALGR(KC_4) // ¤ #define CSA_CURR CSA_CURRENCY -#define CSA_LEFT_CURLY_BRACE ALTGR(KC_7) // { +#define CSA_LEFT_CURLY_BRACE ALGR(KC_7) // { #define CSA_LCBR CSA_LEFT_CURLY_BRACE -#define CSA_RIGHT_CURLY_BRACE ALTGR(KC_8) // } +#define CSA_RIGHT_CURLY_BRACE ALGR(KC_8) // } #define CSA_RCBR CSA_RIGHT_CURLY_BRACE -#define CSA_LBRACKET ALTGR(KC_9) // [ +#define CSA_LBRACKET ALGR(KC_9) // [ #define CSA_LBRC CSA_LBRACKET -#define CSA_RBRACKET ALTGR(KC_0) // ] +#define CSA_RBRACKET ALGR(KC_0) // ] #define CSA_RBRC CSA_RBRACKET -#define CSA_NEGATION ALTGR(KC_EQUAL) // ¬ +#define CSA_NEGATION ALGR(KC_EQUAL) // ¬ #define CSA_NEGT CSA_NEGATION // Second row // euro symbol not available on Linux? (X.org) -#define CSA_EURO ALTGR(KC_E) // € -#define CSA_DEAD_GRAVE ALTGR(CSA_DEAD_CIRCUMFLEX) +#define CSA_EURO ALGR(KC_E) // € +#define CSA_DEAD_GRAVE ALGR(CSA_DEAD_CIRCUMFLEX) #define CSA_DGRV CSA_DEAD_GRAVE // dead ` -#define CSA_DEAD_TILDE ALTGR(CSA_C_CEDILLA) // ~ +#define CSA_DEAD_TILDE ALGR(CSA_C_CEDILLA) // ~ #define CSA_DTLD CSA_DEAD_TILDE // Third row -#define CSA_DEGREE ALTGR(KC_SCOLON) // ° +#define CSA_DEGREE ALGR(KC_SCOLON) // ° #define CSA_DEGR CSA_DEGREE // Fourth row -#define CSA_LEFT_GUILLEMET ALTGR(KC_Z) // « +#define CSA_LEFT_GUILLEMET ALGR(KC_Z) // « #define CSA_LGIL CSA_LEFT_GUILLEMET -#define CSA_RIGHT_GUILLEMET ALTGR(KC_X) // » +#define CSA_RIGHT_GUILLEMET ALGR(KC_X) // » #define CSA_RGIL CSA_RIGHT_GUILLEMET -#define CSA_LESS ALTGR(KC_COMMA) // < -#define CSA_GREATER ALTGR(KC_DOT) // > +#define CSA_LESS ALGR(KC_COMMA) // < +#define CSA_GREATER ALGR(KC_DOT) // > #define CSA_GRTR CSA_GREATER // Space bar -#define CSA_NON_BREAKING_SPACE ALTGR(KC_SPACE) +#define CSA_NON_BREAKING_SPACE ALGR(KC_SPACE) #define CSA_NBSP CSA_NON_BREAKING_SPACE // GR2A-ed characters @@ -198,7 +190,7 @@ // nothing on 2 #define CSA_POUND GR2A(LSFT(KC_3)) // £ #define CSA_GBP CSA_POUND_SIGN -// already on ALTGR(KC_E) +// already on ALGR(KC_E) #define CSA_EURO_BIS GR2A(LSFT(KC_4)) // € #define CSA_EURB CSA_EURO_BIS #define CSA_THREE_EIGHTHS GR2A(LSFT(KC_5)) // ⅜ diff --git a/quantum/keymap_extras/keymap_fr_ch.h b/quantum/keymap_extras/keymap_fr_ch.h index 4eeca7209fa5..69f9547bb9cf 100644 --- a/quantum/keymap_extras/keymap_fr_ch.h +++ b/quantum/keymap_extras/keymap_fr_ch.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define FR_CH_ALGR KC_RALT - // normal characters #define FR_CH_Z KC_Y #define FR_CH_Y KC_Z diff --git a/quantum/keymap_extras/keymap_french.h b/quantum/keymap_extras/keymap_french.h index d2de859ee793..bef7754707c7 100644 --- a/quantum/keymap_extras/keymap_french.h +++ b/quantum/keymap_extras/keymap_french.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define FR_ALGR KC_RALT - // Normal characters #define FR_SUP2 KC_GRV #define FR_AMP KC_1 diff --git a/quantum/keymap_extras/keymap_german.h b/quantum/keymap_extras/keymap_german.h index a215570fd3a8..0ba3570df75d 100644 --- a/quantum/keymap_extras/keymap_german.h +++ b/quantum/keymap_extras/keymap_german.h @@ -19,9 +19,6 @@ #include "keymap.h" -// Alt gr -#define DE_ALGR KC_RALT - // normal characters #define DE_Z KC_Y #define DE_Y KC_Z diff --git a/quantum/keymap_extras/keymap_german_ch.h b/quantum/keymap_extras/keymap_german_ch.h index f0376a17c0fc..bd1ef89a19c0 100644 --- a/quantum/keymap_extras/keymap_german_ch.h +++ b/quantum/keymap_extras/keymap_german_ch.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define CH_ALGR KC_RALT - // normal characters #define CH_Z KC_Y #define CH_Y KC_Z diff --git a/quantum/keymap_extras/keymap_hungarian.h b/quantum/keymap_extras/keymap_hungarian.h index cd2dc94cfede..ff43535f38e9 100644 --- a/quantum/keymap_extras/keymap_hungarian.h +++ b/quantum/keymap_extras/keymap_hungarian.h @@ -19,9 +19,6 @@ #include "keymap.h" -// Alt gr -#define HU_ALGR KC_RALT - // basic letters #define HU_Z KC_Y #define HU_Y KC_Z diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h index f62908150715..fe0f5eb847be 100644 --- a/quantum/keymap_extras/keymap_italian.h +++ b/quantum/keymap_extras/keymap_italian.h @@ -19,13 +19,7 @@ #include "keymap.h" -// Alt gr -#define IT_ALGR KC_RALT - // normal characters - - - #define IT_A KC_A #define IT_B KC_B #define IT_C KC_C diff --git a/quantum/keymap_extras/keymap_neo2.h b/quantum/keymap_extras/keymap_neo2.h index 174f4a6eec0e..818a739c76ee 100644 --- a/quantum/keymap_extras/keymap_neo2.h +++ b/quantum/keymap_extras/keymap_neo2.h @@ -73,6 +73,6 @@ #define NEO_L1_R DE_HASH #define NEO_L2_L DE_LESS -#define NEO_L2_R DE_ALGR +#define NEO_L2_R KC_ALGR #endif diff --git a/quantum/keymap_extras/keymap_nordic.h b/quantum/keymap_extras/keymap_nordic.h index 4210d37145fd..551a4212b26e 100644 --- a/quantum/keymap_extras/keymap_nordic.h +++ b/quantum/keymap_extras/keymap_nordic.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define NO_ALGR KC_RALT - // Normal characters #define NO_HALF KC_GRV #define NO_PLUS KC_MINS diff --git a/quantum/keymap_extras/keymap_slovenian.h b/quantum/keymap_extras/keymap_slovenian.h index 47f5bceed240..892283e7029a 100644 --- a/quantum/keymap_extras/keymap_slovenian.h +++ b/quantum/keymap_extras/keymap_slovenian.h @@ -20,9 +20,6 @@ #include "keymap.h" -// Alt gr -#define SI_ALGR KC_RALT - //Swapped Z and Y #define SI_Z KC_Y #define SI_Y KC_Z diff --git a/quantum/keymap_extras/keymap_spanish.h b/quantum/keymap_extras/keymap_spanish.h index 19d12551a684..1f183327f9e1 100644 --- a/quantum/keymap_extras/keymap_spanish.h +++ b/quantum/keymap_extras/keymap_spanish.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define ES_ALGR KC_RALT - // Normal characters #define ES_OVRR KC_GRV #define ES_APOS KC_MINS diff --git a/quantum/keymap_extras/keymap_uk.h b/quantum/keymap_extras/keymap_uk.h index a7bcd697e01c..cc3d0039e28c 100644 --- a/quantum/keymap_extras/keymap_uk.h +++ b/quantum/keymap_extras/keymap_uk.h @@ -18,9 +18,6 @@ #include "keymap.h" -// Alt gr -#define UK_ALGR KC_RALT - // Normal characters #define UK_HASH KC_NUHS #define UK_BSLS KC_NUBS diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c index f7048869ed33..130d7dc2d419 100644 --- a/users/spacebarracecar/spacebarracecar.c +++ b/users/spacebarracecar/spacebarracecar.c @@ -211,11 +211,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { timer_timeout(); if (lshift || rshift){ unregister_code(KC_LSFT); - register_code(DE_ALGR); + register_code(KC_ALGR); unregister_code(DE_PLUS); register_code(DE_PLUS); unregister_code(DE_PLUS); - unregister_code(DE_ALGR); + unregister_code(KC_ALGR); register_code(KC_LSFT); } else { register_code(KC_LSFT); diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h index 035c1ac79099..d0259b73cce0 100644 --- a/users/spacebarracecar/spacebarracecar.h +++ b/users/spacebarracecar/spacebarracecar.h @@ -192,7 +192,7 @@ return false; if (record->event.pressed) { \ timer_timeout(); \ unregister_code(KC_LSFT); \ - register_code(DE_ALGR); \ + register_code(KC_ALGR); \ if (lshift || rshift) { \ unregister_code(kc2); \ register_code(kc2); \ @@ -203,7 +203,7 @@ if (record->event.pressed) { \ register_code(kc1); \ unregister_code(kc1); \ } \ - unregister_code(DE_ALGR); \ + unregister_code(KC_ALGR); \ } \ return false; From 6f80217958e575aab3c247e286cf919ff75bc72f Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 3 Jan 2019 16:33:32 -0800 Subject: [PATCH 060/458] Snagpad: fix Configurator mismatch (#4767) Key objects for the LAYOUT_numpad_5x4 macro were out-of-order in info.json. Also white space changes because I'm that guy. --- keyboards/snagpad/info.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json index 4faa1d2c0fc7..ffaa5c0a74e0 100644 --- a/keyboards/snagpad/info.json +++ b/keyboards/snagpad/info.json @@ -6,12 +6,11 @@ "width": 4, "height": 5, "layouts": { - "LAYOUT_ortho_5x4": { + "LAYOUT_ortho_5x4": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] - }, + }, "LAYOUT_numpad_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] - - } + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":1, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":3, "y":3, "h":2}] + } } } From 54b572159f62913ead47b0a6ee8d2d09dfb8f19a Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Thu, 3 Jan 2019 18:40:23 -0800 Subject: [PATCH 061/458] Preonic rev. 3: fix info.json file File was saved with an invalid JSON structure. --- keyboards/preonic/rev3/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/rev3/info.json b/keyboards/preonic/rev3/info.json index 50ae8e5fb1be..b1ad1227e1a1 100644 --- a/keyboards/preonic/rev3/info.json +++ b/keyboards/preonic/rev3/info.json @@ -262,8 +262,8 @@ ] }, "LAYOUT_ortho_5x12": { - "layout": [ "key_count": 60, + "layout": [ {"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, From 38e01a7480f6826b3d220c4c8357788558b2af07 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Sat, 29 Dec 2018 16:53:21 +1100 Subject: [PATCH 062/458] Convert split_common to use generic GPIO api --- quantum/split_common/matrix.c | 60 ++++++++++--------------------- quantum/split_common/split_util.c | 15 ++------ 2 files changed, 22 insertions(+), 53 deletions(-) diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 2611376386fc..2c37053f883f 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -20,17 +20,14 @@ along with this program. If not, see . */ #include #include -#include #include "wait.h" -#include "print.h" -#include "debug.h" #include "util.h" #include "matrix.h" #include "split_util.h" -#include "pro_micro.h" #include "config.h" #include "timer.h" #include "split_flags.h" +#include "quantum.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" @@ -91,8 +88,8 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static uint8_t error_count = 0; -static uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; /* matrix state(1:on, 0:off) */ static matrix_row_t matrix[MATRIX_ROWS]; @@ -440,9 +437,7 @@ uint8_t matrix_key_count(void) static void init_cols(void) { for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(col_pins[x]); } } @@ -460,13 +455,8 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) // For each col... for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index); } // Unselect row @@ -477,24 +467,19 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) static void select_row(uint8_t row) { - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + writePinLow(row_pins[row]); + setPinOutput(row_pins[row]); } static void unselect_row(uint8_t row) { - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(row_pins[row]); } static void unselect_rows(void) { for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(row_pins[x]); } } @@ -503,9 +488,7 @@ static void unselect_rows(void) static void init_rows(void) { for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(row_pins[x]); } } @@ -525,15 +508,15 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) matrix_row_t last_row_value = current_matrix[row_index]; // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) + if (readPin(row_pins[row_index])) { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); + // Pin HI, clear col bit + current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); } else { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); + // Pin LO, set col bit + current_matrix[row_index] |= (ROW_SHIFTER << current_col); } // Determine if the matrix changed state @@ -551,24 +534,19 @@ static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) static void select_col(uint8_t col) { - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW + writePinLow(col_pins[col]); + setPinOutput(col_pins[col]); } static void unselect_col(uint8_t col) { - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(col_pins[col]); } static void unselect_cols(void) { for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI + setPinInputHigh(col_pins[x]); } } diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index c613f265a387..11453c998745 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -1,24 +1,15 @@ -#include -#include -#include -#include -#include -#include #include "split_util.h" #include "matrix.h" #include "keyboard.h" #include "config.h" #include "timer.h" #include "split_flags.h" +#include "quantum.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" #endif -#ifdef SPLIT_HAND_PIN -# include "pincontrol.h" -#endif - #if defined(USE_I2C) || defined(EH) # include "i2c.h" #endif @@ -30,8 +21,8 @@ volatile uint8_t setTries = 0; static void setup_handedness(void) { #ifdef SPLIT_HAND_PIN // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand - pinMode(SPLIT_HAND_PIN, PinDirectionInput); - isLeftHand = digitalRead(SPLIT_HAND_PIN); + setPinInput(SPLIT_HAND_PIN); + isLeftHand = readPin(SPLIT_HAND_PIN); #else #ifdef EE_HANDS isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); From 563ce3f225d981ce460c12ca5130dfe47af41df0 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Thu, 3 Jan 2019 14:30:23 +1100 Subject: [PATCH 063/458] Add explicit eeprom include in split_common Fixes builds that set EE_HANDS. --- quantum/split_common/split_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index 11453c998745..e41b6f6386e9 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -6,6 +6,10 @@ #include "split_flags.h" #include "quantum.h" +#ifdef EE_HANDS +# include "tmk_core/common/eeprom.h" +#endif + #ifdef BACKLIGHT_ENABLE # include "backlight.h" #endif From b1ed85587161e8352d136fcc4876a52b33328b01 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 07:24:45 -0800 Subject: [PATCH 064/458] Dichotomy: fix info.json mismatch (#4771) The info.json file was missing the two keys that correspond to the rotary encoders. --- keyboards/dichotomy/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dichotomy/info.json b/keyboards/dichotomy/info.json index aeb00edce70b..4008ce18b75d 100644 --- a/keyboards/dichotomy/info.json +++ b/keyboards/dichotomy/info.json @@ -6,7 +6,7 @@ "height": 6, "layouts": { "LAYOUT": { - "layout": [{"label":"k00", "x":0, "y":0.5}, {"label":"k01", "x":1, "y":0.5}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.5}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":7, "y":0.5}, {"label":"k07", "x":8, "y":0.5}, {"label":"k08", "x":9, "y":0}, {"label":"k09", "x":10, "y":0.25}, {"label":"k0A", "x":11, "y":0.5}, {"label":"k0B", "x":12, "y":0.5}, {"label":"k10", "x":0, "y":1.5}, {"label":"k11", "x":1, "y":1.5}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1}, {"label":"k14", "x":4, "y":1.5}, {"label":"k15", "x":5, "y":1.5}, {"label":"k16", "x":7, "y":1.5}, {"label":"k17", "x":8, "y":1.5}, {"label":"k18", "x":9, "y":1}, {"label":"k19", "x":10, "y":1.25}, {"label":"k1A", "x":11, "y":1.5}, {"label":"k1B", "x":12, "y":1.5}, {"label":"k20", "x":0, "y":2.5}, {"label":"k21", "x":1, "y":2.5}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2}, {"label":"k24", "x":4, "y":2.5}, {"label":"k25", "x":5, "y":2.5}, {"label":"k26", "x":7, "y":2.5}, {"label":"k27", "x":8, "y":2.5}, {"label":"k28", "x":9, "y":2}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2A", "x":11, "y":2.5}, {"label":"k2B", "x":12, "y":2.5}, {"label":"k33", "x":3, "y":4}, {"label":"k34", "x":4, "y":4}, {"label":"k35", "x":5, "y":4}, {"label":"k36", "x":7, "y":4}, {"label":"k37", "x":8, "y":4}, {"label":"k38", "x":9, "y":4}, {"label":"k43", "x":3, "y":5}, {"label":"k44", "x":4, "y":5}, {"label":"k45", "x":5, "y":5}, {"label":"k46", "x":7, "y":5}, {"label":"k47", "x":8, "y":5}, {"label":"k48", "x":9, "y":5}] + "layout": [{"label":"k00", "x":0, "y":0.5}, {"label":"k01", "x":1, "y":0.5}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.5}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":7, "y":0.5}, {"label":"k07", "x":8, "y":0.5}, {"label":"k08", "x":9, "y":0}, {"label":"k09", "x":10, "y":0.25}, {"label":"k0A", "x":11, "y":0.5}, {"label":"k0B", "x":12, "y":0.5}, {"label":"k10", "x":0, "y":1.5}, {"label":"k11", "x":1, "y":1.5}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1}, {"label":"k14", "x":4, "y":1.5}, {"label":"k15", "x":5, "y":1.5}, {"label":"k16", "x":7, "y":1.5}, {"label":"k17", "x":8, "y":1.5}, {"label":"k18", "x":9, "y":1}, {"label":"k19", "x":10, "y":1.25}, {"label":"k1A", "x":11, "y":1.5}, {"label":"k1B", "x":12, "y":1.5}, {"label":"k20", "x":0, "y":2.5}, {"label":"k21", "x":1, "y":2.5}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2}, {"label":"k24", "x":4, "y":2.5}, {"label":"k25", "x":5, "y":2.5}, {"label":"k26", "x":7, "y":2.5}, {"label":"k27", "x":8, "y":2.5}, {"label":"k28", "x":9, "y":2}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2A", "x":11, "y":2.5}, {"label":"k2B", "x":12, "y":2.5}, {"label":"k33", "x":3, "y":4}, {"label":"k34", "x":4, "y":4}, {"label":"k35", "x":5, "y":4}, {"label":"k36", "x":7, "y":4}, {"label":"k37", "x":8, "y":4}, {"label":"k38", "x":9, "y":4}, {"label":"k42", "x":2, "y":5}, {"label":"k43", "x":3, "y":5}, {"label":"k44", "x":4, "y":5}, {"label":"k45", "x":5, "y":5}, {"label":"k46", "x":7, "y":5}, {"label":"k47", "x":8, "y":5}, {"label":"k48", "x":9, "y":5}, {"label":"k49", "x":10, "y":5}] } } } From 7f4f0f7685cef421df4c07b0982c1905fb57a736 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 07:25:48 -0800 Subject: [PATCH 065/458] Remove deprecated QUANTUM_DIR code blocks from makefiles (#4754) * Remove QUANTUM_DIR code blocks from keyboard rules This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files that affect entire keyboards. * remove QUANTUM_DIR code blocks from rules for default keymaps This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files that affect default keymaps. * remove QUANTUM_DIR code blocks from rules for user keymaps This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files that affect "user" keymaps. (It's actually any keymap that isn't named `default`.) * remove QUANTUM_DIR code blocks from rules for community layouts This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files for community layouts. * remove QUANTUM_DIR code blocks from rules for userspaces This commit removes the deprecated "QUANTUM_DIR" code block from rules.mk files for userspaces. --- keyboards/6ball/keymaps/default/rules.mk | 3 --- keyboards/9key/keymaps/default/rules.mk | 3 --- keyboards/alu84/keymaps/turbomech/rules.mk | 3 --- keyboards/amj40/keymaps/default/rules.mk | 4 ---- keyboards/amj60/keymaps/iso_split_rshift/rules.mk | 3 --- keyboards/atreus/keymaps/xk/rules.mk | 3 --- keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk | 3 --- .../bpiphany/tiger_lily/keymaps/default_ansi/rules.mk | 3 --- keyboards/chocopad/keymaps/default/rules.mk | 3 --- keyboards/chocopad/keymaps/khord/rules.mk | 3 --- keyboards/christmas_tree/keymaps/default/rules.mk | 3 --- keyboards/clueboard/66/keymaps/xyverz/rules.mk | 3 --- keyboards/clueboard/card/keymaps/default/rules.mk | 3 --- keyboards/clueboard/card/keymaps/rgb_effects/rules.mk | 3 --- keyboards/comet46/keymaps/satt/rules.mk | 1 + keyboards/contra/keymaps/dana/rules.mk | 3 --- keyboards/contra/keymaps/losinggeneration/rules.mk | 3 --- keyboards/contra/keymaps/maxr1998/rules.mk | 3 --- keyboards/cu75/keymaps/default/rules.mk | 4 ---- keyboards/cu75/keymaps/iso/rules.mk | 4 ---- keyboards/deltasplit75/keymaps/itsaferbie/rules.mk | 3 --- keyboards/eco/keymaps/default/rules.mk | 3 --- keyboards/eco/keymaps/hexwire/rules.mk | 3 --- keyboards/eco/keymaps/that_canadian/rules.mk | 3 --- keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk | 3 --- keyboards/fourier/keymaps/valgrahf/rules.mk | 3 --- keyboards/gh60/keymaps/dbroqua/rules.mk | 4 ---- keyboards/gh60/keymaps/dbroqua_7U/rules.mk | 3 --- keyboards/gh60/keymaps/robotmaxtron/rules.mk | 4 ---- keyboards/gh60/keymaps/sethbc/rules.mk | 3 --- keyboards/gonnerd/keymaps/default/rules.mk | 3 --- keyboards/gonnerd/keymaps/gam3cat/rules.mk | 1 + keyboards/gonnerd/keymaps/mauin/rules.mk | 3 --- keyboards/gonnerd/keymaps/tkl/rules.mk | 3 --- keyboards/hadron/ver2/keymaps/side_numpad/rules.mk | 3 --- keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk | 4 ---- .../dactyl_manuform/4x5/keymaps/default/rules.mk | 3 --- .../dactyl_manuform/4x5/keymaps/dvorak/rules.mk | 3 --- keyboards/handwired/frenchdev/rules.mk | 3 --- keyboards/handwired/woodpad/keymaps/default/rules.mk | 3 --- keyboards/handwired/woodpad/keymaps/drashna/rules.mk | 3 --- keyboards/helix/pico/keymaps/default/rules.mk | 4 ---- keyboards/helix/pico/keymaps/mtei/rules.mk | 4 ---- keyboards/helix/rev1/keymaps/default/rules.mk | 3 --- keyboards/helix/rev2/keymaps/default/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/edvorakjp/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/five_rows/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/froggy/rules.mk | 4 ---- keyboards/helix/rev2/keymaps/led_test/rules.mk | 4 ---- keyboards/hhkb/keymaps/cinaeco/rules.mk | 3 --- keyboards/iris/keymaps/davidrambo/rules.mk | 3 --- keyboards/iris/keymaps/dvp-zjpxshade/rules.mk | 3 --- keyboards/iris/keymaps/hag/rules.mk | 3 --- keyboards/iris/keymaps/hexwire/rules.mk | 3 --- keyboards/iris/keymaps/impstyle/rules.mk | 3 --- keyboards/iris/keymaps/krusli/rules.mk | 3 --- keyboards/iris/keymaps/lewisridden/rules.mk | 3 --- keyboards/iris/keymaps/mtdjr/rules.mk | 4 +--- keyboards/iris/keymaps/rdhaene/rules.mk | 3 --- keyboards/iris/keymaps/swedish/rules.mk | 3 --- keyboards/iris/keymaps/transmogrified/rules.mk | 3 --- keyboards/iris/keymaps/yanfali/rules.mk | 3 --- keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk | 1 + keyboards/jd40/keymaps/vanagon/rules.mk | 3 --- keyboards/jd45/keymaps/mjt6u/rules.mk | 3 --- keyboards/jj40/keymaps/ajp10304/rules.mk | 5 +---- keyboards/jj40/keymaps/fun40/rules.mk | 3 --- keyboards/jj50/rules.mk | 4 ---- keyboards/kc60/keymaps/stanleylai/rules.mk | 3 --- keyboards/kc60/keymaps/wigguno/rules.mk | 3 --- keyboards/kc60/keymaps/ws2812/rules.mk | 3 --- keyboards/kinesis/keymaps/carpalx/rules.mk | 3 --- keyboards/kinesis/keymaps/default/rules.mk | 3 --- keyboards/kinesis/keymaps/default_pretty/rules.mk | 3 --- keyboards/kinesis/keymaps/dvorak/rules.mk | 3 --- keyboards/kinesis/keymaps/insertsnideremarks/rules.mk | 3 --- keyboards/kinesis/keymaps/milestogo/rules.mk | 3 --- keyboards/kinesis/keymaps/xyverz/rules.mk | 3 --- keyboards/kmac/keymaps/default/rules.mk | 3 --- keyboards/kmac/keymaps/winkeyless/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi_arrows/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk | 3 --- keyboards/kona_classic/keymaps/ansi_split/rules.mk | 3 --- .../kona_classic/keymaps/ansi_split_arrows/rules.mk | 3 --- keyboards/kona_classic/keymaps/default/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso_arrows/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso_split/rules.mk | 3 --- keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk | 3 --- keyboards/laplace/keymaps/bakingpy/rules.mk | 3 --- keyboards/laplace/keymaps/default/rules.mk | 3 --- keyboards/launchpad/keymaps/default/rules.mk | 3 --- keyboards/lets_split/keymaps/bbaserdem/rules.mk | 3 --- keyboards/lets_split/keymaps/bbaserdem_right/rules.mk | 3 --- keyboards/lets_split/keymaps/cpeters1982/rules.mk | 9 ++------- keyboards/lets_split/keymaps/fabian/rules.mk | 3 --- keyboards/lets_split/keymaps/heartrobotninja/rules.mk | 3 --- keyboards/lets_split/keymaps/khord/rules.mk | 3 --- keyboards/lets_split/keymaps/mbsurfer/rules.mk | 3 --- keyboards/lets_split/keymaps/mjt/rules.mk | 3 --- keyboards/lets_split/keymaps/mtdjr/rules.mk | 5 +---- keyboards/lets_split/keymaps/pitty/rules.mk | 3 --- keyboards/lets_split/keymaps/poker/rules.mk | 3 --- keyboards/lets_split/keymaps/waples/rules.mk | 3 --- keyboards/lets_split/keymaps/xk/rules.mk | 3 --- keyboards/lets_split/keymaps/zer09/rules.mk | 3 --- keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk | 3 --- keyboards/lets_split_eh/keymaps/that_canadian/rules.mk | 3 --- keyboards/levinson/keymaps/drogglbecher/rules.mk | 3 --- keyboards/levinson/keymaps/losinggeneration/rules.mk | 3 --- keyboards/lfkeyboards/mini1800/rules.mk | 4 ---- keyboards/lfkeyboards/smk65/keymaps/default/rules.mk | 5 +---- keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk | 5 +---- keyboards/m10a/keymaps/default/rules.mk | 3 --- keyboards/m10a/keymaps/gam3cat/rules.mk | 1 + keyboards/minidox/keymaps/that_canadian/rules.mk | 3 --- keyboards/mitosis/keymaps/mjt/rules.mk | 3 --- keyboards/miuni32/keymaps/adam-lee/rules.mk | 3 --- keyboards/miuni32/keymaps/default/rules.mk | 3 --- keyboards/miuni32/keymaps/ht_156/rules.mk | 3 --- keyboards/miuni32/keymaps/ki/rules.mk | 3 --- keyboards/niu_mini/keymaps/planck/rules.mk | 3 --- keyboards/niu_mini/keymaps/xtonhasvim/rules.mk | 5 +---- keyboards/nyquist/keymaps/jojiichan/rules.mk | 3 --- keyboards/nyquist/keymaps/kim-kim/rules.mk | 3 --- keyboards/nyquist/keymaps/losinggeneration/rules.mk | 3 --- keyboards/nyquist/keymaps/pitty/rules.mk | 3 --- keyboards/org60/keymaps/boardy/rules.mk | 5 ----- keyboards/phantom/keymaps/default/rules.mk | 3 --- keyboards/phantom/keymaps/rgbmod/rules.mk | 3 --- keyboards/planck/keymaps/ab/rules.mk | 3 --- keyboards/planck/keymaps/ajp10304/rules.mk | 5 +---- keyboards/planck/keymaps/alexey/rules.mk | 3 --- keyboards/planck/keymaps/altgr/rules.mk | 3 --- keyboards/planck/keymaps/angerthosenear/rules.mk | 3 --- keyboards/planck/keymaps/austin/rules.mk | 3 --- keyboards/planck/keymaps/basic/rules.mk | 3 --- keyboards/planck/keymaps/bone2planck/rules.mk | 3 --- keyboards/planck/keymaps/brandon/rules.mk | 3 --- keyboards/planck/keymaps/callum/rules.mk | 3 --- keyboards/planck/keymaps/cbbrowne/rules.mk | 3 --- keyboards/planck/keymaps/chance/rules.mk | 3 --- keyboards/planck/keymaps/charlie/rules.mk | 3 --- keyboards/planck/keymaps/circuit/rules.mk | 3 --- keyboards/planck/keymaps/coloneljesus/rules.mk | 3 --- keyboards/planck/keymaps/daniel/rules.mk | 3 --- keyboards/planck/keymaps/david/rules.mk | 3 --- keyboards/planck/keymaps/davidrambo/rules.mk | 3 --- keyboards/planck/keymaps/dc/rules.mk | 7 ++----- keyboards/planck/keymaps/dcompact/rules.mk | 5 +---- keyboards/planck/keymaps/dlaroe/rules.mk | 3 --- keyboards/planck/keymaps/dr_notsokind/rules.mk | 3 --- keyboards/planck/keymaps/dshields/rules.mk | 4 ---- keyboards/planck/keymaps/dudeofawesome/rules.mk | 5 +---- keyboards/planck/keymaps/dzobert/rules.mk | 3 --- keyboards/planck/keymaps/espynn/rules.mk | 3 --- keyboards/planck/keymaps/experimental/rules.mk | 3 --- keyboards/planck/keymaps/gabriel/rules.mk | 3 --- keyboards/planck/keymaps/grahampheath/rules.mk | 4 +--- keyboards/planck/keymaps/gunp/rules.mk | 3 --- keyboards/planck/keymaps/handwired_binaryplease/rules.mk | 7 +------ keyboards/planck/keymaps/hiea/rules.mk | 3 --- keyboards/planck/keymaps/hieax/rules.mk | 3 --- keyboards/planck/keymaps/ishtob/rule.mk | 3 --- keyboards/planck/keymaps/jacob/rules.mk | 3 --- keyboards/planck/keymaps/jirgn/rules.mk | 3 --- keyboards/planck/keymaps/johannes/rules.mk | 3 --- keyboards/planck/keymaps/khord/rules.mk | 3 --- keyboards/planck/keymaps/kmontag42/rules.mk | 3 --- keyboards/planck/keymaps/kyle/rules.mk | 3 --- keyboards/planck/keymaps/lae3/rules.mk | 3 --- keyboards/planck/keymaps/lukas/rules.mk | 3 --- keyboards/planck/keymaps/luke/rules.mk | 3 --- keyboards/planck/keymaps/max/rules.mk | 3 --- keyboards/planck/keymaps/mitch/rules.mk | 3 --- keyboards/planck/keymaps/mjt/rules.mk | 3 --- keyboards/planck/keymaps/mjtnumsym/rules.mk | 3 --- keyboards/planck/keymaps/myoung34/rules.mk | 5 +---- keyboards/planck/keymaps/neo2planck/rules.mk | 3 --- keyboards/planck/keymaps/not-quite-neo/rules.mk | 3 --- keyboards/planck/keymaps/originerd/rules.mk | 3 --- keyboards/planck/keymaps/paget/rules.mk | 3 --- keyboards/planck/keymaps/pete/rules.mk | 3 --- keyboards/planck/keymaps/phreed/rules.mk | 3 --- keyboards/planck/keymaps/piemod/rules.mk | 3 --- keyboards/planck/keymaps/priyadi/rules.mk | 3 --- keyboards/planck/keymaps/rai-suta/rules.mk | 3 --- keyboards/planck/keymaps/sdothum/rules.mk | 3 --- keyboards/planck/keymaps/smt/rules.mk | 3 --- keyboards/planck/keymaps/steno/rules.mk | 5 +---- keyboards/planck/keymaps/tehwalris/rules.mk | 3 --- keyboards/planck/keymaps/tong92/rules.mk | 3 --- keyboards/planck/keymaps/unicode/rules.mk | 3 --- keyboards/planck/keymaps/vifon/rules.mk | 3 --- keyboards/planck/keymaps/yale/rules.mk | 3 --- keyboards/planck/keymaps/yang/rules.mk | 3 --- keyboards/planck/keymaps/zach/rules.mk | 3 --- keyboards/planck/keymaps/zrichard/rules.mk | 3 --- keyboards/preonic/keymaps/0xdec/rules.mk | 3 --- keyboards/preonic/keymaps/bucktooth/rules.mk | 3 --- keyboards/preonic/keymaps/dlaroe/rules.mk | 3 --- keyboards/preonic/keymaps/jacwib/rules.mk | 3 --- keyboards/preonic/keymaps/kinesis/rules.mk | 3 --- keyboards/preonic/keymaps/nikchi/rules.mk | 3 --- keyboards/preonic/keymaps/smt/rules.mk | 3 --- keyboards/preonic/keymaps/that_canadian/Makefile | 3 --- keyboards/preonic/keymaps/zach/rules.mk | 3 --- keyboards/redox/keymaps/default/rules.mk | 3 --- keyboards/redox/keymaps/italian/rules.mk | 3 --- keyboards/s60_x/keymaps/ansi_qwertz/rules.mk | 3 --- keyboards/satan/keymaps/admiralStrokers/rules.mk | 4 +--- keyboards/satan/keymaps/ben_iso/rules.mk | 3 --- keyboards/satan/keymaps/chaser/rules.mk | 3 --- keyboards/satan/keymaps/colemak/rules.mk | 3 --- keyboards/satan/keymaps/default/rules.mk | 3 --- keyboards/satan/keymaps/dende_iso/rules.mk | 3 --- keyboards/satan/keymaps/denolfe/rules.mk | 3 --- keyboards/satan/keymaps/dkrieger/rules.mk | 3 --- keyboards/satan/keymaps/fakb/rules.mk | 3 --- keyboards/satan/keymaps/isoHHKB/rules.mk | 3 --- keyboards/satan/keymaps/iso_split_rshift/rules.mk | 3 --- keyboards/satan/keymaps/lepa/rules.mk | 3 --- keyboards/satan/keymaps/midi/rules.mk | 3 --- keyboards/satan/keymaps/sethbc/rules.mk | 3 --- keyboards/satan/keymaps/smt/rules.mk | 3 --- keyboards/satan/keymaps/unxmaal/rules.mk | 3 --- keyboards/tada68/keymaps/ardakilic/rules.mk | 3 --- keyboards/tada68/keymaps/default/rules.mk | 3 --- keyboards/tada68/keymaps/fakb/rules.mk | 3 --- keyboards/tada68/keymaps/fezzant/rules.mk | 3 --- keyboards/tada68/keymaps/iso-nor/rules.mk | 3 --- keyboards/tada68/keymaps/iso-uk/rules.mk | 3 --- keyboards/tada68/keymaps/isoish/rules.mk | 3 --- keyboards/tada68/keymaps/mattdicarlo/rules.mk | 3 --- keyboards/tada68/keymaps/mlechner/rules.mk | 3 --- keyboards/tada68/keymaps/mtdjr/rules.mk | 3 --- keyboards/tada68/keymaps/pascamel/rules.mk | 3 --- keyboards/tada68/keymaps/raylas/rules.mk | 3 --- keyboards/tada68/keymaps/rgb/rules.mk | 3 --- keyboards/tada68/keymaps/stephengrier/rules.mk | 3 --- keyboards/tada68/keymaps/trashcat/rules.mk | 3 --- keyboards/tada68/keymaps/tshack/rules.mk | 3 --- keyboards/tada68/keymaps/unix/rules.mk | 3 --- keyboards/tada68/keymaps/wamsm_tada/rules.mk | 3 --- keyboards/tanuki/rules.mk | 3 --- keyboards/the_ruler/keymaps/default/rules.mk | 3 --- .../thevankeyboards/bananasplit/keymaps/0010/rules.mk | 3 --- .../bananasplit/keymaps/coloneljesus/rules.mk | 3 --- .../thevankeyboards/bananasplit/keymaps/default/rules.mk | 3 --- .../thevankeyboards/bananasplit/keymaps/kamon/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/core/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/default/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/jeebak/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk | 3 --- keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/tong92/rules.mk | 3 --- .../thevankeyboards/minivan/keymaps/xyverz/rules.mk | 3 --- .../thevankeyboards/roadkit/keymaps/default/rules.mk | 3 --- .../thevankeyboards/roadkit/keymaps/flipphone/rules.mk | 3 --- keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk | 3 --- keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk | 3 --- .../thevankeyboards/roadkit/keymaps/singles/rules.mk | 3 --- .../roadkit/keymaps/singlesBrent/rules.mk | 3 --- keyboards/vision_division/keymaps/default/rules.mk | 3 --- keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk | 5 +---- keyboards/xd75/keymaps/adi/rules.mk | 3 --- keyboards/xd75/keymaps/atomic_style/rules.mk | 3 --- keyboards/xd75/keymaps/bbaserdem/rules.mk | 3 --- keyboards/xd75/keymaps/default/rules.mk | 3 --- keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk | 5 +---- keyboards/xd75/keymaps/emilyh/rules.mk | 3 --- keyboards/xd75/keymaps/fabian/rules.mk | 3 --- keyboards/xd75/keymaps/french/rules.mk | 3 --- keyboards/xd75/keymaps/germanized/rules.mk | 3 --- keyboards/xd75/keymaps/kim-kim-xd73/rules.mk | 3 --- keyboards/xd75/keymaps/kim-kim/rules.mk | 3 --- keyboards/xd75/keymaps/kloki/rules.mk | 3 --- keyboards/xd75/keymaps/markus/rules.mk | 3 --- keyboards/xd75/keymaps/mtdjr/rules.mk | 5 +---- keyboards/xd75/keymaps/skewwhiffy/rules.mk | 3 --- keyboards/xd75/keymaps/tdl-jturner/rules.mk | 5 +---- keyboards/ymd75/rules.mk | 4 ---- keyboards/zen/keymaps/default/rules.mk | 3 --- keyboards/zen/keymaps/jwlawrence/rules.mk | 3 --- keyboards/zen/keymaps/xyverz/rules.mk | 3 --- keyboards/zinc/keymaps/monks/rules.mk | 5 +---- layouts/community/ergodox/berfarah/rules.mk | 3 --- layouts/community/ortho_4x12/grahampheath/rules.mk | 3 --- layouts/community/ortho_4x12/xyverz/rules.mk | 3 --- users/losinggeneration/rules.mk | 3 --- 293 files changed, 27 insertions(+), 911 deletions(-) diff --git a/keyboards/6ball/keymaps/default/rules.mk b/keyboards/6ball/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/6ball/keymaps/default/rules.mk +++ b/keyboards/6ball/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/9key/keymaps/default/rules.mk b/keyboards/9key/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/9key/keymaps/default/rules.mk +++ b/keyboards/9key/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/alu84/keymaps/turbomech/rules.mk b/keyboards/alu84/keymaps/turbomech/rules.mk index ff8b4b2e6434..c8b74bfc9a03 100644 --- a/keyboards/alu84/keymaps/turbomech/rules.mk +++ b/keyboards/alu84/keymaps/turbomech/rules.mk @@ -10,6 +10,3 @@ AUDIO_ENABLE ?= no RGBLIGHT_ENABLE ?= yes UNICODE_ENABLE ?= yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/amj40/keymaps/default/rules.mk b/keyboards/amj40/keymaps/default/rules.mk index fe986722010a..cbfa35e63103 100644 --- a/keyboards/amj40/keymaps/default/rules.mk +++ b/keyboards/amj40/keymaps/default/rules.mk @@ -18,7 +18,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/amj60/keymaps/iso_split_rshift/rules.mk b/keyboards/amj60/keymaps/iso_split_rshift/rules.mk index 931affcd5633..1b34f4f60606 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/amj60/keymaps/iso_split_rshift/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/atreus/keymaps/xk/rules.mk b/keyboards/atreus/keymaps/xk/rules.mk index 2e76f9da5dd8..5b69426acabf 100644 --- a/keyboards/atreus/keymaps/xk/rules.mk +++ b/keyboards/atreus/keymaps/xk/rules.mk @@ -13,6 +13,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk b/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk +++ b/keyboards/bpiphany/tiger_lily/keymaps/default_ansi/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/chocopad/keymaps/default/rules.mk b/keyboards/chocopad/keymaps/default/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/chocopad/keymaps/default/rules.mk +++ b/keyboards/chocopad/keymaps/default/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/chocopad/keymaps/khord/rules.mk b/keyboards/chocopad/keymaps/khord/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/chocopad/keymaps/khord/rules.mk +++ b/keyboards/chocopad/keymaps/khord/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/christmas_tree/keymaps/default/rules.mk b/keyboards/christmas_tree/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/christmas_tree/keymaps/default/rules.mk +++ b/keyboards/christmas_tree/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/clueboard/66/keymaps/xyverz/rules.mk b/keyboards/clueboard/66/keymaps/xyverz/rules.mk index fc02ecb7ef91..6fa110a7b665 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/rules.mk +++ b/keyboards/clueboard/66/keymaps/xyverz/rules.mk @@ -44,6 +44,3 @@ # RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index 8ee841da0200..ed7eceea0907 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk index 00670c0cf43d..1418ba1bf4fd 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk +++ b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/comet46/keymaps/satt/rules.mk b/keyboards/comet46/keymaps/satt/rules.mk index 5839b778b888..91609dd4fdf3 100644 --- a/keyboards/comet46/keymaps/satt/rules.mk +++ b/keyboards/comet46/keymaps/satt/rules.mk @@ -5,3 +5,4 @@ SRC += ./lib/glcdfont.c \ ./lib/keylogger.c \ ./lib/modifier_state_reader.c \ ./lib/host_led_state_reader.c + diff --git a/keyboards/contra/keymaps/dana/rules.mk b/keyboards/contra/keymaps/dana/rules.mk index 1198f378a8e2..cf891fad3534 100644 --- a/keyboards/contra/keymaps/dana/rules.mk +++ b/keyboards/contra/keymaps/dana/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/contra/keymaps/losinggeneration/rules.mk b/keyboards/contra/keymaps/losinggeneration/rules.mk index ea2b7165d9be..17ef684830f4 100644 --- a/keyboards/contra/keymaps/losinggeneration/rules.mk +++ b/keyboards/contra/keymaps/losinggeneration/rules.mk @@ -12,6 +12,3 @@ MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/contra/keymaps/maxr1998/rules.mk b/keyboards/contra/keymaps/maxr1998/rules.mk index 75a476114fed..e1ba074290bb 100644 --- a/keyboards/contra/keymaps/maxr1998/rules.mk +++ b/keyboards/contra/keymaps/maxr1998/rules.mk @@ -9,6 +9,3 @@ MOUSEKEY_ENABLE = no CONSOLE_ENABLE = no # yes COMMAND_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/cu75/keymaps/default/rules.mk b/keyboards/cu75/keymaps/default/rules.mk index 39f6eca8b04b..fd26d69fb6ee 100644 --- a/keyboards/cu75/keymaps/default/rules.mk +++ b/keyboards/cu75/keymaps/default/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif diff --git a/keyboards/cu75/keymaps/iso/rules.mk b/keyboards/cu75/keymaps/iso/rules.mk index f8b4d5568978..9407f1103464 100644 --- a/keyboards/cu75/keymaps/iso/rules.mk +++ b/keyboards/cu75/keymaps/iso/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = no # If the I2C pullup resistors aren't install this WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk b/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk index 75db99ebece4..92f24224c78b 100644 --- a/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk +++ b/keyboards/deltasplit75/keymaps/itsaferbie/rules.mk @@ -2,6 +2,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. AUDIO_ENABLE = no # Audio disabled while using RGB underlight. EXTRAKEY_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/eco/keymaps/default/rules.mk b/keyboards/eco/keymaps/default/rules.mk index 0996602325b9..83d1175db993 100644 --- a/keyboards/eco/keymaps/default/rules.mk +++ b/keyboards/eco/keymaps/default/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/eco/keymaps/hexwire/rules.mk b/keyboards/eco/keymaps/hexwire/rules.mk index 0996602325b9..83d1175db993 100644 --- a/keyboards/eco/keymaps/hexwire/rules.mk +++ b/keyboards/eco/keymaps/hexwire/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/eco/keymaps/that_canadian/rules.mk b/keyboards/eco/keymaps/that_canadian/rules.mk index 0996602325b9..83d1175db993 100644 --- a/keyboards/eco/keymaps/that_canadian/rules.mk +++ b/keyboards/eco/keymaps/that_canadian/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk index db5e5d15587a..6f40259b61c8 100644 --- a/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk +++ b/keyboards/ergodox_ez/keymaps/heartrobotninja/rules.mk @@ -30,6 +30,3 @@ KEYMAP_BRANCH = $(shell \ OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\" -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/fourier/keymaps/valgrahf/rules.mk b/keyboards/fourier/keymaps/valgrahf/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/fourier/keymaps/valgrahf/rules.mk +++ b/keyboards/fourier/keymaps/valgrahf/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gh60/keymaps/dbroqua/rules.mk b/keyboards/gh60/keymaps/dbroqua/rules.mk index 31c63ffd8419..5c6afa226f4d 100644 --- a/keyboards/gh60/keymaps/dbroqua/rules.mk +++ b/keyboards/gh60/keymaps/dbroqua/rules.mk @@ -106,7 +106,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: htt # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable RGB Underglow -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - diff --git a/keyboards/gh60/keymaps/dbroqua_7U/rules.mk b/keyboards/gh60/keymaps/dbroqua_7U/rules.mk index e5460196922f..e4269566d28c 100644 --- a/keyboards/gh60/keymaps/dbroqua_7U/rules.mk +++ b/keyboards/gh60/keymaps/dbroqua_7U/rules.mk @@ -106,6 +106,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: htt # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable RGB Underglow -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/gh60/keymaps/robotmaxtron/rules.mk b/keyboards/gh60/keymaps/robotmaxtron/rules.mk index 2b80ea00e384..6e5d6e1ec242 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/rules.mk +++ b/keyboards/gh60/keymaps/robotmaxtron/rules.mk @@ -106,7 +106,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ # BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable RGB Underglow -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - diff --git a/keyboards/gh60/keymaps/sethbc/rules.mk b/keyboards/gh60/keymaps/sethbc/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/gh60/keymaps/sethbc/rules.mk +++ b/keyboards/gh60/keymaps/sethbc/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gonnerd/keymaps/default/rules.mk b/keyboards/gonnerd/keymaps/default/rules.mk index e34aba6927f6..6de64fcf894b 100644 --- a/keyboards/gonnerd/keymaps/default/rules.mk +++ b/keyboards/gonnerd/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gonnerd/keymaps/gam3cat/rules.mk b/keyboards/gonnerd/keymaps/gam3cat/rules.mk index 6eab033cc0c0..55e681efb8de 100644 --- a/keyboards/gonnerd/keymaps/gam3cat/rules.mk +++ b/keyboards/gonnerd/keymaps/gam3cat/rules.mk @@ -22,3 +22,4 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common + diff --git a/keyboards/gonnerd/keymaps/mauin/rules.mk b/keyboards/gonnerd/keymaps/mauin/rules.mk index e34aba6927f6..6de64fcf894b 100644 --- a/keyboards/gonnerd/keymaps/mauin/rules.mk +++ b/keyboards/gonnerd/keymaps/mauin/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/gonnerd/keymaps/tkl/rules.mk b/keyboards/gonnerd/keymaps/tkl/rules.mk index b96663efe6c0..09b51e5a0935 100644 --- a/keyboards/gonnerd/keymaps/tkl/rules.mk +++ b/keyboards/gonnerd/keymaps/tkl/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk index 687c285bdb91..79be3bb87ef9 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk +++ b/keyboards/hadron/ver2/keymaps/side_numpad/rules.mk @@ -21,6 +21,3 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk index f2a91de89719..fc5d9ba1aa55 100644 --- a/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk +++ b/keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/frenchdev/rules.mk b/keyboards/handwired/frenchdev/rules.mk index 2b70ae564e9e..c82bf4a389d6 100644 --- a/keyboards/handwired/frenchdev/rules.mk +++ b/keyboards/handwired/frenchdev/rules.mk @@ -87,6 +87,3 @@ AUDIO_ENABLE = no # Audio output on port C6 RGBLIGHT_ENABLE = no API_SYSEX_ENABLE = no -#ifndef QUANTUM_DIR -# include ../../../Makefile -#endif diff --git a/keyboards/handwired/woodpad/keymaps/default/rules.mk b/keyboards/handwired/woodpad/keymaps/default/rules.mk index f060db79c0b8..fce19bfaa8f1 100644 --- a/keyboards/handwired/woodpad/keymaps/default/rules.mk +++ b/keyboards/handwired/woodpad/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/handwired/woodpad/keymaps/drashna/rules.mk b/keyboards/handwired/woodpad/keymaps/drashna/rules.mk index ed7d2e7c6d4a..7f7f30e2ad4d 100644 --- a/keyboards/handwired/woodpad/keymaps/drashna/rules.mk +++ b/keyboards/handwired/woodpad/keymaps/drashna/rules.mk @@ -8,6 +8,3 @@ MOUSEKEY_ENABLE = no EXTRAFLAGS = -flto -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index c5ee8acb2ac4..3b518ff88136 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -119,10 +119,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index c5ee8acb2ac4..3b518ff88136 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -119,10 +119,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev1/keymaps/default/rules.mk b/keyboards/helix/rev1/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/helix/rev1/keymaps/default/rules.mk +++ b/keyboards/helix/rev1/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index 3f84b895aaa6..37ef8632dee6 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -118,10 +118,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk index 4257d004da44..9d3743995ac6 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk +++ b/keyboards/helix/rev2/keymaps/edvorakjp/rules.mk @@ -121,10 +121,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index bd7130cfc663..a0bf21917b15 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -125,10 +125,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index 3f84b895aaa6..37ef8632dee6 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -118,10 +118,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index f46017071149..8cd0efdd4d9d 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -118,10 +118,6 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index a9cd251bc5f5..2062d348d1f1 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -120,10 +120,6 @@ SRC += led_test_init.c # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) diff --git a/keyboards/hhkb/keymaps/cinaeco/rules.mk b/keyboards/hhkb/keymaps/cinaeco/rules.mk index efed95492f74..a85669aa2f29 100644 --- a/keyboards/hhkb/keymaps/cinaeco/rules.mk +++ b/keyboards/hhkb/keymaps/cinaeco/rules.mk @@ -18,6 +18,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/davidrambo/rules.mk b/keyboards/iris/keymaps/davidrambo/rules.mk index 0b7e7b9057fd..1e3473a1af61 100644 --- a/keyboards/iris/keymaps/davidrambo/rules.mk +++ b/keyboards/iris/keymaps/davidrambo/rules.mk @@ -2,6 +2,3 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk +++ b/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/hag/rules.mk b/keyboards/iris/keymaps/hag/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/hag/rules.mk +++ b/keyboards/iris/keymaps/hag/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/hexwire/rules.mk b/keyboards/iris/keymaps/hexwire/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/hexwire/rules.mk +++ b/keyboards/iris/keymaps/hexwire/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/impstyle/rules.mk b/keyboards/iris/keymaps/impstyle/rules.mk index 4db5ef00d26d..ef4a383d31ca 100644 --- a/keyboards/iris/keymaps/impstyle/rules.mk +++ b/keyboards/iris/keymaps/impstyle/rules.mk @@ -3,6 +3,3 @@ BACKLIGHT_ENABLE = no TAP_DANCE_ENABLE = no MOUSEKEY_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/krusli/rules.mk b/keyboards/iris/keymaps/krusli/rules.mk index c5e16f13695b..b0e37ec2f4ac 100644 --- a/keyboards/iris/keymaps/krusli/rules.mk +++ b/keyboards/iris/keymaps/krusli/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/lewisridden/rules.mk b/keyboards/iris/keymaps/lewisridden/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/lewisridden/rules.mk +++ b/keyboards/iris/keymaps/lewisridden/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/iris/keymaps/mtdjr/rules.mk index a1b884e4dea6..7f8c630d8b19 100644 --- a/keyboards/iris/keymaps/mtdjr/rules.mk +++ b/keyboards/iris/keymaps/mtdjr/rules.mk @@ -1,6 +1,4 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no #AUDIO_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/iris/keymaps/rdhaene/rules.mk b/keyboards/iris/keymaps/rdhaene/rules.mk index d87ba7913364..4bfbfb2ae26f 100644 --- a/keyboards/iris/keymaps/rdhaene/rules.mk +++ b/keyboards/iris/keymaps/rdhaene/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/swedish/rules.mk b/keyboards/iris/keymaps/swedish/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/swedish/rules.mk +++ b/keyboards/iris/keymaps/swedish/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/transmogrified/rules.mk b/keyboards/iris/keymaps/transmogrified/rules.mk index c248822b2318..444fa38a932b 100644 --- a/keyboards/iris/keymaps/transmogrified/rules.mk +++ b/keyboards/iris/keymaps/transmogrified/rules.mk @@ -1,6 +1,3 @@ BACKLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/iris/keymaps/yanfali/rules.mk b/keyboards/iris/keymaps/yanfali/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/iris/keymaps/yanfali/rules.mk +++ b/keyboards/iris/keymaps/yanfali/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk index 85b2b41a6bc4..4086c15d4fef 100644 --- a/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk +++ b/keyboards/jc65/v32u4/keymaps/gam3cat/rules.mk @@ -22,3 +22,4 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common + diff --git a/keyboards/jd40/keymaps/vanagon/rules.mk b/keyboards/jd40/keymaps/vanagon/rules.mk index 63aac4e597d4..e69de29bb2d1 100644 --- a/keyboards/jd40/keymaps/vanagon/rules.mk +++ b/keyboards/jd40/keymaps/vanagon/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jd45/keymaps/mjt6u/rules.mk b/keyboards/jd45/keymaps/mjt6u/rules.mk index 1df8b9754b66..2cf0221ed774 100644 --- a/keyboards/jd45/keymaps/mjt6u/rules.mk +++ b/keyboards/jd45/keymaps/mjt6u/rules.mk @@ -18,6 +18,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend DEBUG_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jj40/keymaps/ajp10304/rules.mk b/keyboards/jj40/keymaps/ajp10304/rules.mk index dc6ab13e89f1..4dee01cd5b13 100644 --- a/keyboards/jj40/keymaps/ajp10304/rules.mk +++ b/keyboards/jj40/keymaps/ajp10304/rules.mk @@ -1,6 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes + diff --git a/keyboards/jj40/keymaps/fun40/rules.mk b/keyboards/jj40/keymaps/fun40/rules.mk index 6fe3b051542c..92f168a16d7a 100644 --- a/keyboards/jj40/keymaps/fun40/rules.mk +++ b/keyboards/jj40/keymaps/fun40/rules.mk @@ -19,6 +19,3 @@ DISABLE_WS2812 = yes SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/jj50/rules.mk b/keyboards/jj50/rules.mk index 4cc901859383..1a18ec4fe4fa 100644 --- a/keyboards/jj50/rules.mk +++ b/keyboards/jj50/rules.mk @@ -57,10 +57,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight.c -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/kc60/keymaps/stanleylai/rules.mk b/keyboards/kc60/keymaps/stanleylai/rules.mk index 9a381d2e78f9..a826c2bf2691 100644 --- a/keyboards/kc60/keymaps/stanleylai/rules.mk +++ b/keyboards/kc60/keymaps/stanleylai/rules.mk @@ -20,6 +20,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kc60/keymaps/wigguno/rules.mk b/keyboards/kc60/keymaps/wigguno/rules.mk index 1f8d1506f82d..db084a76a322 100644 --- a/keyboards/kc60/keymaps/wigguno/rules.mk +++ b/keyboards/kc60/keymaps/wigguno/rules.mk @@ -19,6 +19,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kc60/keymaps/ws2812/rules.mk b/keyboards/kc60/keymaps/ws2812/rules.mk index a8c93bcf595e..5d5a6f8abec7 100644 --- a/keyboards/kc60/keymaps/ws2812/rules.mk +++ b/keyboards/kc60/keymaps/ws2812/rules.mk @@ -20,6 +20,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/carpalx/rules.mk b/keyboards/kinesis/keymaps/carpalx/rules.mk index c7753fae05f4..63f52ac18e70 100644 --- a/keyboards/kinesis/keymaps/carpalx/rules.mk +++ b/keyboards/kinesis/keymaps/carpalx/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/default/rules.mk b/keyboards/kinesis/keymaps/default/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/default/rules.mk +++ b/keyboards/kinesis/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/default_pretty/rules.mk b/keyboards/kinesis/keymaps/default_pretty/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/default_pretty/rules.mk +++ b/keyboards/kinesis/keymaps/default_pretty/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/dvorak/rules.mk b/keyboards/kinesis/keymaps/dvorak/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/dvorak/rules.mk +++ b/keyboards/kinesis/keymaps/dvorak/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk index 24b16ba9b760..d2e362886a53 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/kinesis/keymaps/insertsnideremarks/rules.mk @@ -19,6 +19,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Enable Tap Dancing function -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/milestogo/rules.mk b/keyboards/kinesis/keymaps/milestogo/rules.mk index 93f927c7d0a4..7a331cd530cf 100644 --- a/keyboards/kinesis/keymaps/milestogo/rules.mk +++ b/keyboards/kinesis/keymaps/milestogo/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kinesis/keymaps/xyverz/rules.mk b/keyboards/kinesis/keymaps/xyverz/rules.mk index 94dc4cdfeae8..f21a27feacaf 100644 --- a/keyboards/kinesis/keymaps/xyverz/rules.mk +++ b/keyboards/kinesis/keymaps/xyverz/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kmac/keymaps/default/rules.mk b/keyboards/kmac/keymaps/default/rules.mk index 8e2d011b3421..128487947ea1 100644 --- a/keyboards/kmac/keymaps/default/rules.mk +++ b/keyboards/kmac/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kmac/keymaps/winkeyless/rules.mk b/keyboards/kmac/keymaps/winkeyless/rules.mk index 8e2d011b3421..128487947ea1 100644 --- a/keyboards/kmac/keymaps/winkeyless/rules.mk +++ b/keyboards/kmac/keymaps/winkeyless/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi/rules.mk b/keyboards/kona_classic/keymaps/ansi/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_split/rules.mk b/keyboards/kona_classic/keymaps/ansi_split/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/default/rules.mk b/keyboards/kona_classic/keymaps/default/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/default/rules.mk +++ b/keyboards/kona_classic/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso/rules.mk b/keyboards/kona_classic/keymaps/iso/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso/rules.mk +++ b/keyboards/kona_classic/keymaps/iso/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso_split/rules.mk b/keyboards/kona_classic/keymaps/iso_split/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso_split/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/laplace/keymaps/bakingpy/rules.mk b/keyboards/laplace/keymaps/bakingpy/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/laplace/keymaps/bakingpy/rules.mk +++ b/keyboards/laplace/keymaps/bakingpy/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/laplace/keymaps/default/rules.mk b/keyboards/laplace/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/laplace/keymaps/default/rules.mk +++ b/keyboards/laplace/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/launchpad/keymaps/default/rules.mk b/keyboards/launchpad/keymaps/default/rules.mk index 9bf35a59d09c..d1fa27f41efb 100644 --- a/keyboards/launchpad/keymaps/default/rules.mk +++ b/keyboards/launchpad/keymaps/default/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/bbaserdem/rules.mk b/keyboards/lets_split/keymaps/bbaserdem/rules.mk index 4159db3fee57..7a37e989d877 100755 --- a/keyboards/lets_split/keymaps/bbaserdem/rules.mk +++ b/keyboards/lets_split/keymaps/bbaserdem/rules.mk @@ -6,6 +6,3 @@ RGBLIGHT_ENABLE = yes # LED strips TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk index 36b4b8fc2552..d0b69206105e 100755 --- a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk +++ b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk @@ -21,6 +21,3 @@ KEY_LOCK_ENABLE = no # Allows locking any key. Not used UNICODE_ENABLE = no # Used for unicode character emulation EXTRAKEY_ENABLE = no # OS signals like volume control -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/cpeters1982/rules.mk b/keyboards/lets_split/keymaps/cpeters1982/rules.mk index f2fde785d4e6..87136eef03e6 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/rules.mk +++ b/keyboards/lets_split/keymaps/cpeters1982/rules.mk @@ -1,8 +1,3 @@ +AUTO_SHIFT_ENABLE = yes +RGBLIGHT_ENABLE = yes - - -ifndef QUANTUM_DIR - include ../../../../Makefile - AUTO_SHIFT_ENABLE = yes - RGBLIGHT_ENABLE = yes -endif diff --git a/keyboards/lets_split/keymaps/fabian/rules.mk b/keyboards/lets_split/keymaps/fabian/rules.mk index b8c82cb99d34..316a4b9cbf40 100644 --- a/keyboards/lets_split/keymaps/fabian/rules.mk +++ b/keyboards/lets_split/keymaps/fabian/rules.mk @@ -4,6 +4,3 @@ # # UNICODE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk index 36f5e5b6d556..21aae31dbabd 100644 --- a/keyboards/lets_split/keymaps/heartrobotninja/rules.mk +++ b/keyboards/lets_split/keymaps/heartrobotninja/rules.mk @@ -20,6 +20,3 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/khord/rules.mk b/keyboards/lets_split/keymaps/khord/rules.mk index c90523e5d647..32b6edc121a9 100644 --- a/keyboards/lets_split/keymaps/khord/rules.mk +++ b/keyboards/lets_split/keymaps/khord/rules.mk @@ -2,6 +2,3 @@ TAP_DANCE_ENABLE = yes RGBLIGHT_ENABLE = yes USE_I2C = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/mbsurfer/rules.mk b/keyboards/lets_split/keymaps/mbsurfer/rules.mk index c90523e5d647..32b6edc121a9 100644 --- a/keyboards/lets_split/keymaps/mbsurfer/rules.mk +++ b/keyboards/lets_split/keymaps/mbsurfer/rules.mk @@ -2,6 +2,3 @@ TAP_DANCE_ENABLE = yes RGBLIGHT_ENABLE = yes USE_I2C = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/mjt/rules.mk b/keyboards/lets_split/keymaps/mjt/rules.mk index a14e84d4e5c5..a43a9a1daa04 100644 --- a/keyboards/lets_split/keymaps/mjt/rules.mk +++ b/keyboards/lets_split/keymaps/mjt/rules.mk @@ -20,6 +20,3 @@ SWAP_HANDS_ENABLE = no # Enable one-hand typing # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/mtdjr/rules.mk b/keyboards/lets_split/keymaps/mtdjr/rules.mk index 75e9c6503e8e..a81250cdf6d9 100644 --- a/keyboards/lets_split/keymaps/mtdjr/rules.mk +++ b/keyboards/lets_split/keymaps/mtdjr/rules.mk @@ -1,5 +1,2 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - RGBLIGHT_ENABLE = yes + diff --git a/keyboards/lets_split/keymaps/pitty/rules.mk b/keyboards/lets_split/keymaps/pitty/rules.mk index 8ebc85a44b4a..53a426157e83 100644 --- a/keyboards/lets_split/keymaps/pitty/rules.mk +++ b/keyboards/lets_split/keymaps/pitty/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes NKRO_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/poker/rules.mk b/keyboards/lets_split/keymaps/poker/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/lets_split/keymaps/poker/rules.mk +++ b/keyboards/lets_split/keymaps/poker/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/waples/rules.mk b/keyboards/lets_split/keymaps/waples/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/lets_split/keymaps/waples/rules.mk +++ b/keyboards/lets_split/keymaps/waples/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/xk/rules.mk b/keyboards/lets_split/keymaps/xk/rules.mk index 195f01577897..8aafefa64f2e 100644 --- a/keyboards/lets_split/keymaps/xk/rules.mk +++ b/keyboards/lets_split/keymaps/xk/rules.mk @@ -14,6 +14,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split/keymaps/zer09/rules.mk b/keyboards/lets_split/keymaps/zer09/rules.mk index d8adc708826d..d2259fe9d5b9 100644 --- a/keyboards/lets_split/keymaps/zer09/rules.mk +++ b/keyboards/lets_split/keymaps/zer09/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk b/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk index 4159db3fee57..7a37e989d877 100755 --- a/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk +++ b/keyboards/lets_split_eh/keymaps/bbaserdem/rules.mk @@ -6,6 +6,3 @@ RGBLIGHT_ENABLE = yes # LED strips TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk b/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk +++ b/keyboards/lets_split_eh/keymaps/that_canadian/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/levinson/keymaps/drogglbecher/rules.mk b/keyboards/levinson/keymaps/drogglbecher/rules.mk index b223b71abaff..b2a5451c82df 100644 --- a/keyboards/levinson/keymaps/drogglbecher/rules.mk +++ b/keyboards/levinson/keymaps/drogglbecher/rules.mk @@ -5,6 +5,3 @@ BACKLIGHT_ENABLE = no UNICODE_ENABLE = yes DEFAULT_FOLDER = levinson/rev2 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/levinson/keymaps/losinggeneration/rules.mk b/keyboards/levinson/keymaps/losinggeneration/rules.mk index c8eef2cb3f1e..ee3ea67f7d8f 100644 --- a/keyboards/levinson/keymaps/losinggeneration/rules.mk +++ b/keyboards/levinson/keymaps/losinggeneration/rules.mk @@ -12,6 +12,3 @@ MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index 022b21924fb6..be670b9b48b4 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -52,10 +52,6 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -# ifndef QUANTUM_DIR -# include ../../Makefile -# endif - ifeq ($(strip $(ISSI_ENABLE)), yes) # TMK_COMMON_DEFS += -DISSI_ENABLE diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk index 14ceebb77c45..b5310da58d30 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk +++ b/keyboards/lfkeyboards/smk65/keymaps/default/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif @@ -34,3 +30,4 @@ endif ifeq ($(strip $(WATCHDOG_ENABLE)), yes) TMK_COMMON_DEFS += -DWATCHDOG_ENABLE endif + diff --git a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk index f8b4d5568978..f1814cf4852f 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/rules.mk @@ -23,10 +23,6 @@ ISSI_ENABLE = no # If the I2C pullup resistors aren't install this WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - ifeq ($(strip $(ISSI_ENABLE)), yes) TMK_COMMON_DEFS += -DISSI_ENABLE endif @@ -51,3 +47,4 @@ endif # endif # OPT_DEFS += -DLFK_REV_$(LFK_REV) # OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\" + diff --git a/keyboards/m10a/keymaps/default/rules.mk b/keyboards/m10a/keymaps/default/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/m10a/keymaps/default/rules.mk +++ b/keyboards/m10a/keymaps/default/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/m10a/keymaps/gam3cat/rules.mk b/keyboards/m10a/keymaps/gam3cat/rules.mk index 00515a31e9e7..b09c2904f0d1 100644 --- a/keyboards/m10a/keymaps/gam3cat/rules.mk +++ b/keyboards/m10a/keymaps/gam3cat/rules.mk @@ -22,3 +22,4 @@ FAUXCLICKY_ENABLE = no # Uses buzzer to emulate clicky switches. By defaul API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings(+5390) KEY_LOCK_ENABLE = no # This enables key lock(+260) SPLIT_KEYBOARD = no # This enables split keyboard support and includes all necessary files located at quantum/split_common + diff --git a/keyboards/minidox/keymaps/that_canadian/rules.mk b/keyboards/minidox/keymaps/that_canadian/rules.mk index 7637dfc09a96..f1ef68387f40 100644 --- a/keyboards/minidox/keymaps/that_canadian/rules.mk +++ b/keyboards/minidox/keymaps/that_canadian/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/mitosis/keymaps/mjt/rules.mk b/keyboards/mitosis/keymaps/mjt/rules.mk index a4137ad00e6e..0259657677bd 100644 --- a/keyboards/mitosis/keymaps/mjt/rules.mk +++ b/keyboards/mitosis/keymaps/mjt/rules.mk @@ -12,6 +12,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/adam-lee/rules.mk b/keyboards/miuni32/keymaps/adam-lee/rules.mk index 3138ab57f736..3a741d20a7ca 100644 --- a/keyboards/miuni32/keymaps/adam-lee/rules.mk +++ b/keyboards/miuni32/keymaps/adam-lee/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/default/rules.mk b/keyboards/miuni32/keymaps/default/rules.mk index 3138ab57f736..3a741d20a7ca 100644 --- a/keyboards/miuni32/keymaps/default/rules.mk +++ b/keyboards/miuni32/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/ht_156/rules.mk b/keyboards/miuni32/keymaps/ht_156/rules.mk index 3138ab57f736..3a741d20a7ca 100644 --- a/keyboards/miuni32/keymaps/ht_156/rules.mk +++ b/keyboards/miuni32/keymaps/ht_156/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/miuni32/keymaps/ki/rules.mk b/keyboards/miuni32/keymaps/ki/rules.mk index 7639c2b3f140..15d3cfff2ca0 100644 --- a/keyboards/miuni32/keymaps/ki/rules.mk +++ b/keyboards/miuni32/keymaps/ki/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/niu_mini/keymaps/planck/rules.mk b/keyboards/niu_mini/keymaps/planck/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/niu_mini/keymaps/planck/rules.mk +++ b/keyboards/niu_mini/keymaps/planck/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk index 359f94f1e467..00946ff227ef 100644 --- a/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk +++ b/keyboards/niu_mini/keymaps/xtonhasvim/rules.mk @@ -1,8 +1,5 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - MOUSEKEY_ENABLE = yes BACKLIGHT_ENABLE = no AUDIO_ENABLE = no CONSOLE_ENABLE = no # Console for debug(+400) + diff --git a/keyboards/nyquist/keymaps/jojiichan/rules.mk b/keyboards/nyquist/keymaps/jojiichan/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/nyquist/keymaps/jojiichan/rules.mk +++ b/keyboards/nyquist/keymaps/jojiichan/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/nyquist/keymaps/kim-kim/rules.mk b/keyboards/nyquist/keymaps/kim-kim/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/nyquist/keymaps/kim-kim/rules.mk +++ b/keyboards/nyquist/keymaps/kim-kim/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/nyquist/keymaps/losinggeneration/rules.mk b/keyboards/nyquist/keymaps/losinggeneration/rules.mk index ea2b7165d9be..17ef684830f4 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/rules.mk +++ b/keyboards/nyquist/keymaps/losinggeneration/rules.mk @@ -12,6 +12,3 @@ MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/nyquist/keymaps/pitty/rules.mk b/keyboards/nyquist/keymaps/pitty/rules.mk index 8ebc85a44b4a..53a426157e83 100644 --- a/keyboards/nyquist/keymaps/pitty/rules.mk +++ b/keyboards/nyquist/keymaps/pitty/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes NKRO_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/org60/keymaps/boardy/rules.mk b/keyboards/org60/keymaps/boardy/rules.mk index 0755d5009372..88ac79ecad50 100644 --- a/keyboards/org60/keymaps/boardy/rules.mk +++ b/keyboards/org60/keymaps/boardy/rules.mk @@ -8,8 +8,3 @@ COMMAND_ENABLE = no # Commands for debug and configuration TAP_DANCE_ENABLE = no # Tap Dance skills UNICODE_ENABLE = no # Unicode -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - - diff --git a/keyboards/phantom/keymaps/default/rules.mk b/keyboards/phantom/keymaps/default/rules.mk index 555ac79fa71a..597d4046a136 100644 --- a/keyboards/phantom/keymaps/default/rules.mk +++ b/keyboards/phantom/keymaps/default/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/phantom/keymaps/rgbmod/rules.mk b/keyboards/phantom/keymaps/rgbmod/rules.mk index 38c23a1b897a..2892bb424dcd 100644 --- a/keyboards/phantom/keymaps/rgbmod/rules.mk +++ b/keyboards/phantom/keymaps/rgbmod/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/ab/rules.mk b/keyboards/planck/keymaps/ab/rules.mk index 0b025a2313e8..c4dc26dc2b3c 100644 --- a/keyboards/planck/keymaps/ab/rules.mk +++ b/keyboards/planck/keymaps/ab/rules.mk @@ -58,6 +58,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/ajp10304/rules.mk b/keyboards/planck/keymaps/ajp10304/rules.mk index dc6ab13e89f1..4dee01cd5b13 100644 --- a/keyboards/planck/keymaps/ajp10304/rules.mk +++ b/keyboards/planck/keymaps/ajp10304/rules.mk @@ -1,6 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = no MOUSEKEY_ENABLE = yes + diff --git a/keyboards/planck/keymaps/alexey/rules.mk b/keyboards/planck/keymaps/alexey/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/alexey/rules.mk +++ b/keyboards/planck/keymaps/alexey/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/altgr/rules.mk b/keyboards/planck/keymaps/altgr/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/altgr/rules.mk +++ b/keyboards/planck/keymaps/altgr/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/angerthosenear/rules.mk b/keyboards/planck/keymaps/angerthosenear/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/angerthosenear/rules.mk +++ b/keyboards/planck/keymaps/angerthosenear/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/austin/rules.mk b/keyboards/planck/keymaps/austin/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/austin/rules.mk +++ b/keyboards/planck/keymaps/austin/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/basic/rules.mk b/keyboards/planck/keymaps/basic/rules.mk index 6f88a28d5089..a31025bc33d5 100644 --- a/keyboards/planck/keymaps/basic/rules.mk +++ b/keyboards/planck/keymaps/basic/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/bone2planck/rules.mk b/keyboards/planck/keymaps/bone2planck/rules.mk index 699726948dfd..fc0bbe9e7494 100644 --- a/keyboards/planck/keymaps/bone2planck/rules.mk +++ b/keyboards/planck/keymaps/bone2planck/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/brandon/rules.mk b/keyboards/planck/keymaps/brandon/rules.mk index 6df206578c4e..30275cf1f6e7 100644 --- a/keyboards/planck/keymaps/brandon/rules.mk +++ b/keyboards/planck/keymaps/brandon/rules.mk @@ -10,6 +10,3 @@ MOUSEKEY_ENABLE = yes CONSOLE_ENABLE = no BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/callum/rules.mk b/keyboards/planck/keymaps/callum/rules.mk index 67fe8d284d5d..25d398f0806d 100644 --- a/keyboards/planck/keymaps/callum/rules.mk +++ b/keyboards/planck/keymaps/callum/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/cbbrowne/rules.mk b/keyboards/planck/keymaps/cbbrowne/rules.mk index c7cef55a9af1..45d6837399ad 100644 --- a/keyboards/planck/keymaps/cbbrowne/rules.mk +++ b/keyboards/planck/keymaps/cbbrowne/rules.mk @@ -19,6 +19,3 @@ API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/chance/rules.mk b/keyboards/planck/keymaps/chance/rules.mk index 5c9798a5726d..2febfd96992b 100644 --- a/keyboards/planck/keymaps/chance/rules.mk +++ b/keyboards/planck/keymaps/chance/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. AUDIO_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/charlie/rules.mk b/keyboards/planck/keymaps/charlie/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/charlie/rules.mk +++ b/keyboards/planck/keymaps/charlie/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/circuit/rules.mk b/keyboards/planck/keymaps/circuit/rules.mk index e9a02e31e200..b527d82971d2 100644 --- a/keyboards/planck/keymaps/circuit/rules.mk +++ b/keyboards/planck/keymaps/circuit/rules.mk @@ -20,6 +20,3 @@ TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/coloneljesus/rules.mk b/keyboards/planck/keymaps/coloneljesus/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/coloneljesus/rules.mk +++ b/keyboards/planck/keymaps/coloneljesus/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/daniel/rules.mk b/keyboards/planck/keymaps/daniel/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/daniel/rules.mk +++ b/keyboards/planck/keymaps/daniel/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/david/rules.mk b/keyboards/planck/keymaps/david/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/david/rules.mk +++ b/keyboards/planck/keymaps/david/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/davidrambo/rules.mk b/keyboards/planck/keymaps/davidrambo/rules.mk index ffa9b870afef..5e5ab3845816 100644 --- a/keyboards/planck/keymaps/davidrambo/rules.mk +++ b/keyboards/planck/keymaps/davidrambo/rules.mk @@ -1,6 +1,3 @@ TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/dc/rules.mk b/keyboards/planck/keymaps/dc/rules.mk index ea4341b4fd29..07da5f194420 100644 --- a/keyboards/planck/keymaps/dc/rules.mk +++ b/keyboards/planck/keymaps/dc/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -21,4 +17,5 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. TAP_DANCE_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/planck/keymaps/dcompact/rules.mk b/keyboards/planck/keymaps/dcompact/rules.mk index d7eff1adc6f8..12b4e44c2b76 100644 --- a/keyboards/planck/keymaps/dcompact/rules.mk +++ b/keyboards/planck/keymaps/dcompact/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # https://beta.docs.qmk.fm/reference/config-options#feature-options # Features Specifically Wanted EXTRAKEY_ENABLE = yes @@ -13,3 +9,4 @@ AUDIO_ENABLE = yes MOUSEKEY_ENABLE = no MIDI_ENABLE = no CONSOLE_ENABLE = no + diff --git a/keyboards/planck/keymaps/dlaroe/rules.mk b/keyboards/planck/keymaps/dlaroe/rules.mk index 0064f622b76b..7ff90237a78d 100644 --- a/keyboards/planck/keymaps/dlaroe/rules.mk +++ b/keyboards/planck/keymaps/dlaroe/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/dr_notsokind/rules.mk b/keyboards/planck/keymaps/dr_notsokind/rules.mk index eea90f8e6a44..91156b6b4659 100644 --- a/keyboards/planck/keymaps/dr_notsokind/rules.mk +++ b/keyboards/planck/keymaps/dr_notsokind/rules.mk @@ -20,6 +20,3 @@ TAP_DANCE_ENABLE = yes # Enables the double-tap functionality of keys # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/dshields/rules.mk b/keyboards/planck/keymaps/dshields/rules.mk index a526c5a31add..a2bec4335762 100644 --- a/keyboards/planck/keymaps/dshields/rules.mk +++ b/keyboards/planck/keymaps/dshields/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - MOUSEKEY_ENABLE = yes # Mouse keys(+4700) COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/dudeofawesome/rules.mk b/keyboards/planck/keymaps/dudeofawesome/rules.mk index edeab164393d..eeee270d5e0c 100644 --- a/keyboards/planck/keymaps/dudeofawesome/rules.mk +++ b/keyboards/planck/keymaps/dudeofawesome/rules.mk @@ -1,10 +1,7 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = yes # Audio output on port C6 CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + diff --git a/keyboards/planck/keymaps/dzobert/rules.mk b/keyboards/planck/keymaps/dzobert/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/dzobert/rules.mk +++ b/keyboards/planck/keymaps/dzobert/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/espynn/rules.mk b/keyboards/planck/keymaps/espynn/rules.mk index 0b025a2313e8..c4dc26dc2b3c 100644 --- a/keyboards/planck/keymaps/espynn/rules.mk +++ b/keyboards/planck/keymaps/espynn/rules.mk @@ -58,6 +58,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/experimental/rules.mk b/keyboards/planck/keymaps/experimental/rules.mk index 721e887b98c8..e5db05543699 100644 --- a/keyboards/planck/keymaps/experimental/rules.mk +++ b/keyboards/planck/keymaps/experimental/rules.mk @@ -23,6 +23,3 @@ LEADER_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/gabriel/rules.mk b/keyboards/planck/keymaps/gabriel/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/gabriel/rules.mk +++ b/keyboards/planck/keymaps/gabriel/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/grahampheath/rules.mk b/keyboards/planck/keymaps/grahampheath/rules.mk index 2ff606255ed8..e84f6d5e6da5 100644 --- a/keyboards/planck/keymaps/grahampheath/rules.mk +++ b/keyboards/planck/keymaps/grahampheath/rules.mk @@ -1,9 +1,7 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality NKRO_ENABLE = yes # N-Key rollover. # MOUSEKEY_ENABLE = yes # Mouse mode. TAP_DANCE_ENABLE = no # Tap dance enabled. UNICODEMAP_ENABLE = no # Unicode keymap (sucks on osx). AUDIO_ENABLE = yes # Audio output on port C6 + diff --git a/keyboards/planck/keymaps/gunp/rules.mk b/keyboards/planck/keymaps/gunp/rules.mk index 7d03482abc61..ec69d6e78f39 100644 --- a/keyboards/planck/keymaps/gunp/rules.mk +++ b/keyboards/planck/keymaps/gunp/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/handwired_binaryplease/rules.mk b/keyboards/planck/keymaps/handwired_binaryplease/rules.mk index 248fe2bb74ad..efe0c7a5dd91 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/rules.mk +++ b/keyboards/planck/keymaps/handwired_binaryplease/rules.mk @@ -1,9 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - - - # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -72,3 +66,4 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + diff --git a/keyboards/planck/keymaps/hiea/rules.mk b/keyboards/planck/keymaps/hiea/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/hiea/rules.mk +++ b/keyboards/planck/keymaps/hiea/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/hieax/rules.mk b/keyboards/planck/keymaps/hieax/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/hieax/rules.mk +++ b/keyboards/planck/keymaps/hieax/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/ishtob/rule.mk b/keyboards/planck/keymaps/ishtob/rule.mk index c0d38aaa14a3..0f71be62b73b 100755 --- a/keyboards/planck/keymaps/ishtob/rule.mk +++ b/keyboards/planck/keymaps/ishtob/rule.mk @@ -18,6 +18,3 @@ ENCODER_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jacob/rules.mk b/keyboards/planck/keymaps/jacob/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/jacob/rules.mk +++ b/keyboards/planck/keymaps/jacob/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/jirgn/rules.mk b/keyboards/planck/keymaps/jirgn/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/jirgn/rules.mk +++ b/keyboards/planck/keymaps/jirgn/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/johannes/rules.mk b/keyboards/planck/keymaps/johannes/rules.mk index 6f88a28d5089..a31025bc33d5 100644 --- a/keyboards/planck/keymaps/johannes/rules.mk +++ b/keyboards/planck/keymaps/johannes/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/khord/rules.mk b/keyboards/planck/keymaps/khord/rules.mk index c248822b2318..444fa38a932b 100644 --- a/keyboards/planck/keymaps/khord/rules.mk +++ b/keyboards/planck/keymaps/khord/rules.mk @@ -1,6 +1,3 @@ BACKLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/kmontag42/rules.mk b/keyboards/planck/keymaps/kmontag42/rules.mk index 0c100076beae..5712a735d1e5 100644 --- a/keyboards/planck/keymaps/kmontag42/rules.mk +++ b/keyboards/planck/keymaps/kmontag42/rules.mk @@ -1,6 +1,3 @@ UNICODE_ENABLE = yes LEADER_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/kyle/rules.mk b/keyboards/planck/keymaps/kyle/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/kyle/rules.mk +++ b/keyboards/planck/keymaps/kyle/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/lae3/rules.mk b/keyboards/planck/keymaps/lae3/rules.mk index 89b147f81915..4d91a120c660 100644 --- a/keyboards/planck/keymaps/lae3/rules.mk +++ b/keyboards/planck/keymaps/lae3/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/lukas/rules.mk b/keyboards/planck/keymaps/lukas/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/lukas/rules.mk +++ b/keyboards/planck/keymaps/lukas/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/luke/rules.mk b/keyboards/planck/keymaps/luke/rules.mk index 76ed281c11e8..e04815e2cafb 100644 --- a/keyboards/planck/keymaps/luke/rules.mk +++ b/keyboards/planck/keymaps/luke/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/max/rules.mk b/keyboards/planck/keymaps/max/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/max/rules.mk +++ b/keyboards/planck/keymaps/max/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/mitch/rules.mk b/keyboards/planck/keymaps/mitch/rules.mk index 7955003d47ee..32dc2acc6768 100644 --- a/keyboards/planck/keymaps/mitch/rules.mk +++ b/keyboards/planck/keymaps/mitch/rules.mk @@ -1,5 +1,2 @@ SUBPROJECT = rev3 -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/mjt/rules.mk b/keyboards/planck/keymaps/mjt/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/mjt/rules.mk +++ b/keyboards/planck/keymaps/mjt/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/mjtnumsym/rules.mk b/keyboards/planck/keymaps/mjtnumsym/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/mjtnumsym/rules.mk +++ b/keyboards/planck/keymaps/mjtnumsym/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/myoung34/rules.mk b/keyboards/planck/keymaps/myoung34/rules.mk index b1aaafd3a4d2..0560de1dc4bb 100644 --- a/keyboards/planck/keymaps/myoung34/rules.mk +++ b/keyboards/planck/keymaps/myoung34/rules.mk @@ -1,7 +1,3 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - AUDIO_ENABLE = yes # Audio output on port C6 CONSOLE_ENABLE = no # Console for debug(+400) MIDI_ENABLE = no # MIDI controls @@ -9,3 +5,4 @@ MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. BACKLIGHT_ENABLE = yes + diff --git a/keyboards/planck/keymaps/neo2planck/rules.mk b/keyboards/planck/keymaps/neo2planck/rules.mk index cedf3095e61b..6846e9c164f0 100644 --- a/keyboards/planck/keymaps/neo2planck/rules.mk +++ b/keyboards/planck/keymaps/neo2planck/rules.mk @@ -18,6 +18,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/not-quite-neo/rules.mk b/keyboards/planck/keymaps/not-quite-neo/rules.mk index 90e6353f65b0..5ba0cefb41bd 100644 --- a/keyboards/planck/keymaps/not-quite-neo/rules.mk +++ b/keyboards/planck/keymaps/not-quite-neo/rules.mk @@ -24,6 +24,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/originerd/rules.mk b/keyboards/planck/keymaps/originerd/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/originerd/rules.mk +++ b/keyboards/planck/keymaps/originerd/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/paget/rules.mk b/keyboards/planck/keymaps/paget/rules.mk index 457a3d01d4a4..e69de29bb2d1 100755 --- a/keyboards/planck/keymaps/paget/rules.mk +++ b/keyboards/planck/keymaps/paget/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/pete/rules.mk b/keyboards/planck/keymaps/pete/rules.mk index 20bba3f49157..8a328f6b6cbc 100644 --- a/keyboards/planck/keymaps/pete/rules.mk +++ b/keyboards/planck/keymaps/pete/rules.mk @@ -10,6 +10,3 @@ NKRO_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/phreed/rules.mk b/keyboards/planck/keymaps/phreed/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/phreed/rules.mk +++ b/keyboards/planck/keymaps/phreed/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/piemod/rules.mk b/keyboards/planck/keymaps/piemod/rules.mk index 84cb02bd760a..0eabfdfc19e8 100644 --- a/keyboards/planck/keymaps/piemod/rules.mk +++ b/keyboards/planck/keymaps/piemod/rules.mk @@ -13,6 +13,3 @@ else BLUETOOTH_ENABLE = yes endif -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/priyadi/rules.mk b/keyboards/planck/keymaps/priyadi/rules.mk index 282c047eec42..a999eb00f639 100644 --- a/keyboards/planck/keymaps/priyadi/rules.mk +++ b/keyboards/planck/keymaps/priyadi/rules.mk @@ -21,6 +21,3 @@ FAUXCLICKY_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/rai-suta/rules.mk b/keyboards/planck/keymaps/rai-suta/rules.mk index ce13befd9061..88915dcd3c62 100644 --- a/keyboards/planck/keymaps/rai-suta/rules.mk +++ b/keyboards/planck/keymaps/rai-suta/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/sdothum/rules.mk b/keyboards/planck/keymaps/sdothum/rules.mk index 40f153844c19..a722766296dc 100644 --- a/keyboards/planck/keymaps/sdothum/rules.mk +++ b/keyboards/planck/keymaps/sdothum/rules.mk @@ -21,6 +21,3 @@ SLEEP_LED_ENABLE = no # breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # enable double tap completion of (),[],{} -ifndef QUANTUM_DIR -include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/smt/rules.mk b/keyboards/planck/keymaps/smt/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/smt/rules.mk +++ b/keyboards/planck/keymaps/smt/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/steno/rules.mk b/keyboards/planck/keymaps/steno/rules.mk index 634a1c8878a9..b2fd63a893d5 100644 --- a/keyboards/planck/keymaps/steno/rules.mk +++ b/keyboards/planck/keymaps/steno/rules.mk @@ -1,9 +1,6 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - EXTRAKEY_ENABLE = no MOUSEKEY_ENABLE = no # Mouse keys(+4700) STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls + diff --git a/keyboards/planck/keymaps/tehwalris/rules.mk b/keyboards/planck/keymaps/tehwalris/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/planck/keymaps/tehwalris/rules.mk +++ b/keyboards/planck/keymaps/tehwalris/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/tong92/rules.mk b/keyboards/planck/keymaps/tong92/rules.mk index df9e7918ca30..88ad1e982855 100644 --- a/keyboards/planck/keymaps/tong92/rules.mk +++ b/keyboards/planck/keymaps/tong92/rules.mk @@ -57,6 +57,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/unicode/rules.mk b/keyboards/planck/keymaps/unicode/rules.mk index 110af7501cc0..70866cb8bb24 100644 --- a/keyboards/planck/keymaps/unicode/rules.mk +++ b/keyboards/planck/keymaps/unicode/rules.mk @@ -6,6 +6,3 @@ # UNICODE_ENABLE = yes # Unicode -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/vifon/rules.mk b/keyboards/planck/keymaps/vifon/rules.mk index 5caec1afa8f1..527e63d38213 100644 --- a/keyboards/planck/keymaps/vifon/rules.mk +++ b/keyboards/planck/keymaps/vifon/rules.mk @@ -22,6 +22,3 @@ KEY_LOCK_ENABLE = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/yale/rules.mk b/keyboards/planck/keymaps/yale/rules.mk index caff043c582e..5dda6ad67ba1 100644 --- a/keyboards/planck/keymaps/yale/rules.mk +++ b/keyboards/planck/keymaps/yale/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/yang/rules.mk b/keyboards/planck/keymaps/yang/rules.mk index 173fe29893b6..05f0fb04aa3d 100644 --- a/keyboards/planck/keymaps/yang/rules.mk +++ b/keyboards/planck/keymaps/yang/rules.mk @@ -5,6 +5,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. AUDIO_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/zach/rules.mk b/keyboards/planck/keymaps/zach/rules.mk index ca24b47929a6..b3dfb88d74e4 100644 --- a/keyboards/planck/keymaps/zach/rules.mk +++ b/keyboards/planck/keymaps/zach/rules.mk @@ -24,6 +24,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/planck/keymaps/zrichard/rules.mk b/keyboards/planck/keymaps/zrichard/rules.mk index 7b17f58ce13a..0475875a3b36 100755 --- a/keyboards/planck/keymaps/zrichard/rules.mk +++ b/keyboards/planck/keymaps/zrichard/rules.mk @@ -25,6 +25,3 @@ TAP_DANCE_ENABLE = no # Enable double or n tap macros # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/0xdec/rules.mk b/keyboards/preonic/keymaps/0xdec/rules.mk index 6600e368936a..0c8a6dc4110e 100644 --- a/keyboards/preonic/keymaps/0xdec/rules.mk +++ b/keyboards/preonic/keymaps/0xdec/rules.mk @@ -16,6 +16,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/bucktooth/rules.mk b/keyboards/preonic/keymaps/bucktooth/rules.mk index 9dbdfcbd3baa..8f226afd905b 100644 --- a/keyboards/preonic/keymaps/bucktooth/rules.mk +++ b/keyboards/preonic/keymaps/bucktooth/rules.mk @@ -15,6 +15,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/dlaroe/rules.mk b/keyboards/preonic/keymaps/dlaroe/rules.mk index eea316849727..68f78de6e0a6 100644 --- a/keyboards/preonic/keymaps/dlaroe/rules.mk +++ b/keyboards/preonic/keymaps/dlaroe/rules.mk @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/jacwib/rules.mk b/keyboards/preonic/keymaps/jacwib/rules.mk index 9dbdfcbd3baa..8f226afd905b 100644 --- a/keyboards/preonic/keymaps/jacwib/rules.mk +++ b/keyboards/preonic/keymaps/jacwib/rules.mk @@ -15,6 +15,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/kinesis/rules.mk b/keyboards/preonic/keymaps/kinesis/rules.mk index f37fe433891f..94d02c8b773d 100644 --- a/keyboards/preonic/keymaps/kinesis/rules.mk +++ b/keyboards/preonic/keymaps/kinesis/rules.mk @@ -22,6 +22,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/nikchi/rules.mk b/keyboards/preonic/keymaps/nikchi/rules.mk index 3d4659ceb9a8..e69de29bb2d1 100644 --- a/keyboards/preonic/keymaps/nikchi/rules.mk +++ b/keyboards/preonic/keymaps/nikchi/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/rules.mk b/keyboards/preonic/keymaps/smt/rules.mk index 3d4659ceb9a8..e69de29bb2d1 100644 --- a/keyboards/preonic/keymaps/smt/rules.mk +++ b/keyboards/preonic/keymaps/smt/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/that_canadian/Makefile b/keyboards/preonic/keymaps/that_canadian/Makefile index 507bd77d2d12..773e5c45dadd 100644 --- a/keyboards/preonic/keymaps/that_canadian/Makefile +++ b/keyboards/preonic/keymaps/that_canadian/Makefile @@ -20,6 +20,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/zach/rules.mk b/keyboards/preonic/keymaps/zach/rules.mk index f00af43961ee..77efcf3832fe 100644 --- a/keyboards/preonic/keymaps/zach/rules.mk +++ b/keyboards/preonic/keymaps/zach/rules.mk @@ -24,6 +24,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/redox/keymaps/default/rules.mk b/keyboards/redox/keymaps/default/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/redox/keymaps/default/rules.mk +++ b/keyboards/redox/keymaps/default/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/redox/keymaps/italian/rules.mk b/keyboards/redox/keymaps/italian/rules.mk index 1e5761278801..a81250cdf6d9 100644 --- a/keyboards/redox/keymaps/italian/rules.mk +++ b/keyboards/redox/keymaps/italian/rules.mk @@ -1,5 +1,2 @@ RGBLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk b/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk index cf5012252685..1bcd7ea7f2f9 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk +++ b/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/satan/keymaps/admiralStrokers/rules.mk b/keyboards/satan/keymaps/admiralStrokers/rules.mk index 22908296cee2..7c3f5bd90bc4 100644 --- a/keyboards/satan/keymaps/admiralStrokers/rules.mk +++ b/keyboards/satan/keymaps/admiralStrokers/rules.mk @@ -19,6 +19,4 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no# Breathing sleep LED during USB suspend API_SYSEX_ENABLE = no # This enables using the Quantum SYSEX API to send strings -ifndef QUANTUM_DIR - include ../../../../Makefile -endif + diff --git a/keyboards/satan/keymaps/ben_iso/rules.mk b/keyboards/satan/keymaps/ben_iso/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/ben_iso/rules.mk +++ b/keyboards/satan/keymaps/ben_iso/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/chaser/rules.mk b/keyboards/satan/keymaps/chaser/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/chaser/rules.mk +++ b/keyboards/satan/keymaps/chaser/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/colemak/rules.mk b/keyboards/satan/keymaps/colemak/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/colemak/rules.mk +++ b/keyboards/satan/keymaps/colemak/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/default/rules.mk b/keyboards/satan/keymaps/default/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/default/rules.mk +++ b/keyboards/satan/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/dende_iso/rules.mk b/keyboards/satan/keymaps/dende_iso/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/dende_iso/rules.mk +++ b/keyboards/satan/keymaps/dende_iso/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/denolfe/rules.mk b/keyboards/satan/keymaps/denolfe/rules.mk index 04d274306599..5a8745b6898b 100644 --- a/keyboards/satan/keymaps/denolfe/rules.mk +++ b/keyboards/satan/keymaps/denolfe/rules.mk @@ -15,6 +15,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/dkrieger/rules.mk b/keyboards/satan/keymaps/dkrieger/rules.mk index f2434d30e555..d91b0edbf34d 100644 --- a/keyboards/satan/keymaps/dkrieger/rules.mk +++ b/keyboards/satan/keymaps/dkrieger/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/fakb/rules.mk b/keyboards/satan/keymaps/fakb/rules.mk index c2b5df6cdd95..a0d2447994d5 100644 --- a/keyboards/satan/keymaps/fakb/rules.mk +++ b/keyboards/satan/keymaps/fakb/rules.mk @@ -11,6 +11,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/isoHHKB/rules.mk b/keyboards/satan/keymaps/isoHHKB/rules.mk index 80ce56058834..08e77f9ebc6f 100644 --- a/keyboards/satan/keymaps/isoHHKB/rules.mk +++ b/keyboards/satan/keymaps/isoHHKB/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/iso_split_rshift/rules.mk b/keyboards/satan/keymaps/iso_split_rshift/rules.mk index d1e07da3fcc9..15cabfcd85ae 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/satan/keymaps/iso_split_rshift/rules.mk @@ -11,6 +11,3 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/lepa/rules.mk b/keyboards/satan/keymaps/lepa/rules.mk index 72ca006465cb..74a42b647cab 100644 --- a/keyboards/satan/keymaps/lepa/rules.mk +++ b/keyboards/satan/keymaps/lepa/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/midi/rules.mk b/keyboards/satan/keymaps/midi/rules.mk index d144314de74a..87025ed6fe40 100644 --- a/keyboards/satan/keymaps/midi/rules.mk +++ b/keyboards/satan/keymaps/midi/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/sethbc/rules.mk b/keyboards/satan/keymaps/sethbc/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/satan/keymaps/sethbc/rules.mk +++ b/keyboards/satan/keymaps/sethbc/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/smt/rules.mk b/keyboards/satan/keymaps/smt/rules.mk index 806c2cb84b08..3fe140adcc76 100644 --- a/keyboards/satan/keymaps/smt/rules.mk +++ b/keyboards/satan/keymaps/smt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/satan/keymaps/unxmaal/rules.mk b/keyboards/satan/keymaps/unxmaal/rules.mk index 470d621b105f..e72478251372 100644 --- a/keyboards/satan/keymaps/unxmaal/rules.mk +++ b/keyboards/satan/keymaps/unxmaal/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/ardakilic/rules.mk b/keyboards/tada68/keymaps/ardakilic/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/ardakilic/rules.mk +++ b/keyboards/tada68/keymaps/ardakilic/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/default/rules.mk b/keyboards/tada68/keymaps/default/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/default/rules.mk +++ b/keyboards/tada68/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/fakb/rules.mk b/keyboards/tada68/keymaps/fakb/rules.mk index 642e16de5978..47fd29663ba9 100644 --- a/keyboards/tada68/keymaps/fakb/rules.mk +++ b/keyboards/tada68/keymaps/fakb/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/fezzant/rules.mk b/keyboards/tada68/keymaps/fezzant/rules.mk index 8df84ae954f3..7b32f0a66442 100644 --- a/keyboards/tada68/keymaps/fezzant/rules.mk +++ b/keyboards/tada68/keymaps/fezzant/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/iso-nor/rules.mk b/keyboards/tada68/keymaps/iso-nor/rules.mk index baaca071cf7e..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/iso-nor/rules.mk +++ b/keyboards/tada68/keymaps/iso-nor/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/iso-uk/rules.mk b/keyboards/tada68/keymaps/iso-uk/rules.mk index baaca071cf7e..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/iso-uk/rules.mk +++ b/keyboards/tada68/keymaps/iso-uk/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/isoish/rules.mk b/keyboards/tada68/keymaps/isoish/rules.mk index baaca071cf7e..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/isoish/rules.mk +++ b/keyboards/tada68/keymaps/isoish/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tada68/keymaps/mattdicarlo/rules.mk b/keyboards/tada68/keymaps/mattdicarlo/rules.mk index ac92f99f4855..739b739971fb 100644 --- a/keyboards/tada68/keymaps/mattdicarlo/rules.mk +++ b/keyboards/tada68/keymaps/mattdicarlo/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/mlechner/rules.mk b/keyboards/tada68/keymaps/mlechner/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/mlechner/rules.mk +++ b/keyboards/tada68/keymaps/mlechner/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/mtdjr/rules.mk b/keyboards/tada68/keymaps/mtdjr/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/mtdjr/rules.mk +++ b/keyboards/tada68/keymaps/mtdjr/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/pascamel/rules.mk b/keyboards/tada68/keymaps/pascamel/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/pascamel/rules.mk +++ b/keyboards/tada68/keymaps/pascamel/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/raylas/rules.mk b/keyboards/tada68/keymaps/raylas/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/raylas/rules.mk +++ b/keyboards/tada68/keymaps/raylas/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/rgb/rules.mk b/keyboards/tada68/keymaps/rgb/rules.mk index 470d621b105f..e72478251372 100644 --- a/keyboards/tada68/keymaps/rgb/rules.mk +++ b/keyboards/tada68/keymaps/rgb/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/stephengrier/rules.mk b/keyboards/tada68/keymaps/stephengrier/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/stephengrier/rules.mk +++ b/keyboards/tada68/keymaps/stephengrier/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/trashcat/rules.mk b/keyboards/tada68/keymaps/trashcat/rules.mk index 6fb496919379..488111732c9d 100644 --- a/keyboards/tada68/keymaps/trashcat/rules.mk +++ b/keyboards/tada68/keymaps/trashcat/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Tappa Dance Bitch -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/tshack/rules.mk b/keyboards/tada68/keymaps/tshack/rules.mk index 86d22dd3fd06..1a3bda460372 100644 --- a/keyboards/tada68/keymaps/tshack/rules.mk +++ b/keyboards/tada68/keymaps/tshack/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/unix/rules.mk b/keyboards/tada68/keymaps/unix/rules.mk index aade51459b4c..316106c034d2 100644 --- a/keyboards/tada68/keymaps/unix/rules.mk +++ b/keyboards/tada68/keymaps/unix/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tada68/keymaps/wamsm_tada/rules.mk b/keyboards/tada68/keymaps/wamsm_tada/rules.mk index bb535beb34c5..53644093d6c4 100644 --- a/keyboards/tada68/keymaps/wamsm_tada/rules.mk +++ b/keyboards/tada68/keymaps/wamsm_tada/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/tanuki/rules.mk b/keyboards/tanuki/rules.mk index cc3734152fba..fd3c058304fd 100644 --- a/keyboards/tanuki/rules.mk +++ b/keyboards/tanuki/rules.mk @@ -65,6 +65,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID TAP_DANCE_ENABLE = no -ifndef QUANTUM_DIR - include ../../Makefile -endif diff --git a/keyboards/the_ruler/keymaps/default/rules.mk b/keyboards/the_ruler/keymaps/default/rules.mk index b491f5b3f3fe..2791cc1054b7 100644 --- a/keyboards/the_ruler/keymaps/default/rules.mk +++ b/keyboards/the_ruler/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/0010/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/default/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk index 159fd7dc6c34..9da4bf91a571 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/rules.mk @@ -32,6 +32,3 @@ # RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk index 61124112405f..f9d8b0eb0995 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/rules.mk @@ -7,6 +7,3 @@ MOUSEKEY_ENABLE = no # Mouse keys(+4700) NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work TAP_DANCE_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/core/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/jeebak/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk index b2c421c4dc2b..8e22f3051daf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/mjt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/smt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk index 1e006e94724b..f5556c8fcbae 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/tong92/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk b/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk +++ b/keyboards/thevankeyboards/minivan/keymaps/xyverz/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk index ba4b4fec0c6f..676e9a6e0adc 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/khord/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = no # Enable Tap Dance functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk index 3ff14772511e..7a331cd530cf 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/singles/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk index 030d27f2a622..38fa7790bd95 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk +++ b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/rules.mk @@ -17,6 +17,3 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Enable Tap Dance functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/rules.mk b/keyboards/vision_division/keymaps/default/rules.mk index 342f37453c09..69a3b2cd297d 100644 --- a/keyboards/vision_division/keymaps/default/rules.mk +++ b/keyboards/vision_division/keymaps/default/rules.mk @@ -16,6 +16,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk b/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk index 8eb483103c3f..c9c8cbea51cc 100644 --- a/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk +++ b/keyboards/whitefox/keymaps/jetpacktuxedo/rules.mk @@ -1,5 +1,2 @@ -ifndef QUANTUM_DIR - include ../../../Makefile -endif - BACKLIGHT_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/adi/rules.mk b/keyboards/xd75/keymaps/adi/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/adi/rules.mk +++ b/keyboards/xd75/keymaps/adi/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/atomic_style/rules.mk b/keyboards/xd75/keymaps/atomic_style/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/atomic_style/rules.mk +++ b/keyboards/xd75/keymaps/atomic_style/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/bbaserdem/rules.mk b/keyboards/xd75/keymaps/bbaserdem/rules.mk index 4839c644f8b2..3e501cd00ee6 100644 --- a/keyboards/xd75/keymaps/bbaserdem/rules.mk +++ b/keyboards/xd75/keymaps/bbaserdem/rules.mk @@ -5,6 +5,3 @@ RGBLIGHT_ENABLE = no # LED strips TAP_DANCE_ENABLE = no # Use multi-tap features AUDIO_ENABLE = no # Audio stuff -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/default/rules.mk b/keyboards/xd75/keymaps/default/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/default/rules.mk +++ b/keyboards/xd75/keymaps/default/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk b/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk index 64484d3eee5e..7708eba6a188 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/rules.mk @@ -13,8 +13,5 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - TAP_DANCE_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/emilyh/rules.mk b/keyboards/xd75/keymaps/emilyh/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/emilyh/rules.mk +++ b/keyboards/xd75/keymaps/emilyh/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/fabian/rules.mk b/keyboards/xd75/keymaps/fabian/rules.mk index f1ae8d44a17e..8831f2d62508 100644 --- a/keyboards/xd75/keymaps/fabian/rules.mk +++ b/keyboards/xd75/keymaps/fabian/rules.mk @@ -32,6 +32,3 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/french/rules.mk b/keyboards/xd75/keymaps/french/rules.mk index dfd79792fa5b..324d9ebd059e 100644 --- a/keyboards/xd75/keymaps/french/rules.mk +++ b/keyboards/xd75/keymaps/french/rules.mk @@ -15,6 +15,3 @@ RGBLIGHT_ENABLE = no -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/germanized/rules.mk b/keyboards/xd75/keymaps/germanized/rules.mk index f57fb8c54e68..ab81a5360980 100644 --- a/keyboards/xd75/keymaps/germanized/rules.mk +++ b/keyboards/xd75/keymaps/germanized/rules.mk @@ -33,6 +33,3 @@ RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend TAP_DANCE_ENABLE = yes # Enable Tap Dancing -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk b/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk index 7e4ed0837bbc..4c894d797387 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk +++ b/keyboards/xd75/keymaps/kim-kim-xd73/rules.mk @@ -20,6 +20,3 @@ # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/kim-kim/rules.mk b/keyboards/xd75/keymaps/kim-kim/rules.mk index 7e4ed0837bbc..4c894d797387 100644 --- a/keyboards/xd75/keymaps/kim-kim/rules.mk +++ b/keyboards/xd75/keymaps/kim-kim/rules.mk @@ -20,6 +20,3 @@ # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/kloki/rules.mk b/keyboards/xd75/keymaps/kloki/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/kloki/rules.mk +++ b/keyboards/xd75/keymaps/kloki/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/markus/rules.mk b/keyboards/xd75/keymaps/markus/rules.mk index febb446f8918..d0ed9a73ae15 100644 --- a/keyboards/xd75/keymaps/markus/rules.mk +++ b/keyboards/xd75/keymaps/markus/rules.mk @@ -21,6 +21,3 @@ API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/mtdjr/rules.mk b/keyboards/xd75/keymaps/mtdjr/rules.mk index 28462ff160f1..6b7d69d4f2c9 100644 --- a/keyboards/xd75/keymaps/mtdjr/rules.mk +++ b/keyboards/xd75/keymaps/mtdjr/rules.mk @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - BACKLIGHT_ENABLE = yes TAP_DANCE_ENABLE = yes RGBLIGHT_ENABLE = yes + diff --git a/keyboards/xd75/keymaps/skewwhiffy/rules.mk b/keyboards/xd75/keymaps/skewwhiffy/rules.mk index d4e08cfb26be..52a8f38d45ff 100644 --- a/keyboards/xd75/keymaps/skewwhiffy/rules.mk +++ b/keyboards/xd75/keymaps/skewwhiffy/rules.mk @@ -13,6 +13,3 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/xd75/keymaps/tdl-jturner/rules.mk b/keyboards/xd75/keymaps/tdl-jturner/rules.mk index 186b452fc634..996d77045e2f 100644 --- a/keyboards/xd75/keymaps/tdl-jturner/rules.mk +++ b/keyboards/xd75/keymaps/tdl-jturner/rules.mk @@ -13,11 +13,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - TAP_DANCE_ENABLE = yes MOUSEKEY_ENABLE = yes BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes + diff --git a/keyboards/ymd75/rules.mk b/keyboards/ymd75/rules.mk index c9baf1316725..9697a76f1e86 100644 --- a/keyboards/ymd75/rules.mk +++ b/keyboards/ymd75/rules.mk @@ -57,10 +57,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC = matrix.c i2c.c backlight.c -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/zen/keymaps/default/rules.mk b/keyboards/zen/keymaps/default/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/zen/keymaps/default/rules.mk +++ b/keyboards/zen/keymaps/default/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/zen/keymaps/jwlawrence/rules.mk b/keyboards/zen/keymaps/jwlawrence/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/zen/keymaps/jwlawrence/rules.mk +++ b/keyboards/zen/keymaps/jwlawrence/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/zen/keymaps/xyverz/rules.mk b/keyboards/zen/keymaps/xyverz/rules.mk index 22b6ec476625..73142a16803a 100644 --- a/keyboards/zen/keymaps/xyverz/rules.mk +++ b/keyboards/zen/keymaps/xyverz/rules.mk @@ -1,6 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/zinc/keymaps/monks/rules.mk b/keyboards/zinc/keymaps/monks/rules.mk index a5335def8718..eeabc004c376 100644 --- a/keyboards/zinc/keymaps/monks/rules.mk +++ b/keyboards/zinc/keymaps/monks/rules.mk @@ -90,11 +90,8 @@ endif # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - # Uncomment these for debugging # $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) # $(info -- OPT_DEFS=$(OPT_DEFS)) # $(info ) + diff --git a/layouts/community/ergodox/berfarah/rules.mk b/layouts/community/ergodox/berfarah/rules.mk index a87325037294..abd95b50087a 100644 --- a/layouts/community/ergodox/berfarah/rules.mk +++ b/layouts/community/ergodox/berfarah/rules.mk @@ -14,6 +14,3 @@ ifeq (${FORCE_NKRO},yes) OPT_DEFS += -DFORCE_NKRO endif -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/layouts/community/ortho_4x12/grahampheath/rules.mk b/layouts/community/ortho_4x12/grahampheath/rules.mk index 457a3d01d4a4..e69de29bb2d1 100644 --- a/layouts/community/ortho_4x12/grahampheath/rules.mk +++ b/layouts/community/ortho_4x12/grahampheath/rules.mk @@ -1,3 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/layouts/community/ortho_4x12/xyverz/rules.mk b/layouts/community/ortho_4x12/xyverz/rules.mk index c181e11072c5..f52fe17540ed 100644 --- a/layouts/community/ortho_4x12/xyverz/rules.mk +++ b/layouts/community/ortho_4x12/xyverz/rules.mk @@ -9,6 +9,3 @@ else RGBLIGHT_ENABLE = yes endif -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/users/losinggeneration/rules.mk b/users/losinggeneration/rules.mk index 75277116b244..295367fbcabd 100644 --- a/users/losinggeneration/rules.mk +++ b/users/losinggeneration/rules.mk @@ -11,6 +11,3 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700) TAP_DANCE_ENABLE = yes # Enable tap dancing #UNICODE_ENABLE = no # Unicode -ifndef QUANTUM_DIR - include ../../../../Makefile -endif From aff5c49ee950be410cc82ada0acc375dc89007f3 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 15:27:21 -0800 Subject: [PATCH 066/458] Layouts: add 65_iso (#4778) --- layouts/default/65_iso/default_65_iso/keymap.c | 12 ++++++++++++ layouts/default/65_iso/layout.json | 5 +++++ layouts/default/65_iso/readme.md | 5 +++++ 3 files changed, 22 insertions(+) create mode 100644 layouts/default/65_iso/default_65_iso/keymap.c create mode 100644 layouts/default/65_iso/layout.json create mode 100644 layouts/default/65_iso/readme.md diff --git a/layouts/default/65_iso/default_65_iso/keymap.c b/layouts/default/65_iso/default_65_iso/keymap.c new file mode 100644 index 000000000000..085304a87f7b --- /dev/null +++ b/layouts/default/65_iso/default_65_iso/keymap.c @@ -0,0 +1,12 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* layer 0: qwerty */ + [0] = LAYOUT_65_iso(\ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ) +}; diff --git a/layouts/default/65_iso/layout.json b/layouts/default/65_iso/layout.json new file mode 100644 index 000000000000..6496e93634d6 --- /dev/null +++ b/layouts/default/65_iso/layout.json @@ -0,0 +1,5 @@ +["","","","","","","","","","","","","",{w:2},"",""], +[{w:1.5},"","","","","","","","","","","","","",{x:0.25,w:1.25,h:2,w2:1.5,h2:1,x2:-0.25},"",""], +[{w:1.75},"","","","","","","","","","","","","",{x:1.25},""], +[{w:1.25},"","","","","","","","","","","","",{w:1.75},"","",""], +[{w:1.25},"",{w:1.25},"",{w:1.25},"",{w:6.25},"","","","","","",""] diff --git a/layouts/default/65_iso/readme.md b/layouts/default/65_iso/readme.md new file mode 100644 index 000000000000..d23c157d0f2f --- /dev/null +++ b/layouts/default/65_iso/readme.md @@ -0,0 +1,5 @@ +# 65_iso + + LAYOUT_65_iso + +This is the 65% layout made popular by boards such as the [Input Club Whitefox](https://github.com/qmk/qmk_firmware/tree/master/keyboards/whitefox) and [RAMA M65-A](https://github.com/qmk/qmk_firmware/tree/master/keyboards/jc65), in ISO. From 3e45bc775e5c95fc206097564112d47002da3d5d Mon Sep 17 00:00:00 2001 From: Jordi Pakey-Rodriguez <0xdec@users.noreply.github.com> Date: Fri, 4 Jan 2019 23:28:01 +0000 Subject: [PATCH 067/458] Add novelpad 0xdec keymap (#4779) --- keyboards/novelpad/{readme.md => README.md} | 0 keyboards/novelpad/keymaps/0xdec/keymap.c | 59 +++++++++++++++++++++ 2 files changed, 59 insertions(+) rename keyboards/novelpad/{readme.md => README.md} (100%) create mode 100755 keyboards/novelpad/keymaps/0xdec/keymap.c diff --git a/keyboards/novelpad/readme.md b/keyboards/novelpad/README.md similarity index 100% rename from keyboards/novelpad/readme.md rename to keyboards/novelpad/README.md diff --git a/keyboards/novelpad/keymaps/0xdec/keymap.c b/keyboards/novelpad/keymaps/0xdec/keymap.c new file mode 100755 index 000000000000..429e6c5b3f83 --- /dev/null +++ b/keyboards/novelpad/keymaps/0xdec/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2018 Jordi Pakey-Rodriguez + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + LT(1, KC_NLCK), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PEQL, + KC_P1, KC_P2, KC_P3, KC_TAB, + KC_PCMM, KC_P0, KC_PDOT, KC_PENT + ), + + [1] = LAYOUT( + _______, RESET, BL_STEP, RGB_TOG, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, + RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, + RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G + ), + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +void matrix_init_user(void) {} + +void matrix_scan_user(void) {} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) {} + return true; +} + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // Illuminate the LED under the Num Lock key + rgblight_sethsv_at(0, 0, 127, 1); + } else { + rgblight_sethsv_at(0, 0, 0, 1); + } +} From 3527efcbd21231cf9e7bf7a8de0fa02aa177a957 Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Sat, 5 Jan 2019 16:38:22 +1100 Subject: [PATCH 068/458] Adding keyboards/handwire/numbrero (#4773) * add snagpad * Update keyboards/snagpad/kb.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename kb.c to snagpad.c * Update and rename kb.h to snagpad.h * Update snagpad.h * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update README.md * Add files via upload * Update info.json * Update keymap.c * Update snagpad.h * Delete snagpad_numpad.json * Delete snagpad_ortho.json * Update README.md * Update keyboards/snagpad/info.json Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * add tradestation * --all * Did something weird messing with git -_- hopefully fixed * Update keyboards/tradestation/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update snagpad.h * Update rules.mk * Update keymap.c * fixed merge conflict, updated to LAYOUT_numpad_5x4 * relocated to handwire, updated naming, added layouts to rules.mk * Update keyboards/handwired/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename LICENSE to license * Rename README.md to readme.md * Rename LICENSE to license * Rename README.md to readme.md * Update info.json * Update keymap.c * Update info.json * Adding Numbrero QMK to Handwire Repository * Update config.h * Update readme.md * Update keyboards/handwired/numbrero/numbrero.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keymap.c * Update keyboards/handwired/numbrero/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> --- keyboards/handwired/numbrero/config.h | 51 +++++ keyboards/handwired/numbrero/info.json | 15 ++ .../numbrero/keymaps/default/keymap.c | 30 +++ keyboards/handwired/numbrero/license | 201 ++++++++++++++++++ keyboards/handwired/numbrero/numbrero.c | 1 + keyboards/handwired/numbrero/numbrero.h | 30 +++ keyboards/handwired/numbrero/readme.md | 15 ++ keyboards/handwired/numbrero/rules.mk | 59 +++++ keyboards/snagpad/info.json | 9 +- 9 files changed, 407 insertions(+), 4 deletions(-) create mode 100644 keyboards/handwired/numbrero/config.h create mode 100644 keyboards/handwired/numbrero/info.json create mode 100644 keyboards/handwired/numbrero/keymaps/default/keymap.c create mode 100644 keyboards/handwired/numbrero/license create mode 100644 keyboards/handwired/numbrero/numbrero.c create mode 100644 keyboards/handwired/numbrero/numbrero.h create mode 100644 keyboards/handwired/numbrero/readme.md create mode 100644 keyboards/handwired/numbrero/rules.mk diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/handwired/numbrero/config.h new file mode 100644 index 000000000000..cbcb1d826131 --- /dev/null +++ b/keyboards/handwired/numbrero/config.h @@ -0,0 +1,51 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT Numbrero +#define DESCRIPTION Pro Micro-powered Reversible L/H Numpad with Extra Macro Keys + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 5 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F6, B5, B4, E6, F7 } +#define MATRIX_COL_PINS { D1, D0, D4, F5, F4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/handwired/numbrero/info.json b/keyboards/handwired/numbrero/info.json new file mode 100644 index 000000000000..85c4b48275ef --- /dev/null +++ b/keyboards/handwired/numbrero/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Numbrero", + "url": "", + "maintainer": "Flehrad", + "width": 5, + "height": 5, + "layouts": { + "LAYOUT_numbrero_numpad": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1, "h":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "h":2}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4, "w":2}, {"x":3, "y":4}] + }, + "LAYOUT_numbrero_ortho": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}] + } + } +} diff --git a/keyboards/handwired/numbrero/keymaps/default/keymap.c b/keyboards/handwired/numbrero/keymaps/default/keymap.c new file mode 100644 index 000000000000..903ed8d88c55 --- /dev/null +++ b/keyboards/handwired/numbrero/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_numbrero_numpad( + KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_P7, KC_P8, KC_P9, + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_TRNS, KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + LAYOUT_numbrero_ortho( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/handwired/numbrero/license b/keyboards/handwired/numbrero/license new file mode 100644 index 000000000000..b09cd7856d58 --- /dev/null +++ b/keyboards/handwired/numbrero/license @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/handwired/numbrero/numbrero.c b/keyboards/handwired/numbrero/numbrero.c new file mode 100644 index 000000000000..d3ec36904a49 --- /dev/null +++ b/keyboards/handwired/numbrero/numbrero.c @@ -0,0 +1 @@ +#include "numbrero.h" diff --git a/keyboards/handwired/numbrero/numbrero.h b/keyboards/handwired/numbrero/numbrero.h new file mode 100644 index 000000000000..d4aff8b88059 --- /dev/null +++ b/keyboards/handwired/numbrero/numbrero.h @@ -0,0 +1,30 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_numbrero_numpad( \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, K14, \ + K30, K31, K32, K33, \ + K41, K43, K34 \ +) { \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, KC_NO }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, KC_NO, K43, KC_NO } \ +} +#define LAYOUT_numbrero_ortho(\ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, \ + K30, K31, K32, K33, K34, \ + K41, K42, K43, K44 \ +){ \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, K24 }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, K42, K43, K44 } \ +} diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/handwired/numbrero/readme.md new file mode 100644 index 000000000000..a69eeefd4355 --- /dev/null +++ b/keyboards/handwired/numbrero/readme.md @@ -0,0 +1,15 @@ +# Numbrero + +No picture currently available. + +A Reversible Numpad (Left/Right handed) with extra macro keys. + +Keyboard Maintainer: [Flehrad](https://github.com/flehrad) +Hardware Supported: Numbrero PCB. +Hardware Availability: The Board Podcast Slack + +Make example for this keyboard (after setting up your build environment): + + make handwired/numbrero/numbrero:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/numbrero/rules.mk b/keyboards/handwired/numbrero/rules.mk new file mode 100644 index 000000000000..bda6c866e215 --- /dev/null +++ b/keyboards/handwired/numbrero/rules.mk @@ -0,0 +1,59 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +#Bootloder +#Pro Micro = caterina +BOOTLOADER = caterina + +# Boot Section Size in *bytes* +#OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json index ffaa5c0a74e0..f6b19ee81ee2 100644 --- a/keyboards/snagpad/info.json +++ b/keyboards/snagpad/info.json @@ -6,11 +6,12 @@ "width": 4, "height": 5, "layouts": { - "LAYOUT_ortho_5x4": { + + "LAYOUT_ortho_5x4": { "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}] - }, + }, "LAYOUT_numpad_5x4": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":1, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":3, "y":3, "h":2}] - } + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}] + } } } From d6cc90d0277cf084ab16215190ad64d24164f1bc Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 4 Jan 2019 21:47:13 -0800 Subject: [PATCH 069/458] S65-X and S65-Plus updates and refactoring (#4780) * S65-X: remove S65-Plus support The original QMK codebase for the Sentraq S65-X actually supported both the S65-X and the S65-Plus. In the interim, the S65-Plus has been broken off into its own directory. This commit removes support for the S65-Plus from the `keyboards/s65_x/` directory, as that code has been superseded by the code in the S65-Plus directory (`keyboards/s65_plus/`). - deleted S65-Plus layout macros from s65_x.h and info.json - deleted s65plus keymap directory - removed references to the unused column pins - removed the two unused columns for the switch matrices - renamed switch K300 in LAYOUT_ansi to K301 (reflects matrix position) - renamed switch K214 in LAYOUT_iso to K114 (reflects matrix position) * S65-X: keymap refactor - all keymaps now use #include QMK_KEYBOARD_H - default and iso keymaps refactored for readability - deleted redundant KC_TRNS and KC_NO keycode definitions from smt keymap * S65-X: readme update - updated Hardware Availability link - updated Docs links * S65-Plus: add LAYOUT_iso data Adds LAYOUT_iso macro to s65_plus.h and info.json, and an ISO layout version of the default keymap. * S65-Plus: refactor default keymap - refactor for alignment/readability - removed fn_actions code block - add empty process_record_user block * S65-Plus: readme update - Hardware Availability link is now a hyperlink - updated Docs links * S65-X: enable 65_ansi and 65_iso community layouts Thi commit allows the Sentraq S65-X to use the 65_ansi and 65_iso community layouts. - LAYOUT_ansi renamed to LAYOUT_65_ansi - LAYOUT_iso renamed to LAYOUT_65_iso - added LAYOUTS rule to rules.mk --- keyboards/s65_plus/info.json | 86 ++++++++++- keyboards/s65_plus/keymaps/default/keymap.c | 71 ++++----- keyboards/s65_plus/keymaps/iso/keymap.c | 56 +++++++ keyboards/s65_plus/keymaps/iso/readme.md | 3 + keyboards/s65_plus/readme.md | 4 +- keyboards/s65_plus/s65_plus.h | 15 +- keyboards/s65_x/config.h | 4 +- keyboards/s65_x/info.json | 157 ++++++++++++++++++-- keyboards/s65_x/keymaps/default/keymap.c | 155 ++++++++++--------- keyboards/s65_x/keymaps/iso/keymap.c | 155 ++++++++++--------- keyboards/s65_x/keymaps/kelorean/keymap.c | 14 +- keyboards/s65_x/keymaps/nall/keymap.c | 10 +- keyboards/s65_x/keymaps/s65plus/keymap.c | 30 ---- keyboards/s65_x/keymaps/s65plus/readme.md | 5 - keyboards/s65_x/keymaps/smt/keymap.c | 16 +- keyboards/s65_x/readme.md | 4 +- keyboards/s65_x/rules.mk | 2 + keyboards/s65_x/s65_x.h | 90 ++++++----- 18 files changed, 561 insertions(+), 316 deletions(-) create mode 100644 keyboards/s65_plus/keymaps/iso/keymap.c create mode 100644 keyboards/s65_plus/keymaps/iso/readme.md delete mode 100644 keyboards/s65_x/keymaps/s65plus/keymap.c delete mode 100644 keyboards/s65_x/keymaps/s65plus/readme.md diff --git a/keyboards/s65_plus/info.json b/keyboards/s65_plus/info.json index 14c5b08d911b..1b17ddb53da1 100644 --- a/keyboards/s65_plus/info.json +++ b/keyboards/s65_plus/info.json @@ -6,6 +6,7 @@ "height": 5, "layouts": { "LAYOUT_ansi": { + "key_count": 78, "layout": [ {"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, @@ -86,7 +87,90 @@ {"label":"DOWN", "x":16, "y":4}, {"label":"RIGHT", "x":17, "y":4} ] + }, + "LAYOUT_iso": { + "key_count": 79, + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"ESC", "x":2, "y":0}, + {"label":"1", "x":3, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"7", "x":9, "y":0}, + {"label":"8", "x":10, "y":0}, + {"label":"9", "x":11, "y":0}, + {"label":"0", "x":12, "y":0}, + {"label":"MINUS", "x":13, "y":0}, + {"label":"EQUAL", "x":14, "y":0}, + {"label":"BACKSPACE", "x":15, "y":0, "w":2}, + {"label":"DELETE", "x":17, "y":0}, + {"label":"F3", "x":0, "y":1}, + {"label":"F4", "x":1, "y":1}, + {"label":"TAB", "x":2, "y":1, "w":1.5}, + {"label":"Q", "x":3.5, "y":1}, + {"label":"W", "x":4.5, "y":1}, + {"label":"E", "x":5.5, "y":1}, + {"label":"R", "x":6.5, "y":1}, + {"label":"T", "x":7.5, "y":1}, + {"label":"Y", "x":8.5, "y":1}, + {"label":"U", "x":9.5, "y":1}, + {"label":"I", "x":10.5, "y":1}, + {"label":"O", "x":11.5, "y":1}, + {"label":"P", "x":12.5, "y":1}, + {"label":"LBRACKET", "x":13.5, "y":1}, + {"label":"RBRACKET", "x":14.5, "y":1}, + {"label":"PAGEUP", "x":17, "y":1}, + {"label":"F5", "x":0, "y":2}, + {"label":"F6", "x":1, "y":2}, + {"label":"CAPSLOCK", "x":2, "y":2, "w":1.75}, + {"label":"A", "x":3.75, "y":2}, + {"label":"S", "x":4.75, "y":2}, + {"label":"D", "x":5.75, "y":2}, + {"label":"F", "x":6.75, "y":2}, + {"label":"G", "x":7.75, "y":2}, + {"label":"H", "x":8.75, "y":2}, + {"label":"J", "x":9.75, "y":2}, + {"label":"K", "x":10.75, "y":2}, + {"label":"L", "x":11.75, "y":2}, + {"label":"SEMICOLON", "x":12.75, "y":2}, + {"label":"QUOTE", "x":13.75, "y":2}, + {"label":"ISOHASH", "x":14.75, "y":2}, + {"label":"ENTER", "x":15.75, "y":1, "w":1.25, "h":2}, + {"label":"PAGEDOWN", "x":17, "y":2}, + {"label":"F7", "x":0, "y":3}, + {"label":"F8", "x":1, "y":3}, + {"label":"LSHIFT", "x":2, "y":3, "w":1.25}, + {"label":"ISOBACKSLASH", "x":3.25, "y":3}, + {"label":"Z", "x":4.25, "y":3}, + {"label":"X", "x":5.25, "y":3}, + {"label":"C", "x":6.25, "y":3}, + {"label":"V", "x":7.25, "y":3}, + {"label":"B", "x":8.25, "y":3}, + {"label":"N", "x":9.25, "y":3}, + {"label":"M", "x":10.25, "y":3}, + {"label":"COMMA", "x":11.25, "y":3}, + {"label":"PERIOD", "x":12.25, "y":3}, + {"label":"SLASH", "x":13.25, "y":3}, + {"label":"RSHIFT", "x":14.25, "y":3, "w":1.75}, + {"label":"UP", "x":16, "y":3}, + {"label":"END", "x":17, "y":3}, + {"label":"F9", "x":0, "y":4}, + {"label":"F10", "x":1, "y":4}, + {"label":"LCTRL", "x":2, "y":4, "w":1.25}, + {"label":"LGUI", "x":3.25, "y":4, "w":1.25}, + {"label":"LALT", "x":4.5, "y":4, "w":1.25}, + {"label":"SPACE", "x":5.75, "y":4, "w":6.25}, + {"label":"RALT", "x":12, "y":4}, + {"label":"FN", "x":13, "y":4}, + {"label":"RCTRL", "x":14, "y":4}, + {"label":"LEFT", "x":15, "y":4}, + {"label":"DOWN", "x":16, "y":4}, + {"label":"RIGHT", "x":17, "y":4} + ] } } } - diff --git a/keyboards/s65_plus/keymaps/default/keymap.c b/keyboards/s65_plus/keymaps/default/keymap.c index 04f6926de146..bbeea6a8fbc9 100644 --- a/keyboards/s65_plus/keymaps/default/keymap.c +++ b/keyboards/s65_plus/keymaps/default/keymap.c @@ -5,49 +5,52 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ F1 │ F2 │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│ DEL │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F3 │ F4 │ TAB │▒▒▒▒▒│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │PG_UP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F5 │ F6 │CAPSL│▒▒▒▒▒│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│PG_DN│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F7 │ F8 │▒▒▒▒▒│LSHFT│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │ END │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ F9 │ F10 │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │RCTL │LEFT │DOWN │RIGHT│ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │F1 │F2 │Esc│1 !│2 "│3 £│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │F3 │F4 │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│\ | │End│ + * ├───┼───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │F5 │F6 │CapsLk│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' "│Enter │PUp│ + * ├───┼───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │F7 │F8 │Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├───┼───┼────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │F9 │F10│Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ /* 0: ANSI qwerty */ [_BL] = LAYOUT_ansi( - KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ - KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, \ - KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ - KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, \ + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, \ + KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), /* 1: LED layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │RESET│ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│BLTOG│BLSTP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │▒▒▒▒▒│ │UGTOG│UGMOD│UGHUI│UGHUD│UGSAI│UGSAD│UGVAI│UGVAD│ │ │▒▒▒▒▒│ │VOLU │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │PREV │VOLD │NEXT │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │RST│ │ │ │ │ │ │ │ │ │ │ │ │BLTog │BSt│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │RTg│RMd│RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │VUp│ │ + * ├───┼───┼────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │Prv│VDn│Nxt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ [_AL] = LAYOUT_ansi( - KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, BL_STEP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT) + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) }; -const uint16_t PROGMEM fn_actions[] = { -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/s65_plus/keymaps/iso/keymap.c b/keyboards/s65_plus/keymaps/iso/keymap.c new file mode 100644 index 000000000000..2218d051fd09 --- /dev/null +++ b/keyboards/s65_plus/keymaps/iso/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _AL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: Main layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │F1 │F2 │Esc│1 !│2 "│3 £│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │F3 │F4 │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│Enter│End│ + * ├───┼───├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │F5 │F6 │CapsLk│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' @│# ~│ │PUp│ + * ├───┼───┼────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │F7 │F8 │Sft │\ |│ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├───┼───┼────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │F9 │F10│Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + + /* 0: ISO qwerty */ + [_BL] = LAYOUT_iso( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \ + KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, \ + KC_F7, KC_F8, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_AL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + + /* 1: LED layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │RST│ │ │ │ │ │ │ │ │ │ │ │ │BLTog │BSt│ + * ├───┼───┼───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┼───┼────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │ │ │RTg│RMd│RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │VUp│ │ + * ├───┼───┼────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │Prv│VDn│Nxt│ + * └───┴───┴────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ + + [_AL] = LAYOUT_iso( + _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/s65_plus/keymaps/iso/readme.md b/keyboards/s65_plus/keymaps/iso/readme.md new file mode 100644 index 000000000000..de1d9adf803c --- /dev/null +++ b/keyboards/s65_plus/keymaps/iso/readme.md @@ -0,0 +1,3 @@ +# iso + +An ISO layout version of the default keymap. diff --git a/keyboards/s65_plus/readme.md b/keyboards/s65_plus/readme.md index 426a6612d811..b1ee865bfc82 100644 --- a/keyboards/s65_plus/readme.md +++ b/keyboards/s65_plus/readme.md @@ -5,10 +5,10 @@ DIY 65% keyboard from Sentraq. Keyboard Maintainer: QMK Community Hardware Supported: S65-PLUS PCB -Hardware Availability: https://sentraq.com/collections/kits/products/s65-plus-diy-keyboard-kit +Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/s65-plus-diy-keyboard-kit) Make example for this keyboard (after setting up your build environment): make s65_plus:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/s65_plus/s65_plus.h b/keyboards/s65_plus/s65_plus.h index 107557108578..95d06122e061 100644 --- a/keyboards/s65_plus/s65_plus.h +++ b/keyboards/s65_plus/s65_plus.h @@ -16,6 +16,19 @@ { K400, K401, K402, K403, K404, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417 } \ } +#define LAYOUT_iso( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K016, K017, \ + K100, K101, K102, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K117, \ + K200, K201, K202, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K116, K217, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K315, K316, K317, \ + K400, K401, K402, K403, K404, K408, K412, K413, K414, K415, K416, K417 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, KC_NO, K016, K017 }, \ + { K100, K101, K102, KC_NO, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117 }, \ + { K200, K201, K202, KC_NO, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, KC_NO, K217 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, K315, K316, K317 }, \ + { K400, K401, K402, K403, K404, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K412, K413, K414, K415, K416, K417 } \ +} + void matrix_init_user(void); void matrix_scan_user(void); - diff --git a/keyboards/s65_x/config.h b/keyboards/s65_x/config.h index 367efc526c68..aed55632ab43 100644 --- a/keyboards/s65_x/config.h +++ b/keyboards/s65_x/config.h @@ -13,11 +13,11 @@ /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 18 +#define MATRIX_COLS 16 /* key matrix pins */ #define MATRIX_ROW_PINS { C7, C6, B6, B5, B4 } -#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } +#define MATRIX_COL_PINS { F4, F1, F0, E6, B0, B1, D5, B2, B3, D0, D1, D2, D4, D6, D7, F7 } #define UNUSED_PINS /* number of backlight levels */ diff --git a/keyboards/s65_x/info.json b/keyboards/s65_x/info.json index 74c805e2454b..9aeb7eb7dedd 100644 --- a/keyboards/s65_x/info.json +++ b/keyboards/s65_x/info.json @@ -2,24 +2,155 @@ "keyboard_name": "S65-X PCB", "url": "", "maintainer": "qmk", - "width": 18, + "width": 16, "height": 5, "layouts": { - "LAYOUT_ansi": { + "LAYOUT_65_ansi": { "key_count": 68, - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Delete", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Delete", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Page Up", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Down", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] }, - "LAYOUT_iso": { + "LAYOUT_65_iso": { "key_count": 69, - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Delete", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"PgDn", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"AltGr", "x":10, "y":4}, {"label":"Fn", "x":11, "y":4}, {"label":"Ctrl", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - }, - "LAYOUT_plus_ansi": { - "key_count": 78, - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2, "y":0}, {"label":"!", "x":3, "y":0}, {"label":"@", "x":4, "y":0}, {"label":"#", "x":5, "y":0}, {"label":"$", "x":6, "y":0}, {"label":"%", "x":7, "y":0}, {"label":"^", "x":8, "y":0}, {"label":"&", "x":9, "y":0}, {"label":"*", "x":10, "y":0}, {"label":"(", "x":11, "y":0}, {"label":")", "x":12, "y":0}, {"label":"_", "x":13, "y":0}, {"label":"+", "x":14, "y":0}, {"label":"Backspace", "x":15, "y":0, "w":2}, {"label":"Delete", "x":17, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2, "y":1, "w":1.5}, {"label":"Q", "x":3.5, "y":1}, {"label":"W", "x":4.5, "y":1}, {"label":"E", "x":5.5, "y":1}, {"label":"R", "x":6.5, "y":1}, {"label":"T", "x":7.5, "y":1}, {"label":"Y", "x":8.5, "y":1}, {"label":"U", "x":9.5, "y":1}, {"label":"I", "x":10.5, "y":1}, {"label":"O", "x":11.5, "y":1}, {"label":"P", "x":12.5, "y":1}, {"label":"{", "x":13.5, "y":1}, {"label":"}", "x":14.5, "y":1}, {"label":"|", "x":15.5, "y":1, "w":1.5}, {"label":"PgUp", "x":17, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2, "y":2, "w":1.75}, {"label":"A", "x":3.75, "y":2}, {"label":"S", "x":4.75, "y":2}, {"label":"D", "x":5.75, "y":2}, {"label":"F", "x":6.75, "y":2}, {"label":"G", "x":7.75, "y":2}, {"label":"H", "x":8.75, "y":2}, {"label":"J", "x":9.75, "y":2}, {"label":"K", "x":10.75, "y":2}, {"label":"L", "x":11.75, "y":2}, {"label":":", "x":12.75, "y":2}, {"label":"\"", "x":13.75, "y":2}, {"label":"Enter", "x":14.75, "y":2, "w":2.25}, {"label":"PgDn", "x":17, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2, "y":3, "w":2.25}, {"label":"Z", "x":4.25, "y":3}, {"label":"X", "x":5.25, "y":3}, {"label":"C", "x":6.25, "y":3}, {"label":"V", "x":7.25, "y":3}, {"label":"B", "x":8.25, "y":3}, {"label":"N", "x":9.25, "y":3}, {"label":"M", "x":10.25, "y":3}, {"label":"<", "x":11.25, "y":3}, {"label":">", "x":12.25, "y":3}, {"label":"?", "x":13.25, "y":3}, {"label":"Shift", "x":14.25, "y":3, "w":1.75}, {"label":"\u2191", "x":16, "y":3}, {"label":"End", "x":17, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2, "y":4, "w":1.25}, {"label":"Win", "x":3.25, "y":4, "w":1.25}, {"label":"Alt", "x":4.5, "y":4, "w":1.25}, {"x":5.75, "y":4, "w":6.25}, {"label":"Alt", "x":12, "y":4}, {"label":"Fn", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"label":"\u2190", "x":15, "y":4}, {"label":"\u2193", "x":16, "y":4}, {"label":"\u2192", "x":17, "y":4}] - }, - "LAYOUT_plus_iso": { - "key_count": 79, - "layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2, "y":0}, {"label":"!", "x":3, "y":0}, {"label":"\"", "x":4, "y":0}, {"label":"\u00a3", "x":5, "y":0}, {"label":"$", "x":6, "y":0}, {"label":"%", "x":7, "y":0}, {"label":"^", "x":8, "y":0}, {"label":"&", "x":9, "y":0}, {"label":"*", "x":10, "y":0}, {"label":"(", "x":11, "y":0}, {"label":")", "x":12, "y":0}, {"label":"_", "x":13, "y":0}, {"label":"+", "x":14, "y":0}, {"label":"Backspace", "x":15, "y":0, "w":2}, {"label":"Delete", "x":17, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2, "y":1, "w":1.5}, {"label":"Q", "x":3.5, "y":1}, {"label":"W", "x":4.5, "y":1}, {"label":"E", "x":5.5, "y":1}, {"label":"R", "x":6.5, "y":1}, {"label":"T", "x":7.5, "y":1}, {"label":"Y", "x":8.5, "y":1}, {"label":"U", "x":9.5, "y":1}, {"label":"I", "x":10.5, "y":1}, {"label":"O", "x":11.5, "y":1}, {"label":"P", "x":12.5, "y":1}, {"label":"{", "x":13.5, "y":1}, {"label":"}", "x":14.5, "y":1}, {"label":"PgUp", "x":17, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2, "y":2, "w":1.75}, {"label":"A", "x":3.75, "y":2}, {"label":"S", "x":4.75, "y":2}, {"label":"D", "x":5.75, "y":2}, {"label":"F", "x":6.75, "y":2}, {"label":"G", "x":7.75, "y":2}, {"label":"H", "x":8.75, "y":2}, {"label":"J", "x":9.75, "y":2}, {"label":"K", "x":10.75, "y":2}, {"label":"L", "x":11.75, "y":2}, {"label":":", "x":12.75, "y":2}, {"label":"@", "x":13.75, "y":2}, {"label":"~", "x":14.75, "y":2}, {"label":"Enter", "x":15.75, "y":1, "w":1.25, "h":2}, {"label":"PgDn", "x":17, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2, "y":3, "w":1.25}, {"label":"|", "x":3.25, "y":3}, {"label":"Z", "x":4.25, "y":3}, {"label":"X", "x":5.25, "y":3}, {"label":"C", "x":6.25, "y":3}, {"label":"V", "x":7.25, "y":3}, {"label":"B", "x":8.25, "y":3}, {"label":"N", "x":9.25, "y":3}, {"label":"M", "x":10.25, "y":3}, {"label":"<", "x":11.25, "y":3}, {"label":">", "x":12.25, "y":3}, {"label":"?", "x":13.25, "y":3}, {"label":"Shift", "x":14.25, "y":3, "w":1.75}, {"label":"\u2191", "x":16, "y":3}, {"label":"End", "x":17, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2, "y":4, "w":1.25}, {"label":"Win", "x":3.25, "y":4, "w":1.25}, {"label":"Alt", "x":4.5, "y":4, "w":1.25}, {"x":5.75, "y":4, "w":6.25}, {"label":"AltGr", "x":12, "y":4}, {"label":"Fn", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}, {"label":"\u2190", "x":15, "y":4}, {"label":"\u2193", "x":16, "y":4}, {"label":"\u2192", "x":17, "y":4}] + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Delete", "x":15, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"Page Up", "x":15, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"#", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Down", "x":15, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Up", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"AltGr", "x":10, "y":4}, + {"label":"Fn", "x":11, "y":4}, + {"label":"Ctrl", "x":12, "y":4}, + {"label":"Left", "x":13, "y":4}, + {"label":"Down", "x":14, "y":4}, + {"label":"Right", "x":15, "y":4} + ] } } } diff --git a/keyboards/s65_x/keymaps/default/keymap.c b/keyboards/s65_x/keymaps/default/keymap.c index 3d0b9d72d74a..a2fd12ed60f8 100644 --- a/keyboards/s65_x/keymaps/default/keymap.c +++ b/keyboards/s65_x/keymaps/default/keymap.c @@ -1,103 +1,102 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _AL 1 #define _FL 2 #define _UL 3 +#define FL_CAPS LT(_FL, KC_CAPS) // Tap to toggle caps lock and hold to activate function layer + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer, swapped alt and GUI for Mac - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │█████│END │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │▒▒▒▒▒│ENTER│█████│PG_UP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │GE │1 !│2 @│3 #│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│\ | │End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' "│Enter │PUp│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│Alt │GUI │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ /* 0: ANSI qwerty */ - [_BL] = LAYOUT_ansi( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ - F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [_BL] = LAYOUT_65_ansi( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ + FL_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ Up │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │▒▒▒▒▒│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │Up │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lft│Dwn│Rgt│ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_AL] = LAYOUT_ansi( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_AL] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* 2: Fn layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │ │Home │End │▒▒▒▒▒│ │Vol+ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │_AL│Up │ │ │ │ │ │PUp│PDn│PSc│SLk│Pau│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │Lft│Dwn│Rgt│ │ │Lft│Dwn│Up │Rgt│ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │_UL│ │ │ │ │ │ │Hm │End│ │ │VUp│ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Mut│VDn│Ply│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_FL] = LAYOUT_ansi( - KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), + [_FL] = LAYOUT_65_ansi( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, \ + _______, TG(_UL), _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY \ + ), + /* 3: Locking layer for controlling the underglow - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │BL On│BL St│ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ On │Mode │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │▒▒▒▒▒│ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │BTg│BSt│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │RTg│RMd│ │ │ │ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │ │ │ │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_UL] = LAYOUT_ansi( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_UL] = LAYOUT_65_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay -}; - diff --git a/keyboards/s65_x/keymaps/iso/keymap.c b/keyboards/s65_x/keymaps/iso/keymap.c index 9e888d9a87b2..f5a0a86306fb 100644 --- a/keyboards/s65_x/keymaps/iso/keymap.c +++ b/keyboards/s65_x/keymaps/iso/keymap.c @@ -1,103 +1,102 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _AL 1 #define _FL 2 #define _UL 3 +#define FL_CAPS LT(_FL, KC_CAPS) // Tap to toggle caps lock and hold to activate function layer + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* 0: Main layer, swapped alt and GUI for Mac - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ ESC │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │▒▒▒▒▒│BKSPC│DEL │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ TAB │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │▒▒▒▒▒│▒▒▒▒▒│END │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │CAPSL│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ ~ │▒▒▒▒▒│ENTER│PG_UP│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │GE │1 !│2 "│3 £│4 $│5 %│6 ^│7 &│8 *│9 (│0 )│- _│= +│Bksp │Del│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │[ {│] }│Enter│End│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │; :│' @│# ~│ │PUp│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │Sft │\ |│ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ /* 0: ISO qwerty */ - [_BL] = LAYOUT_iso( - KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_END, \ - F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_GRAVE, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT), + [_BL] = LAYOUT_65_iso( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_END, \ + FL_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), /* 1: Locking arrow keys to WASD for when you need dedicated arrow keys - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ Up │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │ │Up │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │Lft│Dwn│Rgt│ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_AL] = LAYOUT_iso( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_AL] = LAYOUT_65_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* 2: Fn layer - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │GRAVE│ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ _AL │ Up │ │ │ │ │ │PGUP │PGDWN│PRTSC│SCLCK│PAUSE│▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │Left │Down │Right│ │ │Left │Down │ Up │Right│ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │_UL │ │ │ │ │ │ │ │ Home│ End │▒▒▒▒▒│ │Vol+ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │` ~│F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │_AL│Up │ │ │ │ │ │PUp│PDn│PSc│SLk│Pau│ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │ │Lft│Dwn│Rgt│ │ │Lft│Dwn│Up │Rgt│ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ │ │_UL│ │ │ │ │ │ │Hm │End│ │ │VUp│ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │Mut│VDn│Ply│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_FL] = LAYOUT_iso( - KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ - KC_TRNS, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, F(3), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_MPLY), + [_FL] = LAYOUT_65_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ + _______, TG(_AL), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, \ + _______, _______, TG(_UL), _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_VOLU, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY \ + ), + /* 3: Locking layer for controlling the underglow - * ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ - * │ │ │ │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │BL On│BL St│ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ On │Mode │ │ │ │ │ │ │ │ │ │ │▒▒▒▒▒│▒▒▒▒▒│ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │Hue+ │Hue- │Sat+ │Sat- │Val+ │Val- │ │ │ │▒▒▒▒▒│ │ │ │ - * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │ │ │ │ - * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │ │BTg│BSt│ │ │ │ │ │ │ │ │ │ │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ │RTg│RMd│ │ │ │ │ │ │ │ │ │ │ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ │ │ │RH+│RH-│RS+│RS-│RV+│RV-│ │ │ │ │ │ │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │ │ │ │ │ │ │ │ │ │ │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ - [_UL] = LAYOUT_iso( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_UL] = LAYOUT_65_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; - - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(_FL), // Momentary Fn overlay - [1] = ACTION_LAYER_TOGGLE(_AL), // Toggle Arrow Layer overlay - [2] = ACTION_LAYER_TAP_KEY(_FL, KC_CAPS),// Tap to toggle caps lock and hold to activate function layer - [3] = ACTION_LAYER_TOGGLE(_UL), // Toggle Underglow Layer overlay -}; - diff --git a/keyboards/s65_x/keymaps/kelorean/keymap.c b/keyboards/s65_x/keymaps/kelorean/keymap.c index 696b664e0ca8..7a0de8559d40 100644 --- a/keyboards/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/s65_x/keymaps/kelorean/keymap.c @@ -1,4 +1,4 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _CM 1 @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_BL] = LAYOUT_ansi( + [_BL] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ F(4), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 1: Colemak layer */ - [_CM] = LAYOUT_ansi( + [_CM] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ F(4), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 2: Dvorak layer */ - [_DV] = LAYOUT_ansi( + [_DV] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_END, \ F(4), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, \ @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 3: Locking arrow keys to WASD*/ - [_AL] = LAYOUT_ansi( + [_AL] = LAYOUT_65_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_FL] = LAYOUT_ansi( + [_FL] = LAYOUT_65_ansi( KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, \ _______, F(3), KC_UP, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, _______, \ @@ -131,7 +131,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_UL] = LAYOUT_ansi( + [_UL] = LAYOUT_65_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, BL_TOGG, BL_STEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/s65_x/keymaps/nall/keymap.c b/keyboards/s65_x/keymaps/nall/keymap.c index 9361d78ba71d..a5daed006abe 100644 --- a/keyboards/s65_x/keymaps/nall/keymap.c +++ b/keyboards/s65_x/keymaps/nall/keymap.c @@ -1,4 +1,4 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _BL 0 #define _AL 1 @@ -21,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_BL] = LAYOUT_ansi( + [_BL] = LAYOUT_65_ansi( KC_GESC,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ F(2), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_AL] = LAYOUT_ansi( + [_AL] = LAYOUT_65_ansi( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -64,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_FL] = LAYOUT_ansi( + [_FL] = LAYOUT_65_ansi( KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, \ KC_TRNS, F(1), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ - [_UL] = LAYOUT_ansi( + [_UL] = LAYOUT_65_ansi( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, BL_TOGG, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ diff --git a/keyboards/s65_x/keymaps/s65plus/keymap.c b/keyboards/s65_x/keymaps/s65plus/keymap.c deleted file mode 100644 index 1f3ffa3abdea..000000000000 --- a/keyboards/s65_x/keymaps/s65plus/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include QMK_KEYBOARD_H - -#define _BL 0 -#define _FL 1 - -// readability -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: ANSI qwerty */ - [_BL] = LAYOUT_plus_ansi( \ - KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ - KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ - KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ - KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ - ), - - - [_FL] = LAYOUT_plus_ansi( \ - KC_F1, KC_F2, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_STEP, \ - KC_F3, KC_F4, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_F5, KC_F6, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_F7, KC_F8, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, KC_VOLU, _______, \ - KC_F9, KC_F10, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT \ - ), - -}; diff --git a/keyboards/s65_x/keymaps/s65plus/readme.md b/keyboards/s65_x/keymaps/s65plus/readme.md deleted file mode 100644 index f083fb8fd344..000000000000 --- a/keyboards/s65_x/keymaps/s65plus/readme.md +++ /dev/null @@ -1,5 +0,0 @@ -# S65-Plus default keymap - -This is the default keymap for the Sentraq S65-Plus. - -[S65-Plus default keymap](http://www.keyboard-layout-editor.com/##@@_a:6&f:9&w:9&d:true;&=S65-Plus%20default%20keymap&_w:9&d:true;&=%0A%0ABase%20layer;&@_a:4&f:3;&=F1&=F2&=Esc&=!%0A1&=/@%0A2&=#%0A3&=$%0A4&=%25%0A5&=%5E%0A6&=/&%0A7&=*%0A8&=(%0A9&=)%0A0&=/_%0A-&=+%0A/=&_w:2;&=Backspace&=Delete;&@=F3&=F4&_w:1.5;&=Tab&=Q&=W&=E&=R&=T&=Y&=U&=I&=O&=P&=%7B%0A%5B&=%7D%0A%5D&_w:1.5;&=%7C%0A%5C&=PgUp;&@=F5&=F6&_w:1.75;&=Caps%20Lock&=A&=S&=D&=F&=G&=H&=J&=K&=L&=/:%0A/;&=%22%0A%27&_w:2.25;&=Enter&=PgDn;&@=F7&=F8&_w:2.25;&=Shift&=Z&=X&=C&=V&=B&=N&=M&=%3C%0A,&=%3E%0A.&=?%0A//&_w:1.75;&=Shift&=%E2%86%91&=End;&@=F9&=F10&_w:1.25;&=Ctrl&_w:1.25;&=Win&_w:1.25;&=Alt&_a:7&w:6.25;&=&_a:4;&=Alt&=Fn&=Ctrl&=%E2%86%90&=%E2%86%93&=%E2%86%92;&@_x:9&a:6&f:9&w:9&d:true;&=%0A%0AFunction%20layer;&@_a:7&f:3;&=&=&_a:4;&=Reset&_a:7;&=&=&=&=&=&=&=&=&=&=&=&=&_a:4&w:2;&=Backlight%20Toggle&=Back-light%20Step;&@_a:7;&=&=&_w:1.5;&=&=&=&=&=&=&=&=&=&=&=&=&=&_w:1.5;&=&=;&@=&=&_w:1.75;&=&=&=&=&=&=&=&=&=&=&=&=&_w:2.25;&=&=;&@=&=&_w:2.25;&=&_a:4;&=RGB%20Tog-gle&=RGB%20Mode&=RGB%20Hue%20Inc&=RGB%20Hue%20Dec&=RGB%20Sat%20Inc&=RGB%20Sat%20Dec&=RGB%20Value%20Inc&=RGB%20Value%20Dec&_a:7;&=&=&_w:1.75;&=&_a:4;&=Vol%20Up&_a:7;&=;&@=&=&_w:1.25;&=&_w:1.25;&=&_w:1.25;&=&_w:6.25;&=&=&=&=&_a:4;&=Prev.%20Track%20(Win)&=Vol%20Down&=Next%20Track%20(Win)) diff --git a/keyboards/s65_x/keymaps/smt/keymap.c b/keyboards/s65_x/keymaps/smt/keymap.c index ce21859acd6b..8c3984c21f62 100644 --- a/keyboards/s65_x/keymaps/smt/keymap.c +++ b/keyboards/s65_x/keymaps/smt/keymap.c @@ -1,4 +1,4 @@ -#include "s65_x.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _COLEMAK 1 @@ -12,10 +12,6 @@ enum planck_keycodes { DVORAK }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) @@ -37,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 0: ANSI qwerty */ - [_QWERTY] = LAYOUT_ansi( + [_QWERTY] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -59,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 1: ANSI colemak */ - [_COLEMAK] = LAYOUT_ansi( + [_COLEMAK] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_PGUP, \ @@ -81,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 2: ANSI dvorak */ - [_DVORAK] = LAYOUT_ansi( + [_DVORAK] = LAYOUT_65_ansi( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_GRV, \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSLS, KC_DEL, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_PGUP, \ @@ -103,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 3: ANSI Fn layer */ - [_FL] = LAYOUT_ansi( + [_FL] = LAYOUT_65_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ _______, _______, MO(_CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ @@ -125,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ /* 4: ANSI control layer */ - [_CL] = LAYOUT_ansi( + [_CL] = LAYOUT_65_ansi( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ _______, _______, _______, _______, RESET, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, RGB_VAI, \ _______, _______, MO(_CL), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ diff --git a/keyboards/s65_x/readme.md b/keyboards/s65_x/readme.md index 5cb08c9c8f86..d1dbdb10b6af 100644 --- a/keyboards/s65_x/readme.md +++ b/keyboards/s65_x/readme.md @@ -5,10 +5,10 @@ DIY 65% keyboard from Sentraq. Keyboard Maintainer: QMK Community Hardware Supported: S65-X PCB -Hardware Availability: https://sentraq.com/collections/group-buys/products/gb-s65-x-rgb-diy-kit?variant=39246723914 +Hardware Availability: [Sentraq](https://sentraq.com/products/s65-x-rgb-diy-keyboard-kit) Make example for this keyboard (after setting up your build environment): make s65_x:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/s65_x/rules.mk b/keyboards/s65_x/rules.mk index 26a0a44b65b7..c97f7323e271 100644 --- a/keyboards/s65_x/rules.mk +++ b/keyboards/s65_x/rules.mk @@ -65,3 +65,5 @@ AUDIO_ENABLE = no # Audio output on port C6 NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable RGB light + +LAYOUTS = 65_ansi 65_iso diff --git a/keyboards/s65_x/s65_x.h b/keyboards/s65_x/s65_x.h index f6ee9d5a66d4..aef9205754c1 100644 --- a/keyboards/s65_x/s65_x.h +++ b/keyboards/s65_x/s65_x.h @@ -1,69 +1,63 @@ -#ifndef S65X_H -#define S65X_H +#pragma once #include "quantum.h" -// There's an extra 2 x 5 column on the left. Not sure what that's all about -// ANSI has more standard width shift, delete, and enter keys, doesn't use all of the 1U keys -#define LAYOUT_ansi( \ +/* LAYOUT_65_ansi + * ANSI has more standard width shift, delete, and enter keys, doesn't use all of the 1U keys + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │000│001│002│003│004│005│006│007│008│009│010│011│012│014 │015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │100 │102│103│104│105│106│107│108│109│110│111│112│113│114 │115│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │200 │202│203│204│205│206│207│208│209│210│211│212│214 │215│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │301 │302│303│304│305│306│307│308│309│310│311│313 │314│315│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │400 │401 │402 │408 │410│411│412│413│414│415│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_65_ansi( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ + K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ ) { \ - { KC_NO, KC_NO, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { KC_NO, KC_NO, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { KC_NO, KC_NO, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ - { KC_NO, KC_NO, KC_NO, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { KC_NO, KC_NO, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ + { KC_NO, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ } -#define LAYOUT_iso( \ +/* LAYOUT_65_iso + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │000│001│002│003│004│005│006│007│008│009│010│011│012│014 │015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │100 │102│103│104│105│106│107│108│109│110│111│112│113│ │115│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 ├───┤ + * │200 │202│203│204│205│206│207│208│209│210│211│212│213│ │215│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │300 │301│302│303│304│305│306│307│308│309│310│311│313 │314│315│ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ + * │400 │401 │402 │408 │410│411│412│413│414│415│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ + */ +#define LAYOUT_65_iso( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K114, K215, \ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ ) { \ - { KC_NO, KC_NO, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { KC_NO, KC_NO, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, K115 }, \ - { KC_NO, KC_NO, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ - { KC_NO, KC_NO, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { KC_NO, KC_NO, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ } -#define LAYOUT_plus_ansi( \ - M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ - M100, M101, K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - M200, M201, K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - M300, M301, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - M400, M401, K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ -) { \ - { M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { M100, M101, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { M200, M201, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ - { M300, M301, KC_NO, K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { M400, M401, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ -} - - -#define LAYOUT_plus_iso( \ - M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, K015, \ - M100, M101, K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ - M200, M201, K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ - M300, M301, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, K315, \ - M400, M401, K400, K401, K402, K408, K410, K411, K412, K413, K414, K415 \ -) { \ - { M000, M001, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014, K015 }, \ - { M100, M101, K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, K115 }, \ - { M200, M201, K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ - { M300, M301, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314, K315 }, \ - { M400, M401, K400, K401, K402, KC_NO, KC_NO, KC_NO, K408, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415 } \ -} void matrix_init_user(void); void matrix_scan_user(void); - -#endif From be666b2d8a7b30f29a4d29b9d65af012816a43d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sat, 5 Jan 2019 17:31:24 +0100 Subject: [PATCH 070/458] Add underscores to names of brightness control constants in report.h (#4764) --- tmk_core/common/report.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h index eb9afb727e44..e7c31bd376a0 100644 --- a/tmk_core/common/report.h +++ b/tmk_core/common/report.h @@ -48,8 +48,8 @@ along with this program. If not, see . #define TRANSPORT_STOP 0x00B7 #define TRANSPORT_STOP_EJECT 0x00CC #define TRANSPORT_PLAY_PAUSE 0x00CD -#define BRIGHTNESSUP 0x006F -#define BRIGHTNESSDOWN 0x0070 +#define BRIGHTNESS_UP 0x006F +#define BRIGHTNESS_DOWN 0x0070 /* application launch */ #define AL_CC_CONFIG 0x0183 #define AL_EMAIL 0x018A @@ -192,8 +192,8 @@ typedef struct { (key == KC_WWW_FORWARD ? AC_FORWARD : \ (key == KC_WWW_STOP ? AC_STOP : \ (key == KC_WWW_REFRESH ? AC_REFRESH : \ - (key == KC_BRIGHTNESS_UP ? BRIGHTNESSUP : \ - (key == KC_BRIGHTNESS_DOWN ? BRIGHTNESSDOWN : \ + (key == KC_BRIGHTNESS_UP ? BRIGHTNESS_UP : \ + (key == KC_BRIGHTNESS_DOWN ? BRIGHTNESS_DOWN : \ (key == KC_WWW_FAVORITES ? AC_BOOKMARKS : 0))))))))))))))))))))))) uint8_t has_anykey(report_keyboard_t* keyboard_report); From 5b5f452bf9feae121ec5c2f3e9d5d993fcb73f92 Mon Sep 17 00:00:00 2001 From: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Sat, 5 Jan 2019 10:56:00 -0600 Subject: [PATCH 071/458] adding my planck keymap (#4782) * adding my planck keymap * adding my planck keymap --- .../planck/keymaps/mikethetiger/config.h | 39 ++ .../planck/keymaps/mikethetiger/keymap.c | 346 ++++++++++++++++++ .../planck/keymaps/mikethetiger/readme.md | 2 + .../planck/keymaps/mikethetiger/rules.mk | 1 + 4 files changed, 388 insertions(+) create mode 100644 keyboards/planck/keymaps/mikethetiger/config.h create mode 100644 keyboards/planck/keymaps/mikethetiger/keymap.c create mode 100644 keyboards/planck/keymaps/mikethetiger/readme.md create mode 100644 keyboards/planck/keymaps/mikethetiger/rules.mk diff --git a/keyboards/planck/keymaps/mikethetiger/config.h b/keyboards/planck/keymaps/mikethetiger/config.h new file mode 100644 index 000000000000..6fa31cc8a76f --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/config.h @@ -0,0 +1,39 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 + diff --git a/keyboards/planck/keymaps/mikethetiger/keymap.c b/keyboards/planck/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..bc36825e2edc --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/keymap.c @@ -0,0 +1,346 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + PORTE |= (1<<6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); + #endif + layer_on(_ADJUST); + } else { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/mikethetiger/readme.md b/keyboards/planck/keymaps/mikethetiger/readme.md new file mode 100644 index 000000000000..ed039529658b --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/readme.md @@ -0,0 +1,2 @@ +# mikethetiger Planck Layout + diff --git a/keyboards/planck/keymaps/mikethetiger/rules.mk b/keyboards/planck/keymaps/mikethetiger/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/mikethetiger/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From ea47be936b41a31e2644ad3403d91010916683ce Mon Sep 17 00:00:00 2001 From: Naoki Katahira Date: Sun, 6 Jan 2019 02:30:48 +0900 Subject: [PATCH 072/458] Keyboard: Lily58 update serial.c and add OLED (#4715) * update serial.c and add OLED * update readme * keymap fix * keymap fix2 --- keyboards/lily58/config.h | 15 +- keyboards/lily58/i2c.c | 2 +- keyboards/lily58/i2c.h | 7 +- keyboards/lily58/keymaps/default/config.h | 21 +- keyboards/lily58/keymaps/default/keymap.c | 123 ++++++- keyboards/lily58/keymaps/default/rules.mk | 27 +- keyboards/lily58/keymaps/yuchi/config.h | 21 +- keyboards/lily58/keymaps/yuchi/keymap.c | 125 ++++++- keyboards/lily58/keymaps/yuchi/rules.mk | 28 +- keyboards/lily58/lib/glcdfont.c | 243 +++++++++++++ keyboards/lily58/lib/host_led_state_reader.c | 15 + keyboards/lily58/lib/keylogger.c | 45 +++ keyboards/lily58/lib/layer_state_reader.c | 35 ++ keyboards/lily58/lib/logo_reader.c | 11 + keyboards/lily58/lib/mode_icon_reader.c | 15 + keyboards/lily58/lib/rgb_state_reader.c | 15 + keyboards/lily58/lib/timelogger.c | 16 + keyboards/lily58/lily58.c | 11 +- keyboards/lily58/lily58.h | 25 +- keyboards/lily58/readme.md | 8 +- keyboards/lily58/rev1/config.h | 14 +- keyboards/lily58/rev1/matrix.c | 357 +++++++++++++++++++ keyboards/lily58/rev1/rev1.c | 18 +- keyboards/lily58/rev1/rev1.h | 4 + keyboards/lily58/rev1/rules.mk | 4 +- keyboards/lily58/rev1/serial_config.h | 4 + keyboards/lily58/rev1/split_scomm.c | 91 +++++ keyboards/lily58/rev1/split_scomm.h | 24 ++ keyboards/lily58/rev1/split_util.c | 70 ++++ keyboards/lily58/rev1/split_util.h | 19 + keyboards/lily58/rules.mk | 20 +- keyboards/lily58/serial.c | 285 +++++++++++---- keyboards/lily58/serial.h | 22 +- keyboards/lily58/serial_config.h | 12 +- keyboards/lily58/ssd1306.c | 344 ++++++++++++++++++ keyboards/lily58/ssd1306.h | 91 +++++ 36 files changed, 1972 insertions(+), 215 deletions(-) mode change 100644 => 100755 keyboards/lily58/i2c.c mode change 100644 => 100755 keyboards/lily58/i2c.h create mode 100644 keyboards/lily58/lib/glcdfont.c create mode 100644 keyboards/lily58/lib/host_led_state_reader.c create mode 100644 keyboards/lily58/lib/keylogger.c create mode 100644 keyboards/lily58/lib/layer_state_reader.c create mode 100644 keyboards/lily58/lib/logo_reader.c create mode 100644 keyboards/lily58/lib/mode_icon_reader.c create mode 100644 keyboards/lily58/lib/rgb_state_reader.c create mode 100644 keyboards/lily58/lib/timelogger.c create mode 100755 keyboards/lily58/rev1/matrix.c create mode 100755 keyboards/lily58/rev1/serial_config.h create mode 100755 keyboards/lily58/rev1/split_scomm.c create mode 100755 keyboards/lily58/rev1/split_scomm.h create mode 100755 keyboards/lily58/rev1/split_util.c create mode 100755 keyboards/lily58/rev1/split_util.h mode change 100644 => 100755 keyboards/lily58/serial.c mode change 100644 => 100755 keyboards/lily58/serial.h create mode 100755 keyboards/lily58/ssd1306.c create mode 100755 keyboards/lily58/ssd1306.h diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index db4844c91063..b88ec06bf41f 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -18,4 +18,17 @@ along with this program. If not, see . #pragma once -#include "serial_config.h" \ No newline at end of file +#include "config_common.h" +#include + +#define USE_I2C +#define USE_SERIAL + +#ifdef USE_Link_Time_Optimization + // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), + // so just disable them + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION + + #define DISABLE_LEADER +#endif // USE_Link_Time_Optimization \ No newline at end of file diff --git a/keyboards/lily58/i2c.c b/keyboards/lily58/i2c.c old mode 100644 new mode 100755 index 084c890c405f..4bee5c639829 --- a/keyboards/lily58/i2c.c +++ b/keyboards/lily58/i2c.c @@ -34,7 +34,7 @@ void i2c_delay(void) { // _delay_us(100); } -// Setup twi to run at 100kHz +// Setup twi to run at 100kHz or 400kHz (see ./i2c.h SCL_CLOCK) void i2c_master_init(void) { // no prescaler TWSR = 0; diff --git a/keyboards/lily58/i2c.h b/keyboards/lily58/i2c.h old mode 100644 new mode 100755 index c15b6bc5065e..710662c7abd6 --- a/keyboards/lily58/i2c.h +++ b/keyboards/lily58/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -15,7 +14,7 @@ #define SLAVE_BUFFER_SIZE 0x10 -// i2c SCL clock frequency +// i2c SCL clock frequency 400kHz #define SCL_CLOCK 400000L extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/lily58/keymaps/default/config.h b/keyboards/lily58/keymaps/default/config.h index fd0978559361..58bbdc5e9d05 100644 --- a/keyboards/lily58/keymaps/default/config.h +++ b/keyboards/lily58/keymaps/default/config.h @@ -17,12 +17,10 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#pragma once -/* Use I2C or Serial, not both */ +#pragma once -#define USE_SERIAL -// #define USE_I2C +//#define USE_MATRIX_I2C /* Select hand configuration */ @@ -30,6 +28,21 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + // Underglow /* #undef RGBLED_NUM diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 8d770581293d..5ff5dc318254 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -1,7 +1,23 @@ #include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + + extern keymap_config_t keymap_config; +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -88,9 +104,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | |-------. ,-------| | | | | | | + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | | | | | + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | * `-----------------------------------------/ / \ \-----------------------------------------' * | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI | * | | | |/ / \ \ | | | | @@ -99,17 +115,92 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + switch (keycode) { case QWERTY: - if (record->event.pressed) { + if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } return false; @@ -117,31 +208,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; } return true; } \ No newline at end of file diff --git a/keyboards/lily58/keymaps/default/rules.mk b/keyboards/lily58/keymaps/default/rules.mk index 3d2d3c9e0f6c..922fac6b69fc 100644 --- a/keyboards/lily58/keymaps/default/rules.mk +++ b/keyboards/lily58/keymaps/default/rules.mk @@ -1,21 +1,30 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # - -RGBLIGHT_ENABLE = no - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ONEHAND_ENABLE = no # Enable one-hand typing +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/lily58/keymaps/yuchi/config.h b/keyboards/lily58/keymaps/yuchi/config.h index fd0978559361..58bbdc5e9d05 100644 --- a/keyboards/lily58/keymaps/yuchi/config.h +++ b/keyboards/lily58/keymaps/yuchi/config.h @@ -17,12 +17,10 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#pragma once -/* Use I2C or Serial, not both */ +#pragma once -#define USE_SERIAL -// #define USE_I2C +//#define USE_MATRIX_I2C /* Select hand configuration */ @@ -30,6 +28,21 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + // Underglow /* #undef RGBLED_NUM diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index d708dbec7665..13b6cb1687e8 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -1,7 +1,23 @@ #include QMK_KEYBOARD_H +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + + extern keymap_config_t keymap_config; +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -89,28 +105,103 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------| |------+------+------+------+------+------| * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | |-------. ,-------| | | | | | | + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | * |------+------+------+------+------+------| | | |------+------+------+------+------+------| - * | | | | | | |-------| |-------| | | | | | | + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | * `-----------------------------------------/ / \ \-----------------------------------------' * |LOWER | LGUI | Alt | /Space / \Enter \ |BackSP| RGUI |RAISE | * | | | |/ / \ \ | | | | - * `-------------------''-------' '------''--------------------' + * `----------------------------' '------''--------------------' */ [_ADJUST] = LAYOUT( \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,\ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,\ _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; +int RGB_current_mode; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +// When add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +// const char *read_mode_icon(bool swap); +// const char *read_host_led_state(void); +// void set_timelog(void); +// const char *read_timelog(void); + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + // If you want to change the display of OLED, you need to change here + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} +#endif//SSD1306OLED bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef SSD1306OLED + set_keylog(keycode, record); +#endif + // set_timelog(); + } + switch (keycode) { case QWERTY: - if (record->event.pressed) { + if (record->event.pressed) { set_single_persistent_default_layer(_QWERTY); } return false; @@ -118,31 +209,31 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOWER: if (record->event.pressed) { layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case RAISE: if (record->event.pressed) { layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } else { layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); } return false; break; case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; } return true; } \ No newline at end of file diff --git a/keyboards/lily58/keymaps/yuchi/rules.mk b/keyboards/lily58/keymaps/yuchi/rules.mk index 73777a1b7859..922fac6b69fc 100644 --- a/keyboards/lily58/keymaps/yuchi/rules.mk +++ b/keyboards/lily58/keymaps/yuchi/rules.mk @@ -1,22 +1,30 @@ - # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # - -OLED_ENABLE = no -RGBLIGHT_ENABLE = no - BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -ONEHAND_ENABLE = no # Enable one-hand typing +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/glcdfont.c \ + ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ + # ./lib/timelogger.c \ diff --git a/keyboards/lily58/lib/glcdfont.c b/keyboards/lily58/lib/glcdfont.c new file mode 100644 index 000000000000..c691ea9d0be0 --- /dev/null +++ b/keyboards/lily58/lib/glcdfont.c @@ -0,0 +1,243 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font +const unsigned char font[] PROGMEM = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, + 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, + 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, + 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, + 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, + 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, + 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, + 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, + 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, + 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, + 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, + 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, + 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, + 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, + 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, + 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, + 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, + 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, + 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, + 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, + 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, + 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, + 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, + 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, + 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, + 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, + 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, + 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, + 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, + 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, + 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, + 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, + 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, + 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, + 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, + 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, + 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, + 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, + 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, + 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, + 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, + 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, + 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, + 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, + 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, + 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, + 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, + 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, + 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, + 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, + 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, + 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, + 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, + 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, + 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, + 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, + 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, + 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, + 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, + 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, + 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, + 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, + 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, + 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, + 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, + 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, + 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, + 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, + 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, + 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, + 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, + 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, + 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, + 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, + 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, + 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, + 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, + 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, + 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, + 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, + 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, + 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, + 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, + 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, + 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, + 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, + 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, + 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, + 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, + 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, + 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, + 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, + 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, + 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, + 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, + 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, + 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, + 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, + 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, + 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, + 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, + 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, + 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, + 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, + 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, + 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, + 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, + 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, + 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x80, 0xE0, 0x70, 0x18, + 0x0C, 0x18, 0x30, 0xE0, 0x80, 0x00, + 0x00, 0x10, 0xF8, 0x90, 0x10, 0x30, + 0x78, 0x30, 0x10, 0xB8, 0xFC, 0x38, + 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xF8, 0xFC, 0xF8, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, + 0x9C, 0x1C, 0x00, 0x00, 0x00, 0x00, + 0xF8, 0xFC, 0xF8, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1C, 0xFC, 0xF8, + 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x80, 0xE0, 0xF8, 0x7C, 0x1C, + 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFC, + 0xFC, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, + 0x1C, 0x1C, 0x1C, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC0, 0xF0, 0xF8, + 0x38, 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, + 0x1C, 0x3C, 0xF8, 0xF0, 0xE0, 0x00, + 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, + 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, + 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, + 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, + 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, + 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, + 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, + 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, + 0xBC, 0xE0, 0x81, 0x81, 0x81, 0x83, + 0x83, 0x82, 0x87, 0x0C, 0x18, 0x30, + 0x60, 0xC0, 0x00, 0x00, 0x1F, 0xFE, + 0x90, 0xB9, 0xFF, 0xBB, 0x91, 0x98, + 0x3C, 0x18, 0x11, 0x13, 0x3F, 0x11, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, + 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x0F, 0x7F, 0xF8, 0xE0, 0x80, 0xF0, + 0xFC, 0x3F, 0x0F, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x3F, 0x3F, 0x3F, + 0x1C, 0x1C, 0x1C, 0x1C, 0x1C, 0x3C, + 0x78, 0xF8, 0xF0, 0xE0, 0x80, 0x00, + 0x00, 0x00, 0x00, 0xC3, 0xE7, 0xFF, + 0x7E, 0x3C, 0x38, 0x78, 0x78, 0x70, + 0x70, 0xF8, 0xFF, 0xDF, 0x87, 0x00, + 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, + 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, + 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, + 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, + 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, + 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, + 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, + 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x18, 0x3C, 0x24, 0x66, 0x63, 0x41, + 0xC1, 0x81, 0x80, 0x80, 0x80, 0x80, + 0x80, 0x80, 0x81, 0xC1, 0x41, 0x62, + 0x38, 0x6C, 0x4C, 0xC6, 0x81, 0x81, + 0x80, 0x80, 0x80, 0x80, 0x80, 0x81, + 0xC1, 0x43, 0x62, 0x36, 0x1C, 0x18, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xFF, 0xFF, 0xFF, 0xC0, 0xC0, + 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0x80, 0x00, 0x00, 0x00, 0x7F, + 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, + 0x7F, 0xFF, 0xFF, 0xC0, 0x80, 0x00, + 0x00, 0x00, 0xE0, 0xE0, 0xC0, 0xC0, + 0xC0, 0xE0, 0xF9, 0x7F, 0x1F, 0x07, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x70, 0xF0, 0xE0, + 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, 0xE0, + 0xF0, 0xF8, 0x7F, 0x3F, 0x0F, 0x00, + 0x00, 0x00, 0x0F, 0x3F, 0x7F, 0xF9, + 0xE0, 0xE0, 0xC0, 0xC0, 0xC0, 0xC0, + 0xC0, 0xE0, 0xF9, 0x7F, 0x3F, 0x1F, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/lily58/lib/host_led_state_reader.c b/keyboards/lily58/lib/host_led_state_reader.c new file mode 100644 index 000000000000..0e22173b1d81 --- /dev/null +++ b/keyboards/lily58/lib/host_led_state_reader.c @@ -0,0 +1,15 @@ +#include +#include "lily58.h" + +char host_led_state_str[24]; + +const char *read_host_led_state(void) +{ + uint8_t leds = host_keyboard_leds(); + snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s", + (leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ", + (leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "); + + return host_led_state_str; +} diff --git a/keyboards/lily58/lib/keylogger.c b/keyboards/lily58/lib/keylogger.c new file mode 100644 index 000000000000..a1bd476d20b8 --- /dev/null +++ b/keyboards/lily58/lib/keylogger.c @@ -0,0 +1,45 @@ +#include +#include "lily58.h" + +char keylog_str[24] = {}; +char keylogs_str[21] = {}; +int keylogs_str_idx = 0; + +const char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) { + char name = ' '; + if (keycode < 60) { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", + record->event.key.row, record->event.key.col, + keycode, name); + + // update keylogs + if (keylogs_str_idx == sizeof(keylogs_str) - 1) { + keylogs_str_idx = 0; + for (int i = 0; i < sizeof(keylogs_str) - 1; i++) { + keylogs_str[i] = ' '; + } + } + + keylogs_str[keylogs_str_idx] = name; + keylogs_str_idx++; +} + +const char *read_keylog(void) { + return keylog_str; +} + +const char *read_keylogs(void) { + return keylogs_str; +} diff --git a/keyboards/lily58/lib/layer_state_reader.c b/keyboards/lily58/lib/layer_state_reader.c new file mode 100644 index 000000000000..58f406bbc988 --- /dev/null +++ b/keyboards/lily58/lib/layer_state_reader.c @@ -0,0 +1,35 @@ + +#include QMK_KEYBOARD_H +#include +#include "lily58.h" + +#define L_BASE 0 +#define L_LOWER 2 +#define L_RAISE 4 +#define L_ADJUST 65536 +#define L_ADJUST_TRI 65542 + +char layer_state_str[24]; + +const char *read_layer_state(void) { + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} diff --git a/keyboards/lily58/lib/logo_reader.c b/keyboards/lily58/lib/logo_reader.c new file mode 100644 index 000000000000..9f8adb84667f --- /dev/null +++ b/keyboards/lily58/lib/logo_reader.c @@ -0,0 +1,11 @@ +#include "lily58.h" + +const char *read_logo(void) { + static char logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, + 0}; + + return logo; +} diff --git a/keyboards/lily58/lib/mode_icon_reader.c b/keyboards/lily58/lib/mode_icon_reader.c new file mode 100644 index 000000000000..2bce4a71b0e1 --- /dev/null +++ b/keyboards/lily58/lib/mode_icon_reader.c @@ -0,0 +1,15 @@ +#include +#include "lily58.h" + +char mode_icon[24]; + +const char *read_mode_icon(bool swap) { + static char logo[][2][3] = {{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}}; + if (swap == false) { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); + } else { + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); + } + + return mode_icon; +} diff --git a/keyboards/lily58/lib/rgb_state_reader.c b/keyboards/lily58/lib/rgb_state_reader.c new file mode 100644 index 000000000000..e0efe2e5288f --- /dev/null +++ b/keyboards/lily58/lib/rgb_state_reader.c @@ -0,0 +1,15 @@ +#ifdef RGBLIGHT_ENABLE + +#include QMK_KEYBOARD_H +#include + +extern rgblight_config_t rgblight_config; +char rbf_info_str[24]; +const char *read_rgb_info(void) { + + snprintf(rbf_info_str, sizeof(rbf_info_str), "%s %2d h%3d s%3d v%3d", + rgblight_config.enable ? "on" : "- ", rgblight_config.mode, + rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + return rbf_info_str; +} +#endif diff --git a/keyboards/lily58/lib/timelogger.c b/keyboards/lily58/lib/timelogger.c new file mode 100644 index 000000000000..bfbfbe8a2144 --- /dev/null +++ b/keyboards/lily58/lib/timelogger.c @@ -0,0 +1,16 @@ +#include +#include "lily58.h" + +char timelog_str[24] = {}; +int last_time = 0; +int elapsed_time = 0; + +void set_timelog(void) { + elapsed_time = timer_elapsed(last_time); + last_time = timer_read(); + snprintf(timelog_str, sizeof(timelog_str), "lt:%5d, et:%5d", last_time, elapsed_time); +} + +const char *read_timelog(void) { + return timelog_str; +} diff --git a/keyboards/lily58/lily58.c b/keyboards/lily58/lily58.c index 697e3820c693..eacd90a82de9 100644 --- a/keyboards/lily58/lily58.c +++ b/keyboards/lily58/lily58.c @@ -1 +1,10 @@ - #include "lily58.h" +#include "lily58.h" +#include "ssd1306.h" + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { +#ifdef SSD1306OLED + return process_record_gfx(keycode,record) && process_record_user(keycode, record); +#else + return process_record_user(keycode, record); +#endif +} \ No newline at end of file diff --git a/keyboards/lily58/lily58.h b/keyboards/lily58/lily58.h index 1d64dd7b2a7b..064f847dd256 100644 --- a/keyboards/lily58/lily58.h +++ b/keyboards/lily58/lily58.h @@ -1,28 +1,5 @@ -#ifndef LILY58_H -#define LILY58_H - -#include "quantum.h" +#pragma once #ifdef KEYBOARD_lily58_rev1 #include "rev1.h" #endif - - - -// Used to create a keymap using only KC_ prefixed keys -#define LAYOUT_kc( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \ - L41, L42, L43, L44, R41, R42, R43, R44 \ - ) \ - LAYOUT( \ - KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ - KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ - KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ - KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L45, KC_##R40, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ - KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##R41, KC_##R42, KC_##R43, KC_##R44 \ - ) - -#endif diff --git a/keyboards/lily58/readme.md b/keyboards/lily58/readme.md index c71365e46ba0..cbf0c1eeb02a 100644 --- a/keyboards/lily58/readme.md +++ b/keyboards/lily58/readme.md @@ -2,16 +2,14 @@ Lily58 is 6×4+5keys column-staggered split keyboard. -![Lily58_01](https://user-images.githubusercontent.com/6285554/45210815-92744a00-b2cb-11e8-977a-8c1a93584f17.jpg) - -![Lily58_02](https://user-images.githubusercontent.com/6285554/45337733-7b33a600-b5c4-11e8-85b0-35f1cc9bf946.png) - +![Lily58_01](https://user-images.githubusercontent.com/6285554/50394214-72479880-079f-11e9-9d91-33fdbf1d7715.jpg) +![2018-12-24 17 39 58](https://user-images.githubusercontent.com/6285554/50394779-05360200-07a3-11e9-82b5-066fd8907ecf.png) Keyboard Maintainer: [Naoki Katahira](https://github.com/kata0510/) [Twitter:@F_YUUCHI](https://twitter.com/F_YUUCHI) Hardware Supported: Lily58 PCB, ProMicro Hardware Availability: [PCB & Case Data](https://github.com/kata0510/Lily58) Make example for this keyboard (after setting up your build environment): - make lily58:default + sudo make lily58:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). \ No newline at end of file diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index a991e88322c3..0dee6a6946a5 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -19,12 +19,9 @@ along with this program. If not, see . #pragma once -//#include QMK_KEYBOARD_CONFIG_H -#include "config_common.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFC51 -#define PRODUCT_ID 0x0058 +#define PRODUCT_ID 0x0058 #define DEVICE_VER 0x0100 #define MANUFACTURER F_YUUCHI #define PRODUCT Lily58 @@ -51,9 +48,9 @@ along with this program. If not, see . #define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +//#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +//#define LOCKING_RESYNC_ENABLE /* key combination for command */ #define IS_COMMAND() ( \ @@ -62,8 +59,7 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN D3 - -#define RGBLED_NUM 14 // Number of LEDs +#define RGBLED_NUM 12 // Number of LEDs /* * Feature disable options @@ -81,4 +77,4 @@ along with this program. If not, see . //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION +//#define NO_ACTION_FUNCTION \ No newline at end of file diff --git a/keyboards/lily58/rev1/matrix.c b/keyboards/lily58/rev1/matrix.c new file mode 100755 index 000000000000..718cc574481a --- /dev/null +++ b/keyboards/lily58/rev1/matrix.c @@ -0,0 +1,357 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "split_scomm.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; +uint8_t is_master = 0 ; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); +static uint8_t matrix_master_scan(void); + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + // initialize row and col + unselect_rows(); + init_cols(); + + TX_RX_LED_INIT; + TXLED0; + RXLED0; + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + + is_master = has_usb(); + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_MATRIX_I2C + +// Get rows from other half over i2c +int i2c_transaction(void) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + + int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); + if (err) goto i2c_error; + + // start of matrix stored at 0x00 + err = i2c_master_write(0x00); + if (err) goto i2c_error; + + // Start read + err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); + if (err) goto i2c_error; + + if (!err) { + int i; + for (i = 0; i < ROWS_PER_HAND-1; ++i) { + matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); + } + matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); + i2c_master_stop(); + } else { +i2c_error: // the cable is disconnceted, or something else went wrong + i2c_reset_state(); + return err; + } + + return 0; +} + +#else // USE_SERIAL + +int serial_transaction(int master_changed) { + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; +#ifdef SERIAL_USE_MULTI_TRANSACTION + int ret=serial_update_buffers(master_changed); +#else + int ret=serial_update_buffers(); +#endif + if (ret ) { + if(ret==2) RXLED1; + return 1; + } + RXLED0; + memcpy(&matrix[slaveOffset], + (void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH); + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + memcpy(&matrix[offset], + (void *)serial_master_buffer, SERIAL_MASTER_BUFFER_LENGTH); + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + + int ret = _matrix_scan(); + int mchanged = 1; + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_I2C +// for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ +// i2c_slave_buffer[i] = matrix[offset+i]; +// } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + mchanged = memcmp((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); + #endif + memcpy((void *)serial_master_buffer, + &matrix[offset], SERIAL_MASTER_BUFFER_LENGTH); +#endif + +#ifdef USE_MATRIX_I2C + if( i2c_transaction() ) { +#else // USE_SERIAL + if( serial_transaction(mchanged) ) { +#endif + // turn on the indicator led when halves are disconnected + TXLED1; + + error_count++; + + if (error_count > ERROR_DISCONNECT_COUNT) { + // reset other half if disconnected + int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = 0; + } + } + } else { + // turn off the indicator led on no error + TXLED0; + error_count = 0; + } + matrix_scan_quantum(); + return ret; +} + +void matrix_slave_scan(void) { + _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ + i2c_slave_buffer[i] = matrix[offset+i]; + } +#else // USE_SERIAL + #ifdef SERIAL_USE_MULTI_TRANSACTION + int change = 0; + #endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + #ifdef SERIAL_USE_MULTI_TRANSACTION + if( serial_slave_buffer[i] != matrix[offset+i] ) + change = 1; + #endif + serial_slave_buffer[i] = matrix[offset+i]; + } + #ifdef SERIAL_USE_MULTI_TRANSACTION + slave_buffer_change_count += change; + #endif +#endif +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/lily58/rev1/rev1.c b/keyboards/lily58/rev1/rev1.c index 4c54d7717c38..e78f2ccfa5f4 100644 --- a/keyboards/lily58/rev1/rev1.c +++ b/keyboards/lily58/rev1/rev1.c @@ -1,14 +1,8 @@ #include "lily58.h" -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; \ No newline at end of file +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + //led_set_user(usb_led); +} +#endif \ No newline at end of file diff --git a/keyboards/lily58/rev1/rev1.h b/keyboards/lily58/rev1/rev1.h index a83046358228..4949bf5372d8 100644 --- a/keyboards/lily58/rev1/rev1.h +++ b/keyboards/lily58/rev1/rev1.h @@ -5,6 +5,10 @@ //void promicro_bootloader_jmp(bool program); #include "quantum.h" +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif #ifdef USE_I2C #include diff --git a/keyboards/lily58/rev1/rules.mk b/keyboards/lily58/rev1/rules.mk index f845616741c2..7fc101bf2b0e 100644 --- a/keyboards/lily58/rev1/rules.mk +++ b/keyboards/lily58/rev1/rules.mk @@ -1 +1,3 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file +SRC += rev1/matrix.c +SRC += rev1/split_util.c +SRC += rev1/split_scomm.c \ No newline at end of file diff --git a/keyboards/lily58/rev1/serial_config.h b/keyboards/lily58/rev1/serial_config.h new file mode 100755 index 000000000000..4fab8e8ddfcf --- /dev/null +++ b/keyboards/lily58/rev1/serial_config.h @@ -0,0 +1,4 @@ +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/lily58/rev1/split_scomm.c b/keyboards/lily58/rev1/split_scomm.c new file mode 100755 index 000000000000..a1fe6ba5b823 --- /dev/null +++ b/keyboards/lily58/rev1/split_scomm.c @@ -0,0 +1,91 @@ +#ifdef USE_SERIAL +#ifdef SERIAL_USE_MULTI_TRANSACTION +/* --- USE flexible API (using multi-type transaction function) --- */ + +#include +#include +#include +#include +#include "serial.h" +#ifdef CONSOLE_ENABLE + #include +#endif + +uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; +uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; +uint8_t volatile status_com = 0; +uint8_t volatile status1 = 0; +uint8_t slave_buffer_change_count = 0; +uint8_t s_change_old = 0xff; +uint8_t s_change_new = 0xff; + +SSTD_t transactions[] = { +#define GET_SLAVE_STATUS 0 + /* master buffer not changed, only recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + 0, NULL, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define PUT_MASTER_GET_SLAVE_STATUS 1 + /* master buffer changed need send, and recive slave_buffer_change_count */ + { (uint8_t *)&status_com, + sizeof(serial_master_buffer), (uint8_t *)serial_master_buffer, + sizeof(slave_buffer_change_count), &slave_buffer_change_count, + }, +#define GET_SLAVE_BUFFER 2 + /* recive serial_slave_buffer */ + { (uint8_t *)&status1, + 0, NULL, + sizeof(serial_slave_buffer), (uint8_t *)serial_slave_buffer + } +}; + +void serial_master_init(void) +{ + soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); +} + +void serial_slave_init(void) +{ + soft_serial_target_init(transactions, TID_LIMIT(transactions)); +} + +// 0 => no error +// 1 => slave did not respond +// 2 => checksum error +int serial_update_buffers(int master_update) +{ + int status, smatstatus; + static int need_retry = 0; + + if( s_change_old != s_change_new ) { + smatstatus = soft_serial_transaction(GET_SLAVE_BUFFER); + if( smatstatus == TRANSACTION_END ) { + s_change_old = s_change_new; +#ifdef CONSOLE_ENABLE + uprintf("slave matrix = %b %b %b %b\n", + serial_slave_buffer[0], serial_slave_buffer[1], + serial_slave_buffer[2], serial_slave_buffer[3]); +#endif + } + } else { + // serial_slave_buffer dosen't change + smatstatus = TRANSACTION_END; // dummy status + } + + if( !master_update && !need_retry) { + status = soft_serial_transaction(GET_SLAVE_STATUS); + } else { + status = soft_serial_transaction(PUT_MASTER_GET_SLAVE_STATUS); + } + if( status == TRANSACTION_END ) { + s_change_new = slave_buffer_change_count; + need_retry = 0; + } else { + need_retry = 1; + } + return smatstatus; +} + +#endif // SERIAL_USE_MULTI_TRANSACTION +#endif /* USE_SERIAL */ diff --git a/keyboards/lily58/rev1/split_scomm.h b/keyboards/lily58/rev1/split_scomm.h new file mode 100755 index 000000000000..873d8939d81f --- /dev/null +++ b/keyboards/lily58/rev1/split_scomm.h @@ -0,0 +1,24 @@ +#ifndef SPLIT_COMM_H +#define SPLIT_COMM_H + +#ifndef SERIAL_USE_MULTI_TRANSACTION +/* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ +#include "serial.h" + +#else +/* --- USE flexible API (using multi-type transaction function) --- */ +// Buffers for master - slave communication +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; +extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; +extern uint8_t slave_buffer_change_count; + +void serial_master_init(void); +void serial_slave_init(void); +int serial_update_buffers(int master_changed); + +#endif + +#endif /* SPLIT_COMM_H */ diff --git a/keyboards/lily58/rev1/split_util.c b/keyboards/lily58/rev1/split_util.c new file mode 100755 index 000000000000..e1ff8b4379dc --- /dev/null +++ b/keyboards/lily58/rev1/split_util.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else +# include "split_scomm.h" +#endif + +volatile bool isLeftHand = true; + +static void setup_handedness(void) { + #ifdef EE_HANDS + isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + #else + // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c + #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) + isLeftHand = !has_usb(); + #else + isLeftHand = has_usb(); + #endif + #endif +} + +static void keyboard_master_setup(void) { + +#ifdef USE_MATRIX_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + +#ifdef USE_MATRIX_I2C + i2c_slave_init(SLAVE_I2C_ADDRESS); +#else + serial_slave_init(); +#endif +} + +bool has_usb(void) { + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +#define SLAVE_I2C_ADDRESS 0x32 + +extern volatile bool isLeftHand; + +// slave version of matix scan, defined in matrix.c +void matrix_slave_scan(void); + +void split_keyboard_setup(void); +bool has_usb(void); + +void matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/lily58/rules.mk b/keyboards/lily58/rules.mk index ad8ad585e9a4..f6b922eeac2f 100644 --- a/keyboards/lily58/rules.mk +++ b/keyboards/lily58/rules.mk @@ -1,7 +1,10 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c +SRC += i2c.c +SRC += serial.c +SRC += ssd1306.c + +# if firmware size over limit, try this option +# CFLAGS += -flto + # MCU name #MCU = at90usb1287 MCU = atmega32u4 @@ -38,16 +41,15 @@ ARCH = AVR8 # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. F_USB = $(F_CPU) -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + # Build Options # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically @@ -65,7 +67,7 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SUBPROJECT_rev1 = no -USE_I2C = no +USE_I2C = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/lily58/serial.c b/keyboards/lily58/serial.c old mode 100644 new mode 100755 index f85dc28dc342..325c29a3f704 --- a/keyboards/lily58/serial.c +++ b/keyboards/lily58/serial.c @@ -1,5 +1,10 @@ /* * WARNING: be careful changing this code, it is very timing dependent + * + * 2018-10-28 checked + * avr-gcc 4.9.2 + * avr-gcc 5.4.0 + * avr-gcc 7.3.0 */ #ifndef F_CPU @@ -14,9 +19,58 @@ #include "serial.h" //#include -#ifdef USE_SERIAL -//#ifndef USE_SERIAL_PD2 +#ifdef SOFT_SERIAL_PIN +#ifdef __AVR_ATmega32U4__ + // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial. + #ifdef USE_I2C + #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1 + #error Using ATmega32U4 I2C, so can not use PD0, PD1 + #endif + #endif + + #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3 + #define SERIAL_PIN_DDR DDRD + #define SERIAL_PIN_PORT PORTD + #define SERIAL_PIN_INPUT PIND + #if SOFT_SERIAL_PIN == D0 + #define SERIAL_PIN_MASK _BV(PD0) + #define EIMSK_BIT _BV(INT0) + #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01))) + #define SERIAL_PIN_INTERRUPT INT0_vect + #elif SOFT_SERIAL_PIN == D1 + #define SERIAL_PIN_MASK _BV(PD1) + #define EIMSK_BIT _BV(INT1) + #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11))) + #define SERIAL_PIN_INTERRUPT INT1_vect + #elif SOFT_SERIAL_PIN == D2 + #define SERIAL_PIN_MASK _BV(PD2) + #define EIMSK_BIT _BV(INT2) + #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21))) + #define SERIAL_PIN_INTERRUPT INT2_vect + #elif SOFT_SERIAL_PIN == D3 + #define SERIAL_PIN_MASK _BV(PD3) + #define EIMSK_BIT _BV(INT3) + #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31))) + #define SERIAL_PIN_INTERRUPT INT3_vect + #endif + #elif SOFT_SERIAL_PIN == E6 + #define SERIAL_PIN_DDR DDRE + #define SERIAL_PIN_PORT PORTE + #define SERIAL_PIN_INPUT PINE + #define SERIAL_PIN_MASK _BV(PE6) + #define EIMSK_BIT _BV(INT6) + #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61))) + #define SERIAL_PIN_INTERRUPT INT6_vect + #else + #error invalid SOFT_SERIAL_PIN value + #endif + +#else + #error serial.c now support ATmega32U4 only +#endif + +//////////////// for backward compatibility //////////////////////////////// #ifndef SERIAL_USE_MULTI_TRANSACTION /* --- USE Simple API (OLD API, compatible with let's split serial.c) */ #if SERIAL_SLAVE_BUFFER_LENGTH > 0 @@ -43,56 +97,118 @@ SSTD_t transactions[] = { }; void serial_master_init(void) -{ soft_serial_initiator_init(transactions); } +{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } void serial_slave_init(void) -{ soft_serial_target_init(transactions); } +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } // 0 => no error // 1 => slave did not respond // 2 => checksum error int serial_update_buffers() -{ return soft_serial_transaction(); } +{ + int result; + result = soft_serial_transaction(); + return result; +} -#endif // Simple API (OLD API, compatible with let's split serial.c) +#endif // end of Simple API (OLD API, compatible with let's split serial.c) +//////////////////////////////////////////////////////////////////////////// #define ALWAYS_INLINE __attribute__((always_inline)) #define NO_INLINE __attribute__((noinline)) #define _delay_sub_us(x) __builtin_avr_delay_cycles(x) -// Serial pulse period in microseconds. -#define TID_SEND_ADJUST 14 +// parity check +#define ODD_PARITY 1 +#define EVEN_PARITY 0 +#define PARITY EVEN_PARITY + +#ifdef SERIAL_DELAY + // custom setup in config.h + // #define TID_SEND_ADJUST 2 + // #define SERIAL_DELAY 6 // micro sec + // #define READ_WRITE_START_ADJUST 30 // cycles + // #define READ_WRITE_WIDTH_ADJUST 8 // cycles +#else +// ============ Standard setups ============ + +#ifndef SELECT_SOFT_SERIAL_SPEED +#define SELECT_SOFT_SERIAL_SPEED 1 +// 0: about 189kbps +// 1: about 137kbps (default) +// 2: about 75kbps +// 3: about 39kbps +// 4: about 26kbps +// 5: about 20kbps +#endif -#define SELECT_SERIAL_SPEED 1 -#if SELECT_SERIAL_SPEED == 0 +#if __GNUC__ < 6 + #define TID_SEND_ADJUST 14 +#else + #define TID_SEND_ADJUST 2 +#endif + +#if SELECT_SOFT_SERIAL_SPEED == 0 // Very High speed #define SERIAL_DELAY 4 // micro sec - #define READ_WRITE_START_ADJUST 33 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 1 + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 34 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 1 // High speed #define SERIAL_DELAY 6 // micro sec - #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 2 + #if __GNUC__ < 6 + #define READ_WRITE_START_ADJUST 30 // cycles + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_START_ADJUST 33 // cycles + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 2 // Middle speed #define SERIAL_DELAY 12 // micro sec #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 3 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 3 // Low speed #define SERIAL_DELAY 24 // micro sec #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles -#elif SELECT_SERIAL_SPEED == 4 + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 4 // Very Low speed - #define SERIAL_DELAY 50 // micro sec + #define SERIAL_DELAY 36 // micro sec + #define READ_WRITE_START_ADJUST 30 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif +#elif SELECT_SOFT_SERIAL_SPEED == 5 + // Ultra Low speed + #define SERIAL_DELAY 48 // micro sec #define READ_WRITE_START_ADJUST 30 // cycles - #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #if __GNUC__ < 6 + #define READ_WRITE_WIDTH_ADJUST 3 // cycles + #else + #define READ_WRITE_WIDTH_ADJUST 7 // cycles + #endif #else -#error Illegal Serial Speed -#endif - +#error invalid SELECT_SOFT_SERIAL_SPEED value +#endif /* SELECT_SOFT_SERIAL_SPEED */ +#endif /* SERIAL_DELAY */ #define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2) #define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2) @@ -106,17 +222,21 @@ int serial_update_buffers() #endif static SSTD_t *Transaction_table = NULL; +static uint8_t Transaction_table_size = 0; +inline static void serial_delay(void) ALWAYS_INLINE; inline static void serial_delay(void) { _delay_us(SERIAL_DELAY); } +inline static void serial_delay_half1(void) ALWAYS_INLINE; inline static void serial_delay_half1(void) { _delay_us(SERIAL_DELAY_HALF1); } +inline static void serial_delay_half2(void) ALWAYS_INLINE; inline static void serial_delay_half2(void) { _delay_us(SERIAL_DELAY_HALF2); @@ -136,6 +256,7 @@ void serial_input_with_pullup(void) { SERIAL_PIN_PORT |= SERIAL_PIN_MASK; } +inline static uint8_t serial_read_pin(void) ALWAYS_INLINE; inline static uint8_t serial_read_pin(void) { return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); @@ -153,30 +274,28 @@ void serial_high(void) { SERIAL_PIN_PORT |= SERIAL_PIN_MASK; } -void soft_serial_initiator_init(SSTD_t *sstd_table) +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size) { Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; serial_output(); serial_high(); } -void soft_serial_target_init(SSTD_t *sstd_table) +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) { Transaction_table = sstd_table; + Transaction_table_size = (uint8_t)sstd_table_size; serial_input_with_pullup(); -#if SERIAL_PIN_MASK == _BV(PD0) - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -#elif SERIAL_PIN_MASK == _BV(PD2) - // Enable INT2 - EIMSK |= _BV(INT2); - // Trigger on falling edge of INT2 - EICRA &= ~(_BV(ISC20) | _BV(ISC21)); + // Enable INT0-INT3,INT6 + EIMSK |= EIMSK_BIT; +#if SERIAL_PIN_MASK == _BV(PE6) + // Trigger on falling edge of INT6 + EICRB &= EICRx_BIT; #else - #error unknown SERIAL_PIN_MASK value + // Trigger on falling edge of INT0-INT3 + EICRA &= EICRx_BIT; #endif } @@ -192,7 +311,7 @@ void sync_recv(void) { } // Used by the reciver to send a synchronization signal to the sender. -static void sync_send(void)NO_INLINE; +static void sync_send(void) NO_INLINE; static void sync_send(void) { serial_low(); @@ -206,12 +325,12 @@ static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { uint8_t byte, i, p, pb; _delay_sub_us(READ_WRITE_START_ADJUST); - for( i = 0, byte = 0, p = 0; i < bit; i++ ) { + for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) { serial_delay_half1(); // read the middle of pulses if( serial_read_pin() ) { - byte = (byte << 1) | 1; p ^= 1; + byte = (byte << 1) | 1; p ^= 1; } else { - byte = (byte << 1) | 0; p ^= 0; + byte = (byte << 1) | 0; p ^= 0; } _delay_sub_us(READ_WRITE_WIDTH_ADJUST); serial_delay_half2(); @@ -231,13 +350,13 @@ static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) { void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE; void serial_write_chunk(uint8_t data, uint8_t bit) { uint8_t b, p; - for( p = 0, b = 1<<(bit-1); b ; b >>= 1) { - if(data & b) { - serial_high(); p ^= 1; - } else { - serial_low(); p ^= 0; - } - serial_delay(); + for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) { + if(data & b) { + serial_high(); p ^= 1; + } else { + serial_low(); p ^= 0; + } + serial_delay(); } /* send parity bit */ if(p & 1) { serial_high(); } @@ -289,6 +408,13 @@ void change_reciver2sender(void) { serial_delay_half1(); //4 } +static inline uint8_t nibble_bits_count(uint8_t bits) +{ + bits = (bits & 0x5) + (bits >> 1 & 0x5); + bits = (bits & 0x3) + (bits >> 2 & 0x3); + return bits; +} + // interrupt handle to be used by the target device ISR(SERIAL_PIN_INTERRUPT) { @@ -298,12 +424,15 @@ ISR(SERIAL_PIN_INTERRUPT) { SSTD_t *trans = Transaction_table; #else // recive transaction table index - uint8_t tid; + uint8_t tid, bits; uint8_t pecount = 0; sync_recv(); - tid = serial_read_chunk(&pecount,4); - if(pecount> 0) + bits = serial_read_chunk(&pecount,7); + tid = bits>>3; + bits = (bits&7) != nibble_bits_count(tid); + if( bits || pecount> 0 || tid > Transaction_table_size ) { return; + } serial_delay_half1(); serial_high(); // response step1 low->high @@ -316,17 +445,17 @@ ISR(SERIAL_PIN_INTERRUPT) { // target send phase if( trans->target2initiator_buffer_size > 0 ) serial_send_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size); + trans->target2initiator_buffer_size); // target switch to input change_sender2reciver(); // target recive phase if( trans->initiator2target_buffer_size > 0 ) { if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size) ) { - *trans->status = TRANSACTION_ACCEPTED; + trans->initiator2target_buffer_size) ) { + *trans->status = TRANSACTION_ACCEPTED; } else { - *trans->status = TRANSACTION_DATA_ERROR; + *trans->status = TRANSACTION_DATA_ERROR; } } else { *trans->status = TRANSACTION_ACCEPTED; @@ -350,6 +479,8 @@ int soft_serial_transaction(void) { SSTD_t *trans = Transaction_table; #else int soft_serial_transaction(int sstd_index) { + if( sstd_index > Transaction_table_size ) + return TRANSACTION_TYPE_ERROR; SSTD_t *trans = &Transaction_table[sstd_index]; #endif cli(); @@ -376,9 +507,10 @@ int soft_serial_transaction(int sstd_index) { #else // send transaction table index + int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index)); sync_send(); _delay_sub_us(TID_SEND_ADJUST); - serial_write_chunk(sstd_index, 4); + serial_write_chunk(tid, 7); serial_delay_half1(); // wait for the target response (step1 low->high) @@ -390,12 +522,12 @@ int soft_serial_transaction(int sstd_index) { // check if the target is present (step2 high->low) for( int i = 0; serial_read_pin(); i++ ) { if (i > SLAVE_INT_ACK_WIDTH + 1) { - // slave failed to pull the line low, assume not present - serial_output(); - serial_high(); - *trans->status = TRANSACTION_NO_RESPONSE; - sei(); - return TRANSACTION_NO_RESPONSE; + // slave failed to pull the line low, assume not present + serial_output(); + serial_high(); + *trans->status = TRANSACTION_NO_RESPONSE; + sei(); + return TRANSACTION_NO_RESPONSE; } _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT); } @@ -405,12 +537,12 @@ int soft_serial_transaction(int sstd_index) { // if the target is present syncronize with it if( trans->target2initiator_buffer_size > 0 ) { if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer, - trans->target2initiator_buffer_size) ) { - serial_output(); - serial_high(); - *trans->status = TRANSACTION_DATA_ERROR; - sei(); - return TRANSACTION_DATA_ERROR; + trans->target2initiator_buffer_size) ) { + serial_output(); + serial_high(); + *trans->status = TRANSACTION_DATA_ERROR; + sei(); + return TRANSACTION_DATA_ERROR; } } @@ -420,7 +552,7 @@ int soft_serial_transaction(int sstd_index) { // initiator send phase if( trans->initiator2target_buffer_size > 0 ) { serial_send_packet((uint8_t *)trans->initiator2target_buffer, - trans->initiator2target_buffer_size); + trans->initiator2target_buffer_size); } // always, release the line when not in use @@ -443,3 +575,16 @@ int soft_serial_get_and_clean_status(int sstd_index) { #endif #endif + +// Helix serial.c history +// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc) +// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4) +// (adjusted with avr-gcc 4.9.2) +// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78) +// (adjusted with avr-gcc 4.9.2) +// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae) +// (adjusted with avr-gcc 4.9.2) +// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff) +// (adjusted with avr-gcc 7.3.0) +// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66) +// (adjusted with avr-gcc 5.4.0, 7.3.0) diff --git a/keyboards/lily58/serial.h b/keyboards/lily58/serial.h old mode 100644 new mode 100755 index d2b7fd8e60be..7e0c0847a431 --- a/keyboards/lily58/serial.h +++ b/keyboards/lily58/serial.h @@ -4,14 +4,16 @@ #include // ///////////////////////////////////////////////////////////////// -// Need Soft Serial defines in serial_config.h +// Need Soft Serial defines in config.h // ///////////////////////////////////////////////////////////////// // ex. -// #define SERIAL_PIN_DDR DDRD -// #define SERIAL_PIN_PORT PORTD -// #define SERIAL_PIN_INPUT PIND -// #define SERIAL_PIN_MASK _BV(PD?) ?=0,2 -// #define SERIAL_PIN_INTERRUPT INT?_vect ?=0,2 +// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6 +// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5 +// // 1: about 137kbps (default) +// // 2: about 75kbps +// // 3: about 39kbps +// // 4: about 26kbps +// // 5: about 20kbps // // //// USE Simple API (OLD API, compatible with let's split serial.c) // ex. @@ -47,16 +49,18 @@ typedef struct _SSTD_t { uint8_t target2initiator_buffer_size; uint8_t *target2initiator_buffer; } SSTD_t; +#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t)) // initiator is transaction start side -void soft_serial_initiator_init(SSTD_t *sstd_table); +void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size); // target is interrupt accept side -void soft_serial_target_init(SSTD_t *sstd_table); +void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size); // initiator resullt #define TRANSACTION_END 0 #define TRANSACTION_NO_RESPONSE 0x1 #define TRANSACTION_DATA_ERROR 0x2 +#define TRANSACTION_TYPE_ERROR 0x4 #ifndef SERIAL_USE_MULTI_TRANSACTION int soft_serial_transaction(void); #else @@ -72,7 +76,7 @@ int soft_serial_transaction(int sstd_index); // target: // TRANSACTION_DATA_ERROR // or TRANSACTION_ACCEPTED -#define TRANSACTION_ACCEPTED 0x4 +#define TRANSACTION_ACCEPTED 0x8 #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif diff --git a/keyboards/lily58/serial_config.h b/keyboards/lily58/serial_config.h index fef689038e74..4fab8e8ddfcf 100644 --- a/keyboards/lily58/serial_config.h +++ b/keyboards/lily58/serial_config.h @@ -1,8 +1,4 @@ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD2) -#define SERIAL_PIN_INTERRUPT INT2_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 \ No newline at end of file +#ifndef SOFT_SERIAL_PIN +#define SOFT_SERIAL_PIN D2 +#define SERIAL_USE_MULTI_TRANSACTION +#endif diff --git a/keyboards/lily58/ssd1306.c b/keyboards/lily58/ssd1306.c new file mode 100755 index 000000000000..4330c8497db2 --- /dev/null +++ b/keyboards/lily58/ssd1306.c @@ -0,0 +1,344 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +static const unsigned char font[] PROGMEM; + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ + +// 'last_flush' is declared as uint16_t, +// so this must be less than 65535 +#define ScreenOffInterval 60000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +static bool force_dirty = true; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + i2c_master_init(); + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty|| force_dirty) { + iota_gfx_flush(); + force_dirty = false; + } + + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record) { + force_dirty = true; + return true; +} + +#endif diff --git a/keyboards/lily58/ssd1306.h b/keyboards/lily58/ssd1306.h new file mode 100755 index 000000000000..ea8c9232805d --- /dev/null +++ b/keyboards/lily58/ssd1306.h @@ -0,0 +1,91 @@ +#pragma once + +#include +#include +#include "pincontrol.h" +#include "action.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + +bool process_record_gfx(uint16_t keycode, keyrecord_t *record); \ No newline at end of file From ac7a9e3c66c59c8f35202269eebac692bb4c3716 Mon Sep 17 00:00:00 2001 From: Masayuki Sunahara Date: Sun, 6 Jan 2019 02:35:48 +0900 Subject: [PATCH 073/458] add Pinky keyboard (#4748) add Pinky (https://github.com/tamanishi/Pinky3) keyboard --- keyboards/pinky/3/3.c | 1 + keyboards/pinky/3/3.h | 46 ++++ keyboards/pinky/3/config.h | 246 +++++++++++++++++++++ keyboards/pinky/3/keymaps/default/config.h | 31 +++ keyboards/pinky/3/keymaps/default/keymap.c | 134 +++++++++++ keyboards/pinky/3/keymaps/default/rules.mk | 18 ++ keyboards/pinky/3/rules.mk | 1 + keyboards/pinky/4/4.c | 1 + keyboards/pinky/4/4.h | 51 +++++ keyboards/pinky/4/config.h | 246 +++++++++++++++++++++ keyboards/pinky/4/keymaps/default/config.h | 31 +++ keyboards/pinky/4/keymaps/default/keymap.c | 154 +++++++++++++ keyboards/pinky/4/keymaps/default/rules.mk | 18 ++ keyboards/pinky/4/rules.mk | 1 + keyboards/pinky/config.h | 20 ++ keyboards/pinky/pinky.c | 43 ++++ keyboards/pinky/pinky.h | 29 +++ keyboards/pinky/readme.md | 25 +++ keyboards/pinky/rules.mk | 85 +++++++ 19 files changed, 1181 insertions(+) create mode 100644 keyboards/pinky/3/3.c create mode 100644 keyboards/pinky/3/3.h create mode 100644 keyboards/pinky/3/config.h create mode 100644 keyboards/pinky/3/keymaps/default/config.h create mode 100644 keyboards/pinky/3/keymaps/default/keymap.c create mode 100644 keyboards/pinky/3/keymaps/default/rules.mk create mode 100644 keyboards/pinky/3/rules.mk create mode 100644 keyboards/pinky/4/4.c create mode 100644 keyboards/pinky/4/4.h create mode 100644 keyboards/pinky/4/config.h create mode 100644 keyboards/pinky/4/keymaps/default/config.h create mode 100644 keyboards/pinky/4/keymaps/default/keymap.c create mode 100644 keyboards/pinky/4/keymaps/default/rules.mk create mode 100644 keyboards/pinky/4/rules.mk create mode 100644 keyboards/pinky/config.h create mode 100644 keyboards/pinky/pinky.c create mode 100644 keyboards/pinky/pinky.h create mode 100644 keyboards/pinky/readme.md create mode 100644 keyboards/pinky/rules.mk diff --git a/keyboards/pinky/3/3.c b/keyboards/pinky/3/3.c new file mode 100644 index 000000000000..200510d0aa23 --- /dev/null +++ b/keyboards/pinky/3/3.c @@ -0,0 +1 @@ +#include "pinky.h" diff --git a/keyboards/pinky/3/3.h b/keyboards/pinky/3/3.h new file mode 100644 index 000000000000..ca1109d262a8 --- /dev/null +++ b/keyboards/pinky/3/3.h @@ -0,0 +1,46 @@ +#pragma once + +#include "../pinky.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, R30, R31, R32, R33 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { KC_NO, KC_NO, KC_NO, L30, L31, L32, L33 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, KC_NO, R33, R32, R31, R30 } \ + } + +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, R30, R31, R32, R33 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##R30, KC_##R31, KC_##R32, KC_##R33 \ + ) diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h new file mode 100644 index 000000000000..1b120b9cb0ed --- /dev/null +++ b/keyboards/pinky/3/config.h @@ -0,0 +1,246 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tamanishi +#define PRODUCT Pinky +#define DESCRIPTION A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +// #define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +// #define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/pinky/3/keymaps/default/config.h b/keyboards/pinky/3/keymaps/default/config.h new file mode 100644 index 000000000000..db797767299f --- /dev/null +++ b/keyboards/pinky/3/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define RETRO_TAPPPING diff --git a/keyboards/pinky/3/keymaps/default/keymap.c b/keyboards/pinky/3/keymaps/default/keymap.c new file mode 100644 index 000000000000..94ed82b02edb --- /dev/null +++ b/keyboards/pinky/3/keymaps/default/keymap.c @@ -0,0 +1,134 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +#define ________ KC_TRNS +#define XXXXXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_ADJ ADJUST +#define KC_CTLTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ADJ, KC_ADJ, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LALT, KC_LOWER, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RAISE, KC_RALT \ + //`---------------------------------------' `---------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, ________, ________, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, ________, ________, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + ________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, KC_F11, KC_F12, ________, ________, ________, KC_LCBR, KC_RCBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + diff --git a/keyboards/pinky/3/keymaps/default/rules.mk b/keyboards/pinky/3/keymaps/default/rules.mk new file mode 100644 index 000000000000..176869809356 --- /dev/null +++ b/keyboards/pinky/3/keymaps/default/rules.mk @@ -0,0 +1,18 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/3/rules.mk b/keyboards/pinky/3/rules.mk new file mode 100644 index 000000000000..1bb8bf6d7fd4 --- /dev/null +++ b/keyboards/pinky/3/rules.mk @@ -0,0 +1 @@ +# empty diff --git a/keyboards/pinky/4/4.c b/keyboards/pinky/4/4.c new file mode 100644 index 000000000000..200510d0aa23 --- /dev/null +++ b/keyboards/pinky/4/4.c @@ -0,0 +1 @@ +#include "pinky.h" diff --git a/keyboards/pinky/4/4.h b/keyboards/pinky/4/4.h new file mode 100644 index 000000000000..ad105ce7fc53 --- /dev/null +++ b/keyboards/pinky/4/4.h @@ -0,0 +1,51 @@ +#pragma once + +#include "../pinky.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R40, R41, R42, R43 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { KC_NO, KC_NO, KC_NO, L40, L41, L42, L43 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { KC_NO, KC_NO, KC_NO, R43, R42, R41, R40 } \ + } + +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, R40, R41, R42, R43 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \ + KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##R40, KC_##R41, KC_##R42, KC_##R43 \ + ) diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h new file mode 100644 index 000000000000..2348d4084544 --- /dev/null +++ b/keyboards/pinky/4/config.h @@ -0,0 +1,246 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER tamanishi +#define PRODUCT Pinky +#define DESCRIPTION A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } + +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +// #define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +// #define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/pinky/4/keymaps/default/config.h b/keyboards/pinky/4/keymaps/default/config.h new file mode 100644 index 000000000000..db797767299f --- /dev/null +++ b/keyboards/pinky/4/keymaps/default/config.h @@ -0,0 +1,31 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keymaps/default/keymap.c b/keyboards/pinky/4/keymaps/default/keymap.c new file mode 100644 index 000000000000..ee43194dd8b8 --- /dev/null +++ b/keyboards/pinky/4/keymaps/default/keymap.c @@ -0,0 +1,154 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST +}; + +#define ________ KC_TRNS +#define XXXXXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_ADJ ADJUST +#define KC_CTLTB CTL_T(KC_TAB) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_CTLTB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, KC_RCBR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ADJ, KC_ADJ, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + KC_LALT, KC_LOWER, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RAISE, KC_RALT \ + //`---------------------------------------' `---------------------------------------' + ), + + [_LOWER] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_RAISE] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + KC_GRV, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_MINS, KC_EQL, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ), + + [_ADJUST] = LAYOUT( \ + //,---------------------------------------------------------------------. ,---------------------------------------------------------------------. + ________, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ________, ________, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, KC_F11, KC_F12, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, KC_HOME, KC_PGDN, KC_PGUP, KC_END, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________, ________,\ + //|---------+---------+---------+---------+---------+---------+---------| |---------+---------+---------+---------+---------+---------+---------| + ________, ________, ________, ________, ________, ________, ________, ________ \ + //`---------------------------------------' `---------------------------------------' + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + // set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/pinky/4/keymaps/default/rules.mk b/keyboards/pinky/4/keymaps/default/rules.mk new file mode 100644 index 000000000000..176869809356 --- /dev/null +++ b/keyboards/pinky/4/keymaps/default/rules.mk @@ -0,0 +1,18 @@ + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SWAP_HANDS_ENABLE = no # Enable one-hand typing diff --git a/keyboards/pinky/4/rules.mk b/keyboards/pinky/4/rules.mk new file mode 100644 index 000000000000..1bb8bf6d7fd4 --- /dev/null +++ b/keyboards/pinky/4/rules.mk @@ -0,0 +1 @@ +# empty diff --git a/keyboards/pinky/config.h b/keyboards/pinky/config.h new file mode 100644 index 000000000000..7f0c3c10ea9a --- /dev/null +++ b/keyboards/pinky/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2018 'Masayuki Sunahara' + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/pinky/pinky.c b/keyboards/pinky/pinky.c new file mode 100644 index 000000000000..9b98ea85d3f0 --- /dev/null +++ b/keyboards/pinky/pinky.c @@ -0,0 +1,43 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "pinky.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/pinky/pinky.h b/keyboards/pinky/pinky.h new file mode 100644 index 000000000000..9cc5d8d5898f --- /dev/null +++ b/keyboards/pinky/pinky.h @@ -0,0 +1,29 @@ +/* Copyright 2018 'Masayuki Sunahara' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#ifndef PINKY_H +#define PINKY_H + +#include "quantum.h" + +#ifdef KEYBOARD_pinky_3 + #include "3.h" +#endif + +#ifdef KEYBOARD_pinky_4 + #include "4.h" +#endif + +#endif diff --git a/keyboards/pinky/readme.md b/keyboards/pinky/readme.md new file mode 100644 index 000000000000..f9eb6ee2b851 --- /dev/null +++ b/keyboards/pinky/readme.md @@ -0,0 +1,25 @@ +Pinky +=== + +A split keyboard with 3 or 4 x7 vertically staggered keys and 4 thumb keys. +An idea is inspired from [crkbd](https://github.com/foostan/crkbd), [Lily58](https://github.com/kata0510/Lily58), [Ergo42](https://github.com/Biacco42/Ergo42) and [Helix](https://github.com/MakotoKurauchi/helix). + +Keyboard Maintainer: [Masayuki Sunahara](https://github.com/tamanishi/) [@tamanishi](https://twitter.com/tamanishi) +Hardware Supported: Pinky3(3rows) or Pinky4(4rows) PCB, Pro Micro +Hardware Availability: [Pinky3 PCB & Case Data](https://github.com/tamanishi/Pinky3), [Pinky4 PCB & Case Data](https://github.com/tamanishi/Pinky4) + +Make example for pinky(3rows) keyboard (after setting up your build environment): + + make pinky:default + or + make pinky/3:default + +Make example for pinky(4rows) keyboard (after setting up your build environment): + + make pinky/4:default + +Install example for pinky(3rows) keyboard: + + make pinky:default:avrdude + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/pinky/rules.mk b/keyboards/pinky/rules.mk new file mode 100644 index 000000000000..1c0059d318bd --- /dev/null +++ b/keyboards/pinky/rules.mk @@ -0,0 +1,85 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = pinky/3 From 9153ff59d4996425df0cc9cd60b959cd45200f79 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 5 Jan 2019 10:04:45 -0800 Subject: [PATCH 074/458] Keyboard: update readme with ps2avr flashing instructions (#4776) --- keyboards/mehkee96/readme.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/keyboards/mehkee96/readme.md b/keyboards/mehkee96/readme.md index 9dfad2a79eb0..a06f2e33e6a7 100644 --- a/keyboards/mehkee96/readme.md +++ b/keyboards/mehkee96/readme.md @@ -12,5 +12,35 @@ Make example for this keyboard (after setting up your build environment): make mehkee96:default -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). +Flashing + +ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods. + +Windows: +1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +2. Place your keyboard into reset. +3. Press the `Find Device` button and ensure that your keyboard is found. +4. Press the `Open .hex File` button and locate the `.hex` file you created. +5. Press the `Flash Device` button and wait for the process to complete. + +macOS: +1. Install homebrew by typing the following: + ``` + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" + ``` +2. Install `crosspack-avr`. + ``` + brew cask install crosspack-avr + ``` +3. Install the following packages: + ``` + brew install python + brew install pyusb + brew install --HEAD`https://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). From 27b512d9f550dd1a42466733c0c3066742aeb300 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 5 Jan 2019 15:34:19 -0800 Subject: [PATCH 075/458] Keyboard: Tradestation code tidy and readme refactor (#4784) * Tradestation: tidy code - correct JSON syntax on info.json - visual key alignment on info.json - white space changes on rules.mk and tradestation.h (readability/QMK conventions) * Tradestation: readme refactor Modify readme.md to more closely match QMK template. * Tradestation: readme update Update The Board podcast link for libsyn. --- keyboards/handwired/tradestation/info.json | 12 +++---- keyboards/handwired/tradestation/readme.md | 26 ++++++++------- keyboards/handwired/tradestation/rules.mk | 3 +- .../handwired/tradestation/tradestation.h | 32 +++++++++---------- 4 files changed, 38 insertions(+), 35 deletions(-) diff --git a/keyboards/handwired/tradestation/info.json b/keyboards/handwired/tradestation/info.json index f26d4ec371f8..e59c217cb70b 100644 --- a/keyboards/handwired/tradestation/info.json +++ b/keyboards/handwired/tradestation/info.json @@ -2,14 +2,14 @@ "keyboard_name": "Tradestation", "url": "", "maintainer": "Flehrad", - "bootloader": "", - "width": 4.3, - "height": 4.5, + "width": 4.375, + "height": 4.375, "layouts": { "LAYOUT_tradestation": { - "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25, "w":2}, {"x":2.25, "y":2.25, "w":2}, {"x":0, "y":3.5, "w":2}, {"x":2.25, "y":3.5, "w":2}] + "layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25, "w":2},{"x":2.25, "y":2.25, "w":2},{"x":0, "y":3.5, "w":2},{"x":2.25, "y":3.5, "w":2}] }, - "LAYOUT_ortho_4x4": { - "layout": [{"x":0, "y":0}, {"x":1.1, "y":0}, {"x":2.2, "y":0}, {"x":3.3, "y":0}, {"x":0, "y":1.1}, {"x":1.1, "y":1.1}, {"x":2.2, "y":1.1}, {"x":3.3, "y":1.1}, {"x":0, "y":2.25}, {"x":1, "y":2.25}, {"x":2.25, "y":2.25}, {"x":3.25, "y":2.25}, {"x":0, "y":3.5}, {"x":1, "y":3.5}, {"x":2.25, "y":3.5}, {"x":3.25, "y":3.5}] + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0},{"x":1.125, "y":0},{"x":2.25, "y":0},{"x":3.375, "y":0},{"x":0, "y":1.1},{"x":1.125, "y":1.1},{"x":2.25, "y":1.1},{"x":3.375, "y":1.1},{"x":0, "y":2.25},{"x":1.125, "y":2.25},{"x":2.25, "y":2.25},{"x":3.375, "y":2.25},{"x":0, "y":3.5},{"x":1.125, "y":3.5},{"x":2.25, "y":3.5},{"x":3.375, "y":3.5}] + } } } diff --git a/keyboards/handwired/tradestation/readme.md b/keyboards/handwired/tradestation/readme.md index 69c0331a92cc..3a8c39e26327 100644 --- a/keyboards/handwired/tradestation/readme.md +++ b/keyboards/handwired/tradestation/readme.md @@ -1,25 +1,27 @@ # Tradestation -QMK for Tradestation Macropad -This macropad was layout designed by Didier Luximon +[Image Gallery](https://imgur.com/a/yxQJXMT) + +A 4x4 ortholinear macropad, with options for 2U keys on the bottom half. Can be built as single PCB with custom case, or as two-PCB style with standoffs. Requires a Pro Micro. This PCB supports an overall 4x4 matrix with unique spacing. + * Top two rows are 1U keys with 1/8U spacing * Bottom two rows are available with 4x2 1U as clusters of 2x1U or as 2x2 2U, spaced with 1/4U -For QMK Configurator, the info.json is utilised. -- For 2U keys , the first 1u row/column key assignment is the same as the 2u position. - -Build requires a pro micro. +If you like this simple PCB and want to make a donation, you can do so at [paypal.me/theboardpodcast](https://paypal.me/theboardpodcast). -Can be built as single PCB with custom case, or as two PCB style with standoffs. +- [The Board Podcast on YouTube](https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) +- [The Board Podcast on Libsyn](http://theboard.libsyn.com/) +- [The Board Podcast on Patreon](https://www.patreon.com/theboardpodcast) -If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast +Designed by Didier Luximon. -Check out our: +Keyboard Maintainer: [flehrad](https://github.com/flehrad) +Hardware Supported: Tradestation PCB, Pro Micro -YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw) +Make example for this keyboard (after setting up your build environment): -Podcast (www.libsyn.com/theboardpodcast) + make tradestation:default -Patreon (www.patreon.com/theboardpodcast) +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/tradestation/rules.mk b/keyboards/handwired/tradestation/rules.mk index 9d49888b5fb8..649b63babf93 100644 --- a/keyboards/handwired/tradestation/rules.mk +++ b/keyboards/handwired/tradestation/rules.mk @@ -62,4 +62,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = no - LAYOUTS = ortho_4x4 + +LAYOUTS = ortho_4x4 diff --git a/keyboards/handwired/tradestation/tradestation.h b/keyboards/handwired/tradestation/tradestation.h index 15e40e3b5196..60b53b7ddf15 100644 --- a/keyboards/handwired/tradestation/tradestation.h +++ b/keyboards/handwired/tradestation/tradestation.h @@ -3,25 +3,25 @@ #include "quantum.h" #define LAYOUT_ortho_4x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33 \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 } \ } #define LAYOUT_tradestation( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K22, \ - K30, K32 \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K22, \ + K30, K32 \ ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, KC_NO, K22, KC_NO }, \ - { K30, KC_NO, K32, KC_NO } \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, KC_NO, K22, KC_NO }, \ + { K30, KC_NO, K32, KC_NO } \ } From 90046af17fb3ffe1dfe57d87b83a894ce925f3c1 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 5 Jan 2019 15:34:38 -0800 Subject: [PATCH 076/458] Keyboard: Numbrero: Configurator fix and code tidy (#4787) * Numbrero: fix Configurator mismatch Key object order in info.json didn't match the layout macro, leading to keys being assigned out-of-sequence. * Numbrero: tidy - white space changes in numbrero.h (alignment/readability/QMK conventions) - minor changes to readme.md (grammar, mostly) --- keyboards/handwired/numbrero/info.json | 57 ++++++++++++++++++++++--- keyboards/handwired/numbrero/numbrero.h | 38 ++++++++--------- keyboards/handwired/numbrero/readme.md | 6 +-- 3 files changed, 73 insertions(+), 28 deletions(-) diff --git a/keyboards/handwired/numbrero/info.json b/keyboards/handwired/numbrero/info.json index 85c4b48275ef..d2f7ebd031d0 100644 --- a/keyboards/handwired/numbrero/info.json +++ b/keyboards/handwired/numbrero/info.json @@ -5,11 +5,58 @@ "width": 5, "height": 5, "layouts": { - "LAYOUT_numbrero_numpad": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1, "h":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3, "h":2}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4, "w":2}, {"x":3, "y":4}] - }, - "LAYOUT_numbrero_ortho": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":0, "y":1, "h":1.5}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":0, "y":2.5}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":0, "y":3.5, "h":1.5}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}] + "LAYOUT_numbrero_numpad": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K10", "x":0, "y":1, "h":1.5}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K20", "x":0, "y":2.5}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K23", "x":3, "y":2}, + {"label":"K14", "x":4, "y":1, "h":2}, + {"label":"K30", "x":0, "y":3.5, "h":1.5}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K41", "x":1, "y":4, "w":2}, + {"label":"K43", "x":3, "y":4}, + {"label":"K34", "x":4, "y":3, "h":2} + ] + }, + "LAYOUT_numbrero_ortho": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K10", "x":0, "y":1, "h":1.5}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K20", "x":0, "y":2.5}, + {"label":"K21", "x":1, "y":2}, + {"label":"K22", "x":2, "y":2}, + {"label":"K23", "x":3, "y":2}, + {"label":"K24", "x":4, "y":2}, + {"label":"K30", "x":0, "y":3.5, "h":1.5}, + {"label":"K31", "x":1, "y":3}, + {"label":"K32", "x":2, "y":3}, + {"label":"K33", "x":3, "y":3}, + {"label":"K34", "x":4, "y":3}, + {"label":"K41", "x":1, "y":4}, + {"label":"K42", "x":2, "y":4}, + {"label":"K43", "x":3, "y":4}, + {"label":"K44", "x":4, "y":4} + ] } } } diff --git a/keyboards/handwired/numbrero/numbrero.h b/keyboards/handwired/numbrero/numbrero.h index d4aff8b88059..c72e65407884 100644 --- a/keyboards/handwired/numbrero/numbrero.h +++ b/keyboards/handwired/numbrero/numbrero.h @@ -3,28 +3,28 @@ #include "quantum.h" #define LAYOUT_numbrero_numpad( \ - K00, K01, K02, K03, K04, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, K14, \ - K30, K31, K32, K33, \ - K41, K43, K34 \ + K00, K01, K02, K03, K04, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, K14, \ + K30, K31, K32, K33, \ + K41, K43, K34 \ ) { \ - { K00, K01, K02, K03, K04 }, \ - { K10, K11, K12, K13, K14 }, \ - { K20, K21, K22, K23, KC_NO }, \ - { K30, K31, K32, K33, K34 }, \ - { KC_NO, K41, KC_NO, K43, KC_NO } \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, KC_NO }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, KC_NO, K43, KC_NO } \ } #define LAYOUT_numbrero_ortho(\ K00, K01, K02, K03, K04, \ - K10, K11, K12, K13, K14, \ - K20, K21, K22, K23, K24, \ - K30, K31, K32, K33, K34, \ - K41, K42, K43, K44 \ + K10, K11, K12, K13, K14, \ + K20, K21, K22, K23, K24, \ + K30, K31, K32, K33, K34, \ + K41, K42, K43, K44 \ ){ \ - { K00, K01, K02, K03, K04 }, \ - { K10, K11, K12, K13, K14 }, \ - { K20, K21, K22, K23, K24 }, \ - { K30, K31, K32, K33, K34 }, \ - { KC_NO, K41, K42, K43, K44 } \ + { K00, K01, K02, K03, K04 }, \ + { K10, K11, K12, K13, K14 }, \ + { K20, K21, K22, K23, K24 }, \ + { K30, K31, K32, K33, K34 }, \ + { KC_NO, K41, K42, K43, K44 } \ } diff --git a/keyboards/handwired/numbrero/readme.md b/keyboards/handwired/numbrero/readme.md index a69eeefd4355..42f005dbe234 100644 --- a/keyboards/handwired/numbrero/readme.md +++ b/keyboards/handwired/numbrero/readme.md @@ -1,11 +1,9 @@ # Numbrero -No picture currently available. - -A Reversible Numpad (Left/Right handed) with extra macro keys. +A reversible numpad (left/right-handed) with extra macro keys. Keyboard Maintainer: [Flehrad](https://github.com/flehrad) -Hardware Supported: Numbrero PCB. +Hardware Supported: Numbrero PCB, Pro Micro Hardware Availability: The Board Podcast Slack Make example for this keyboard (after setting up your build environment): From 4aaa4b3428367c0bee187c17dc05063b10284502 Mon Sep 17 00:00:00 2001 From: mikethetiger <30720424+mikethetiger@users.noreply.github.com> Date: Sun, 6 Jan 2019 12:36:24 -0600 Subject: [PATCH 077/458] Keymap: added my espectro keymap (#4791) * adding my planck keymap * adding my planck keymap * added my espectro keymap --- .../espectro/keymaps/mikethetiger/keymap.c | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 keyboards/espectro/keymaps/mikethetiger/keymap.c diff --git a/keyboards/espectro/keymaps/mikethetiger/keymap.c b/keyboards/espectro/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000000..e594184ca530 --- /dev/null +++ b/keyboards/espectro/keymaps/mikethetiger/keymap.c @@ -0,0 +1,88 @@ +/* Copyright 2018 @TurboMech /u/TurboMech @A9entOran9e#6134 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + +#include QMK_KEYBOARD_H + +#define _BL 0 //Base layer +#define _FN1 1 //Function layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* BL +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | | | | | +| ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | PRT SC | SCR LK | PAUSE | P UP | P DOWN | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | BACK | NUM | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | SPACE | LOCK | / | * | - | +|________|________|________|________|________|________|________|________|________|________|________|________|________|_________________|________|________|________|________| +| | | | | | | | | | | | [ | ] | | | | | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | 7 | 8 | 9 | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________| + | +| | | | | | | | | | | ; | ' | | | | | | +| CAPS LOCK | A | S | D | F | G | H | J | K | L | : | " | ENTER | 4 | 5 | 6 | | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | , | . | / | | | | | | | +| SHIFT | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | 1 | 2 | 3 | | +|__________________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________| ENTER | +| | | | | | | MO | | | | | | | +| CTRL | LGUI | L ALT | SPACE | VOL Dn | VOL Up | _FN | LEFT | DOWN | RIGHT | 0 | . | | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| + */ + + [_BL] = LAYOUT_default( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_PGUP, KC_PGDN, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_VOLD, KC_VOLU, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT \ + ), + +/* FN_1 +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | VOL | VOL | NEXT | | | +| RESET | | | | | | | | | | | | | MUTE | DOWN | UP | TRACK | HOME | END | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | RGB | RGB | RGB | RGB | RGB | RGB | RGB | RGB | | | | | | | | | | +| | TOGGLE | MODE |INCREASE|DECREASE| HUE | HUE | SAT | SAT | | | | | DELETE | | | | | +|________|________|________|________|________|INCREASE|DECREASE|INCREASE|DECREASE|________|________|________|________|_________________|________|________|________|________| +| | BACK | BACK | | | | | | | | | | | | | | | | +| | LIGHT | LIGHT | | | | | | | | | | | | | | | | +|____________| TOGGLE |INCREASE|DECREASE|________|________|________|________|________|________|________|________|________|_____________|________|________|________| | +| | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | +|__________________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________| | +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| + */ + + [_FN1] = LAYOUT_default( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_HOME, KC_END, \ + _______, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, \ + _______, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +}; + From 2c0bc5ed6be737e98377fa2299102f6737bbea72 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 6 Jan 2019 11:05:24 -0800 Subject: [PATCH 078/458] Keyboard: Fractal layout macro and readme cleanup (#4789) * Fractal: layout macro cleanup Removed KEYMAP alias for LAYOUT_preonic_mit. Alias was unused, and the terminology usage is deprecated. * Fractal: readme cleanup Updated the line containing the documentation links in the readme. * Fractal: disable preonic_mit community layout QMK doesn't have a preonic_mit community layout at this time. Disables preonic_mit as an option for community layout. Can be re-enabled when the layout is added. --- keyboards/fractal/fractal.h | 7 +------ keyboards/fractal/readme.md | 2 +- keyboards/fractal/rules.mk | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/keyboards/fractal/fractal.h b/keyboards/fractal/fractal.h index 1eefcecd7538..0af7c22390a3 100755 --- a/keyboards/fractal/fractal.h +++ b/keyboards/fractal/fractal.h @@ -1,5 +1,4 @@ -#ifndef FRACTAL_H -#define FRACTAL_H +#pragma once #include "quantum.h" @@ -30,7 +29,3 @@ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 }, \ { K400, K401, K402, K403, K404, KC_NO, K406, K407, K408, K409, K410, K411 } \ } - -#define KEYMAP LAYOUT_preonic_mit - -#endif diff --git a/keyboards/fractal/readme.md b/keyboards/fractal/readme.md index 1bb41cf7ffb2..3b9e59d2172f 100644 --- a/keyboards/fractal/readme.md +++ b/keyboards/fractal/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make fractal:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk index b5808c15eaff..0de2a7d39f7e 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -57,5 +57,5 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -LAYOUTS = preonic_mit ortho_5x12 +LAYOUTS = ortho_5x12 # preonic_mit LAYOUTS_HAS_RGB = no From 2bfac351edebc6e141d3291448512b0e228e5c47 Mon Sep 17 00:00:00 2001 From: yiancar Date: Mon, 7 Jan 2019 01:22:19 +0000 Subject: [PATCH 079/458] Final HS60v2 changes. (#4790) * initial commit, this now mostly works - RGB controls work - Dynamic keymap still broken due to eeprom - Via works * STM32 eeprom update - Update EEPROM emulation library to handle 8bit data like AVR. - This library also allows for multiple page pairs resulting in greater EEPROM size flexibility * hs60 changes * HS60 hhkb added * Update keyboards/hs60/v2/config.h Co-Authored-By: yiancar --- drivers/issi/is31fl3733.c | 2 +- keyboards/hs60/v2/config.h | 89 ++- keyboards/hs60/v2/keymaps/ansi/config.h | 2 + keyboards/hs60/v2/keymaps/ansi/keymap.c | 22 +- keyboards/hs60/v2/keymaps/ansi/readme.md | 6 +- keyboards/hs60/v2/keymaps/default/keymap.c | 20 +- keyboards/hs60/v2/keymaps/default/readme.md | 6 +- keyboards/hs60/v2/keymaps/hhkb/config.h | 13 + keyboards/hs60/v2/keymaps/hhkb/keymap.c | 34 +- keyboards/hs60/v2/keymaps/hhkb/readme.md | 6 + keyboards/hs60/v2/mcuconf.h | 2 +- keyboards/hs60/v2/rules.mk | 18 +- keyboards/hs60/v2/v2.c | 621 +---------------- keyboards/hs60/v2/v2.h | 7 +- keyboards/zeal60/rgb_backlight.c | 285 +++++++- tmk_core/common/chibios/eeprom_stm32.c | 710 ++++---------------- tmk_core/common/chibios/eeprom_stm32.h | 68 +- tmk_core/common/chibios/flash_stm32.c | 15 + tmk_core/common/chibios/flash_stm32.h | 1 + tmk_core/common/eeconfig.c | 4 +- tmk_core/common/eeconfig.h | 21 +- tmk_core/common/eeprom.h | 1 - tmk_core/protocol/chibios/main.c | 2 +- 23 files changed, 611 insertions(+), 1344 deletions(-) create mode 100644 keyboards/hs60/v2/keymaps/hhkb/readme.md diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c index c198ec517460..c18ed7ca30b3 100644 --- a/drivers/issi/is31fl3733.c +++ b/drivers/issi/is31fl3733.c @@ -24,10 +24,10 @@ #include "wait.h" #endif +#include "is31fl3733.h" #include #include "i2c_master.h" #include "progmem.h" -#include "rgb_matrix.h" // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index 192f7d6f25db..bc1681ffd15a 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x0258 -#define DEVICE_VER 0x0001 +#define VENDOR_ID 0x8968 +#define PRODUCT_ID 0x4853 +#define DEVICE_VER 0x0002 #define MANUFACTURER Yiancar-Designs #define PRODUCT HS60 V2 #define DESCRIPTION GH60 compatible, tool free RGB keyboard @@ -39,7 +39,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 0 +#define DEBOUNCING_DELAY 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -70,48 +70,63 @@ along with this program. If not, see . */ //#define FORCE_NKRO -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - /* key combination for magic key command */ #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ +/* Backlight options */ -/* disable debug print */ -//#define NO_DEBUG +#define RGB_BACKLIGHT_ENABLED 1 -/* disable print */ -//#define NO_PRINT +#define RGB_BACKLIGHT_HS60 -/* Backlight options */ +// they aren't really used if RGB_BACKLIGHT_HS60 defined +#define RGB_BACKLIGHT_USE_SPLIT_BACKSPACE 0 +#define RGB_BACKLIGHT_USE_SPLIT_LEFT_SHIFT 0 +#define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 0 +#define RGB_BACKLIGHT_USE_7U_SPACEBAR 0 +#define RGB_BACKLIGHT_USE_ISO_ENTER 0 +#define RGB_BACKLIGHT_DISABLE_HHKB_BLOCKER_LEDS 0 -#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended -#define RGB_MATRIX_SKIP_FRAMES 3 +// disable backlight when USB suspended (PC sleep/hibernate/shutdown) +#define RGB_BACKLIGHT_DISABLE_WHEN_USB_SUSPENDED 0 -#define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. +// disable backlight after timeout in minutes, 0 = no timeout +#define RGB_BACKLIGHT_DISABLE_AFTER_TIMEOUT 0 -#define DRIVER_COUNT 2 -#ifdef HS60_ANSI -#define DRIVER_1_LED_TOTAL 61 -#else -#define DRIVER_1_LED_TOTAL 62 -#endif +// the default effect (RGB test) +#define RGB_BACKLIGHT_EFFECT 255 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 2 +#define DRIVER_LED_TOTAL 64 + +// These define which keys in the matrix are alphas/mods +// Used for backlight effects so colors are different for +// alphas vs. mods +// Each value is for a row, bit 0 is column 0 +// Alpha=0 Mod=1 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0010000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011110000000111 + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Backlight config starts after EEPROM version +#define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR 35 +// Dynamic keymap starts after backlight config (35+31) +#define DYNAMIC_KEYMAP_EEPROM_ADDR 66 +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 +// Dynamic macro starts after dynamic keymaps (66+(4*5*14*2)) = (66+560) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/hs60/v2/keymaps/ansi/config.h b/keyboards/hs60/v2/keymaps/ansi/config.h index f51cc16d8536..96adaf56884e 100644 --- a/keyboards/hs60/v2/keymaps/ansi/config.h +++ b/keyboards/hs60/v2/keymaps/ansi/config.h @@ -19,3 +19,5 @@ along with this program. If not, see . /* Include overwrites for specific keymap */ #define HS60_ANSI +#undef PRODUCT_ID +#define PRODUCT_ID 0x4854 diff --git a/keyboards/hs60/v2/keymaps/ansi/keymap.c b/keyboards/hs60/v2/keymaps/ansi/keymap.c index 923af9e2ce0e..ba649470b41d 100644 --- a/keyboards/hs60/v2/keymaps/ansi/keymap.c +++ b/keyboards/hs60/v2/keymaps/ansi/keymap.c @@ -26,11 +26,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), [1] = LAYOUT_60_ansi( /* FN */ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS,\ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_60_ansi( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; void matrix_init_user(void) { diff --git a/keyboards/hs60/v2/keymaps/ansi/readme.md b/keyboards/hs60/v2/keymaps/ansi/readme.md index fa811319d381..650871a5e689 100644 --- a/keyboards/hs60/v2/keymaps/ansi/readme.md +++ b/keyboards/hs60/v2/keymaps/ansi/readme.md @@ -1,6 +1,6 @@ -The default keymap for ANSI HS60 -================================ +The default keymap for ANSI HS60 V2 +=================================== -![Layout image](https://imgur.com/CSyPw0J.png) +![Layout image](https://i.imgur.com/m8t5CfE.png) Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/default/keymap.c b/keyboards/hs60/v2/keymaps/default/keymap.c index 2a5e823618c8..c1e575769fea 100644 --- a/keyboards/hs60/v2/keymaps/default/keymap.c +++ b/keyboards/hs60/v2/keymaps/default/keymap.c @@ -26,11 +26,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), [1] = LAYOUT_60_iso( /* FN */ - KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_TRNS,\ KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[2] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +[3] = LAYOUT_60_iso( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; void matrix_init_user(void) { diff --git a/keyboards/hs60/v2/keymaps/default/readme.md b/keyboards/hs60/v2/keymaps/default/readme.md index 9125cb349e82..f0b29900e6bf 100644 --- a/keyboards/hs60/v2/keymaps/default/readme.md +++ b/keyboards/hs60/v2/keymaps/default/readme.md @@ -1,6 +1,6 @@ -The default keymap for ISO HS60 -=============================== +The default keymap for ISO HS60 V2 +================================== -![Layout image](https://imgur.com/HXj4tYL.png) +![Layout image](https://imgur.com/6go4vQV.png) Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/keymaps/hhkb/config.h b/keyboards/hs60/v2/keymaps/hhkb/config.h index 3db403ecc5c3..fc1b6d8f47bb 100644 --- a/keyboards/hs60/v2/keymaps/hhkb/config.h +++ b/keyboards/hs60/v2/keymaps/hhkb/config.h @@ -19,3 +19,16 @@ along with this program. If not, see . /* Include overwrites for specific keymap */ #define HS60_HHKB +#undef PRODUCT_ID +#define PRODUCT_ID 0x4855 + +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 +#undef RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_0 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_1 0b0000000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_2 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_3 0b0011000000000001 +#define RGB_BACKLIGHT_ALPHAS_MODS_ROW_4 0b0011100000000111 diff --git a/keyboards/hs60/v2/keymaps/hhkb/keymap.c b/keyboards/hs60/v2/keymaps/hhkb/keymap.c index d52fc4bac94c..9641eedb4929 100644 --- a/keyboards/hs60/v2/keymaps/hhkb/keymap.c +++ b/keyboards/hs60/v2/keymaps/hhkb/keymap.c @@ -19,18 +19,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_hhkb( /* Base */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,\ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL ), [1] = LAYOUT_60_hhkb( /* FN */ - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_UP, KC_TRNS, KC_DEL, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,\ + KC_TRNS, EF_DEC, EF_INC, H1_DEC, H1_INC, H2_DEC, H2_INC, BR_DEC, BR_INC, ES_DEC, ES_INC, KC_UP, KC_TRNS, KC_DEL, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_TRNS, S1_DEC, S1_INC, S2_DEC, S2_INC, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +[2] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + +[3] = LAYOUT_60_hhkb( /* Empty for dynamic keymaps */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; void matrix_init_user(void) { diff --git a/keyboards/hs60/v2/keymaps/hhkb/readme.md b/keyboards/hs60/v2/keymaps/hhkb/readme.md new file mode 100644 index 000000000000..69b812c60724 --- /dev/null +++ b/keyboards/hs60/v2/keymaps/hhkb/readme.md @@ -0,0 +1,6 @@ +The default keymap for HHKB HS60 V2 +=================================== + +![Layout image](https://imgur.com/usbrQWL.png) + +Default layer is normal HHKB with 7U space. Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/v2/mcuconf.h b/keyboards/hs60/v2/mcuconf.h index 226da48d5936..ce608f904ede 100644 --- a/keyboards/hs60/v2/mcuconf.h +++ b/keyboards/hs60/v2/mcuconf.h @@ -139,7 +139,7 @@ #define STM32_GPT_USE_TIM1 FALSE #define STM32_GPT_USE_TIM2 FALSE #define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM4 TRUE #define STM32_GPT_USE_TIM6 TRUE #define STM32_GPT_USE_TIM7 TRUE #define STM32_GPT_USE_TIM8 TRUE diff --git a/keyboards/hs60/v2/rules.mk b/keyboards/hs60/v2/rules.mk index 51e3cf0a3ecb..a2850a83057d 100644 --- a/keyboards/hs60/v2/rules.mk +++ b/keyboards/hs60/v2/rules.mk @@ -1,4 +1,9 @@ # project specific files +SRC = keyboards/zeal60/zeal60.c \ + keyboards/zeal60/rgb_backlight.c \ + drivers/issi/is31fl3733.c \ + quantum/color.c \ + drivers/arm/i2c_master.c ## chip/board settings # the next two should match the directories in @@ -44,15 +49,18 @@ DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover -AUDIO_ENABLE = no -RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +AUDIO_ENABLE = no # Audio output on port C6 NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in #SERIAL_LINK_ENABLE = yes + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +CIE1931_CURVE = yes diff --git a/keyboards/hs60/v2/v2.c b/keyboards/hs60/v2/v2.c index 4289c1fed5ca..2e12538e9bb8 100644 --- a/keyboards/hs60/v2/v2.c +++ b/keyboards/hs60/v2/v2.c @@ -13,623 +13,6 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "v2.h" - -//#include "is31fl3733.h" - -// Please ignore this is for upcoming features -/*#ifdef RAW_ENABLE - -void raw_hid_receive( uint8_t *data, uint8_t length ) -{ - uint8_t command = data[0]; - switch ( command ) - { - case id_protocol_version: - { - msg_protocol_version *msg = (msg_protocol_version*)&data[1]; - msg->version = PROTOCOL_VERSION; - break; - } -#if USE_KEYMAPS_IN_EEPROM - case id_keymap_keycode_load: - { - msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1]; - msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column ); - break; - } - case id_keymap_keycode_save: - { - msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1]; - keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode); - break; - } - case id_keymap_default_save: - { - keymap_default_save(); - break; - } -#endif // USE_KEYMAPS_IN_EEPROM - case id_backlight_config_set_values: - { - msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1]; - backlight_config_set_values(msg); - backlight_config_save(); - break; - } - case id_backlight_config_set_alphas_mods: - { - msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1]; - backlight_config_set_alphas_mods( msg->alphas_mods ); - backlight_config_save(); - break; - } - case id_backlight_set_key_color: - { - msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1]; - backlight_set_key_color(msg->row, msg->column, msg->hsv); - break; - } - case id_system_get_state: - { - msg_system_state *msg = (msg_system_state*)&data[1]; - msg->value = backlight_get_tick(); - break; - } - default: - { - // Unhandled message. - data[0] = id_unhandled; - break; - } - } - - // Return same buffer with values changed - raw_hid_send( data, length ); - -} - -#endif*/ - -#ifdef HS60_ANSI - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //MX1 - {0, E_1, D_1, F_1}, //MX2 - {0, H_1, G_1, I_1}, //MX3 - {0, K_1, J_1, L_1}, //MX4 - {0, B_2, A_2, C_2}, //MX6 - {0, E_2, D_2, F_2}, //MX7 - {0, H_2, G_2, I_2}, //MX8 - {0, K_2, J_2, L_2}, //MX14 - {0, B_3, A_3, C_3}, //MX11 - {0, E_3, D_3, F_3}, //MX12 - {0, H_3, G_3, I_3}, //MX13 - {0, K_3, J_3, L_3}, //MX19 - {0, B_4, A_4, C_4}, //MX16 - {0, E_4, D_4, F_4}, //MX17 - {0, H_4, G_4, I_4}, //MX18 - {0, K_4, J_4, L_4}, //MX23 - {0, B_5, A_5, C_5}, //MX20 - {0, E_5, D_5, F_5}, //MX21 - {0, H_5, G_5, I_5}, //MX22 - {0, K_5, J_5, L_5}, //MX27 - {0, B_6, A_6, C_6}, //MX24 - {0, E_6, D_6, F_6}, //MX25 - {0, H_6, G_6, I_6}, //MX26 - {0, K_6, J_6, L_6}, //MX31 - {0, B_7, A_7, C_7}, //MX28 - {0, E_7, D_7, F_7}, //MX29 - {0, H_7, G_7, I_7}, //MX30 - {0, K_7, J_7, L_7}, //MX36 - {0, B_8, A_8, C_8}, //MX33 - {0, E_8, D_8, F_8}, //MX34 - {0, H_8, G_8, I_8}, //MX35 - {0, K_8, J_8, L_8}, //MX40 - {0, B_9, A_9, C_9}, //MX37 - {0, E_9, D_9, F_9}, //MX38 - {0, H_9, G_9, I_9}, //MX39 - {0, K_9, J_9, L_9}, //MX44 - {0, B_10, A_10, C_10}, //MX41 - {0, E_10, D_10, F_10}, //MX42 - {0, H_10, G_10, I_10}, //MX43 - {0, K_10, J_10, L_10}, //MX48 - {0, B_11, A_11, C_11}, //MX45 - {0, E_11, D_11, F_11}, //MX46 - {0, H_11, G_11, I_11}, //MX47 - {0, K_11, J_11, L_11}, //MX53 - {0, B_12, A_12, C_12}, //MX50 - {0, E_12, D_12, F_12}, //MX51 - {0, H_12, G_12, I_12}, //MX52 - - {0, B_13, A_13, C_13}, //MX55 - {0, E_13, D_13, F_13}, //MX56 - - {0, K_13, J_13, L_13}, //MX61 - {0, B_14, A_14, C_14}, //MX59 - {0, E_14, D_14, F_14}, //MX57 - {0, H_14, G_14, I_14}, //MX60 - {0, K_14, J_14, L_14}, //MX62 - {0, B_15, A_15, C_15}, //MX5 - {0, E_15, D_15, F_15}, //MX10 - {0, H_15, G_15, I_15}, //MX15 - {0, K_15, J_15, L_15}, //MX32 - - {0, E_16, D_16, F_16}, //MX49 - {0, H_16, G_16, I_16}, //MX54 - {0, K_16, J_16, L_16}, //MX58 -}; - -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// MX1, MX6, MX11, MX16, MX20, MX24, MX28, MX33, MX37, MX41, MX45, MX50, MX55, MX59, -// MX2, MX7, MX12, MX17, MX21, MX25, MX29, MX34, MX38, MX42, MX46, MX51, MX56, ---, -// MX3, MX8, MX13, MX18, MX22, MX26, MX30, MX35, MX39, MX43, MX47, MX52, MX57, MX60, -// MX4, ---, MX14, MX19, MX23, MX27, MX31, MX36, MX40, MX44, MX48, MX53, ---, MX61, -// MX5, MX10, MX15, ---, ---, ---, MX32, ---, ---, ---, MX49, MX54, MX58, MX62 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, { 0, 0}, 1}, //MX1 - {{1|(0<<4)}, { 0, 16}, 1}, //MX2 - {{2|(0<<4)}, { 0, 32}, 1}, //MX3 - {{3|(0<<4)}, { 0, 48}, 1}, //MX4 - {{0|(1<<4)}, { 17, 0}, 0}, //MX6 - {{1|(1<<4)}, { 17, 16}, 0}, //MX7 - {{2|(1<<4)}, { 17, 32}, 0}, //MX8 - {{3|(2<<4)}, { 34, 48}, 0}, //MX14 - {{0|(2<<4)}, { 34, 0}, 0}, //MX11 - {{1|(2<<4)}, { 34, 16}, 0}, //MX12 - {{2|(2<<4)}, { 34, 32}, 0}, //MX13 - {{3|(3<<4)}, { 51, 48}, 0}, //MX19 - {{0|(3<<4)}, { 51, 0}, 0}, //MX16 - {{1|(3<<4)}, { 51, 16}, 0}, //MX17 - {{2|(3<<4)}, { 51, 32}, 0}, //MX18 - {{3|(4<<4)}, { 68, 48}, 0}, //MX23 - {{0|(4<<4)}, { 68, 0}, 0}, //MX20 - {{1|(4<<4)}, { 68, 16}, 0}, //MX21 - {{2|(4<<4)}, { 68, 32}, 0}, //MX22 - {{3|(5<<4)}, { 85, 48}, 0}, //MX27 - {{0|(5<<4)}, { 85, 0}, 0}, //MX24 - {{1|(5<<4)}, { 85, 16}, 0}, //MX25 - {{2|(5<<4)}, { 85, 32}, 0}, //MX26 - {{3|(6<<4)}, {102, 48}, 0}, //MX31 - {{0|(6<<4)}, {102, 0}, 0}, //MX28 - {{1|(6<<4)}, {102, 16}, 0}, //MX29 - {{2|(6<<4)}, {102, 32}, 0}, //MX30 - {{3|(7<<4)}, {119, 48}, 0}, //MX36 - {{0|(7<<4)}, {119, 0}, 0}, //MX33 - {{1|(7<<4)}, {119, 16}, 0}, //MX34 - {{2|(7<<4)}, {119, 32}, 0}, //MX35 - {{3|(8<<4)}, {136, 48}, 0}, //MX40 - {{0|(8<<4)}, {136, 0}, 0}, //MX37 - {{1|(8<<4)}, {136, 16}, 0}, //MX38 - {{2|(8<<4)}, {136, 32}, 0}, //MX39 - {{3|(9<<4)}, {153, 48}, 0}, //MX44 - {{0|(9<<4)}, {153, 0}, 0}, //MX41 - {{1|(9<<4)}, {153, 16}, 0}, //MX42 - {{2|(9<<4)}, {153, 32}, 0}, //MX43 - {{3|(10<<4)}, {170, 48}, 0}, //MX48 - {{0|(10<<4)}, {170, 0}, 0}, //MX45 - {{1|(10<<4)}, {170, 16}, 0}, //MX46 - {{2|(10<<4)}, {170, 32}, 0}, //MX47 - {{3|(11<<4)}, {187, 48}, 0}, //MX53 - {{0|(11<<4)}, {187, 0}, 0}, //MX50 - {{1|(11<<4)}, {187, 16}, 0}, //MX51 - {{2|(11<<4)}, {187, 32}, 0}, //MX52 - - {{0|(12<<4)}, {204, 0}, 0}, //MX55 - {{1|(12<<4)}, {204, 16}, 0}, //MX56 - - {{3|(13<<4)}, {221, 48}, 1}, //MX61 - {{0|(13<<4)}, {221, 0}, 1}, //MX59 - {{2|(12<<4)}, {221, 16}, 0}, //MX57 - {{2|(13<<4)}, {221, 32}, 1}, //MX60 - {{4|(13<<4)}, {221, 64}, 1}, //MX62 - {{4|(0<<4)}, { 0, 64}, 1}, //MX5 - {{4|(1<<4)}, { 17, 64}, 1}, //MX10 - {{4|(2<<4)}, { 34, 64}, 1}, //MX15 - {{4|(5<<4)}, {102, 64}, 0}, //MX32 - - {{4|(10<<4)}, {170, 64}, 1}, //MX49 - {{4|(11<<4)}, {187, 64}, 1}, //MX54 - {{4|(12<<4)}, {204, 64}, 1} //MX58 -}; - -#elif defined(HS60_HHKB) - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //MX1 - {0, E_1, D_1, F_1}, //MX2 - {0, H_1, G_1, I_1}, //MX3 - {0, K_1, J_1, L_1}, //MX4 - {0, B_2, A_2, C_2}, //MX6 - {0, E_2, D_2, F_2}, //MX7 - {0, H_2, G_2, I_2}, //MX8 - {0, K_2, J_2, L_2}, //MX14 - {0, B_3, A_3, C_3}, //MX11 - {0, E_3, D_3, F_3}, //MX12 - {0, H_3, G_3, I_3}, //MX13 - {0, K_3, J_3, L_3}, //MX19 - {0, B_4, A_4, C_4}, //MX16 - {0, E_4, D_4, F_4}, //MX17 - {0, H_4, G_4, I_4}, //MX18 - {0, K_4, J_4, L_4}, //MX23 - {0, B_5, A_5, C_5}, //MX20 - {0, E_5, D_5, F_5}, //MX21 - {0, H_5, G_5, I_5}, //MX22 - {0, K_5, J_5, L_5}, //MX27 - {0, B_6, A_6, C_6}, //MX24 - {0, E_6, D_6, F_6}, //MX25 - {0, H_6, G_6, I_6}, //MX26 - {0, K_6, J_6, L_6}, //MX31 - {0, B_7, A_7, C_7}, //MX28 - {0, E_7, D_7, F_7}, //MX29 - {0, H_7, G_7, I_7}, //MX30 - {0, K_7, J_7, L_7}, //MX36 - {0, B_8, A_8, C_8}, //MX33 - {0, E_8, D_8, F_8}, //MX34 - {0, H_8, G_8, I_8}, //MX35 - {0, K_8, J_8, L_8}, //MX40 - {0, B_9, A_9, C_9}, //MX37 - {0, E_9, D_9, F_9}, //MX38 - {0, H_9, G_9, I_9}, //MX39 - {0, K_9, J_9, L_9}, //MX44 - {0, B_10, A_10, C_10}, //MX41 - {0, E_10, D_10, F_10}, //MX42 - {0, H_10, G_10, I_10}, //MX43 - {0, K_10, J_10, L_10}, //MX48 - {0, B_11, A_11, C_11}, //MX45 - {0, E_11, D_11, F_11}, //MX46 - {0, H_11, G_11, I_11}, //MX47 - {0, K_11, J_11, L_11}, //MX53 - {0, B_12, A_12, C_12}, //MX50 - {0, E_12, D_12, F_12}, //MX51 - {0, H_12, G_12, I_12}, //MX52 - {0, K_12, J_12, L_12}, //MX64 - {0, B_13, A_13, C_13}, //MX55 - {0, E_13, D_13, F_13}, //MX56 - {0, H_13, G_13, I_13}, //MX63 - {0, K_13, J_13, L_13}, //MX61 - {0, B_14, A_14, C_14}, //MX59 - {0, E_14, D_14, F_14}, //MX57 - {0, H_14, G_14, I_14}, //MX60 - {0, K_14, J_14, L_14}, //MX62 - {0, B_15, A_15, C_15}, //MX5 - {0, E_15, D_15, F_15}, //MX10 - {0, H_15, G_15, I_15}, //MX15 - {0, K_15, J_15, L_15}, //MX32 - - - {0, H_16, G_16, I_16}, //MX54 - {0, K_16, J_16, L_16}, //MX58 -}; - -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// MX1, MX6, MX11, MX16, MX20, MX24, MX28, MX33, MX37, MX41, MX45, MX50, MX55, MX59, -// MX2, MX7, MX12, MX17, MX21, MX25, MX29, MX34, MX38, MX42, MX46, MX51, MX56, MX64, -// MX3, MX8, MX13, MX18, MX22, MX26, MX30, MX35, MX39, MX43, MX47, MX52, MX57, MX60, -// MX4, ----, MX14, MX19, MX23, MX27, MX31, MX36, MX40, MX44, MX48, MX53, MX63, MX61, -// MX5, MX10, MX15, ----, ----, ----, MX32, ----, ---, ----, ----, MX54, MX58, MX62 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, { 0, 0}, 1}, //MX1 - {{1|(0<<4)}, { 0, 16}, 1}, //MX2 - {{2|(0<<4)}, { 0, 32}, 1}, //MX3 - {{3|(0<<4)}, { 0, 48}, 1}, //MX4 - {{0|(1<<4)}, { 17, 0}, 0}, //MX6 - {{1|(1<<4)}, { 17, 16}, 0}, //MX7 - {{2|(1<<4)}, { 17, 32}, 0}, //MX8 - {{3|(2<<4)}, { 34, 48}, 0}, //MX14 - {{0|(2<<4)}, { 34, 0}, 0}, //MX11 - {{1|(2<<4)}, { 34, 16}, 0}, //MX12 - {{2|(2<<4)}, { 34, 32}, 0}, //MX13 - {{3|(3<<4)}, { 51, 48}, 0}, //MX19 - {{0|(3<<4)}, { 51, 0}, 0}, //MX16 - {{1|(3<<4)}, { 51, 16}, 0}, //MX17 - {{2|(3<<4)}, { 51, 32}, 0}, //MX18 - {{3|(4<<4)}, { 68, 48}, 0}, //MX23 - {{0|(4<<4)}, { 68, 0}, 0}, //MX20 - {{1|(4<<4)}, { 68, 16}, 0}, //MX21 - {{2|(4<<4)}, { 68, 32}, 0}, //MX22 - {{3|(5<<4)}, { 85, 48}, 0}, //MX27 - {{0|(5<<4)}, { 85, 0}, 0}, //MX24 - {{1|(5<<4)}, { 85, 16}, 0}, //MX25 - {{2|(5<<4)}, { 85, 32}, 0}, //MX26 - {{3|(6<<4)}, {102, 48}, 0}, //MX31 - {{0|(6<<4)}, {102, 0}, 0}, //MX28 - {{1|(6<<4)}, {102, 16}, 0}, //MX29 - {{2|(6<<4)}, {102, 32}, 0}, //MX30 - {{3|(7<<4)}, {119, 48}, 0}, //MX36 - {{0|(7<<4)}, {119, 0}, 0}, //MX33 - {{1|(7<<4)}, {119, 16}, 0}, //MX34 - {{2|(7<<4)}, {119, 32}, 0}, //MX35 - {{3|(8<<4)}, {136, 48}, 0}, //MX40 - {{0|(8<<4)}, {136, 0}, 0}, //MX37 - {{1|(8<<4)}, {136, 16}, 0}, //MX38 - {{2|(8<<4)}, {136, 32}, 0}, //MX39 - {{3|(9<<4)}, {153, 48}, 0}, //MX44 - {{0|(9<<4)}, {153, 0}, 0}, //MX41 - {{1|(9<<4)}, {153, 16}, 0}, //MX42 - {{2|(9<<4)}, {153, 32}, 0}, //MX43 - {{3|(10<<4)}, {170, 48}, 0}, //MX48 - {{0|(10<<4)}, {170, 0}, 0}, //MX45 - {{1|(10<<4)}, {170, 16}, 0}, //MX46 - {{2|(10<<4)}, {170, 32}, 0}, //MX47 - {{3|(11<<4)}, {187, 48}, 0}, //MX53 - {{0|(11<<4)}, {187, 0}, 0}, //MX50 - {{1|(11<<4)}, {187, 16}, 0}, //MX51 - {{2|(11<<4)}, {187, 32}, 0}, //MX52 - {{1|(13<<4)}, {221, 0}, 1}, //MX64 - {{0|(12<<4)}, {204, 0}, 0}, //MX55 - {{1|(12<<4)}, {204, 16}, 0}, //MX56 - {{3|(12<<4)}, {204, 48}, 0}, //MX63 - {{3|(13<<4)}, {212, 48}, 1}, //MX61 - {{0|(13<<4)}, {221, 0}, 0}, //MX59 - {{2|(12<<4)}, {221, 16}, 0}, //MX57 - {{2|(13<<4)}, {221, 32}, 1}, //MX60 - {{4|(13<<4)}, {221, 64}, 1}, //MX62 - {{4|(0<<4)}, { 0, 64}, 1}, //MX5 - {{4|(1<<4)}, { 17, 64}, 1}, //MX10 - {{4|(2<<4)}, { 34, 64}, 1}, //MX15 - {{4|(5<<4)}, {102, 64}, 0}, //MX32 - - - {{4|(11<<4)}, {187, 64}, 1}, //MX54 - {{4|(12<<4)}, {204, 64}, 1} //MX58 -}; - -#else //ISO layout - -const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { -/* Refer to IS31 manual for these locations - * driver - * | R location - * | | G location - * | | | B location - * | | | | */ - {0, B_1, A_1, C_1}, //MX1 - {0, E_1, D_1, F_1}, //MX2 - {0, H_1, G_1, I_1}, //MX3 - {0, K_1, J_1, L_1}, //MX4 - {0, B_2, A_2, C_2}, //MX6 - {0, E_2, D_2, F_2}, //MX7 - {0, H_2, G_2, I_2}, //MX8 - {0, K_2, J_2, L_2}, //MX14 - {0, B_3, A_3, C_3}, //MX11 - {0, E_3, D_3, F_3}, //MX12 - {0, H_3, G_3, I_3}, //MX13 - {0, K_3, J_3, L_3}, //MX19 - {0, B_4, A_4, C_4}, //MX16 - {0, E_4, D_4, F_4}, //MX17 - {0, H_4, G_4, I_4}, //MX18 - {0, K_4, J_4, L_4}, //MX23 - {0, B_5, A_5, C_5}, //MX20 - {0, E_5, D_5, F_5}, //MX21 - {0, H_5, G_5, I_5}, //MX22 - {0, K_5, J_5, L_5}, //MX27 - {0, B_6, A_6, C_6}, //MX24 - {0, E_6, D_6, F_6}, //MX25 - {0, H_6, G_6, I_6}, //MX26 - {0, K_6, J_6, L_6}, //MX31 - {0, B_7, A_7, C_7}, //MX28 - {0, E_7, D_7, F_7}, //MX29 - {0, H_7, G_7, I_7}, //MX30 - {0, K_7, J_7, L_7}, //MX36 - {0, B_8, A_8, C_8}, //MX33 - {0, E_8, D_8, F_8}, //MX34 - {0, H_8, G_8, I_8}, //MX35 - {0, K_8, J_8, L_8}, //MX40 - {0, B_9, A_9, C_9}, //MX37 - {0, E_9, D_9, F_9}, //MX38 - {0, H_9, G_9, I_9}, //MX39 - {0, K_9, J_9, L_9}, //MX44 - {0, B_10, A_10, C_10}, //MX41 - {0, E_10, D_10, F_10}, //MX42 - {0, H_10, G_10, I_10}, //MX43 - {0, K_10, J_10, L_10}, //MX48 - {0, B_11, A_11, C_11}, //MX45 - {0, E_11, D_11, F_11}, //MX46 - {0, H_11, G_11, I_11}, //MX47 - {0, K_11, J_11, L_11}, //MX53 - {0, B_12, A_12, C_12}, //MX50 - {0, E_12, D_12, F_12}, //MX51 - {0, H_12, G_12, I_12}, //MX52 - {0, K_12, J_12, L_12}, //MX9 - {0, B_13, A_13, C_13}, //MX55 - {0, E_13, D_13, F_13}, //MX56 - - {0, K_13, J_13, L_13}, //MX61 - {0, B_14, A_14, C_14}, //MX59 - {0, E_14, D_14, F_14}, //MX57 - {0, H_14, G_14, I_14}, //MX60 - {0, K_14, J_14, L_14}, //MX62 - {0, B_15, A_15, C_15}, //MX5 - {0, E_15, D_15, F_15}, //MX10 - {0, H_15, G_15, I_15}, //MX15 - {0, K_15, J_15, L_15}, //MX32 - - {0, E_16, D_16, F_16}, //MX49 - {0, H_16, G_16, I_16}, //MX54 - {0, K_16, J_16, L_16}, //MX58 -}; - -const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { -// -// MX1, MX6, MX11, MX16, MX20, MX24, MX28, MX33, MX37, MX41, MX45, MX50, MX55, MX59, -// MX2, MX7, MX12, MX17, MX21, MX25, MX29, MX34, MX38, MX42, MX46, MX51, MX56, ---, -// MX3, MX8, MX13, MX18, MX22, MX26, MX30, MX35, MX39, MX43, MX47, MX52, MX57, MX60, -// MX4, ---, MX14, MX19, MX23, MX27, MX31, MX36, MX40, MX44, MX48, MX53, ---, MX61, -// MX5, MX10, MX15, ---, ---, ---, MX32, ---, ---, ---, MX49, MX54, MX58, MX62 -/* {row | col << 4} - * | {x=0..224, y=0..64} - * | | modifier - * | | | */ - {{0|(0<<4)}, { 0, 0}, 1}, //MX1 - {{1|(0<<4)}, { 0, 16}, 1}, //MX2 - {{2|(0<<4)}, { 0, 32}, 1}, //MX3 - {{3|(0<<4)}, { 0, 48}, 1}, //MX4 - {{0|(1<<4)}, { 17, 0}, 0}, //MX6 - {{1|(1<<4)}, { 17, 16}, 0}, //MX7 - {{2|(1<<4)}, { 17, 32}, 0}, //MX8 - {{3|(2<<4)}, { 34, 48}, 0}, //MX14 - {{0|(2<<4)}, { 34, 0}, 0}, //MX11 - {{1|(2<<4)}, { 34, 16}, 0}, //MX12 - {{2|(2<<4)}, { 34, 32}, 0}, //MX13 - {{3|(3<<4)}, { 51, 48}, 0}, //MX19 - {{0|(3<<4)}, { 51, 0}, 0}, //MX16 - {{1|(3<<4)}, { 51, 16}, 0}, //MX17 - {{2|(3<<4)}, { 51, 32}, 0}, //MX18 - {{3|(4<<4)}, { 68, 48}, 0}, //MX23 - {{0|(4<<4)}, { 68, 0}, 0}, //MX20 - {{1|(4<<4)}, { 68, 16}, 0}, //MX21 - {{2|(4<<4)}, { 68, 32}, 0}, //MX22 - {{3|(5<<4)}, { 85, 48}, 0}, //MX27 - {{0|(5<<4)}, { 85, 0}, 0}, //MX24 - {{1|(5<<4)}, { 85, 16}, 0}, //MX25 - {{2|(5<<4)}, { 85, 32}, 0}, //MX26 - {{3|(6<<4)}, {102, 48}, 0}, //MX31 - {{0|(6<<4)}, {102, 0}, 0}, //MX28 - {{1|(6<<4)}, {102, 16}, 0}, //MX29 - {{2|(6<<4)}, {102, 32}, 0}, //MX30 - {{3|(7<<4)}, {119, 48}, 0}, //MX36 - {{0|(7<<4)}, {119, 0}, 0}, //MX33 - {{1|(7<<4)}, {119, 16}, 0}, //MX34 - {{2|(7<<4)}, {119, 32}, 0}, //MX35 - {{3|(8<<4)}, {136, 48}, 0}, //MX40 - {{0|(8<<4)}, {136, 0}, 0}, //MX37 - {{1|(8<<4)}, {136, 16}, 0}, //MX38 - {{2|(8<<4)}, {136, 32}, 0}, //MX39 - {{3|(9<<4)}, {153, 48}, 0}, //MX44 - {{0|(9<<4)}, {153, 0}, 0}, //MX41 - {{1|(9<<4)}, {153, 16}, 0}, //MX42 - {{2|(9<<4)}, {153, 32}, 0}, //MX43 - {{3|(10<<4)}, {170, 48}, 0}, //MX48 - {{0|(10<<4)}, {170, 0}, 0}, //MX45 - {{1|(10<<4)}, {170, 16}, 0}, //MX46 - {{2|(10<<4)}, {170, 32}, 0}, //MX47 - {{3|(11<<4)}, {187, 48}, 0}, //MX53 - {{0|(11<<4)}, {187, 0}, 0}, //MX50 - {{1|(11<<4)}, {187, 16}, 0}, //MX51 - {{2|(11<<4)}, {187, 32}, 0}, //MX52 - {{3|(2<<4)}, { 17, 32}, 1}, //MX9 - {{0|(12<<4)}, {204, 0}, 0}, //MX55 - {{1|(12<<4)}, {204, 16}, 0}, //MX56 - - {{3|(13<<4)}, {221, 48}, 1}, //MX61 - {{0|(13<<4)}, {221, 0}, 1}, //MX59 - {{2|(12<<4)}, {204, 32}, 0}, //MX57 - {{2|(13<<4)}, {221, 24}, 1}, //MX60 - {{4|(13<<4)}, {221, 64}, 1}, //MX62 - {{4|(0<<4)}, { 0, 64}, 1}, //MX5 - {{4|(1<<4)}, { 17, 64}, 1}, //MX10 - {{4|(2<<4)}, { 34, 64}, 1}, //MX15 - {{4|(5<<4)}, {102, 64}, 0}, //MX32 - - {{4|(10<<4)}, {170, 64}, 1}, //MX49 - {{4|(11<<4)}, {187, 64}, 1}, //MX54 - {{4|(12<<4)}, {204, 64}, 1} //MX58 -}; - +#ifndef RGB_BACKLIGHT_HS60 +#error RGB_BACKLIGHT_M60_A not defined, recheck config.h #endif - -void bootmagic_lite(void) -{ - // The lite version of TMK's bootmagic made by Wilba. - // 100% less potential for accidentally making the - // keyboard do stupid things. - - // We need multiple scans because debouncing can't be turned off. - matrix_scan(); - wait_ms(10); - matrix_scan(); - - // If the Esc and space bar are held down on power up, - // reset the EEPROM valid state and jump to bootloader. - // Assumes Esc is at [0,0] and spacebar is at [4,6]. - // This isn't very generalized, but we need something that doesn't - // rely on user's keymaps in firmware or EEPROM. - if ( ( matrix_get_row(0) & (1<<0) ) && - ( matrix_get_row(4) & (1<<6) ) ) - { - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); - //eeprom_set_valid(false); - // Jump to bootloader. - bootloader_jump(); - } -} - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - bootmagic_lite(); - - // Please ignore this is for upcoming features - // If the EEPROM has the magic, the data is good. - // OK to load from EEPROM. - /*if (eeprom_is_valid()) - { - backlight_config_load(); - - // TODO: do something to "turn on" keymaps in EEPROM? - } - else - { - // If the EEPROM has not been saved before, or is out of date, - // save the default values to the EEPROM. Default values - // come from construction of the zeal_backlight_config instance. - backlight_config_save(); - - // Clear the LED colors stored in EEPROM - for ( int row=0; row < MATRIX_ROWS; row++ ) - { - HSV hsv; - for ( int column=0; column < MATRIX_COLS; column++ ) - { - hsv.h = rand() & 0xFF; - hsv.s = rand() & 0x7F; - hsv.v = 255; - backlight_set_key_color( row, column, hsv ); - } - } - #ifdef USE_KEYMAPS_IN_EEPROM - keymap_default_save(); - #endif - // Save the magic number last, in case saving was interrupted - eeprom_set_valid(true); - }*/ - - matrix_init_user(); -} - -void matrix_scan_kb(void) { - - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - - return process_record_user(keycode, record); -} - -void led_set_kb(uint8_t usb_led) { - //backlight_set_indicator_state(usb_led); -} \ No newline at end of file diff --git a/keyboards/hs60/v2/v2.h b/keyboards/hs60/v2/v2.h index 86aeb68a74b2..0a35acdea72c 100644 --- a/keyboards/hs60/v2/v2.h +++ b/keyboards/hs60/v2/v2.h @@ -13,12 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef HS60_H -#define HS60_H +#pragma once #define XXX KC_NO #include "quantum.h" +#include "../../zeal60/rgb_backlight_keycodes.h" +#include "../../zeal60/zeal60_keycodes.h" // This a shortcut to help you visually see your layout. @@ -63,5 +64,3 @@ { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, XXX, K4B, K4C, K4D } \ } - -#endif \ No newline at end of file diff --git a/keyboards/zeal60/rgb_backlight.c b/keyboards/zeal60/rgb_backlight.c index 64b95059e134..a965a13bbdf6 100644 --- a/keyboards/zeal60/rgb_backlight.c +++ b/keyboards/zeal60/rgb_backlight.c @@ -15,27 +15,44 @@ */ #if RGB_BACKLIGHT_ENABLED -#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_ZEAL65) || defined (RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) +#if defined (RGB_BACKLIGHT_ZEAL60) || defined (RGB_BACKLIGHT_ZEAL65) || defined (RGB_BACKLIGHT_M60_A) || defined(RGB_BACKLIGHT_M6_B) || defined(RGB_BACKLIGHT_KOYU) || defined(RGB_BACKLIGHT_HS60) #else #error None of the following was defined: RGB_BACKLIGHT_ZEAL60, RGB_BACKLIGHT_ZEAL65, RGB_BACKLIGHT_M60_A, RGB_BACKLIGHT_M6_B, RGB_BACKLIGHT_KOYU #endif +#ifndef MAX + #define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + +#ifndef MIN + #define MIN(a,b) ((a) < (b)? (a): (b)) +#endif + #include "quantum.h" #include "rgb_backlight.h" #include "rgb_backlight_api.h" #include "rgb_backlight_keycodes.h" +#if !defined(RGB_BACKLIGHT_HS60) #include #include #include +#include "drivers/avr/i2c_master.h" +#else +#include "ch.h" +#include "hal.h" +#include "drivers/arm/i2c_master.h" +#include "tmk_core/common/eeprom.h" +#endif #include "progmem.h" - #include "quantum/color.h" -#include "drivers/avr/i2c_master.h" #if defined (RGB_BACKLIGHT_M6_B) #include "drivers/issi/is31fl3218.h" #define BACKLIGHT_LED_COUNT 6 +#elif defined (RGB_BACKLIGHT_HS60) +#include "drivers/issi/is31fl3733.h" +#define BACKLIGHT_LED_COUNT 64 #else #include "drivers/issi/is31fl3731.h" #define BACKLIGHT_LED_COUNT 72 @@ -84,7 +101,88 @@ uint8_t g_key_hit[BACKLIGHT_LED_COUNT]; // Ticks since any key was last hit. uint32_t g_any_key_hit = 0; -#if !defined(RGB_BACKLIGHT_M6_B) +#if defined(RGB_BACKLIGHT_HS60) + +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// ADDR_2 is not needed. it is here as a dummy +#define ISSI_ADDR_1 0x50 +#define ISSI_ADDR_2 0x50 + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, B_1, A_1, C_1}, //LA1 + {0, E_1, D_1, F_1}, //LA2 + {0, H_1, G_1, I_1}, //LA3 + {0, K_1, J_1, L_1}, //LA4 + {0, B_2, A_2, C_2}, //LA5 + {0, E_2, D_2, F_2}, //LA6 + {0, H_2, G_2, I_2}, //LA7 + {0, K_2, J_2, L_2}, //LA8 + {0, B_3, A_3, C_3}, //LA9 + {0, E_3, D_3, F_3}, //LA10 + {0, H_3, G_3, I_3}, //LA11 + {0, K_3, J_3, L_3}, //LA12 + {0, B_4, A_4, C_4}, //LA13 + {0, E_4, D_4, F_4}, //LA14 + {0, H_4, G_4, I_4}, //LA15 + {0, K_4, J_4, L_4}, //LA16 + {0, B_5, A_5, C_5}, //LA17 + {0, E_5, D_5, F_5}, //LA18 + {0, H_5, G_5, I_5}, //LA19 + {0, K_5, J_5, L_5}, //LA20 + {0, B_6, A_6, C_6}, //LA21 + {0, E_6, D_6, F_6}, //LA22 + {0, H_6, G_6, I_6}, //LA23 + {0, K_6, J_6, L_6}, //LA24 + {0, B_7, A_7, C_7}, //LA25 + {0, E_7, D_7, F_7}, //LA26 + {0, H_7, G_7, I_7}, //LA27 + {0, K_7, J_7, L_7}, //LA28 + {0, B_8, A_8, C_8}, //LA29 + {0, E_8, D_8, F_8}, //LA30 + {0, H_8, G_8, I_8}, //LA31 + {0, K_8, J_8, L_8}, //LA32 + {0, B_9, A_9, C_9}, //LA33 + {0, E_9, D_9, F_9}, //LA34 + {0, H_9, G_9, I_9}, //LA35 + {0, K_9, J_9, L_9}, //LA36 + {0, B_10, A_10, C_10}, //LA37 + {0, E_10, D_10, F_10}, //LA38 + {0, H_10, G_10, I_10}, //LA39 + {0, K_10, J_10, L_10}, //LA40 + {0, B_11, A_11, C_11}, //LA41 + {0, E_11, D_11, F_11}, //LA42 + {0, H_11, G_11, I_11}, //LA43 + {0, K_11, J_11, L_11}, //LA44 + {0, B_12, A_12, C_12}, //LA45 + {0, E_12, D_12, F_12}, //LA46 + {0, H_12, G_12, I_12}, //LA47 + {0, K_12, J_12, L_12}, //LA48 + {0, B_13, A_13, C_13}, //LA49 + {0, E_13, D_13, F_13}, //LA50 + {0, H_13, G_13, I_13}, //LA51 + {0, K_13, J_13, L_13}, //LA52 + {0, B_14, A_14, C_14}, //LA53 + {0, E_14, D_14, F_14}, //LA54 + {0, H_14, G_14, I_14}, //LA55 + {0, K_14, J_14, L_14}, //LA56 + {0, B_15, A_15, C_15}, //LA57 + {0, E_15, D_15, F_15}, //LA58 + {0, H_15, G_15, I_15}, //LA59 + {0, K_15, J_15, L_15}, //LA60 + {0, B_16, A_16, C_16}, //LA61 + {0, E_16, D_16, F_16}, //LA62 + {0, H_16, G_16, I_16}, //LA63 + {0, K_16, J_16, L_16}, //LA64 +}; + +#elif !defined(RGB_BACKLIGHT_M6_B) // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) #define ISSI_ADDR_1 0x74 @@ -272,6 +370,85 @@ const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { {0,27}, {0,64}, {0,101}, {0,137}, {0,174}, {255,233}, {228,201}, {235,255}, {237,255}, {195,128}, {206,136}, {215,152}, {222,175}, {205,234}, {209,255}, {214,255}, {219,255}, {223,255} }; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA47 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {214,32}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA47 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, + {255,255},// LA48 does not exist, dummy + // LA49..LA50 + {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {255,233}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} +}; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {0,0}, {4,16}, {6,32}, {10,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, + {48,0}, {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, + {96,0}, {104,16}, {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, + {148,48}, {144,0}, {152,16}, {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, + {224,0}, {192,0}, {200,16}, {202,48}, {224,48}, {208,0}, {220,16}, {214,32}, {220,64}, {4,64}, {24,64}, {44,64}, {112,64}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {180,64}, {200,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA60 + {96,255}, {109,255}, {128,242}, {148,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, + {85,255}, {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, + {70,255}, {70,129}, {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, + {53,255}, {39,157}, {255,101}, {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {32,255}, + {39,255}, {23,238}, {233,242}, {237,255}, {35,255}, {19,255}, {255,233}, {223,255}, {161,255}, {165,255}, {170,255}, {192,255}, + {255,255}, {255,255}, // LA61..LA62 does not exit, dummy + // LA63..LA64 + {214,255}, {219,255} +}; +#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +const Point g_map_led_to_point[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA50 + {0,0}, {4,16}, {6,32}, {2,48}, {16,0}, {24,16}, {28,32}, {36,48}, {32,0}, {40,16}, {44,32}, {52,48}, {48,0}, + {56,16}, {60,32}, {68,48}, {64,0}, {72,16}, {76,32}, {84,48}, {80,0}, {88,16}, {92,32}, {100,48}, {96,0}, {104,16}, + {108,32}, {116,48}, {112,0}, {120,16}, {124,32}, {132,48}, {128,0}, {136,16}, {140,32}, {148,48}, {144,0}, {152,16}, + {156,32}, {164,48}, {160,0}, {168,16}, {172,32}, {180,48}, {176,0}, {184, 16}, {188,32}, {20,48}, {192,0}, {200,16}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {210,48}, {216,0}, {220,16}, {222,24}, {222,64}, {2,64}, {22,64}, {42,64}, {102,64}, + {255,255},// LA61 does not exit, dummy + {162,64}, {182,64}, {202,64} +}; +const Point g_map_led_to_point_polar[BACKLIGHT_LED_COUNT] PROGMEM = { + // LA1..LA50 + {96,255}, {109,255}, {128,242}, {147,255}, {93,255}, {105,238}, {128,192}, {154,216}, {89,255}, {101,208}, {128,155}, {159,188}, {85,255}, + {96,181}, {128,119}, {165,163}, {81,255}, {89,157}, {128,82}, {173,143}, {75,255}, {81,139}, {128,46}, {183,131}, {70,255}, {70,129}, + {129,9}, {195,128}, {64,255}, {58,129}, {255,27}, {206,136}, {58,255}, {47,139}, {255,64}, {215,152}, {53,255}, {39,157}, {255,101}, + {222,175}, {47,255}, {32,181}, {255,137}, {228,201}, {43,255}, {27,208}, {255, 174}, {150,246}, {39,255}, {23,238}, + {255,255},// LA51 does not exit, dummy + // LA52..LA60 + {235,255}, {33,255}, {19,255}, {10,255}, {224,255}, {160,255}, {164,255}, {169,255}, {188,255}, + {255,255},// LA61 does not exit, dummy + {209,255}, {215,255}, {220,255} +}; #elif defined (RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -397,6 +574,48 @@ const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { { 36+16, 36+15, 36+5, 36+4, 36+3, 36+2, 36+1, 54+9, 54+10, 54+11, 54+12, 54+6, 54+7, 54+8 }, { 36+17, 36+8, 36+7, 36+6, 255, 255, 255, 36+0, 255, 54+13, 54+14, 54+15, 54+16, 54+17 } }; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_ANSI) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; +#elif defined (RGB_BACKLIGHT_HS60) && defined (HS60_HHKB) +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, LA48, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, ---, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, LA51, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, ---, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 48-1 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 255, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 51-1, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 255, 63-1, 64-1, 56-1 } +}; +#elif defined (RGB_BACKLIGHT_HS60) //HS60_ISO +// +// LA1, LA5, LA9, LA13, LA17, LA21, LA25, LA29, LA33, LA37, LA41, LA45, LA49, LA53, +// LA2, LA6, LA10, LA14, LA18, LA22, LA26, LA30, LA34, LA38, LA42, LA46, LA50, ---, +// LA3, LA7, LA11, LA15, LA19, LA23, LA27, LA31, LA35, LA39, LA43, LA47, LA54, LA55, +// LA4, LA48, LA8, LA12, LA16, LA20, LA24, LA28, LA32, LA36, LA40, LA44, ---, LA52, +// LA57, LA58, LA59, ---, ---, ---, LA60, ---, ---, ---, LA62, LA63, LA64, LA56 +const uint8_t g_map_row_column_to_led[MATRIX_ROWS][MATRIX_COLS] PROGMEM = { + { 1-1, 5-1, 9-1, 13-1, 17-1, 21-1, 25-1, 29-1, 33-1, 37-1, 41-1, 45-1, 49-1, 53-1 }, + { 2-1, 6-1, 10-1, 14-1, 18-1, 22-1, 26-1, 30-1, 34-1, 38-1, 42-1, 46-1, 50-1, 255 }, + { 3-1, 7-1, 11-1, 15-1, 19-1, 23-1, 27-1, 31-1, 35-1, 39-1, 43-1, 47-1, 54-1, 55-1 }, + { 4-1, 48-1, 8-1, 12-1, 16-1, 20-1, 24-1, 28-1, 32-1, 36-1, 40-1, 44-1, 255, 52-1 }, + { 57-1, 58-1, 59-1, 255, 255, 255, 60-1, 255, 255, 255, 62-1, 63-1, 64-1, 56-1 } +}; #elif defined (RGB_BACKLIGHT_M6_B) // M6-B is really simple: // 0 3 5 @@ -419,6 +638,9 @@ void backlight_update_pwm_buffers(void) { #if defined (RGB_BACKLIGHT_M6_B) IS31FL3218_update_pwm_buffers(); +#elif defined (RGB_BACKLIGHT_HS60) + IS31FL3733_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #else IS31FL3731_update_pwm_buffers( ISSI_ADDR_1, ISSI_ADDR_2 ); IS31FL3731_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); @@ -429,6 +651,8 @@ void backlight_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) { #if defined (RGB_BACKLIGHT_M6_B) IS31FL3218_set_color( index, red, green, blue ); +#elif defined (RGB_BACKLIGHT_HS60) + IS31FL3733_set_color( index, red, green, blue ); #else IS31FL3731_set_color( index, red, green, blue ); #endif @@ -438,6 +662,8 @@ void backlight_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) { #if defined (RGB_BACKLIGHT_M6_B) IS31FL3218_set_color_all( red, green, blue ); +#elif defined (RGB_BACKLIGHT_HS60) + IS31FL3733_set_color_all( red, green, blue ); #else IS31FL3731_set_color_all( red, green, blue ); #endif @@ -452,6 +678,7 @@ void backlight_set_key_hit(uint8_t row, uint8_t column) g_any_key_hit = 0; } +#if !defined(RGB_BACKLIGHT_HS60) // This is (F_CPU/1024) / 20 Hz // = 15625 Hz / 20 Hz // = 781 @@ -487,6 +714,29 @@ void backlight_timer_disable(void) { TIMSK3 &= ~_BV(OCIE3A); } +#else //STM32, use GPT with TIM4. Enable in halconf.h +static void gpt_backlight_timer_task(GPTDriver *gptp); +// Timer setup at 200Khz, callback at 10k ticks = 20Hz +static GPTConfig gpt4cfg1 = { + .frequency = 200000U, + .callback = gpt_backlight_timer_task +}; + +void backlight_timer_init(void) +{ + gptStart(&GPTD4, &gpt4cfg1); +} + +void backlight_timer_enable(void) +{ + gptStartContinuous(&GPTD4, 10000); +} + +void backlight_timer_disable(void) +{ + gptStopTimer(&GPTD4); +} +#endif //!defined(RGB_BACKLIGHT_HS60) void backlight_set_suspend_state(bool state) { @@ -921,7 +1171,11 @@ void backlight_effect_indicators(void) } } +#if !defined(RGB_BACKLIGHT_HS60) ISR(TIMER3_COMPA_vect) +#else //STM32 interrupt +static void gpt_backlight_timer_task(GPTDriver *gptp) +#endif { // delay 1 second before driving LEDs or doing anything else static uint8_t startup_tick = 0; @@ -1378,6 +1632,27 @@ void backlight_init_drivers(void) #if defined(RGB_BACKLIGHT_M6_B) IS31FL3218_init(); +#elif defined(RGB_BACKLIGHT_HS60) + IS31FL3733_init( ISSI_ADDR_1 ); + + for ( int index = 0; index < BACKLIGHT_LED_COUNT; index++ ) + { +#if defined (HS60_ANSI) + bool enabled = !( ( index == 48-1 ) || //LA48 + ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#elif defined (HS60_HHKB) + bool enabled = !( ( index == 61-1 ) || //LA61 + ( index == 62-1 ) ); //LA62 +#else //HS60_ISO + bool enabled = !( ( index == 51-1 ) || //LA51 + ( index == 61-1 ) ); //LA61 +#endif + // This only caches it for later + IS31FL3733_set_led_control_register( index, enabled, enabled, enabled ); + } + // This actually updates the LED drivers + IS31FL3733_update_led_control_registers( ISSI_ADDR_1, ISSI_ADDR_2 ); #else IS31FL3731_init( ISSI_ADDR_1 ); IS31FL3731_init( ISSI_ADDR_2 ); @@ -1668,7 +1943,6 @@ void backlight_test_led( uint8_t index, bool red, bool green, bool blue ) } } } -#endif // defined(RGB_DEBUGGING_ONLY) void backlight_debug_led( bool state ) { @@ -1685,5 +1959,6 @@ void backlight_debug_led( bool state ) PORTE &= ~(1<<6); } } +#endif // defined(RGB_DEBUGGING_ONLY) #endif // BACKLIGHT_ENABLED diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c index a86998550128..a15430d676c5 100755 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ b/tmk_core/common/chibios/eeprom_stm32.c @@ -10,664 +10,206 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and - * https://github.com/leaflabs/libmaple + * This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by + * Artur F. * * Modifications for QMK and STM32F303 by Yiancar */ +#include +#include #include "eeprom_stm32.h" +/***************************************************************************** + * Allows to use the internal flash to store non volatile data. To initialize + * the functionality use the EEPROM_Init() function. Be sure that by reprogramming + * of the controller just affected pages will be deleted. In other case the non + * volatile data will be lost. +******************************************************************************/ + +/* Private macro -------------------------------------------------------------*/ +/* Private variables ---------------------------------------------------------*/ +/* Functions -----------------------------------------------------------------*/ + +uint8_t DataBuf[FEE_PAGE_SIZE]; +/***************************************************************************** +* Delete Flash Space used for user Data, deletes the whole space between +* RW_PAGE_BASE_ADDRESS and the last uC Flash Page +******************************************************************************/ +uint16_t EEPROM_Init(void) { + // unlock flash + FLASH_Unlock(); - FLASH_Status EE_ErasePage(uint32_t); - - uint16_t EE_CheckPage(uint32_t, uint16_t); - uint16_t EE_CheckErasePage(uint32_t, uint16_t); - uint16_t EE_Format(void); - uint32_t EE_FindValidPage(void); - uint16_t EE_GetVariablesCount(uint32_t, uint16_t); - uint16_t EE_PageTransfer(uint32_t, uint32_t, uint16_t); - uint16_t EE_VerifyPageFullWriteVariable(uint16_t, uint16_t); - - uint32_t PageBase0 = EEPROM_PAGE0_BASE; - uint32_t PageBase1 = EEPROM_PAGE1_BASE; - uint32_t PageSize = EEPROM_PAGE_SIZE; - uint16_t Status = EEPROM_NOT_INIT; - -// See http://www.st.com/web/en/resource/technical/document/application_note/CD00165693.pdf - -/** - * @brief Check page for blank - * @param page base address - * @retval Success or error - * EEPROM_BAD_FLASH: page not empty after erase - * EEPROM_OK: page blank - */ -uint16_t EE_CheckPage(uint32_t pageBase, uint16_t status) -{ - uint32_t pageEnd = pageBase + (uint32_t)PageSize; - - // Page Status not EEPROM_ERASED and not a "state" - if ((*(__IO uint16_t*)pageBase) != EEPROM_ERASED && (*(__IO uint16_t*)pageBase) != status) - return EEPROM_BAD_FLASH; - for(pageBase += 4; pageBase < pageEnd; pageBase += 4) - if ((*(__IO uint32_t*)pageBase) != 0xFFFFFFFF) // Verify if slot is empty - return EEPROM_BAD_FLASH; - return EEPROM_OK; -} - -/** - * @brief Erase page with increment erase counter (page + 2) - * @param page base address - * @retval Success or error - * FLASH_COMPLETE: success erase - * - Flash error code: on write Flash error - */ -FLASH_Status EE_ErasePage(uint32_t pageBase) -{ - FLASH_Status FlashStatus; - uint16_t data = (*(__IO uint16_t*)(pageBase)); - if ((data == EEPROM_ERASED) || (data == EEPROM_VALID_PAGE) || (data == EEPROM_RECEIVE_DATA)) - data = (*(__IO uint16_t*)(pageBase + 2)) + 1; - else - data = 0; - - FlashStatus = FLASH_ErasePage(pageBase); - if (FlashStatus == FLASH_COMPLETE) - FlashStatus = FLASH_ProgramHalfWord(pageBase + 2, data); - - return FlashStatus; -} + // Clear Flags + //FLASH_ClearFlag(FLASH_SR_EOP|FLASH_SR_PGERR|FLASH_SR_WRPERR); -/** - * @brief Check page for blank and erase it - * @param page base address - * @retval Success or error - * - Flash error code: on write Flash error - * - EEPROM_BAD_FLASH: page not empty after erase - * - EEPROM_OK: page blank - */ -uint16_t EE_CheckErasePage(uint32_t pageBase, uint16_t status) -{ - uint16_t FlashStatus; - if (EE_CheckPage(pageBase, status) != EEPROM_OK) - { - FlashStatus = EE_ErasePage(pageBase); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - return EE_CheckPage(pageBase, status); - } - return EEPROM_OK; + return FEE_DENSITY_BYTES; } +/***************************************************************************** +* Erase the whole reserved Flash Space used for user Data +******************************************************************************/ +void EEPROM_Erase (void) { -/** - * @brief Find valid Page for write or read operation - * @param Page0: Page0 base address - * Page1: Page1 base address - * @retval Valid page address (PAGE0 or PAGE1) or NULL in case of no valid page was found - */ -uint32_t EE_FindValidPage(void) -{ - uint16_t status0 = (*(__IO uint16_t*)PageBase0); // Get Page0 actual status - uint16_t status1 = (*(__IO uint16_t*)PageBase1); // Get Page1 actual status - - if (status0 == EEPROM_VALID_PAGE && status1 == EEPROM_ERASED) - return PageBase0; - if (status1 == EEPROM_VALID_PAGE && status0 == EEPROM_ERASED) - return PageBase1; - - return 0; -} + int page_num = 0; -/** - * @brief Calculate unique variables in EEPROM - * @param start: address of first slot to check (page + 4) - * @param end: page end address - * @param address: 16 bit virtual address of the variable to excluse (or 0XFFFF) - * @retval count of variables - */ -uint16_t EE_GetVariablesCount(uint32_t pageBase, uint16_t skipAddress) -{ - uint16_t varAddress, nextAddress; - uint32_t idx; - uint32_t pageEnd = pageBase + (uint32_t)PageSize; - uint16_t count = 0; - - for (pageBase += 6; pageBase < pageEnd; pageBase += 4) - { - varAddress = (*(__IO uint16_t*)pageBase); - if (varAddress == 0xFFFF || varAddress == skipAddress) - continue; - - count++; - for(idx = pageBase + 4; idx < pageEnd; idx += 4) - { - nextAddress = (*(__IO uint16_t*)idx); - if (nextAddress == varAddress) - { - count--; - break; - } - } - } - return count; + // delete all pages from specified start page to the last page + do { + FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE)); + page_num++; + } while (page_num < FEE_DENSITY_PAGES); } +/***************************************************************************** +* Writes once data byte to flash on specified address. If a byte is already +* written, the whole page must be copied to a buffer, the byte changed and +* the manipulated buffer written after PageErase. +*******************************************************************************/ +uint16_t EEPROM_WriteDataByte (uint16_t Address, uint8_t DataByte) { -/** - * @brief Transfers last updated variables data from the full Page to an empty one. - * @param newPage: new page base address - * @param oldPage: old page base address - * @param SkipAddress: 16 bit virtual address of the variable (or 0xFFFF) - * @retval Success or error status: - * - FLASH_COMPLETE: on success - * - EEPROM_OUT_SIZE: if valid new page is full - * - Flash error code: on write Flash error - */ -uint16_t EE_PageTransfer(uint32_t newPage, uint32_t oldPage, uint16_t SkipAddress) -{ - uint32_t oldEnd, newEnd; - uint32_t oldIdx, newIdx, idx; - uint16_t address, data, found; - FLASH_Status FlashStatus; - - // Transfer process: transfer variables from old to the new active page - newEnd = newPage + ((uint32_t)PageSize); - - // Find first free element in new page - for (newIdx = newPage + 4; newIdx < newEnd; newIdx += 4) - if ((*(__IO uint32_t*)newIdx) == 0xFFFFFFFF) // Verify if element - break; // contents are 0xFFFFFFFF - if (newIdx >= newEnd) - return EEPROM_OUT_SIZE; - - oldEnd = oldPage + 4; - oldIdx = oldPage + (uint32_t)(PageSize - 2); - - for (; oldIdx > oldEnd; oldIdx -= 4) - { - address = *(__IO uint16_t*)oldIdx; - if (address == 0xFFFF || address == SkipAddress) - continue; // it's means that power off after write data - - found = 0; - for (idx = newPage + 6; idx < newIdx; idx += 4) - if ((*(__IO uint16_t*)(idx)) == address) - { - found = 1; - break; - } - - if (found) - continue; - - if (newIdx < newEnd) - { - data = (*(__IO uint16_t*)(oldIdx - 2)); - - FlashStatus = FLASH_ProgramHalfWord(newIdx, data); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; + FLASH_Status FlashStatus = FLASH_COMPLETE; - FlashStatus = FLASH_ProgramHalfWord(newIdx + 2, address); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; + uint32_t page; + int i; - newIdx += 4; - } - else - return EEPROM_OUT_SIZE; + // exit if desired address is above the limit (e.G. under 2048 Bytes for 4 pages) + if (Address > FEE_DENSITY_BYTES) { + return 0; } - // Erase the old Page: Set old Page status to EEPROM_EEPROM_ERASED status - data = EE_CheckErasePage(oldPage, EEPROM_ERASED); - if (data != EEPROM_OK) - return data; + // calculate which page is affected (Pagenum1/Pagenum2...PagenumN) + page = (FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address)) & 0x00000FFF; - // Set new Page status - FlashStatus = FLASH_ProgramHalfWord(newPage, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; + if (page % FEE_PAGE_SIZE) page = page + FEE_PAGE_SIZE; + page = (page / FEE_PAGE_SIZE) - 1; - return EEPROM_OK; -} + // if current data is 0xFF, the byte is empty, just overwrite with the new one + if ((*(__IO uint16_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) == FEE_EMPTY_WORD) { -/** - * @brief Verify if active page is full and Writes variable in EEPROM. - * @param Address: 16 bit virtual address of the variable - * @param Data: 16 bit data to be written as variable value - * @retval Success or error status: - * - FLASH_COMPLETE: on success - * - EEPROM_PAGE_FULL: if valid page is full (need page transfer) - * - EEPROM_NO_VALID_PAGE: if no valid page was found - * - EEPROM_OUT_SIZE: if EEPROM size exceeded - * - Flash error code: on write Flash error - */ -uint16_t EE_VerifyPageFullWriteVariable(uint16_t Address, uint16_t Data) -{ - FLASH_Status FlashStatus; - uint32_t idx, pageBase, pageEnd, newPage; - uint16_t count; - - // Get valid Page for write operation - pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; - - // Get the valid Page end Address - pageEnd = pageBase + PageSize; // Set end of page - - for (idx = pageEnd - 2; idx > pageBase; idx -= 4) - { - if ((*(__IO uint16_t*)idx) == Address) // Find last value for address - { - count = (*(__IO uint16_t*)(idx - 2)); // Read last data - if (count == Data) - return EEPROM_OK; - if (count == 0xFFFF) - { - FlashStatus = FLASH_ProgramHalfWord(idx - 2, Data); // Set variable data - if (FlashStatus == FLASH_COMPLETE) - return EEPROM_OK; - } - break; - } + FlashStatus = FLASH_ProgramHalfWord(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address), (uint16_t)(0x00FF & DataByte)); } + else { - // Check each active page address starting from begining - for (idx = pageBase + 4; idx < pageEnd; idx += 4) - if ((*(__IO uint32_t*)idx) == 0xFFFFFFFF) // Verify if element - { // contents are 0xFFFFFFFF - FlashStatus = FLASH_ProgramHalfWord(idx, Data); // Set variable data - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - FlashStatus = FLASH_ProgramHalfWord(idx + 2, Address); // Set variable virtual address - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - return EEPROM_OK; - } - - // Empty slot not found, need page transfer - // Calculate unique variables in page - count = EE_GetVariablesCount(pageBase, Address) + 1; - if (count >= (PageSize / 4 - 1)) - return EEPROM_OUT_SIZE; - - if (pageBase == PageBase1) - newPage = PageBase0; // New page address where variable will be moved to - else - newPage = PageBase1; - - // Set the new Page status to RECEIVE_DATA status - FlashStatus = FLASH_ProgramHalfWord(newPage, EEPROM_RECEIVE_DATA); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - - // Write the variable passed as parameter in the new active page - FlashStatus = FLASH_ProgramHalfWord(newPage + 4, Data); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - - FlashStatus = FLASH_ProgramHalfWord(newPage + 6, Address); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; - - return EE_PageTransfer(newPage, pageBase, Address); -} - -/*EEPROMClass::EEPROMClass(void) -{ - PageBase0 = EEPROM_PAGE0_BASE; - PageBase1 = EEPROM_PAGE1_BASE; - PageSize = EEPROM_PAGE_SIZE; - Status = EEPROM_NOT_INIT; -}*/ -/* -uint16_t EEPROM_init(uint32_t pageBase0, uint32_t pageBase1, uint32_t pageSize) -{ - PageBase0 = pageBase0; - PageBase1 = pageBase1; - PageSize = pageSize; - return EEPROM_init(); -}*/ + // Copy Page to a buffer + memcpy(DataBuf, (uint8_t*)FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE), FEE_PAGE_SIZE); // !!! Calculate base address for the desired page -uint16_t EEPROM_init(void) -{ - uint16_t status0 = 6, status1 = 6; - FLASH_Status FlashStatus; + // check if new data is differ to current data, return if not, proceed if yes + if (DataByte == *(__IO uint8_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) { + return 0; + } - FLASH_Unlock(); - Status = EEPROM_NO_VALID_PAGE; + // manipulate desired data byte in temp data array if new byte is differ to the current + DataBuf[FEE_ADDR_OFFSET(Address)] = DataByte; - status0 = (*(__IO uint16_t *)PageBase0); - status1 = (*(__IO uint16_t *)PageBase1); + //Erase Page + FlashStatus = FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + page); - switch (status0) - { -/* - Page0 Page1 - ----- ----- - EEPROM_ERASED EEPROM_VALID_PAGE Page1 valid, Page0 erased - EEPROM_RECEIVE_DATA Page1 need set to valid, Page0 erased - EEPROM_ERASED make EE_Format - any Error: EEPROM_NO_VALID_PAGE -*/ - case EEPROM_ERASED: - if (status1 == EEPROM_VALID_PAGE) // Page0 erased, Page1 valid - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); - else if (status1 == EEPROM_RECEIVE_DATA) // Page0 erased, Page1 receive - { - FlashStatus = FLASH_ProgramHalfWord(PageBase1, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - Status = FlashStatus; - else - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); - } - else if (status1 == EEPROM_ERASED) // Both in erased state so format EEPROM - Status = EEPROM_format(); - break; -/* - Page0 Page1 - ----- ----- - EEPROM_RECEIVE_DATA EEPROM_VALID_PAGE Transfer Page1 to Page0 - EEPROM_ERASED Page0 need set to valid, Page1 erased - any EEPROM_NO_VALID_PAGE -*/ - case EEPROM_RECEIVE_DATA: - if (status1 == EEPROM_VALID_PAGE) // Page0 receive, Page1 valid - Status = EE_PageTransfer(PageBase0, PageBase1, 0xFFFF); - else if (status1 == EEPROM_ERASED) // Page0 receive, Page1 erased - { - Status = EE_CheckErasePage(PageBase1, EEPROM_ERASED); - if (Status == EEPROM_OK) - { - FlashStatus = FLASH_ProgramHalfWord(PageBase0, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - Status = FlashStatus; - else - Status = EEPROM_OK; + // Write new data (whole page) to flash if data has beed changed + for(i = 0; i < (FEE_PAGE_SIZE / 2); i++) { + if ((__IO uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)]) != 0xFFFF) { + FlashStatus = FLASH_ProgramHalfWord((FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE)) + (i * 2), (uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)])); } } - break; -/* - Page0 Page1 - ----- ----- - EEPROM_VALID_PAGE EEPROM_VALID_PAGE Error: EEPROM_NO_VALID_PAGE - EEPROM_RECEIVE_DATA Transfer Page0 to Page1 - any Page0 valid, Page1 erased -*/ - case EEPROM_VALID_PAGE: - if (status1 == EEPROM_VALID_PAGE) // Both pages valid - Status = EEPROM_NO_VALID_PAGE; - else if (status1 == EEPROM_RECEIVE_DATA) - Status = EE_PageTransfer(PageBase1, PageBase0, 0xFFFF); - else - Status = EE_CheckErasePage(PageBase1, EEPROM_ERASED); - break; -/* - Page0 Page1 - ----- ----- - any EEPROM_VALID_PAGE Page1 valid, Page0 erased - EEPROM_RECEIVE_DATA Page1 valid, Page0 erased - any EEPROM_NO_VALID_PAGE -*/ - default: - if (status1 == EEPROM_VALID_PAGE) - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); // Check/Erase Page0 - else if (status1 == EEPROM_RECEIVE_DATA) - { - FlashStatus = FLASH_ProgramHalfWord(PageBase1, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - Status = FlashStatus; - else - Status = EE_CheckErasePage(PageBase0, EEPROM_ERASED); - } - break; - } - return Status; -} - -/** - * @brief Erases PAGE0 and PAGE1 and writes EEPROM_VALID_PAGE / 0 header to PAGE0 - * @param PAGE0 and PAGE1 base addresses - * @retval Status of the last operation (Flash write or erase) done during EEPROM formating - */ -uint16_t EEPROM_format(void) -{ - uint16_t status; - FLASH_Status FlashStatus; - FLASH_Unlock(); - - // Erase Page0 - status = EE_CheckErasePage(PageBase0, EEPROM_VALID_PAGE); - if (status != EEPROM_OK) - return status; - if ((*(__IO uint16_t*)PageBase0) == EEPROM_ERASED) - { - // Set Page0 as valid page: Write VALID_PAGE at Page0 base address - FlashStatus = FLASH_ProgramHalfWord(PageBase0, EEPROM_VALID_PAGE); - if (FlashStatus != FLASH_COMPLETE) - return FlashStatus; } - // Erase Page1 - return EE_CheckErasePage(PageBase1, EEPROM_ERASED); -} - -/** - * @brief Returns the erase counter for current page - * @param Data: Global variable contains the read variable value - * @retval Success or error status: - * - EEPROM_OK: if erases counter return. - * - EEPROM_NO_VALID_PAGE: if no valid page was found. - */ -uint16_t EEPROM_erases(uint16_t *Erases) -{ - uint32_t pageBase; - if (Status != EEPROM_OK) - if (EEPROM_init() != EEPROM_OK) - return Status; - - // Get active Page for read operation - pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; - - *Erases = (*(__IO uint16_t*)pageBase+2); - return EEPROM_OK; -} - -/** - * @brief Returns the last stored variable data, if found, - * which correspond to the passed virtual address - * @param Address: Variable virtual address - * @retval Data for variable or EEPROM_DEFAULT_DATA, if any errors - */ -/* -uint16_t EEPROM_read (uint16_t Address) -{ - uint16_t data; - EEPROM_read(Address, &data); - return data; -}*/ - -/** - * @brief Returns the last stored variable data, if found, - * which correspond to the passed virtual address - * @param Address: Variable virtual address - * @param Data: Pointer to data variable - * @retval Success or error status: - * - EEPROM_OK: if variable was found - * - EEPROM_BAD_ADDRESS: if the variable was not found - * - EEPROM_NO_VALID_PAGE: if no valid page was found. - */ -uint16_t EEPROM_read(uint16_t Address, uint16_t *Data) -{ - uint32_t pageBase, pageEnd; - - // Set default data (empty EEPROM) - *Data = EEPROM_DEFAULT_DATA; - - if (Status == EEPROM_NOT_INIT) - if (EEPROM_init() != EEPROM_OK) - return Status; - - // Get active Page for read operation - pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; - - // Get the valid Page end Address - pageEnd = pageBase + ((uint32_t)(PageSize - 2)); - - // Check each active page address starting from end - for (pageBase += 6; pageEnd >= pageBase; pageEnd -= 4) - if ((*(__IO uint16_t*)pageEnd) == Address) // Compare the read address with the virtual address - { - *Data = (*(__IO uint16_t*)(pageEnd - 2)); // Get content of Address-2 which is variable value - return EEPROM_OK; - } - - // Return ReadStatus value: (0: variable exist, 1: variable doesn't exist) - return EEPROM_BAD_ADDRESS; -} - -/** - * @brief Writes/upadtes variable data in EEPROM. - * @param VirtAddress: Variable virtual address - * @param Data: 16 bit data to be written - * @retval Success or error status: - * - FLASH_COMPLETE: on success - * - EEPROM_BAD_ADDRESS: if address = 0xFFFF - * - EEPROM_PAGE_FULL: if valid page is full - * - EEPROM_NO_VALID_PAGE: if no valid page was found - * - EEPROM_OUT_SIZE: if no empty EEPROM variables - * - Flash error code: on write Flash error - */ -uint16_t EEPROM_write(uint16_t Address, uint16_t Data) -{ - if (Status == EEPROM_NOT_INIT) - if (EEPROM_init() != EEPROM_OK) - return Status; - - if (Address == 0xFFFF) - return EEPROM_BAD_ADDRESS; - - // Write the variable virtual address and value in the EEPROM - uint16_t status = EE_VerifyPageFullWriteVariable(Address, Data); - return status; -} - -/** - * @brief Writes/upadtes variable data in EEPROM. - The value is written only if differs from the one already saved at the same address. - * @param VirtAddress: Variable virtual address - * @param Data: 16 bit data to be written - * @retval Success or error status: - * - EEPROM_SAME_VALUE: If new Data matches existing EEPROM Data - * - FLASH_COMPLETE: on success - * - EEPROM_BAD_ADDRESS: if address = 0xFFFF - * - EEPROM_PAGE_FULL: if valid page is full - * - EEPROM_NO_VALID_PAGE: if no valid page was found - * - EEPROM_OUT_SIZE: if no empty EEPROM variables - * - Flash error code: on write Flash error - */ -uint16_t EEPROM_update(uint16_t Address, uint16_t Data) -{ - uint16_t temp; - EEPROM_read(Address, &temp); - if (temp == Data) - return EEPROM_SAME_VALUE; - else - return EEPROM_write(Address, Data); + return FlashStatus; } +/***************************************************************************** +* Read once data byte from a specified address. +*******************************************************************************/ +uint8_t EEPROM_ReadDataByte (uint16_t Address) { -/** - * @brief Return number of variable - * @retval Number of variables - */ -uint16_t EEPROM_count(uint16_t *Count) -{ - if (Status == EEPROM_NOT_INIT) - if (EEPROM_init() != EEPROM_OK) - return Status; - - // Get valid Page for write operation - uint32_t pageBase = EE_FindValidPage(); - if (pageBase == 0) - return EEPROM_NO_VALID_PAGE; // No valid page, return max. numbers + uint8_t DataByte = 0xFF; - *Count = EE_GetVariablesCount(pageBase, 0xFFFF); - return EEPROM_OK; -} + // Get Byte from specified address + DataByte = (*(__IO uint8_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))); -uint16_t EEPROM_maxcount(void) -{ - return ((PageSize / 4)-1); + return DataByte; } - +/***************************************************************************** +* Wrap library in AVR style functions. +*******************************************************************************/ uint8_t eeprom_read_byte (const uint8_t *Address) { const uint16_t p = (const uint32_t) Address; - uint16_t temp; - EEPROM_read(p, &temp); - return (uint8_t) temp; + return EEPROM_ReadDataByte(p); } void eeprom_write_byte (uint8_t *Address, uint8_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_write(p, (uint16_t) Value); + EEPROM_WriteDataByte(p, Value); } void eeprom_update_byte (uint8_t *Address, uint8_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_update(p, (uint16_t) Value); + EEPROM_WriteDataByte(p, Value); } uint16_t eeprom_read_word (const uint16_t *Address) { const uint16_t p = (const uint32_t) Address; - uint16_t temp; - EEPROM_read(p, &temp); - return temp; + return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8); } void eeprom_write_word (uint16_t *Address, uint16_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_write(p, Value); + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p + 1, (uint8_t) (Value >> 8)); } void eeprom_update_word (uint16_t *Address, uint16_t Value) { uint16_t p = (uint32_t) Address; - EEPROM_update(p, Value); + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p + 1, (uint8_t) (Value >> 8)); } uint32_t eeprom_read_dword (const uint32_t *Address) { const uint16_t p = (const uint32_t) Address; - uint16_t temp1, temp2; - EEPROM_read(p, &temp1); - EEPROM_read(p + 1, &temp2); - return temp1 | (temp2 << 16); + return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8) + | (EEPROM_ReadDataByte(p+2) << 16) | (EEPROM_ReadDataByte(p+3) << 24); } void eeprom_write_dword (uint32_t *Address, uint32_t Value) { - uint16_t temp = (uint16_t) Value; - uint16_t p = (uint32_t) Address; - EEPROM_write(p, temp); - temp = (uint16_t) (Value >> 16); - EEPROM_write(p + 1, temp); + uint16_t p = (const uint32_t) Address; + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8)); + EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16)); + EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24)); } void eeprom_update_dword (uint32_t *Address, uint32_t Value) { - uint16_t temp = (uint16_t) Value; - uint16_t p = (uint32_t) Address; - EEPROM_update(p, temp); - temp = (uint16_t) (Value >> 16); - EEPROM_update(p + 1, temp); + uint16_t p = (const uint32_t) Address; + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8)); + EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16)); + EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24)); +} + +void eeprom_read_block(void *buf, const void *addr, uint32_t len) { + const uint8_t *p = (const uint8_t *)addr; + uint8_t *dest = (uint8_t *)buf; + while (len--) { + *dest++ = eeprom_read_byte(p++); + } +} + +void eeprom_write_block(const void *buf, void *addr, uint32_t len) { + uint8_t *p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} + +void eeprom_update_block(const void *buf, void *addr, uint32_t len) { + uint8_t *p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } } diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/tmk_core/common/chibios/eeprom_stm32.h index 09229530ca4f..892e417b7e6e 100755 --- a/tmk_core/common/chibios/eeprom_stm32.h +++ b/tmk_core/common/chibios/eeprom_stm32.h @@ -10,15 +10,17 @@ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * - * This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and - * https://github.com/leaflabs/libmaple + * This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by + * Artur F. * * Modifications for QMK and STM32F303 by Yiancar + * + * This library assumes 8-bit data locations. To add a new MCU, please provide the flash + * page size and the total flash size in Kb. The number of available pages must be a multiple + * of 2. Only half of the pages account for the total EEPROM size. + * This library also assumes that the pages are not used by the firmware. */ -// This file must be modified if the MCU is not defined below. -// This library also assumes that the pages are not used by the firmware. - #ifndef __EEPROM_H #define __EEPROM_H @@ -38,9 +40,11 @@ #ifndef EEPROM_PAGE_SIZE #if defined (MCU_STM32F103RB) - #define EEPROM_PAGE_SIZE (uint16_t)0x400 /* Page size = 1KByte */ + #define FEE_PAGE_SIZE (uint16_t)0x400 // Page size = 1KByte + #define FEE_DENSITY_PAGES 2 // How many pages are used #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) || defined (MCU_STM32F103RD) || defined (MCU_STM32F303CC) - #define EEPROM_PAGE_SIZE (uint16_t)0x800 /* Page size = 2KByte */ + #define FEE_PAGE_SIZE (uint16_t)0x800 // Page size = 2KByte + #define FEE_DENSITY_PAGES 4 // How many pages are used #else #error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." #endif @@ -48,48 +52,30 @@ #ifndef EEPROM_START_ADDRESS #if defined (MCU_STM32F103RB) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 128 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 128 // Size in Kb #elif defined (MCU_STM32F103ZE) || defined (MCU_STM32F103RE) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 512 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 512 // Size in Kb #elif defined (MCU_STM32F103RD) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 384 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 384 // Size in Kb #elif defined (MCU_STM32F303CC) - #define EEPROM_START_ADDRESS ((uint32_t)(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)) + #define FEE_MCU_FLASH_SIZE 256 // Size in Kb #else #error "No MCU type specified. Add something like -DMCU_STM32F103RB to your compiler arguments (probably in a Makefile)." #endif #endif -/* Pages 0 and 1 base and end addresses */ -#define EEPROM_PAGE0_BASE ((uint32_t)(EEPROM_START_ADDRESS + 0x000)) -#define EEPROM_PAGE1_BASE ((uint32_t)(EEPROM_START_ADDRESS + EEPROM_PAGE_SIZE)) - -/* Page status definitions */ -#define EEPROM_ERASED ((uint16_t)0xFFFF) /* PAGE is empty */ -#define EEPROM_RECEIVE_DATA ((uint16_t)0xEEEE) /* PAGE is marked to receive data */ -#define EEPROM_VALID_PAGE ((uint16_t)0x0000) /* PAGE containing valid data */ - -/* Page full define */ -enum uint16_t - { - EEPROM_OK = ((uint16_t)0x0000), - EEPROM_OUT_SIZE = ((uint16_t)0x0081), - EEPROM_BAD_ADDRESS = ((uint16_t)0x0082), - EEPROM_BAD_FLASH = ((uint16_t)0x0083), - EEPROM_NOT_INIT = ((uint16_t)0x0084), - EEPROM_SAME_VALUE = ((uint16_t)0x0085), - EEPROM_NO_VALID_PAGE = ((uint16_t)0x00AB) - }; - -#define EEPROM_DEFAULT_DATA 0xFFFF +// DONT CHANGE +// Choose location for the first EEPROM Page address on the top of flash +#define FEE_PAGE_BASE_ADDRESS ((uint32_t)(0x8000000 + FEE_MCU_FLASH_SIZE * 1024 - FEE_DENSITY_PAGES * FEE_PAGE_SIZE)) +#define FEE_DENSITY_BYTES ((FEE_PAGE_SIZE / 2) * FEE_DENSITY_PAGES - 1) +#define FEE_LAST_PAGE_ADDRESS (FEE_PAGE_BASE_ADDRESS + (FEE_PAGE_SIZE * FEE_DENSITY_PAGES)) +#define FEE_EMPTY_WORD ((uint16_t)0xFFFF) +#define FEE_ADDR_OFFSET(Address)(Address * 2) // 1Byte per Word will be saved to preserve Flash - uint16_t EEPROM_init(void); - uint16_t EEPROM_format(void); - uint16_t EEPROM_erases(uint16_t *); - uint16_t EEPROM_read (uint16_t address, uint16_t *data); - uint16_t EEPROM_write(uint16_t address, uint16_t data); - uint16_t EEPROM_update(uint16_t address, uint16_t data); - uint16_t EEPROM_count(uint16_t *); - uint16_t EEPROM_maxcount(void); +// Use this function to initialize the functionality +uint16_t EEPROM_Init(void); +void EEPROM_Erase (void); +uint16_t EEPROM_WriteDataByte (uint16_t Address, uint8_t DataByte); +uint8_t EEPROM_ReadDataByte (uint16_t Address); #endif /* __EEPROM_H */ diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c index 27359348445e..164654a15eae 100755 --- a/tmk_core/common/chibios/flash_stm32.c +++ b/tmk_core/common/chibios/flash_stm32.c @@ -186,3 +186,18 @@ void FLASH_Lock(void) /* Set the Lock Bit to lock the FPEC and the FCR */ FLASH->CR |= FLASH_CR_LOCK; } + +/** + * @brief Clears the FLASH's pending flags. + * @param FLASH_FLAG: specifies the FLASH flags to clear. + * This parameter can be any combination of the following values: + * @arg FLASH_FLAG_PGERR: FLASH Programming error flag flag + * @arg FLASH_FLAG_WRPERR: FLASH Write protected error flag + * @arg FLASH_FLAG_EOP: FLASH End of Programming flag + * @retval None + */ +void FLASH_ClearFlag(uint32_t FLASH_FLAG) +{ + /* Clear the flags */ + FLASH->SR = FLASH_FLAG; +} diff --git a/tmk_core/common/chibios/flash_stm32.h b/tmk_core/common/chibios/flash_stm32.h index cc065cbca26c..3c99cc566a03 100755 --- a/tmk_core/common/chibios/flash_stm32.h +++ b/tmk_core/common/chibios/flash_stm32.h @@ -45,6 +45,7 @@ FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data); void FLASH_Unlock(void); void FLASH_Lock(void); +void FLASH_ClearFlag(uint32_t FLASH_FLAG); #ifdef __cplusplus } diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index d8bab7d2e52c..59b2bffbc714 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c @@ -33,7 +33,7 @@ void eeconfig_init_kb(void) { */ void eeconfig_init_quantum(void) { #ifdef STM32_EEPROM_ENABLE - EEPROM_format(); + EEPROM_Erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER); eeprom_update_byte(EECONFIG_DEBUG, 0); @@ -74,7 +74,7 @@ void eeconfig_enable(void) void eeconfig_disable(void) { #ifdef STM32_EEPROM_ENABLE - EEPROM_format(); + EEPROM_Erase(); #endif eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_NUMBER_OFF); } diff --git a/tmk_core/common/eeconfig.h b/tmk_core/common/eeconfig.h index 8d4e1d4d0083..eedd67602c69 100644 --- a/tmk_core/common/eeconfig.h +++ b/tmk_core/common/eeconfig.h @@ -25,8 +25,7 @@ along with this program. If not, see . #define EECONFIG_MAGIC_NUMBER (uint16_t)0xFEED #define EECONFIG_MAGIC_NUMBER_OFF (uint16_t)0xFFFF -/* eeprom parameteter address */ -#if !defined(STM32_EEPROM_ENABLE) +/* EEPROM parameter address */ #define EECONFIG_MAGIC (uint16_t *)0 #define EECONFIG_DEBUG (uint8_t *)2 #define EECONFIG_DEFAULT_LAYER (uint8_t *)3 @@ -42,24 +41,6 @@ along with this program. If not, see . #define EECONFIG_KEYBOARD (uint32_t *)15 #define EECONFIG_USER (uint32_t *)19 -#else -/* STM32F3 uses 16byte block. Reconfigure memory map */ -#define EECONFIG_MAGIC (uint16_t *)0 -#define EECONFIG_DEBUG (uint8_t *)1 -#define EECONFIG_DEFAULT_LAYER (uint8_t *)2 -#define EECONFIG_KEYMAP (uint8_t *)3 -#define EECONFIG_MOUSEKEY_ACCEL (uint8_t *)4 -#define EECONFIG_BACKLIGHT (uint8_t *)5 -#define EECONFIG_AUDIO (uint8_t *)6 -#define EECONFIG_RGBLIGHT (uint32_t *)7 -#define EECONFIG_UNICODEMODE (uint8_t *)9 -#define EECONFIG_STENOMODE (uint8_t *)10 -// EEHANDS for two handed boards -#define EECONFIG_HANDEDNESS (uint8_t *)11 -#define EECONFIG_KEYBOARD (uint32_t *)12 -#define EECONFIG_USER (uint32_t *)14 -#endif - /* debug bit */ #define EECONFIG_DEBUG_ENABLE (1<<0) #define EECONFIG_DEBUG_MATRIX (1<<1) diff --git a/tmk_core/common/eeprom.h b/tmk_core/common/eeprom.h index 3696d0df3f89..5ae0f6eebd93 100644 --- a/tmk_core/common/eeprom.h +++ b/tmk_core/common/eeprom.h @@ -20,5 +20,4 @@ void eeprom_update_dword (uint32_t *__p, uint32_t __value); void eeprom_update_block (const void *__src, void *__dst, uint32_t __n); #endif - #endif /* TMK_CORE_COMMON_EEPROM_H_ */ diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index ee9571c950de..5436d4909012 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -113,7 +113,7 @@ int main(void) { chSysInit(); #ifdef STM32_EEPROM_ENABLE - EEPROM_init(); + EEPROM_Init(); #endif // TESTING From 28986998046b4dbdbc228dbb7889836de2a3ee18 Mon Sep 17 00:00:00 2001 From: flehrad <20124416+flehrad@users.noreply.github.com> Date: Tue, 8 Jan 2019 02:29:37 +1100 Subject: [PATCH 080/458] Add Downbubble to Handwired repository (#4794) * add snagpad * Update keyboards/snagpad/kb.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename kb.c to snagpad.c * Update and rename kb.h to snagpad.h * Update snagpad.h * Update keymap.c * Update config.h * Update config.h * Update rules.mk * Update README.md * Add files via upload * Update info.json * Update keymap.c * Update snagpad.h * Delete snagpad_numpad.json * Delete snagpad_ortho.json * Update README.md * Update keyboards/snagpad/info.json Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * add tradestation * --all * Did something weird messing with git -_- hopefully fixed * Update keyboards/tradestation/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/config.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update snagpad.h * Update rules.mk * Update keymap.c * fixed merge conflict, updated to LAYOUT_numpad_5x4 * relocated to handwire, updated naming, added layouts to rules.mk * Update keyboards/handwired/tradestation/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/snagpad/snagpad.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Rename LICENSE to license * Rename README.md to readme.md * Rename LICENSE to license * Rename README.md to readme.md * Update info.json * Update keymap.c * Update info.json * Adding Numbrero QMK to Handwire Repository * Update config.h * Update readme.md * Update keyboards/handwired/numbrero/numbrero.h Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keymap.c * Update keyboards/handwired/numbrero/rules.mk Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Add handwired/downbubble keyboard to QMK Repository * Update readme.md * Create license * Update keyboards/handwired/downbubble/readme.md Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * Update keyboards/handwired/downbubble/keymaps/default/keymap.c Co-Authored-By: flehrad <20124416+flehrad@users.noreply.github.com> * fixed .h with noroadsleft's gist --- keyboards/handwired/downbubble/config.h | 245 ++++++++ keyboards/handwired/downbubble/downbubble.c | 16 + keyboards/handwired/downbubble/downbubble.h | 111 ++++ keyboards/handwired/downbubble/info.json | 554 ++++++++++++++++++ .../downbubble/keymaps/default/config.h | 19 + .../downbubble/keymaps/default/keymap.c | 103 ++++ .../downbubble/keymaps/default/readme.md | 1 + keyboards/handwired/downbubble/license | 201 +++++++ keyboards/handwired/downbubble/readme.md | 15 + keyboards/handwired/downbubble/rules.mk | 81 +++ 10 files changed, 1346 insertions(+) create mode 100644 keyboards/handwired/downbubble/config.h create mode 100644 keyboards/handwired/downbubble/downbubble.c create mode 100644 keyboards/handwired/downbubble/downbubble.h create mode 100644 keyboards/handwired/downbubble/info.json create mode 100644 keyboards/handwired/downbubble/keymaps/default/config.h create mode 100644 keyboards/handwired/downbubble/keymaps/default/keymap.c create mode 100644 keyboards/handwired/downbubble/keymaps/default/readme.md create mode 100644 keyboards/handwired/downbubble/license create mode 100644 keyboards/handwired/downbubble/readme.md create mode 100644 keyboards/handwired/downbubble/rules.mk diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h new file mode 100644 index 000000000000..0da13a4b15e2 --- /dev/null +++ b/keyboards/handwired/downbubble/config.h @@ -0,0 +1,245 @@ +/* +Copyright 2018 Don Chiou + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Flehrad +#define PRODUCT downbubble +#define DESCRIPTION An Ergonomic Centered Numpad Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 20 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F2, F3, F4, F5, F6 } +#define MATRIX_COL_PINS { F7, C7, C6, C5, C4, C3, C2, C1, C0, E1, E0, D7, D6, D5, D4, D3, D2, D1, D0, B7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/handwired/downbubble/downbubble.c b/keyboards/handwired/downbubble/downbubble.c new file mode 100644 index 000000000000..48be8e499823 --- /dev/null +++ b/keyboards/handwired/downbubble/downbubble.c @@ -0,0 +1,16 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "downbubble.h" diff --git a/keyboards/handwired/downbubble/downbubble.h b/keyboards/handwired/downbubble/downbubble.h new file mode 100644 index 000000000000..a25a9a5db56e --- /dev/null +++ b/keyboards/handwired/downbubble/downbubble.h @@ -0,0 +1,111 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_downbubble_standard( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K418, \ + K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_splitbackspace( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K418, \ + K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_splitrightshift( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K29, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K410, K411, K412, K413, K414, K416, K417, K418, \ + K50, K51, K52, K53, K54, K56, K58, K49, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, KC_NO, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, K417, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_splitnumpad( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, K416, K418, \ + K50, K51, K52, K53, K54, K56, K57, K58, K59, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, KC_NO, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, KC_NO, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } + +#define LAYOUT_downbubble_spliteverything( \ + K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, K317, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, K416, K417, K418, \ + K50, K51, K52, K53, K54, K56, K57, K58, K59, K510, K512, K513, K514, K516, K517, K518, K519 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, KC_NO, KC_NO, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K310, K311, K312, K313, K314, K315, KC_NO, K317, KC_NO, KC_NO }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K410, K411, K412, K413, K414, KC_NO, K416, K417, K418, KC_NO }, \ + { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ + } diff --git a/keyboards/handwired/downbubble/info.json b/keyboards/handwired/downbubble/info.json new file mode 100644 index 000000000000..cd64c0e36958 --- /dev/null +++ b/keyboards/handwired/downbubble/info.json @@ -0,0 +1,554 @@ +{ + "keyboard_name": "downbubble", + "url": "", + "maintainer": "flehrad", + "width": 22.75, + "height": 6, + "layouts": { + "LAYOUT_downbubble_standard": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5, "w":2}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K29", "x":10.75, "y":2.5, "h":2}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":2.75}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5, "w":2}, + {"label":"K58", "x":9.75, "y":5.5}, + {"label":"K49", "x":10.75, "y":4.5, "h":2}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubbled_splitbackspace": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K29", "x":10.75, "y":2.5, "h":2}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":2.75}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5, "w":2}, + {"label":"K58", "x":9.75, "y":5.5}, + {"label":"K49", "x":10.75, "y":4.5, "h":2}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubble_splitrightshift": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5, "w":2}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K29", "x":10.75, "y":2.5, "h":2}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5, "w":2}, + {"label":"K58", "x":9.75, "y":5.5}, + {"label":"K49", "x":10.75, "y":4.5, "h":2}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubble_splitnumpad": { + "layout": [ + {"label":"K00", "x":0, "y":0.5}, + {"label":"K01", "x":1, "y":0.5}, + {"label":"K02", "x":2, "y":0.5}, + {"label":"K03", "x":3, "y":0.5}, + {"label":"K04", "x":4, "y":0.5}, + {"label":"K05", "x":5, "y":0.5}, + {"label":"K06", "x":6, "y":0.5}, + {"label":"K010", "x":12.75, "y":0.5}, + {"label":"K011", "x":13.75, "y":0.5}, + {"label":"K012", "x":14.75, "y":0.5}, + {"label":"K013", "x":15.75, "y":0.5}, + {"label":"K014", "x":16.75, "y":0.5}, + {"label":"K015", "x":17.75, "y":0.5}, + {"label":"K016", "x":18.75, "y":0.5}, + {"label":"K017", "x":19.75, "y":0.5}, + {"label":"K018", "x":20.75, "y":0.5}, + {"label":"K019", "x":21.75, "y":0.5}, + {"label":"K10", "x":0, "y":1.5}, + {"label":"K11", "x":1, "y":1.5}, + {"label":"K12", "x":2, "y":1.5}, + {"label":"K13", "x":3, "y":1.5}, + {"label":"K14", "x":4, "y":1.5}, + {"label":"K15", "x":5, "y":1.5}, + {"label":"K16", "x":6, "y":1.5}, + {"label":"K17", "x":8.75, "y":1.5}, + {"label":"K18", "x":9.75, "y":1.5}, + {"label":"K19", "x":10.75, "y":1.5}, + {"label":"K110", "x":12.75, "y":1.5}, + {"label":"K111", "x":13.75, "y":1.5}, + {"label":"K112", "x":14.75, "y":1.5}, + {"label":"K113", "x":15.75, "y":1.5}, + {"label":"K114", "x":16.75, "y":1.5}, + {"label":"K115", "x":17.75, "y":1.5}, + {"label":"K116", "x":18.75, "y":1.5, "w":2}, + {"label":"K118", "x":20.75, "y":1.5}, + {"label":"K119", "x":21.75, "y":1.5}, + {"label":"K20", "x":0, "y":2.5, "w":1.5}, + {"label":"K21", "x":1.5, "y":2.5}, + {"label":"K22", "x":2.5, "y":2.5}, + {"label":"K23", "x":3.5, "y":2.5}, + {"label":"K24", "x":4.5, "y":2.5}, + {"label":"K25", "x":5.5, "y":2.5}, + {"label":"K26", "x":7.75, "y":2.5}, + {"label":"K17", "x":8.75, "y":2.5}, + {"label":"K28", "x":9.75, "y":2.5}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2.5}, + {"label":"K211", "x":13.25, "y":2.5}, + {"label":"K212", "x":14.25, "y":2.5}, + {"label":"K213", "x":15.25, "y":2.5}, + {"label":"K214", "x":16.25, "y":2.5}, + {"label":"K215", "x":17.25, "y":2.5}, + {"label":"K216", "x":18.25, "y":2.5}, + {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, + {"label":"K218", "x":20.75, "y":2.5}, + {"label":"K219", "x":21.75, "y":2.5}, + {"label":"K30", "x":0, "y":3.5, "w":1.75}, + {"label":"K31", "x":1.75, "y":3.5}, + {"label":"K32", "x":2.75, "y":3.5}, + {"label":"K33", "x":3.75, "y":3.5}, + {"label":"K34", "x":4.75, "y":3.5}, + {"label":"K35", "x":5.75, "y":3.5}, + {"label":"K36", "x":7.75, "y":3.5}, + {"label":"K37", "x":8.75, "y":3.5}, + {"label":"K38", "x":9.75, "y":3.5}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3.5}, + {"label":"K311", "x":13.5, "y":3.5}, + {"label":"K312", "x":14.5, "y":3.5}, + {"label":"K313", "x":15.5, "y":3.5}, + {"label":"K314", "x":16.5, "y":3.5}, + {"label":"K315", "x":17.5, "y":3.5}, + {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, + {"label":"K40", "x":0, "y":4.5, "w":2.25}, + {"label":"K41", "x":2.25, "y":4.5}, + {"label":"K42", "x":3.25, "y":4.5}, + {"label":"K43", "x":4.25, "y":4.5}, + {"label":"K44", "x":5.25, "y":4.5}, + {"label":"K45", "x":6.25, "y":4.5}, + {"label":"K46", "x":7.75, "y":4.5}, + {"label":"K47", "x":8.75, "y":4.5}, + {"label":"K48", "x":9.75, "y":4.5}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4.5}, + {"label":"K411", "x":14, "y":4.5}, + {"label":"K412", "x":15, "y":4.5}, + {"label":"K413", "x":16, "y":4.5}, + {"label":"K414", "x":17, "y":4.5}, + {"label":"K416", "x":18, "y":4.5, "w":2.75}, + {"label":"K418", "x":20.75, "y":4.5}, + {"label":"K50", "x":0, "y":5.5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, + {"label":"K54", "x":5, "y":5.5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5.5}, + {"Label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5.5, "w":2}, + {"label":"K512", "x":15, "y":5.5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5.5}, + {"label":"K517", "x":19.75, "y":5.5}, + {"label":"K518", "x":20.75, "y":5.5}, + {"label":"K519", "x":21.75, "y":5.5}] + }, + "LAYOUT_downbubble_spliteverything": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "X":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K27", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5}, + {"label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5}] + } + } +} diff --git a/keyboards/handwired/downbubble/keymaps/default/config.h b/keyboards/handwired/downbubble/keymaps/default/config.h new file mode 100644 index 000000000000..4496c5910061 --- /dev/null +++ b/keyboards/handwired/downbubble/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +// place overrides here diff --git a/keyboards/handwired/downbubble/keymaps/default/keymap.c b/keyboards/handwired/downbubble/keymaps/default/keymap.c new file mode 100644 index 000000000000..d35d36739461 --- /dev/null +++ b/keyboards/handwired/downbubble/keymaps/default/keymap.c @@ -0,0 +1,103 @@ +/* Copyright 2018 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_downbubble_standard(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_splitbackspace(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_splitrightshift(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_splitnumpad(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_PENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_downbubble_spliteverything(\ + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P1, KC_P2, KC_P3, KC_PENT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/handwired/downbubble/keymaps/default/readme.md b/keyboards/handwired/downbubble/keymaps/default/readme.md new file mode 100644 index 000000000000..757d99062588 --- /dev/null +++ b/keyboards/handwired/downbubble/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymaps for downbubble diff --git a/keyboards/handwired/downbubble/license b/keyboards/handwired/downbubble/license new file mode 100644 index 000000000000..e6e77b08909f --- /dev/null +++ b/keyboards/handwired/downbubble/license @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/keyboards/handwired/downbubble/readme.md b/keyboards/handwired/downbubble/readme.md new file mode 100644 index 000000000000..e6623451277a --- /dev/null +++ b/keyboards/handwired/downbubble/readme.md @@ -0,0 +1,15 @@ +# downbubble + +Prototype hand-wired version of this keyboard - https://imgur.com/a/0KbX1JH + +This is an ergonomic keyboard with a 5 degree rotation on keyboard halves, and a rotated numpad in the center for RH users. + +Keyboard Maintainer: [Flehrad](https://github.com/flehrad) +Hardware Supported: downbubble PCB, AT90USB1286 MCU, MX switches and MiniUSB connector +Hardware Availability: The Board Podcast Slack + +Make example for this keyboard (after setting up your build environment): + + make downbubble:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/downbubble/rules.mk b/keyboards/handwired/downbubble/rules.mk new file mode 100644 index 000000000000..87d0d4a1e258 --- /dev/null +++ b/keyboards/handwired/downbubble/rules.mk @@ -0,0 +1,81 @@ +# MCU name +MCU = at90usb1286 +#MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) From d55dc9b8168dc4582751b4d7ee4b2de3f5b4e3ab Mon Sep 17 00:00:00 2001 From: Ian O'Dea Date: Mon, 7 Jan 2019 09:36:28 -0600 Subject: [PATCH 081/458] Add ability to animate arm_atsam led matrix from the center of a circle --- tmk_core/protocol/arm_atsam/led_matrix.c | 20 ++++++++++++++------ tmk_core/protocol/arm_atsam/led_matrix.h | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index e914fc80ea59..3e07fbe6c3d7 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -18,6 +18,7 @@ along with this program. If not, see . #include "arm_atsam_protocol.h" #include "tmk_core/common/led.h" #include +#include void SERCOM1_0_Handler( void ) { @@ -249,6 +250,7 @@ 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; @@ -327,13 +329,18 @@ void led_matrix_run(void) for (fcur = 0; fcur < fmax; fcur++) { - if (led_animation_orientation) - { - po = led_cur->py; + if (led_animation_circular) { + po = sqrtf((powf(fabsf(50 - led_cur->py), 2) + powf(fabsf(50 - led_cur->px), 2))); } - else - { - po = led_cur->px; + else { + if (led_animation_orientation) + { + po = led_cur->py; + } + else + { + po = led_cur->px; + } } float pomod; @@ -466,6 +473,7 @@ uint8_t led_matrix_init(void) led_animation_breathe_cur = BREATHE_MIN_STEP; breathe_step = 1; breathe_dir = 1; + led_animation_circular = 0; gcr_min_counter = 0; v_5v_cat_hit = 0; diff --git a/tmk_core/protocol/arm_atsam/led_matrix.h b/tmk_core/protocol/arm_atsam/led_matrix.h index cedea8a856dc..f0d45283484f 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.h +++ b/tmk_core/protocol/arm_atsam/led_matrix.h @@ -129,6 +129,7 @@ extern uint8_t led_animation_orientation; extern uint8_t led_animation_breathing; extern uint8_t led_animation_breathe_cur; extern uint8_t breathe_dir; +extern uint8_t led_animation_circular; extern const uint8_t led_setups_count; extern void *led_setups[]; From 9f3afae5d12e7847639666b30f3239580dafed28 Mon Sep 17 00:00:00 2001 From: Ian O'Dea Date: Mon, 7 Jan 2019 10:20:15 -0600 Subject: [PATCH 082/458] Make arm_atsam led matrix circular animation circular rather than obloid --- tmk_core/protocol/arm_atsam/led_matrix.c | 4 +++- tmk_core/protocol/arm_atsam/led_matrix.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index 3e07fbe6c3d7..af49db28dd78 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -218,6 +218,7 @@ void disp_calc_extents(void) 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) @@ -267,6 +268,7 @@ void led_matrix_run(void) float go; float bo; float po; + uint8_t led_this_run = 0; led_setup_t *f = (led_setup_t*)led_setups[led_animation_id]; @@ -330,7 +332,7 @@ void led_matrix_run(void) { if (led_animation_circular) { - po = sqrtf((powf(fabsf(50 - led_cur->py), 2) + powf(fabsf(50 - led_cur->px), 2))); + 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) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.h b/tmk_core/protocol/arm_atsam/led_matrix.h index f0d45283484f..4513234e7f37 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.h +++ b/tmk_core/protocol/arm_atsam/led_matrix.h @@ -83,6 +83,7 @@ typedef struct led_disp_s { float bottom; float width; float height; + float max_distance; } led_disp_t; uint8_t led_matrix_init(void); From 6ca52c9d571659463a526fdeabb86af10c8e1665 Mon Sep 17 00:00:00 2001 From: Ian O'Dea Date: Mon, 7 Jan 2019 10:22:47 -0600 Subject: [PATCH 083/458] Fix indentation in tmk_core led_matrix.c --- tmk_core/protocol/arm_atsam/led_matrix.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index af49db28dd78..9b76d8bbc8bb 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -332,17 +332,17 @@ void led_matrix_run(void) { 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; + 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; - } + if (led_animation_orientation) + { + po = led_cur->py; + } + else + { + po = led_cur->px; + } } float pomod; From 6e984a8b5e34ba181b0893a929af569a1faef2b6 Mon Sep 17 00:00:00 2001 From: patrickmt <40182064+patrickmt@users.noreply.github.com> Date: Tue, 18 Dec 2018 15:21:25 -0500 Subject: [PATCH 084/458] Update to arm_atsam wait and timer routines Microsecond (us) delays are now handled by a busy wait loop according to MCU frequency. This replaces the system counter method which had an overhead of around 12us. TC5 device and supporting routines removed as it was the old us delay counter. wait_ms is now properly a macro to CLK_delay_ms. wait_us is now properly a macro to CLK_delay_us. Removed CLK_get_us as it has no use. All calls to CLK_get_ms() have been replaced by timer_read64() with corrected typing. All calls to CLK_delay_ms() have been replaced by wait_ms(). All calls to CLK_delay_us() have been replaced by wait_us() and timings verified or updated as needed after review on scope. Corrected typing of variables using 64bit ms timer readings if needed. --- keyboards/massdrop/alt/matrix.c | 12 +-- keyboards/massdrop/ctrl/matrix.c | 12 +-- tmk_core/common/arm_atsam/timer.c | 20 +---- tmk_core/common/wait.h | 4 + .../protocol/arm_atsam/arm_atsam_protocol.h | 2 + tmk_core/protocol/arm_atsam/clks.c | 90 +++++-------------- tmk_core/protocol/arm_atsam/clks.h | 5 +- tmk_core/protocol/arm_atsam/i2c_master.c | 4 +- tmk_core/protocol/arm_atsam/led_matrix.c | 4 +- tmk_core/protocol/arm_atsam/main_arm_atsam.c | 18 ++-- tmk_core/protocol/arm_atsam/usb/udi_cdc.c | 8 +- tmk_core/protocol/arm_atsam/usb/usb2422.c | 15 ++-- 12 files changed, 61 insertions(+), 133 deletions(-) diff --git a/keyboards/massdrop/alt/matrix.c b/keyboards/massdrop/alt/matrix.c index 892d38791c3a..472479d303a9 100644 --- a/keyboards/massdrop/alt/matrix.c +++ b/keyboards/massdrop/alt/matrix.c @@ -79,8 +79,6 @@ void matrix_init(void) matrix_init_quantum(); } -#define MATRIX_SCAN_DELAY 10 //Delay after setting a col to output (in us) - uint64_t mdebouncing = 0; uint8_t matrix_scan(void) { @@ -89,9 +87,7 @@ uint8_t matrix_scan(void) uint8_t col; uint32_t scans[2]; //PA PB - if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active - - //DBG_1_OFF; //Profiling scans + if (timer_read64() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer @@ -99,7 +95,7 @@ uint8_t matrix_scan(void) { PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output - CLK_delay_us(MATRIX_SCAN_DELAY); //Delay for output + wait_us(1); //Delay for output scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data @@ -132,11 +128,9 @@ uint8_t matrix_scan(void) else { //Begin or extend debounce on change - mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY; + mdebouncing = timer_read64() + DEBOUNCING_DELAY; } - //DBG_1_ON; //Profiling scans - matrix_scan_quantum(); return 1; diff --git a/keyboards/massdrop/ctrl/matrix.c b/keyboards/massdrop/ctrl/matrix.c index 3580577dc107..5f1741e58a50 100644 --- a/keyboards/massdrop/ctrl/matrix.c +++ b/keyboards/massdrop/ctrl/matrix.c @@ -79,8 +79,6 @@ void matrix_init(void) matrix_init_quantum(); } -#define MATRIX_SCAN_DELAY 10 //Delay after setting a col to output (in us) - uint64_t mdebouncing = 0; uint8_t matrix_scan(void) { @@ -89,9 +87,7 @@ uint8_t matrix_scan(void) uint8_t col; uint32_t scans[2]; //PA PB - if (CLK_get_ms() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active - - //DBG_1_OFF; //Profiling scans + if (timer_read64() < mdebouncing) return 1; //mdebouncing == 0 when no debouncing active memset(mlatest, 0, MATRIX_ROWS * sizeof(matrix_row_t)); //Zero the result buffer @@ -99,7 +95,7 @@ uint8_t matrix_scan(void) { PORT->Group[col_ports[col]].OUTSET.reg = 1 << col_pins[col]; //Set col output - CLK_delay_us(MATRIX_SCAN_DELAY); //Delay for output + wait_us(1); //Delay for output scans[PA] = PORT->Group[PA].IN.reg & row_masks[PA]; //Read PA row pins data scans[PB] = PORT->Group[PB].IN.reg & row_masks[PB]; //Read PB row pins data @@ -132,11 +128,9 @@ uint8_t matrix_scan(void) else { //Begin or extend debounce on change - mdebouncing = CLK_get_ms() + DEBOUNCING_DELAY; + mdebouncing = timer_read64() + DEBOUNCING_DELAY; } - //DBG_1_ON; //Profiling scans - matrix_scan_quantum(); return 1; diff --git a/tmk_core/common/arm_atsam/timer.c b/tmk_core/common/arm_atsam/timer.c index bcfe5002c347..6c3905e3087f 100644 --- a/tmk_core/common/arm_atsam/timer.c +++ b/tmk_core/common/arm_atsam/timer.c @@ -9,7 +9,7 @@ void set_time(uint64_t tset) void timer_init(void) { - ms_clk = 0; + timer_clear(); } uint16_t timer_read(void) @@ -37,23 +37,7 @@ uint32_t timer_elapsed32(uint32_t tlast) return TIMER_DIFF_32(timer_read32(), tlast); } -uint32_t timer_elapsed64(uint32_t tlast) -{ - uint64_t tnow = timer_read64(); - return (tnow >= tlast ? tnow - tlast : UINT64_MAX - tlast + tnow); -} - void timer_clear(void) { - ms_clk = 0; -} - -void wait_ms(uint64_t msec) -{ - CLK_delay_ms(msec); -} - -void wait_us(uint16_t usec) -{ - CLK_delay_us(usec); + set_time(0); } diff --git a/tmk_core/common/wait.h b/tmk_core/common/wait.h index a7cded942021..a77840bcef96 100644 --- a/tmk_core/common/wait.h +++ b/tmk_core/common/wait.h @@ -15,6 +15,10 @@ extern "C" { # include "ch.h" # define wait_ms(ms) chThdSleepMilliseconds(ms) # define wait_us(us) chThdSleepMicroseconds(us) +#elif defined PROTOCOL_ARM_ATSAM +# include "clks.h" +# define wait_ms(ms) CLK_delay_ms(ms) +# define wait_us(us) CLK_delay_us(us) #elif defined(__arm__) # include "wait_api.h" #else // Unit tests diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h index 2ba0991749cc..928af8c7e170 100644 --- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h +++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h @@ -21,8 +21,10 @@ along with this program. If not, see . #include "samd51j18a.h" #include "md_bootloader.h" +#include "timer.h" #include "d51_util.h" #include "clks.h" +#include "wait.h" #include "adc.h" #include "i2c_master.h" #include "spi.h" diff --git a/tmk_core/protocol/arm_atsam/clks.c b/tmk_core/protocol/arm_atsam/clks.c index 8768d0a99e13..1ff318e59b35 100644 --- a/tmk_core/protocol/arm_atsam/clks.c +++ b/tmk_core/protocol/arm_atsam/clks.c @@ -21,8 +21,8 @@ along with this program. If not, see . volatile clk_t system_clks; volatile uint64_t ms_clk; - -volatile uint8_t us_delay_done; +uint32_t usec_delay_mult; +#define USEC_DELAY_LOOP_CYCLES 3 //Sum of instruction cycles in us delay loop const uint32_t sercom_apbbase[] = {(uint32_t)SERCOM0,(uint32_t)SERCOM1,(uint32_t)SERCOM2,(uint32_t)SERCOM3,(uint32_t)SERCOM4,(uint32_t)SERCOM5}; const uint8_t sercom_pchan[] = {7, 8, 23, 24, 34, 35}; @@ -73,6 +73,9 @@ void CLK_oscctrl_init(void) system_clks.freq_gclk[0] = system_clks.freq_dpll[0]; + usec_delay_mult = system_clks.freq_gclk[0] / (USEC_DELAY_LOOP_CYCLES * 1000000); + if (usec_delay_mult < 1) usec_delay_mult = 1; //Never allow a multiplier of zero + DBGC(DC_CLK_OSC_INIT_COMPLETE); } @@ -158,23 +161,11 @@ void TC4_Handler() } } -void TC5_Handler() -{ - if (TC5->COUNT16.INTFLAG.bit.MC0) - { - TC5->COUNT16.INTFLAG.reg = TC_INTENCLR_MC0; - us_delay_done = 1; - TC5->COUNT16.CTRLA.bit.ENABLE = 0; - while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {} - } -} - uint32_t CLK_enable_timebase(void) { Gclk *pgclk = GCLK; Mclk *pmclk = MCLK; Tc *ptc4 = TC4; - Tc *ptc5 = TC5; Tc *ptc0 = TC0; Evsys *pevsys = EVSYS; @@ -189,11 +180,6 @@ uint32_t CLK_enable_timebase(void) pgclk->PCHCTRL[TC4_GCLK_ID].bit.GEN = GEN_TC45; pgclk->PCHCTRL[TC4_GCLK_ID].bit.CHEN = 1; - //unmask TC5 sourcegclk2 to TC5 - pmclk->APBCMASK.bit.TC5_ = 1; - pgclk->PCHCTRL[TC5_GCLK_ID].bit.GEN = GEN_TC45; - pgclk->PCHCTRL[TC5_GCLK_ID].bit.CHEN = 1; - //configure TC4 DBGC(DC_CLK_ENABLE_TIMEBASE_TC4_BEGIN); ptc4->COUNT16.CTRLA.bit.ENABLE = 0; @@ -220,30 +206,6 @@ uint32_t CLK_enable_timebase(void) DBGC(DC_CLK_ENABLE_TIMEBASE_TC4_COMPLETE); - //configure TC5 - DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_BEGIN); - ptc5->COUNT16.CTRLA.bit.ENABLE = 0; - while (ptc5->COUNT16.SYNCBUSY.bit.ENABLE) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_DISABLE); } - ptc5->COUNT16.CTRLA.bit.SWRST = 1; - while (ptc5->COUNT16.SYNCBUSY.bit.SWRST) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_SWRST_1); } - while (ptc5->COUNT16.CTRLA.bit.SWRST) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_SWRST_2); } - - //CTRLA defaults - //CTRLB as default, counting up - ptc5->COUNT16.CTRLBCLR.reg = 5; - while (ptc5->COUNT16.SYNCBUSY.bit.CTRLB) { DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_SYNC_CLTRB); } - //ptc5->COUNT16.DBGCTRL.bit.DBGRUN = 1; - - //wave mode - ptc5->COUNT16.WAVE.bit.WAVEGEN = 1; //MFRQ match frequency mode, toggle each CC match - //generate event for next stage - ptc5->COUNT16.EVCTRL.bit.MCEO0 = 1; - - NVIC_EnableIRQ(TC5_IRQn); - ptc5->COUNT16.INTENSET.bit.MC0 = 1; - - DBGC(DC_CLK_ENABLE_TIMEBASE_TC5_COMPLETE); - //unmask TC0,1, sourcegclk2 to TC0,1 pmclk->APBAMASK.bit.TC0_ = 1; pgclk->PCHCTRL[TC0_GCLK_ID].bit.GEN = GEN_TC45; @@ -289,37 +251,27 @@ uint32_t CLK_enable_timebase(void) return 0; } -uint32_t CLK_get_ms(void) +void CLK_delay_us(uint32_t usec) { - return ms_clk; -} - -void CLK_delay_us(uint16_t usec) -{ - us_delay_done = 0; - - if (TC5->COUNT16.CTRLA.bit.ENABLE) - { - TC5->COUNT16.CTRLA.bit.ENABLE = 0; - while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {} - } - - if (usec < 10) usec = 0; - else usec -= 10; - - TC5->COUNT16.CC[0].reg = usec; - while (TC5->COUNT16.SYNCBUSY.bit.CC0) {} - - TC5->COUNT16.CTRLA.bit.ENABLE = 1; - while (TC5->COUNT16.SYNCBUSY.bit.ENABLE) {} - - while (!us_delay_done) {} + asm ( + "CBZ R0, return\n\t" //If usec == 0, branch to return label + ); + asm ( + "MULS R0, %0\n\t" //Multiply R0(usec) by usec_delay_mult and store in R0 + ".balign 16\n\t" //Ensure loop is aligned for fastest performance + "loop: SUBS R0, #1\n\t" //Subtract 1 from R0 and update flags (1 cycle) + "BNE loop\n\t" //Branch if non-zero to loop label (2 cycles) NOTE: USEC_DELAY_LOOP_CYCLES is the sum of loop cycles + "return:\n\t" //Return label + : //No output registers + : "r" (usec_delay_mult) //For %0 + ); + //Note: BX LR generated } void CLK_delay_ms(uint64_t msec) { - msec += CLK_get_ms(); - while (msec > CLK_get_ms()) {} + msec += timer_read64(); + while (msec > timer_read64()) {} } void clk_enable_sercom_apbmask(int sercomn) diff --git a/tmk_core/protocol/arm_atsam/clks.h b/tmk_core/protocol/arm_atsam/clks.h index 96819bfdd090..1b01a1764ef8 100644 --- a/tmk_core/protocol/arm_atsam/clks.h +++ b/tmk_core/protocol/arm_atsam/clks.h @@ -77,9 +77,8 @@ void CLK_oscctrl_init(void); void CLK_reset_time(void); uint32_t CLK_set_gclk_freq(uint8_t gclkn, uint32_t freq); uint32_t CLK_enable_timebase(void); -uint32_t CLK_get_ms(void); -uint64_t CLK_get_us(void); -void CLK_delay_us(uint16_t usec); +uint64_t timer_read64(void); +void CLK_delay_us(uint32_t usec); void CLK_delay_ms(uint64_t msec); uint32_t CLK_set_spi_freq(uint8_t sercomn, uint32_t freq); diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c index f608a79cc98d..d91a851f3776 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.c +++ b/tmk_core/protocol/arm_atsam/i2c_master.c @@ -265,12 +265,12 @@ uint8_t I2C3733_Init_Control(void) //USB state machine will enable driver when communication is ready I2C3733_Control_Set(0); - CLK_delay_ms(1); + wait_ms(1); sr_exp_data.bit.IRST = 0; SR_EXP_WriteData(); - CLK_delay_ms(1); + wait_ms(1); DBGC(DC_I2C3733_INIT_CONTROL_COMPLETE); diff --git a/tmk_core/protocol/arm_atsam/led_matrix.c b/tmk_core/protocol/arm_atsam/led_matrix.c index e914fc80ea59..9ef7393a2531 100644 --- a/tmk_core/protocol/arm_atsam/led_matrix.c +++ b/tmk_core/protocol/arm_atsam/led_matrix.c @@ -494,11 +494,11 @@ void led_matrix_task(void) if (led_enabled) { //If an update may run and frame processing has completed - if (CLK_get_ms() >= led_next_run && led_cur == lede) + if (timer_read64() >= led_next_run && led_cur == lede) { uint8_t drvid; - led_next_run = CLK_get_ms() + LED_UPDATE_RATE; //Set next frame update time + led_next_run = timer_read64() + LED_UPDATE_RATE; //Set next frame update time //NOTE: GCR does not need to be timed with LED processing, but there is really no harm if (gcr_actual != gcr_actual_last) diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 2bda7d7c7b16..eaad66e9fc8e 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -159,7 +159,7 @@ void send_consumer(uint16_t data) void main_subtask_usb_state(void) { - static uint32_t fsmstate_on_delay = 0; //Delay timer to be sure USB is actually operating before bringing up hardware + static uint64_t fsmstate_on_delay = 0; //Delay timer to be sure USB is actually operating before bringing up hardware uint8_t fsmstate_now = USB->DEVICE.FSMSTATUS.reg; //Current state from hardware register if (fsmstate_now == USB_FSMSTATUS_FSMSTATE_SUSPEND_Val) //If USB SUSPENDED @@ -188,9 +188,9 @@ void main_subtask_usb_state(void) { if (fsmstate_on_delay == 0) //If ON delay timer is cleared { - fsmstate_on_delay = CLK_get_ms() + 250; //Set ON delay timer + fsmstate_on_delay = timer_read64() + 250; //Set ON delay timer } - else if (CLK_get_ms() > fsmstate_on_delay) //Else if ON delay timer is active and timed out + else if (timer_read64() > fsmstate_on_delay) //Else if ON delay timer is active and timed out { suspend_wakeup_init(); //Run wakeup routine g_usb_state = fsmstate_now; //Save current USB state @@ -214,9 +214,9 @@ void main_subtask_power_check(void) { static uint64_t next_5v_checkup = 0; - if (CLK_get_ms() > next_5v_checkup) + if (timer_read64() > next_5v_checkup) { - next_5v_checkup = CLK_get_ms() + 5; + next_5v_checkup = timer_read64() + 5; v_5v = adc_get(ADC_5V); v_5v_avg = 0.9 * v_5v_avg + 0.1 * v_5v; @@ -229,9 +229,9 @@ void main_subtask_usb_extra_device(void) { static uint64_t next_usb_checkup = 0; - if (CLK_get_ms() > next_usb_checkup) + if (timer_read64() > next_usb_checkup) { - next_usb_checkup = CLK_get_ms() + 10; + next_usb_checkup = timer_read64() + 10; USB_HandleExtraDevice(); } @@ -325,9 +325,9 @@ int main(void) keyboard_task(); #ifdef CONSOLE_ENABLE - if (CLK_get_ms() > next_print) + if (timer_read64() > next_print) { - next_print = CLK_get_ms() + 250; + next_print = timer_read64() + 250; //Add any debug information here that you want to see very often //dprintf("5v=%u 5vu=%u dlow=%u dhi=%u gca=%u gcd=%u\r\n", v_5v, v_5v_avg, v_5v_avg - V5_LOW, v_5v_avg - V5_HIGH, gcr_actual, gcr_desired); } diff --git a/tmk_core/protocol/arm_atsam/usb/udi_cdc.c b/tmk_core/protocol/arm_atsam/usb/udi_cdc.c index 5f3c289e812e..ffe3526db567 100644 --- a/tmk_core/protocol/arm_atsam/usb/udi_cdc.c +++ b/tmk_core/protocol/arm_atsam/usb/udi_cdc.c @@ -1227,9 +1227,9 @@ uint32_t cdc_tx_send_time_next; void CDC_send(void) { - while (CLK_get_ms() < cdc_tx_send_time_next); + while (timer_read64() < cdc_tx_send_time_next); udi_cdc_tx_send(0); - cdc_tx_send_time_next = CLK_get_ms() + CDC_SEND_INTERVAL; + cdc_tx_send_time_next = timer_read64() + CDC_SEND_INTERVAL; } uint32_t CDC_print(char *printbuf) @@ -1238,7 +1238,7 @@ uint32_t CDC_print(char *printbuf) char *buf = printbuf; char c; - if (CLK_get_ms() < 5000) return 0; + if (timer_read64() < 5000) return 0; while ((c = *buf++) != 0 && !(count >= MAX_PRINT)) { @@ -1339,7 +1339,7 @@ void CDC_init(void) inbuf.count = 0; inbuf.lastcount = 0; printbuf[0] = 0; - cdc_tx_send_time_next = CLK_get_ms() + CDC_SEND_INTERVAL; + cdc_tx_send_time_next = timer_read64() + CDC_SEND_INTERVAL; } #else //CDC line 62 diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.c b/tmk_core/protocol/arm_atsam/usb/usb2422.c index ac19bf4ea046..d6e192242910 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb2422.c +++ b/tmk_core/protocol/arm_atsam/usb/usb2422.c @@ -64,7 +64,7 @@ void USB_write2422_block(void) i2c0_transmit(USB2422_ADDR, dest, 34, 50000); SERCOM0->I2CM.CTRLB.bit.CMD = 0x03; while (SERCOM0->I2CM.SYNCBUSY.bit.SYSOP) { DBGC(DC_USB_WRITE2422_BLOCK_SYNC_SYSOP); } - CLK_delay_us(100); + wait_us(100); } DBGC(DC_USB_WRITE2422_BLOCK_COMPLETE); @@ -135,7 +135,7 @@ void USB2422_init(void) sr_exp_data.bit.HUB_RESET_N = 1; //reset high SR_EXP_WriteData(); - CLK_delay_us(100); + wait_us(100); #ifndef MD_BOOTLOADER @@ -154,10 +154,9 @@ void USB_reset(void) //pulse reset for at least 1 usec sr_exp_data.bit.HUB_RESET_N = 0; //reset low SR_EXP_WriteData(); - CLK_delay_us(1); + wait_us(2); sr_exp_data.bit.HUB_RESET_N = 1; //reset high to run SR_EXP_WriteData(); - CLK_delay_us(1); DBGC(DC_USB_RESET_COMPLETE); } @@ -247,7 +246,7 @@ void USB_set_host_by_voltage(void) SR_EXP_WriteData(); - CLK_delay_ms(250); + wait_ms(250); while ((v_5v = adc_get(ADC_5V)) < ADC_5V_START_LEVEL) { DBGC(DC_USB_SET_HOST_5V_LOW_WAITING); } @@ -313,11 +312,11 @@ uint8_t USB2422_Port_Detect_Init(void) USB_set_host_by_voltage(); - port_detect_retry_ms = CLK_get_ms() + PORT_DETECT_RETRY_INTERVAL; + port_detect_retry_ms = timer_read64() + PORT_DETECT_RETRY_INTERVAL; while (!USB_active()) { - tmod = CLK_get_ms() % PORT_DETECT_RETRY_INTERVAL; + tmod = timer_read64() % PORT_DETECT_RETRY_INTERVAL; if (v_con_1 > v_con_2) //Values updated from USB_set_host_by_voltage(); { @@ -333,7 +332,7 @@ uint8_t USB2422_Port_Detect_Init(void) else { DBG_LED_OFF; } } - if (CLK_get_ms() > port_detect_retry_ms) + if (timer_read64() > port_detect_retry_ms) { DBGC(DC_PORT_DETECT_INIT_FAILED); return 0; From cd9262d7b2dcde5d31aa34f066dd593a012d7049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 7 Jan 2019 21:56:57 +0100 Subject: [PATCH 085/458] Improve consistency in UNICODEMAP code and docs, update docs/understanding_qmk (#4774) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove unused UNICODE(n) macro, update docs * Add note about max length of unicode_map to docs * QK_UNICODE_MAP → QK_UNICODEMAP * Refactor process_unicode_map * process_unicode_map → process_unicodemap This is done for consistency: UNICODEMAP is the method (hence UNICODEMAP_ENABLE, process_unicodemap), whereas unicode_map is the mapping table itself. * Update references and ordering in docs/understanding_qmk * Add additional note to docs/understanding_qmk * &unicode_map[index] → unicode_map + index This avoids the issue of the compiler sometimes complaining about the array index being out of range * Update docs/getting_started_make_guide * Update method sections in docs/feature_unicode --- docs/feature_unicode.md | 47 ++++++++------- docs/getting_started_make_guide.md | 16 +++-- docs/keycodes.md | 8 +-- docs/understanding_qmk.md | 58 ++++++++++--------- .../process_keycode/process_unicode_common.c | 2 +- quantum/process_keycode/process_unicodemap.c | 33 +++++------ quantum/process_keycode/process_unicodemap.h | 4 +- quantum/quantum_keycodes.h | 15 ++--- 8 files changed, 89 insertions(+), 94 deletions(-) diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 9d57e2fb7ab3..7dd85c5c2e78 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -2,15 +2,15 @@ There are three Unicode keymap definition methods available in QMK: -## UNICODE_ENABLE +## `UNICODE_ENABLE` -Supports Unicode up to `0xFFFF`. The keycode function is `UC(n)` in the keymap file, where _n_ is a 4 digit hexadecimal number. +Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`. -## UNICODEMAP_ENABLE +## `UNICODEMAP_ENABLE` -Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(n)`, where _n_ is an array index into the mapping table. +Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries. -And you may want to have an enum to make reference easier. So you'd want to add something like this to your keymap: +You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file: ```c enum unicode_names { @@ -20,38 +20,37 @@ enum unicode_names { }; const uint32_t PROGMEM unicode_map[] = { - [BANG] = 0x203D, // ‽ - [IRONY] = 0x2E2E, // ⸮ - [SNEK] = 0x1F40D, // 🐍 + [BANG] = 0x203D, // ‽ + [IRONY] = 0x2E2E, // ⸮ + [SNEK] = 0x1F40D, // 🐍 }; ``` -Make sure that the order for both matches. +Then you can use `X(BANG)` etc. in your keymap. -## UCIS_ENABLE +## `UCIS_ENABLE` -Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you may want to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once it's been called, you can type the mnemonic for your character, then hit Space or Enter to complete it or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode sequence inserted. +Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted. -For instance, you would need to have a table like this in your keymap: +For instance, you would define a table like this in your keymap file: ```c -const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE -( - UCIS_SYM("poop", 0x1f4a9), - UCIS_SYM("rofl", 0x1f923), - UCIS_SYM("kiss", 0x1f619) +const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE( + UCIS_SYM("poop", 0x1F4A9), // 💩 + UCIS_SYM("rofl", 0x1F923), // 🤣 + UCIS_SYM("kiss", 0x1F619) // 😙 ); ``` -You run the function, and then type "rofl" and hit enter, it should backspace remove "rofl" and input the `0x1f923` unicode. +You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji. ### Customization -There are several functions that you can add to your keymap to customize the functionality of this feature. +There are several functions that you can define in your keymap to customize the functionality of this feature. -* `void qk_ucis_start_user(void)` - This runs when you run the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji. -* `void qk_ucis_success(uint8_t symbol_index)` - This runs when the unicode input has matched something, and has completed. Default doesn't do anything. -* `void qk_ucis_symbol_fallback (void)` - This runs if the input text doesn't match anything. The default function falls back to trying that input as a unicode code. +* `void qk_ucis_start_user(void)` – This runs when you call the "start" function, and can be used to provide feedback. By default, it types out a keyboard emoji. +* `void qk_ucis_success(uint8_t symbol_index)` – This runs when the input has matched something and has completed. By default, it doesn't do anything. +* `void qk_ucis_symbol_fallback (void)` – This runs when the input doesn't match anything. By default, it falls back to trying that input as a Unicode code. You can find the default implementations of these functions in [`process_ucis.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_ucis.c). @@ -66,7 +65,7 @@ The following input modes are available: To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar. By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode. -* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports all possible code points (`0x10FFFF`). +* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points). Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else. @@ -77,7 +76,7 @@ The following input modes are available: * **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues). -* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF`. +* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points). To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app. By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode. diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index e515411901de..adc1aed7512b 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -93,19 +93,17 @@ This enables MIDI sending and receiving with your keyboard. To enter MIDI send m `UNICODE_ENABLE` -This allows you to send unicode symbols via `UC()` in your keymap. Only codes up to 0x7FFF are currently supported. +This allows you to send Unicode characters using `UC()` in your keymap. Code points up to `0x7FFF` are supported. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. `UNICODEMAP_ENABLE` -This allows sending unicode symbols using `X()` in your keymap. Codes -up to 0xFFFFFFFF are supported, including emojis. You will need to maintain -a separate mapping table in your keymap file. +This allows you to send Unicode characters using `X()` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. -Known limitations: -- Under Mac OS, only codes up to 0xFFFF are supported. -- Under Linux ibus, only codes up to 0xFFFFF are supported (but anything important is still under this limit for now). +`UCIS_ENABLE` -Characters out of range supported by the OS will be ignored. +This allows you to send Unicode characters by inputting a mnemonic corresponding to the character you want to send. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. + +For further details, as well as limitations, see the [Unicode page](feature_unicode.md). `BLUETOOTH_ENABLE` @@ -117,7 +115,7 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p `FAUXCLICKY_ENABLE` -Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as AUDIO_ENABLE. +Uses buzzer to emulate clicky switches. A cheap imitation of the Cherry blue switches. By default, uses the C6 pin, same as `AUDIO_ENABLE`. `VARIABLE_TRACE` diff --git a/docs/keycodes.md b/docs/keycodes.md index 6d85253935f2..bd325b7fa259 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -454,7 +454,7 @@ This is a reference only. Each group of keys links to the page documenting their ## [Unicode Support](feature_unicode.md) -|Key |Aliases| | -|------------|-------|-------------------------------------------------| -|`UNICODE(n)`|`UC(n)`|Send Unicode character `n` | -|`X(n)` | |Send Unicode character `n` via a different method| +|Key |Description | +|-------|---------------------------------------------------------------------------| +|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) | +|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)| diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index 35596cc6924a..20ead2b3f54f 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -12,7 +12,7 @@ You can think of QMK as no different from any other computer program. It is star The reason for this is the different platforms that QMK supports. The most common platform is `lufa`, which runs on AVR processors such at the atmega32u4. We also support `chibios` and `vusb`. -We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1019). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/protocol/lufa/lufa.c#L1060). This is [The Main Loop](#the-main-loop). +We'll focus on AVR processors for the moment, which use the `lufa` platform. You can find the `main()` function in [tmk_core/protocol/lufa/lufa.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1028). If you browse through that function you'll find that it initializes any hardware that has been configured (including USB to the host) and then it starts the core part of the program with a [`while(1)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/protocol/lufa/lufa.c#L1069). This is [The Main Loop](#the-main-loop). ## The Main Loop @@ -22,7 +22,7 @@ This section of code is called "The Main Loop" because it's responsible for loop keyboard_task(); ``` -This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/tmk_core/common/keyboard.c#L206), and it is responsible for detecting changes in the matrix and turning status LED's on and off. +This is where all the keyboard specific functionality is dispatched. The source code for `keyboard_task()` can be found in [tmk_core/common/keyboard.c](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/keyboard.c#L216), and it is responsible for detecting changes in the matrix and turning status LED's on and off. Within `keyboard_task()` you'll find code to handle: @@ -77,7 +77,7 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to. -You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. +You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document. ##### Keycode Assignment @@ -130,31 +130,33 @@ Comparing against our keymap we can see that the pressed key is KC_NLCK. From he ##### Process Record -The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in rule.mk or elsewhere, only a subset of the functions below will be included in final firmware. - -* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/tmk_core/common/action.c#L172) - * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L193) - * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/quantum.c#L213) - * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_tap_dance.c#L115) - * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_key_lock.c#L62) - * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/quantum/process_keycode/process_clicky.c#L44) - * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/card.c#L20) - * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/08c682c193f43e5d54df990680ae93fc2e06150a/keyboards/clueboard/card/keymaps/default/keymap.c#L58) - * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/fdd0f915271f79b104aa5d216566bcc3fd134e85/quantum/rgb_matrix.c#L139) - * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_midi.c#L81) - * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_audio.c#L19) - * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_steno.c#L160) - * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_music.c#L114) - * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_tap_dance.c#L136) - * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_leader.c#L38) - * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_combo.c#L115) - * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicode.c#L22) - * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_ucis.c#L91) - * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_printer.c#L77) - * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_auto_shift.c#L94) - * [`bool process_unicode_map(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_unicodemap.c#L47) - * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/process_keycode/process_terminal.c#L264) - * [Identify and process quantum specific keycodes](https://github.com/qmk/qmk_firmware/blob/661ca4440cc42f3b60697e98985c44b0571ccfc1/quantum/quantum.c#L287) +The `process_record()` function itself is deceptively simple, but hidden within is a gateway to overriding functionality at various levels of QMK. The chain of events is listed below, using cluecard whenever we need to look at the keyboard/keymap level functions. Depending on options set in `rules.mk` or elsewhere, only a subset of the functions below will be included in final firmware. + +* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172) + * [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206) + * [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226) + * [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119) + * [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62) + * [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79) + * [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20) + * [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58) + * [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139) + * [`bool process_midi(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_midi.c#L81) + * [`bool process_audio(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_audio.c#L19) + * [`bool process_steno(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_steno.c#L160) + * [`bool process_music(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_music.c#L114) + * [`bool process_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L141) + * [`bool process_unicode_common(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode_common.c#L169) + calls one of: + * [`bool process_unicode(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicode.c#L20) + * [`bool process_unicodemap(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_unicodemap.c#L46) + * [`bool process_ucis(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_ucis.c#L95) + * [`bool process_leader(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_leader.c#L51) + * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115) + * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77) + * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94) + * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264) + * [Identify and process Quantum-specific keycodes](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291) At any step during this chain of events a function (such as `process_record_kb()`) can `return false` to halt all further processing. diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 3286f45b5d8a..b64feb7003b1 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -216,7 +216,7 @@ bool process_unicode_common(uint16_t keycode, keyrecord_t *record) { #if defined(UNICODE_ENABLE) return process_unicode(keycode, record); #elif defined(UNICODEMAP_ENABLE) - return process_unicode_map(keycode, record); + return process_unicodemap(keycode, record); #elif defined(UCIS_ENABLE) return process_ucis(keycode, record); #else diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 75f35112b133..cee9acb5fcc1 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -18,8 +18,7 @@ #include "process_unicode_common.h" __attribute__((weak)) -const uint32_t PROGMEM unicode_map[] = { -}; +const uint32_t PROGMEM unicode_map[] = {}; void register_hex32(uint32_t hex) { bool onzerostart = true; @@ -42,26 +41,26 @@ void register_hex32(uint32_t hex) { } __attribute__((weak)) -void unicode_map_input_error() {} +void unicodemap_input_error() {} -bool process_unicode_map(uint16_t keycode, keyrecord_t *record) { - uint8_t input_mode = get_unicode_input_mode(); - if ((keycode & QK_UNICODE_MAP) == QK_UNICODE_MAP && record->event.pressed) { - const uint32_t* map = unicode_map; - uint16_t index = keycode - QK_UNICODE_MAP; - uint32_t code = pgm_read_dword(&map[index]); - if (code > 0xFFFF && code <= 0x10ffff && input_mode == UC_OSX) { +bool process_unicodemap(uint16_t keycode, keyrecord_t *record) { + if ((keycode & QK_UNICODEMAP) == QK_UNICODEMAP && record->event.pressed) { + uint16_t index = keycode - QK_UNICODEMAP; + uint32_t code = pgm_read_dword(unicode_map + index); + uint8_t input_mode = get_unicode_input_mode(); + + if (code > 0xFFFF && code <= 0x10FFFF && input_mode == UC_OSX) { // Convert to UTF-16 surrogate pair code -= 0x10000; - uint32_t lo = code & 0x3ff; - uint32_t hi = (code & 0xffc00) >> 10; + uint32_t lo = code & 0x3FF, hi = (code & 0xFFC00) >> 10; + unicode_input_start(); - register_hex32(hi + 0xd800); - register_hex32(lo + 0xdc00); + register_hex32(hi + 0xD800); + register_hex32(lo + 0xDC00); unicode_input_finish(); - } else if ((code > 0x10ffff && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { - // when character is out of range supported by the OS - unicode_map_input_error(); + } else if ((code > 0x10FFFF && input_mode == UC_OSX) || (code > 0xFFFFF && input_mode == UC_LNX)) { + // Character is out of range supported by the OS + unicodemap_input_error(); } else { unicode_input_start(); register_hex32(code); diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index f6d64bb86b02..5764697f84ca 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -19,5 +19,5 @@ #include "quantum.h" #include "process_unicode_common.h" -void unicode_map_input_error(void); -bool process_unicode_map(uint16_t keycode, keyrecord_t *record); +void unicodemap_input_error(void); +bool process_unicodemap(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 2b309f4d5296..ccf5371f0ee4 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -86,8 +86,8 @@ enum quantum_keycodes { QK_UNICODE_MAX = 0xFFFF, #endif #ifdef UNICODEMAP_ENABLE - QK_UNICODE_MAP = 0x8000, - QK_UNICODE_MAP_MAX = 0x83FF, + QK_UNICODEMAP = 0x8000, + QK_UNICODEMAP_MAX = 0x83FF, #endif // Loose keycodes - to be used directly @@ -679,15 +679,12 @@ enum quantum_keycodes { #define KC_MEH MEH(KC_NO) #ifdef UNICODE_ENABLE - // For sending unicode codes. - // You may not send codes over 7FFF -- this supports most of UTF8. - // To have a key that sends out Œ, go UC(0x0152) - #define UNICODE(n) (QK_UNICODE | (n)) - #define UC(n) UNICODE(n) + // Allows Unicode input up to 0x7FFF + #define UC(c) (QK_UNICODE | (c)) #endif - #ifdef UNICODEMAP_ENABLE - #define X(n) (QK_UNICODE_MAP | (n)) + // Allows Unicode input up to 0x10FFFF, requires unicode_map + #define X(i) (QK_UNICODEMAP | (i)) #endif #define UC_MOD UNICODE_MODE_FORWARD From c5707708ed7de283f0d778252c097381ff1b6fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elvis=20Pf=C3=BCtzenreuter?= Date: Mon, 7 Jan 2019 19:00:15 -0200 Subject: [PATCH 086/458] Keymap: Added Model F-inspired layout for YMD[K]96 (#4777) --- keyboards/ymd96/keymaps/epx/keymap.c | 87 ++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 keyboards/ymd96/keymaps/epx/keymap.c diff --git a/keyboards/ymd96/keymaps/epx/keymap.c b/keyboards/ymd96/keymaps/epx/keymap.c new file mode 100644 index 000000000000..b9d3f6df228c --- /dev/null +++ b/keyboards/ymd96/keymaps/epx/keymap.c @@ -0,0 +1,87 @@ +/* +Base Copyright 2017 Luiz Ribeiro + Copyright 2017 Andrew Novak +Modified Copyright 2018 Elvis Pfutzenreuter + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public LicensezZZ +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#define _x_ KC_TRNS +#define _DEFLT 0 +#define _AR 1 +#define _RAISE 2 + +#define KEYMAP KEYMAP_DEFAULT + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0, default layer + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | || > | << | >> | vol+ | vol- | Bkspc | + * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | - | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | | + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + | + * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | | + * | Ctrl | Alt | Win | Space | Win | Fn | Alt | Ctrl | 0 | . | Enter | + * + * Layout is inspired on Model F. + * Extra keys on top right, as well as some seldom-used keys, are media keys in default layer. + * Num Lock toogles layer, so the numeric block works as a Model F navigation block in a Mac. + * (Fn-Num Lock operates as conventional Num Lock in case the keyboard needs to be used with Windows or Linux.) + * Caps Lock operates normally but it takes FN to work, the key is Ctrl by default, like in Model F. + */ + [_DEFLT] = KEYMAP( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_BSPC, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, TO(_AR), KC_PSLS, KC_PAST, KC_PMNS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LALT,KC_LGUI, KC_SPC, KC_RGUI, KC_NO, MO(_RAISE), KC_RALT, KC_RCTL, KC_P0, KC_P0, KC_PDOT \ + ), + + /* Layer 1, Num Lock activated + * ... + * ... + * ... | Home | Up | Pg Up | | + * ... | Left | (no) | Right | + | + * ... | End | Down | Pg Dn | | + * ... | Ins | Del | Enter | + */ + [_AR] = KEYMAP( + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, TO(_DEFLT), _x_, _x_, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_HOME, KC_UP, KC_PGUP, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_LEFT, KC_NO, KC_RGHT, _x_, \ + _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_END, KC_DOWN, KC_PGDN, _x_, \ + _x_, _x_,_x_, _x_, _x_, _x_, _x_, _x_, _x_, KC_INS, KC_INS, KC_DEL \ + ), + + /* Layer 2, raise layer + * | | | | | | | | | | | | | | PrtSc |Pause|ScrLck| stop | mute | Del | + * | | RGB Toggle | RGB Hue - | RGB Hue + | | | | | | | | | | Del |NumLck| | | | + * | | RGB Mode + | RGB Satu- | RGB Satu+ | | | | | | | | | | | | | | | + * | Caps Lck | RGB Mode - | RGB Brgt- | RGB Brgt+ | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | + * | | | | | Win Menu | | | | | | | + */ + [_RAISE] = KEYMAP( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_PAUS, KC_SLCK, KC_MUTE, KC_MSTP, KC_DEL, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_NLCK, _______, _______, _______, \ + _______, RGB_TOG, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, RGB_MOD, RGB_SAD, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RGB_RMOD,RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______,_______, _______, KC_APP, _______, _______, _______, _______, _______, _______, _______ + ), + +}; From 103d904fabd549e1051ed32adcdb935db0d8f952 Mon Sep 17 00:00:00 2001 From: Vasken Dermardiros Date: Mon, 7 Jan 2019 16:06:34 -0500 Subject: [PATCH 087/458] Alternate keymap for Alpha keyboard, enjoy! (#4797) * Create README.md * Add files via upload * Update README.md --- keyboards/alpha/keymaps/vderm/README.md | 35 + keyboards/alpha/keymaps/vderm/alpha_vderm.hex | 1422 +++++++++++++++++ keyboards/alpha/keymaps/vderm/keymap.c | 34 + 3 files changed, 1491 insertions(+) create mode 100644 keyboards/alpha/keymaps/vderm/README.md create mode 100644 keyboards/alpha/keymaps/vderm/alpha_vderm.hex create mode 100644 keyboards/alpha/keymaps/vderm/keymap.c diff --git a/keyboards/alpha/keymaps/vderm/README.md b/keyboards/alpha/keymaps/vderm/README.md new file mode 100644 index 000000000000..26a8ab3e85f5 --- /dev/null +++ b/keyboards/alpha/keymaps/vderm/README.md @@ -0,0 +1,35 @@ +# Alpha 28-Key Keyboard Alternate Keymap +Alternate keymap for [Alpha 28-key keyboard](https://github.com/qmk/qmk_firmware/tree/master/keyboards/alpha). + +## How-to +Assuming you've followed all the instructions from the original post, put my "keymap.c" file in "$qmk-firmware-folder$/keyboards/alpha/keymaps/vderm/" and then run your make command ("make alpha:vderm" while in $qmk-firmware-folder$ where this folder is what you've downloaded from the official github page) to compile the hex file to upload to your microcontroller. I've also uploaded my hex file. + +## Description +Instead of going up and down layers like in the original Alpha keyboard, I've made the bottom row keys all have alternate functions: ++ Like in the original Alpha28 keymap, the 2U spacebar is a shift key when held down and space when tapped ++ Z and M are Ctrl keys when held down or Z and M when tapped ++ X and N are Alt keys ++ C activates the function keys layer (arrows, page up/dn, esc, tab, etc.) ++ V activates the characters and numbers layer ++ C and V combined activated the F-keys layer (F1, F2, F3, etc.) ++ The enter key is an enter key in the home layer, backspace in the function keys and characters/numbers layer and a delete in the F-keys layer ++ While in the other layers, the bottom row acts like a "regular" bottom modified row: ctrl, alt, winkey + +## Keymap +![keymap](https://imgur.com/ZbDz0eL.jpg) + +## Build Images +Here is my keyboard. ++ Switches: Aliaz Silent Switches (Tactile), PCB mount, 80g from [KBDfans](https://kbdfans.cn/collections/aliaz-switches/products/pre-orderaliaz-silent-switch-tactile?variant=2519899832333) ++ PCB board: ordered from JLCPCB, in white ++ Keycaps: ebay, can't find link :S ++ Bottom plate: I cut a piece of canary wood that was laying around, needs to be varnished; I also need to actually screw the pcb to the wood instead of relying on double-sided tape + +![vderm_alpha0](https://imgur.com/MjjoVtr.jpg) +![vderm_alpha1](https://imgur.com/mIFu9WV.jpg) +![vderm_alpha2](https://imgur.com/A70Iemw.jpg) +![vderm_alpha3](https://imgur.com/eYljPWh.jpg) +![vderm_alpha4](https://imgur.com/OhUKowj.jpg) + +Good luck on your build! +//vderm diff --git a/keyboards/alpha/keymaps/vderm/alpha_vderm.hex b/keyboards/alpha/keymaps/vderm/alpha_vderm.hex new file mode 100644 index 000000000000..7515ad030511 --- /dev/null +++ b/keyboards/alpha/keymaps/vderm/alpha_vderm.hex @@ -0,0 +1,1422 @@ +:100000000C949F020C94E6020C94E6020C94E60217 +:100010000C94E6020C94E6020C94E6020C94E602C0 +:100020000C94E6020C94E6020C94E0250C94B226A3 +:100030000C940D1D0C94E6020C94E6020C94E6025E +:100040000C94E6020C94E6020C94E6020C94E60290 +:100050000C94E6020C94751D0C94E6020C94E602D6 +:100060000C94E6020C94E6020C94E6020C94E60270 +:100070000C94E6020C94E6020C94E6020C94E60260 +:100080000C94E6020C94E6020C94E6020C94E60250 +:100090000C94E6020C94E6020C94E6020C94E60240 +:1000A0000C94E6020C94E6020C94E602AE03B00354 +:1000B000BB03B203B403B603B803BA03BD03BF0363 +:1000C000C103CC03C303C503C703C903CB03CE03DA +:1000D000181318134A134A138813A6130C150C157A +:1000E000E8130C158B148B14FC140C150C1505154A +:1000F00098149814981498149814981498149814A0 +:10010000981498149814981498149814981498148F +:10011000A914B714BE14C514CF149D159D15AF15A1 +:10012000AF15A615AF15AF15AF159D159D15AB15E0 +:10013000AF15AF15AB151F2746273E2846273E288B +:100140009227B5273E280C281B2807634236B79B09 +:10015000D8A71A39685618AEBAAB558C1D3CB7CC27 +:100160005763BD6DEDFD753EF6177231BF0000009F +:10017000803F05A84CCDB2D44EB93836A9020C50F8 +:10018000B9918688083CA6AAAA2ABE000000803F32 +:1001900014001A000800150017001C0018000C00BD +:1001A0001200130004001600070009000A000B00EB +:1001B0000D000E000F0028001D611B64064119424E +:1001C00000002C62000005781174107129007F0076 +:1001D000AA00A900AE004A004E004B004D000000EE +:1001E0002B000000000000000000500051005200F1 +:1001F0004F002A00E000E2000100035100002C62E1 +:100200000000E700E600E4001E001F0020002100BF +:1002100022002300240025002600270035000000CE +:100220002D002E0031002F003000330034002A0052 +:10023000E000E2000351010000002C6200003600E3 +:10024000370038003A003B003C003D003E003F00D4 +:10025000400041004200430044004500000000000F +:10026000000000000000000000004C00E000E20080 +:100270000100010000002C620000E700E600E4003D +:1002800000047F3F1F643214643214783C1E1E1435 +:100290000A056801F000B40078005A000000000070 +:1002A0000001010101010101010102020202020239 +:1002B000020202030303030303030304040404040C +:1002C00004050505050506060606060707070708CF +:1002D0000808080909090A0A0A0A0B0B0B0C0C0C7E +:1002E0000D0D0D0E0E0F0F0F101011111112121314 +:1002F000131414151516161717181819191A1A1B8E +:100300001C1C1D1D1E1F1F202021222223242525E9 +:1003100026272728292A2B2B2C2D2E2F2F30313220 +:1003200033343536363738393A3B3C3D3E3F404131 +:10033000424344464748494A4B4C4D4F5051525313 +:10034000555657585A5B5C5E5F60626364666769C6 +:100350006A6C6D6E707173747678797B7C7E808147 +:10036000838486888A8B8D8F91929496989A9B9D90 +:100370009FA1A3A5A7A9ABADAFB1B3B5B7B9BBBD9D +:10038000BFC1C4C6C8CACCCFD1D3D6D8DADCDFE16E +:10039000E4E6E8EBEDF0F2F5F7FAFCFF04033000D9 +:1003A00000000C0361006C00700068006100000038 +:1003B0000C035000790072006F004C000000040331 +:1003C000090409026D00040100A0FA0904000001FB +:1003D00003010100092111010001224000070581EC +:1003E0000308000A090401000103010200092111A8 +:1003F000010001224D000705820308000A090402DA +:10040000000103000000092111010001223600074C +:1004100005830308000A0904030001030000000922 +:100420002111010001223900070584032000011277 +:1004300001100100000008EDFE60600100010203F0 +:100440000105010906A101050719E029E7150025A5 +:1004500001950875018102050819012905950575A1 +:100460000191029501750391010507190029F715FE +:1004700000250195F875018102C005010980A101DF +:1004800085021601002603001A81002A83007510D8 +:1004900095018100C0050C0901A101850316010029 +:1004A000269C021A01002A9C02751095018100C049 +:1004B00005010902A1010901A10005091901290588 +:1004C00015002501950575018102950175038101CE +:1004D0000501093009311581257F950275088106CE +:1004E00009381581257F950175088106050C0A38A4 +:1004F000021581257F950175088106C0C005010997 +:1005000006A101050719E029E715002501950875E1 +:1005100001810295017508810105081901290595D8 +:1005200005750191029501750391010507190029CF +:10053000FF150026FF00950675088100C0001124F4 +:100540001FBECFEFDAE0DEBFCDBF04B603FE27C08B +:100550008091620290916302A0916402B091650261 +:100560008730904BA740B04BD1F4109262021092AA +:100570006302109264021092650214BE84B7877FF2 +:1005800084BF0FB6F894A89580916000886180932D +:100590006000109260000FBEE0E0F8E3099511E002 +:1005A000A0E0B1E0E0E8F8E502C005900D92A234C9 +:1005B000B107D9F722E0A2E4B1E001C01D92A23652 +:1005C000B207E1F70E940B230C943E2C0C94000020 +:1005D0000895089581E0089581E008950C94EC0257 +:1005E0000C9461080C94630808950C94F4020C9424 +:1005F000F50208950E9489150E94F9022FEF84E305 +:100600009CE0215080409040E1F700C0000087E767 +:1006100097E790930108809300080C949B1DFF922C +:100620000F931F93CF93DF938C01FC01C081D18185 +:1006300080919101811113C08281882349F0CE01FC +:100640000E94E61AF82E682FCE010E948F1A04C06D +:10065000CE010E94BA1AF82EBE018F2D04C0CE0121 +:100660000E94E61ABE010E94B305EC01B8010E9487 +:10067000EE02882309F46CC2B801CE010E94120870 +:10068000882309F465C2C93CFCE5DF0741F4F801A1 +:100690008281882309F45CC20E94290A59C2CA3C9B +:1006A0008CE5D80708F013C1C13C9CE5D90761F47B +:1006B000F8018281882309F44BC20E94B71B827221 +:1006C000F1F00E94490C44C2C23CECE5DE07D0F0D8 +:1006D000F8018281C53CFCE5DF0709F4CDC008F0D4 +:1006E000DDC0C33CECE5DE0709F4CCC008F0D0C0A7 +:1006F000882309F42DC20E94B71B827211F30E9455 +:100700003F0C26C2C531FCE5DF0708F07EC0C230D1 +:100710008CE5D80708F452C0F8018281882309F4D7 +:1007200059C00E94141C811102C00E94F31B0E9438 +:10073000311C90E09093540280935302FE01E350E9 +:10074000FC45E231F10530F4EA5AFF4F8091530243 +:100750000C94E32B80915302816027C0826025C0F6 +:10076000846023C0806121C080621FC080641DC07E +:1007700080681BC08460886018C08E7F16C08D7F23 +:1007800014C08B7F12C08F7E10C08F7D0EC08F7BF8 +:100790000CC08F770AC08B7F877F07C087FB22271B +:1007A00020F991E0922790FB87F980935302809182 +:1007B00053020E94351C0E948915CAC1C1159CE5CF +:1007C000D90781F0C130DC45A9F081E08093470171 +:1007D00080934801C801DF91CF911F910F91FF9045 +:1007E0000C94EA02F8018281882309F4B1C10E94C5 +:1007F000FA02AEC1F8018281882309F4A9C180916F +:100800000B02816080930B02A3C1C531FCE5DF07B9 +:1008100039F50E94B71B982FF801828120910D01B4 +:1008200030910E01882379F09A7A81E009F480E012 +:1008300080934201911102C069E201C065E3C901E0 +:100840000E94971C0AC080914201811102C069E296 +:1008500001C065E3C9010E94A21C0E94841B78C1EB +:10086000C03CDC4509F0B1CFF8018281882309F44E +:100870006FC10E94DA0C6CC1882309F469C10E941F +:10088000880B66C1882309F463C10E94510B60C1C3 +:10089000882309F45DC10E94690B5AC1C73C9CE5DD +:1008A000D90731F4882309F453C10E94BD0B50C10C +:1008B000C83CDC4530F4882309F44AC10E94A30BEC +:1008C00047C1882309F444C10E94D80B41C1C13DEE +:1008D000FCE5DF0749F4F8018281882309F438C177 +:1008E00088E10E943C0C34C1C23D8CE5D80708F079 +:1008F00087C0F8018281CD3CFCE5DF07A1F48823A5 +:1009000009F426C10E941B0A663071058105910514 +:1009100040F00E941B0A683071058105910508F4BA +:10092000EECE86E0DECFCE3C9CE5D90730F5CB3C61 +:10093000ECE5DE0729F4882309F40AC181E0D1CF70 +:10094000CC3CDC4530F4882309F402C10E943E0A05 +:10095000FFC0882309F4FCC00E941B0A62307105A5 +:100960008105910540F00E941B0A653071058105E3 +:10097000910508F4C4CE82E0B4CFCF3C9CE5D90702 +:10098000A1F4882309F4E4C00E941B0A6F307105AA +:100990008105910540F00E941B0A643171058105B3 +:1009A000910508F4ACCE8FE09CCFC03DDC45A0F4AF +:1009B000882309F4CDC00E941B0A693071058105A6 +:1009C000910540F00E941B0A6E307105810591056A +:1009D00008F495CE89E085CF882309F4B9C00E9438 +:1009E0001B0A653171058105910540F00E941B0AC3 +:1009F000673171058105910508F481CE85E171CFDC +:100A0000C53DFCE5DF0739F5F8018281882361F0F7 +:100A1000109248010E943F1D90934601809345012A +:100A200080E20E94D51294C08091480181110FC0CC +:100A300080914501909146010E944B1D883C910593 +:100A400030F487E20E94731187E20E946F1280E205 +:100A50000E94DC127DC0C63D8CE5D80708F043C07B +:100A6000F8018281C33DFCE5DF0729F4882309F4FE +:100A70006FC083E236CFC43DDC45A0F4882309F47F +:100A800067C00E941B0A693171058105910540F01C +:100A90000E941B0A623271058105910508F42FCE70 +:100AA00089E11FCF882351F0109247010E943F1D1A +:100AB000909344018093430182E0B3CF809147013A +:100AC00081110FC080914301909144010E944B1D00 +:100AD000883C910530F486E20E94731186E20E9400 +:100AE0006F1282E0B5CFC93DECE5DE0731F4F801C5 +:100AF0008281882369F180E009C0CA3DFCE5DF07F7 +:100B000041F4F8018281882319F182E00E94A72331 +:100B10001FC0C63DDC4509F058CEF8018281811125 +:100B200077CF80914801811192CF809145019091BA +:100B300046010E944B1D883C910508F088CF80E259 +:100B40000E94DC1288E20E94731188E20E946F12F8 +:100B500080E0DF91CF911F910F91FF90089580E089 +:100B600090E0089508952EE1829FC0011124FC01B8 +:100B70002AE0729FE00DF11D1124E60FF11DEE0F2A +:100B8000FF1FE057FE4F859194910895880F991F9C +:100B9000FC01E058FD4F859194910895CF93DF9328 +:100BA0000E94B3050E947207EC018115904508F080 +:100BB00041C0C11580E4D80708F01CC1C83ED1056A +:100BC00010F5C03ED10508F089C1C83AD10578F4C6 +:100BD000C53AD10508F09EC0C130D10509F47EC1E7 +:100BE00008F435C1C430D10508F078C130C1CD3B1F +:100BF000D10508F49AC0C03CD10508F428C1CE0143 +:100C0000805C9109E9C0C11590E2D90758F4C1157B +:100C100021E0D20708F062C1C03FD10508F417C136 +:100C2000D0655CC1C11580E3D80708F0D9C0CE01FA +:100C30009F70D2C0C11595E5D90708F044C0C11511 +:100C400024E5D20708F0EDC0C11582E5D80710F5FC +:100C5000C11591E5D90708F0D0C0CE0174E0969592 +:100C600087957A95E1F7282F23703C2F337081E028 +:100C700090E002C0880F991F3A95E2F79C68922B8A +:100C8000CF70C695C69520E2C29FE0011124C82B03 +:100C9000D92B24C19E01237033278C2F86958695EE +:100CA000C115D34508F0AEC0C1E0D0E002C0CC0F02 +:100CB000DD1F2A95E2F720E2829FC0011124C82B94 +:100CC000D92BDC680BC1C11529E5D20780F4C11509 +:100CD00088E5D80708F0AAC0C11596E5D90708F03D +:100CE000B6C0CF71DD27DC2FCC27D062F7C0CE0194 +:100CF000C1152AE5D20708F49EC09056811590428E +:100D000008F0A5C08D2F8F710E94EE07DD27D062FD +:100D10008F719BC0C53AD10509F49CC0C63AD10574 +:100D200009F09BC0C2E8D0E4D9C0C83AD10509F4A3 +:100D300097C0C93AD10509F496C0CA3AD10509F459 +:100D400095C0CB3AD10509F494C0CC3AD10509F449 +:100D500093C0CB3BD10509F492C0CC3BD10509F43B +:100D600091C0CD3AD10509F490C0C03BD10509F43A +:100D70008FC0CE3AD10509F48EC0CF3AD10509F41F +:100D80008DC0C13BD10509F48CC0C23BD10509F42B +:100D90008BC0C33BD10509F48AC0C43BD10509F41B +:100DA00089C0C53BD10509F488C0C63BD10509F40B +:100DB00087C0C73BD10509F486C0C83BD10509F4FB +:100DC00085C0C93BD10509F484C0CA3BD10509F4EB +:100DD00083C0C0E0D4E482C00E94C605EC017EC09E +:100DE000CE019927D3FF03C0EC01D86C77C0EC018A +:100DF000D06C74C0DF70D06A71C0DC2FCC27C16F9B +:100E0000D06A6CC0C1E0D0E002C0CC0FDD1F2A95D3 +:100E1000E2F720E2829FC0011124C82BD92BDA68A7 +:100E20005DC0DC2FCC27C46FD06A58C0DC2FCC2724 +:100E3000C06FD06A53C024E0969587952A95E1F754 +:100E40008F70CF70C06ED0E0D06AD82B47C0C0E0A2 +:100E5000D0E044C0C1E8D0E441C0C3E8D0E43EC023 +:100E6000C2EED4E43BC0C9EED4E438C0CAEED4E448 +:100E700035C0C5EBD4E432C0C6EBD4E42FC0C3EB1D +:100E8000D4E42CC0C4EBD4E429C0C7EBD4E426C01E +:100E9000CCECD4E423C0CDECD4E420C0C3E8D5E44A +:100EA0001DC0CAE8D5E41AC0C2E9D5E417C0C4E938 +:100EB000D5E414C0C1E2D6E411C0C3E2D6E40EC04A +:100EC000C4E2D6E40BC0C5E2D6E408C0C6E2D6E46C +:100ED00005C0C7E2D6E402C0CAE2D6E4CE01DF9183 +:100EE000CF9108958238910549F1B0F4813391058D +:100EF00009F459C048F48932910509F44FC08A3287 +:100F0000910509F455C008958533910509F441C050 +:100F10008933910599F00895833E910531F138F4B4 +:100F2000803E910591F0823E9105A9F00895863E9C +:100F3000910501F1873E910539F108952091530201 +:100F400020FD3BC021FD39C008958091530280FFF0 +:100F500034C089E341C08091530282FF30C0809148 +:100F6000530284FD2EC083EE37C08091530282FD70 +:100F700026C0F5CF8091530283FF25C08091530294 +:100F800084FD1FC087EE28C08091530283FD1BC0E3 +:100F9000F5CF8091530285FD18C019C0809153028E +:100FA00085FD15C012C08091530286FD12C013C08A +:100FB0008091530286FD0FC00CC080EE0DC082EE02 +:100FC0000BC080E009C086EE07C089E205C085E35A +:100FD00003C08AE201C081E390E00895909153023A +:100FE00092FF0DC0282F2871283019F4877F846064 +:100FF00006C0282F2471243011F48B7F886093FF62 +:101000000DC0282F2871283119F4877E846106C00D +:10101000282F2471243111F48B7E886194FD877E02 +:10102000089508950F931F93CF93FB0122812111FF +:1010300002C0C1E041C08C01C0915601C11125C060 +:1010400086319C45B1F70E94110881E080935601DA +:101050000E943F1D909355018093540110924901C5 +:1010600010924B0110924A0110924D0110924C01C6 +:1010700010924F0110924E011092510110925001A6 +:10108000109253011092520117C080915401909117 +:1010900055010E944B1D8C32914058F690914901A8 +:1010A000E92FF0E0EE0FFF1FE65BFE4F1183008398 +:1010B0009F5F90934901C0E08C2FCF911F910F91BA +:1010C00008950C94E8020C94E902CF93DF93AAE20E +:1010D000B1E04DE251E061E070E08D91E82FE295E2 +:1010E000EF70F0E021A18F70EB0102C0CC0FDD1F8B +:1010F0008A95E2F7CE019C2F9095922391A392A11D +:10110000892B82A34A175B0741F7A0E2B1E04AE2CC +:1011100051E061E070E08D91E82FE295EF70F0E032 +:1011200021A18F70EB0102C0CC0FDD1F8A95E2F781 +:10113000CE019C2F9095922391A392A1892B82A3FB +:101140004A175B0741F710925E0110925D01109201 +:101150005801109257011092600110925F01109295 +:101160005A0110925901109262011092610110927D +:101170005C0110925B01DF91CF910C94F0022F92F1 +:101180003F924F925F926F927F928F929F92AF9217 +:10119000BF92CF92DF92EF92FF920F931F93CF9364 +:1011A000DF932AE2E22E21E0F22EC7E5D1E03DE511 +:1011B000832E31E0932E01E010E066246394BE019B +:1011C000A880B98019821882D7018D917D01E82FFE +:1011D000E295EF70F0E021A18F70A80102C0440FEA +:1011E000551F8A95E2F7CA01242B21A322A1742E50 +:1011F0007094272122A350EA5A95F1F790E2292E04 +:1012000091E0392E20E030E0D1015D901D01452DA7 +:1012100042954F7050E0DA0190964C90C880D9808A +:10122000552D5F70D80102C0AA0FBB1F5A95E2F777 +:10123000AD01442141F4A801022E02C0440F551F04 +:101240000A94E2F702C040E050E04C295D2959833E +:1012500048832F5F3F4F2A303105B1F691A17922A3 +:1012600071A292A1892B82A32296FB018081918198 +:10127000A816B90641F0609263010E943F1D909349 +:101280006501809364018C169D0609F098CF8091CA +:101290006301882311F180916401909165010E949E +:1012A0004B1D0697D0F08091570190915801909373 +:1012B0005E0180935D018091590190915A01909354 +:1012C000600180935F0180915B0190915C0190933C +:1012D000620180936101109263010E94F20281E039 +:1012E000DF91CF911F910F91FF90EF90DF90CF9002 +:1012F000BF90AF909F908F907F906F905F904F9036 +:101300003F902F900895E82FF0E0EE0FFF1FE35A73 +:10131000FE4F8081918108950895EF92FF920F937F +:101320001F93CF93DF93E901662309F44BC0242F69 +:1013300030E0EFEFF0E0E61BF109B901E69F900124 +:10134000E79F300DF69F300D1124232F8B01031BD7 +:1013500011095CE3E52EF12CB7010E94BB2BFB01C8 +:10136000BC01069FC001079F900D169F900D112490 +:10137000B7010E94BB2BE230F105B1F040F4309789 +:1013800079F0319711F5832F242F461B21C0E430CB +:10139000F105A1F068F03597C1F4842F861B18C0C1 +:1013A000832F262F230F14C0862F830FE42F03C013 +:1013B000E42FE61B842F432F2E2F0AC0842F462FA5 +:1013C000430F06C0842F242F03C080E020E040E0BC +:1013D000E42FF0E0E456FD4F4491E22FF0E0E456B4 +:1013E000FD4F9491E82FF0E0E456FD4FE4914983DE +:1013F0009883EA83DF91CF911F910F91FF90EF9037 +:10140000089588E090E00C94FE2BAB01BC0188E0CD +:1014100090E00C941C2CE9E3F2E083E080831092CE +:101420003A028FEF8283838314826081718182818B +:1014300093810C94050A6091390260FF06C066959D +:101440006F7370E080E090E0089560E070E0CB01A1 +:10145000089580913D0290E001968430910514F04A +:1014600083E090E080933D026091390270913A02EE +:1014700080913B0290913C020C94050A80913D02C0 +:1014800090E0019797FF02C080E090E084309105E2 +:1014900014F083E090E080933D02609139027091F6 +:1014A0003A0280913B0290913C020C94050A809193 +:1014B000390280FF06C065E070E08EE392E00C9494 +:1014C0001910EEE3F2E0118210821282339682E06C +:1014D000ED34F807C1F7EFCF9091390290FF0CC0BF +:1014E000EEE3F2E0818360834283339692E0ED3451 +:1014F000F907C1F70C94570A0895CF93DF9300D0F2 +:101500001F92CDB7DEB72091390220FF0AC09E019D +:101510002F5F3F4F0E948D094B8169818A810E9414 +:101520006C0A0F900F900F90DF91CF9108955F920A +:101530006F927F928F929F92AF92BF92CF92DF92E3 +:10154000EF92FF920F931F93CF93DF9300D01F92E0 +:10155000CDB7DEB78C01E62EF42E522E80913902E3 +:1015600080FF89C0982F9E77923061F49E012F5F93 +:101570003F4FC8010E948D094B8169818A810E9479 +:101580006C0A59C0E82FE695EF739EE39E0F9F7398 +:10159000943018F4F0903C024EC09AE39E0F9F7373 +:1015A000993068F4881F8827881F90913A02292F64 +:1015B000220F022F082B97FB112710F93CC087E25E +:1015C0008E0F8F738A30B8F5F0E07997E0FD02C096 +:1015D00021E001C02FEFEE7FEE56FD4F85919491F3 +:1015E00065E070E00E94BB2B26034001279F900C12 +:1015F0001124580188E9A81A8EEFB80A8EE3C82E84 +:1016000082E0D82E98E6692E77247394C501B30141 +:101610000E94BB2B96014F2D6E2D0E948D09A80CA8 +:10162000B91C83E0C80ED11C8DE4C81682E0D80630 +:1016300069F70E94570A8091390200FB87F980936D +:101640003902902F969580913A028078892B10FB71 +:1016500087F980933A02E0923B02F0923C025520D7 +:1016600051F06091390270913A0280913B02909161 +:101670003C020E94050A0F900F900F90DF91CF91CE +:101680001F910F91FF90EF90DF90CF90BF90AF90A0 +:101690009F908F907F906F905F90089521E00C94C1 +:1016A000970AE9E3F2E02081221F2227221F3091CE +:1016B0003A02432F440F842F822B37FB992790F94E +:1016C000089668E671E00E94CF2B438162810C94FA +:1016D0004E0B20913902221F2227221F30913A02FD +:1016E000432F440F842F822B37FB992790F98830A2 +:1016F00091051CF4805A9E4F05C0089768E671E07A +:101700000E94CF2B40913C0260913B020C944E0B07 +:1017100060913B02862F90E0883F910514F4685F4A +:1017200001C06FEF80913902881F8827881F909130 +:101730003A02292F220F97FB992790F940913C02FA +:10174000822B0C944E0B60913B02862F90E0089701 +:1017500014F0685001C060E080913902881F88272A +:10176000881F90913A02292F220F97FB992790F911 +:1017700040913C02822B0C944E0B40913C02842FF2 +:1017800090E0883F910514F4485F01C04FEF8091CD +:101790003902881F8827881F90913A02292F220F2B +:1017A00097FB992790F960913B02822B0C944E0B8A +:1017B00040913C02842F90E0089714F0485001C0FB +:1017C00040E080913902881F8827881F90913A0253 +:1017D000292F220F97FB992790F960913B02822BCA +:1017E0000C944E0B20E00C94970ACF939091390201 +:1017F00090FF40C09178811102C0926007C085328D +:1018000010F0986403C08F73880F982B909339025F +:10181000662351F06091390270913A0280913B0247 +:1018200090913C020E94050AC09139026C2F669586 +:101830006F7370E04BE050E082E091E00E94E92B92 +:10184000892B19F01092830103C081E080938301FA +:10185000CC1FCC27CC1F90913A02892F880F97FB81 +:10186000992790F940913C0260913B028C2BCF91DB +:101870000C94F20BCF91089561E00C94F50B8091DC +:10188000390286958F738F5F853208F081E00C9462 +:101890003C0C8091390286958F73815009F484E263 +:1018A0000C943C0CE9E3F2E08081816080838695B2 +:1018B0008F730C943C0C60E00C94F50B80910B0240 +:1018C000816080930B020E94141C811104C00E944D +:1018D000F31B0E940B0A0E94010A60933902709365 +:1018E0003A0280933B0290933C026E7761F40E942F +:1018F0000B0A0E94010A6093390270933A028093A6 +:101900003B0290933C0281E08093830180913902F5 +:1019100080FF04C086958F730C945B0C08959091A2 +:10192000390290FF10C0253070F430E0F901EE0F5D +:10193000FF1F2E0F3F1FF901E25CFD4F8183608383 +:1019400042830C94570A08951F93CF93DF9300D0DE +:101950001F92CDB7DEB73091390230FF0CC0122F85 +:101960009E012F5F3F4F0E948D09212F4B8169817E +:101970008A810E948F0C0F900F900F90DF91CF9172 +:101980001F910895E9E3F2E080818E7F808360817A +:101990007181828193810E94050A109283012FEF49 +:1019A00080E792E0215080409040E1F700C00000C5 +:1019B0000C94570A8091390280FD0C94C20C0C944F +:1019C000520CCF93C82F80918101909182010E9487 +:1019D0004B1DEC2FF0E0E257FD4FE491F0E08E1745 +:1019E0009F0708F443C00E943F1D9093820180939B +:1019F00081016091800170E080E090E00E94BC294C +:101A000020E030E04FE753E40E94DF282BED3FE079 +:101A100049E450E40E94E52A0E94522B0E94592971 +:101A20002BE43AE34EE25FE30E94722820EF3BEFA3 +:101A300048ED52E40E94E52A0E948B29462F8091AE +:101A40003902881F8827881F90913A02292F220F78 +:101A500097FB992790F960913B02822B0E947D0AA7 +:101A60008091800190E0019680938001CF9108954C +:101A7000CF93C82F80917E0190917F010E944B1DD2 +:101A8000EC2FF0E0E557FD4FE491F0E08E179F0753 +:101A9000E8F00E943F1D90937F0180937E0140916A +:101AA0003C0260913B0280917C0190917D010E94FB +:101AB0007D0A80917C0190917D01019668E671E03C +:101AC0000E94BB2B90937D0180937C01CF91089560 +:101AD000CF92DF92FF920F931F93CF93DF93F82E55 +:101AE00080917A0190917B010E944B1DEF2DE6952C +:101AF000F0E0E857FD4FE491F0E08E179F07C0F14A +:101B00000E943F1D90937B0180937A010EE312E0C7 +:101B1000C0E0D0E088E6C82EDD24D394809178011F +:101B2000909179018C0F9D1FB6010E94BB2B9801EB +:101B300040913C0260913B020E948D09C85BDF4FDF +:101B40000D5F1F4FC83681E0D80741F70E94570A42 +:101B50008091780190917901F0FE05C00196BE0157 +:101B60000E94BB2B01C0019790937901809378016B +:101B7000DF91CF911F910F91FF90DF90CF9008954B +:101B8000CF92DF92EF92FF920F931F93CF93DF9349 +:101B9000C82F80FF02C01FEF01C011E080917601C5 +:101BA000909177010E944B1DC695EC2FF0E0EB570A +:101BB000FD4FE491F0E08E179F0708F45BC00E9490 +:101BC0003F1D90937701809376012EE3E22E22E071 +:101BD000F22EC0E0D0E0F70111821082128294E070 +:101BE000C92ED12C00E080917501800F87FD8B5F9D +:101BF000082E000C990BC817D907E9F480913C0214 +:101C00008C9DA0018D9D500D11245595479555959E +:101C1000479580913902881F8827881F90913A0242 +:101C2000592F550F97FB992790F9970160913B0227 +:101C3000852B0E948D09010FF1E0CF1AD10899F68A +:101C4000219683E0E80EF11CC530D10521F60E94F3 +:101C5000570A80917501113031F4811102C084E07E +:101C600007C0815005C090E00196BE010E94CF2BB5 +:101C700080937501DF91CF911F910F91FF90EF90AD +:101C8000DF90CF9008950F931F93CF93DF93C82FCA +:101C900080917301909174010E944B1DEC2FF0E034 +:101CA000EE57FD4FE491F0E08E179F0708F456C001 +:101CB0000E943F1D9093740180937301CEE3D2E0A4 +:101CC000FE01118210821282339682E0ED34F80711 +:101CD000C1F700E010E080917201082E000C990B12 +:101CE00008171907ECF080910101082E000C990BE0 +:101CF00080179107ACF080913902881F8827881FD0 +:101D000090913A02592F550F97FB992790F99E0110 +:101D100040913C0260913B02852B0E948D0903C0DB +:101D2000198218821A820F5F1F4F23960530110502 +:101D300091F60E94570A8091000190917201980FCC +:101D40009093720120910101280F20930101121636 +:101D500014F494301CF0819580930001DF91CF91B1 +:101D60001F910F910895EF92FF920F931F93CF93BE +:101D7000DF9380917001909171010E944B1D883E0C +:101D80009340D0F10E943F1D9093710180937001A8 +:101D9000C0916E01D0916F012196C170DD27D09363 +:101DA0006F01C0936E018EE3E82E82E0F82E10E002 +:101DB00008E7812F8695FE01E80FF11DCF018170A4 +:101DC0009927970140913C0260913B02FC010E9FD4 +:101DD000C0010F9F900D11240E948D091F5FF3E039 +:101DE000EF0EF11C153029F7DF91CF911F910F9164 +:101DF000FF90EF900C94570ADF91CF911F910F91B4 +:101E0000FF90EF900895CF93DF9300D01F92CDB74E +:101E1000DEB780916C0190916D010E944B1DE0E84E +:101E2000F2E02591349182179307C0F180916B0104 +:101E300081110CC09E012F5F3F4F4FEF6FEF80E08D +:101E400090E00E948D098A8180936B010E943F1D62 +:101E500090936D0180936C0180916A01813051F003 +:101E600028F0823061F440916B010AC080916B01CF +:101E700040E007C060916B0140E080E003C040E0BB +:101E800080E060E00E946C0A80916A0190E0019617 +:101E900063E070E00E94CF2B80936A010F900F9057 +:101EA0000F90DF91CF910895CF93DF9380916801D8 +:101EB000909169010E944B1D843F914008F444C0F9 +:101EC0000E943F1D9093690180936801C0E0D0E0BB +:101ED00020916601309167018091390290913A0218 +:101EE000C230D1051CF4232B79F002C0232B61F4FE +:101EF000881F8827881F392F330F97FB992790F960 +:101F00002C2F40913C020AC0881F8827881F392F38 +:101F1000330F97FB992790F92C2F40E060913B02FB +:101F2000832B0E94A40C2196C530D10589F60E940E +:101F3000570A8091660190916701019681709927F7 +:101F40009093670180936601DF91CF91089580910E +:101F500083018823D9F190913902892F86958F7357 +:101F60002EE3280F2F73243018F482500C94E10CC8 +:101F70002AE3280F2F73233018F486500C94380D61 +:101F800027E3280F2F73263018F489500C94680D1E +:101F900021E3280F2F73263018F48F500C94C00DB6 +:101FA0002BE2280F2F73233018F485510C94430E25 +:101FB000892F8E77803311F40C94B30E863411F48C +:101FC0000C94030F883411F40C94540F089521B32A +:101FD000342F3095232331B3432B3FB7F894FC01C2 +:101FE000680F791FE617F70789F0819198E041BBE8 +:101FF000000000C087FF21BB880F000000C000C0A8 +:1020000000C021BB00C09A9591F7ECCF3FBF089567 +:1020100020B3242B20BB9B01220F331F620F731FA1 +:102020000E94E70F87EC90E00197F1F700C00000F5 +:10203000089540E10C9408109093890180938801E1 +:102040000895E0918801F0918901309721F0019085 +:10205000F081E02D099480E00895E0918801F091ED +:102060008901309721F00280F381E02D09940895D1 +:10207000E0918801F0918901309721F00480F58189 +:10208000E02D099408952091860130918701281749 +:10209000390771F09093870180938601E091880160 +:1020A000F0918901309721F00680F781E02D0994A5 +:1020B000089520918401309185012817390771F026 +:1020C0009093850180938401E0918801F0918901CA +:1020D000309721F00084F185E02D0994089508954A +:1020E0000C946F1081E008950E94361D85B78068BA +:1020F00085BF85B7806885BF0E9465080E94F81D6E +:102100000C945E0C5F926F927F928F929F92AF922F +:10211000BF92CF92DF92EF92FF920F931F93CF93D4 +:10212000DF93CDB7DEB72A970FB6F894DEBF0FBEA8 +:10213000CDBF0E94BF080E947210811111C08FEFA5 +:1021400089838A831B820E943F1D8160782F9D8333 +:102150008C8349815A816B818D810E943F1156C0C9 +:102160009BE8692E91E0792E00E010E088248394AA +:10217000912C502E802F0E9483096C01F301A190B5 +:10218000B1903F01A826B926A114B10431F40F5F24 +:102190001F4F0330110569F7D2CF80910B0281FDEB +:1021A0000E948C0980E090E07401082E02C0EE0CC1 +:1021B000FF1C0A94E2F795012E213F21232B09F100 +:1021C0008E835F82CE20DF2081E0CD2809F480E07D +:1021D00088870E943F1D8160782F9A8789874E816A +:1021E0005F8168858A850E943F11000F111FF801E9 +:1021F000E557FE4F80819181E826F926F182E08241 +:1022000005C001968A30910579F6C1CF0E949B20C6 +:102210000E94211090918A018917D9F00E94211003 +:1022200080938A012A960FB6F894DEBF0FBECDBF09 +:10223000DF91CF911F910F91FF90EF90DF90CF90A2 +:10224000BF90AF909F908F907F906F905F900C9415 +:10225000F7022A960FB6F894DEBF0FBECDBFDF910E +:10226000CF911F910F91FF90EF90DF90CF90BF9093 +:10227000AF909F908F907F906F905F900895CF93D5 +:10228000DF93CDB7DEB72B970FB6F894DEBF0FBE46 +:10229000CDBF4F83588769877A878B87DE01119678 +:1022A00086E0FD0111928A95E9F785E0FE013796F7 +:1022B00001900D928A95E1F749815A816B817C8169 +:1022C0008D819E810E9456182B960FB6F894DEBF22 +:1022D0000FBECDBFDF91CF910895FC018081918128 +:1022E0000E94251B0895882309F4F8C08238C1F4A0 +:1022F0000E94211081FDF2C069E380910D0190914F +:102300000E010E94971C0E94841B2FEF81EE94E027 +:10231000215080409040E1F700C0000069E319C0FF +:102320008338F9F40E94211080FDD8C063E58091C4 +:102330000D0190910E010E94971C0E94841B2FEFAB +:1023400081EE94E0215080409040E1F700C0000011 +:1023500063E580910D0190910E010E94A21C0C94E6 +:10236000841B8438C1F40E94211082FDB7C067E449 +:1023700080910D0190910E010E94971C0E94841B78 +:102380002FEF81EE94E0215080409040E1F700C0B3 +:10239000000067E4DECF9CEF980F913A40F4682F7D +:1023A00080910D0190910E010E94971CD8CF90E270 +:1023B000980F983050F4877091E001C0990F8A957A +:1023C000EAF7892F0E94BA1BCACF9BE5980F93307A +:1023D00070F4853A29F0863A31F083E890E005C040 +:1023E00081E890E002C082E890E00C94431098E508 +:1023F000980F953108F06EC0883A61F1893A69F119 +:102400008A3A71F18B3A79F18C3A81F18B3B89F1FF +:102410008C3B91F18D3A99F1803BA1F18E3AA9F173 +:102420008F3AB1F1813BB9F1823BC1F1833BC9F1F4 +:10243000843BD1F1853BD9F1863BE1F1873BE9F162 +:10244000883BF1F1893BF9F18A3B09F43FC080E018 +:1024500090E03EC082EE90E03BC089EE90E038C054 +:102460008AEE90E035C085EB90E032C086EB90E0DC +:102470002FC083EB90E02CC084EB90E029C087EB69 +:1024800090E026C08CEC90E023C08DEC90E020C062 +:1024900083E891E01DC08AE891E01AC082E991E0EA +:1024A00017C084E991E014C081E292E011C083E298 +:1024B00092E00EC084E292E00BC085E292E008C098 +:1024C00086E292E005C087E292E002C08AE292E0F2 +:1024D0000C945910803F10F00C94A31F089588238A +:1024E00009F462C0823879F40E94211081FF5CC037 +:1024F00069E380910D0190910E010E94971C0E944A +:10250000841B69E310C08338B1F40E94211080FF5E +:102510004BC063E580910D0190910E010E94971CC4 +:102520000E94841B63E580910D0190910E010E9431 +:10253000A21C0C94841B843879F40E94211082FF21 +:1025400033C067E480910D0190910E010E94971CA9 +:102550000E94841B67E4E7CF9CEF980F913A10F438 +:10256000682FE1CF90E2980F983050F4877091E097 +:1025700001C0990F8A95EAF7892F0E94C01BD9CF15 +:102580009BE5980F933020F480E090E00C9443108A +:1025900098E5980F953120F480E090E00C94591064 +:1025A000803F10F00C940B200895882321F00E94A6 +:1025B000BA1B0C94841B0895882321F00E94C01B31 +:1025C0000C94841B08958F929F92AF92BF92DF92DA +:1025D000EF92FF920F931F93CF93DF937C01D62F3F +:1025E000C72FFC01058102950F70128111110E9405 +:1025F000D71B0E947D1B882379F0112369F080E2AC +:102600008D0F883048F082E00E94661B0E947D1B7F +:1026100091E0D82ED92601C0D12CBC2EB2948FE0E7 +:10262000B8228B2D90E0FC01E859FF4F0C94E32B6E +:102630008C2F807FCF70882311F0C295C07F11232B +:1026400099F0CC2309F4C3C180E28D0F883010F0DB +:10265000D11104C08C2F0E94BA1B03C08C2F0E9482 +:10266000CA1B0E94841BB3C18D2F0E946F12CC2302 +:1026700009F4D2C180E28D0F883010F0D11104C06E +:102680008C2F0E94C01B03C08C2F0E94D01B0E9465 +:10269000841BC2C18C2F807FCF70803211F0C29515 +:1026A000C07FDD2319F0D130C9F022C0112371F0B1 +:1026B000002341F0013031F40E94F01B8C2B0E946A +:1026C000EA1BAAC10E94F01B8C2B3AC1002319F00F +:1026D000013009F4A1C10E94ED1B18C0112321F0A3 +:1026E000063008F099C10EC0053008F095C10EC043 +:1026F000112351F0002331F0F701858180FF67C17C +:102700008F7085838C2F1CC1011172C18C2F1EC14B +:102710008C2F86958695837019F0813061F07CC18D +:10272000112321F08D2F9C2F937002C080E090E048 +:102730000E9443107EC1112321F08D2F9C2F937096 +:1027400002C080E090E00E94591073C11123F9F09B +:10275000D53F51F0D63F71F0D43FA9F480914D029E +:1027600090914E0281600BC080914D0290914E027B +:10277000826005C080914D0290914E0284609093DA +:102780004E0280934D028D2F0E94A31F1EC0D53F85 +:1027900051F0D63F71F0D43FA9F480914D02909151 +:1027A0004E028E7F0BC080914D0290914E028D7F24 +:1027B00005C080914D0290914E028B7F90934E0206 +:1027C00080934D028D2F0E940B200E94902031C1DA +:1027D0008C2F837009F04CC0111127C12D2F229529 +:1027E00026952770220F220F6D2F6F70862F90E095 +:1027F000A0E0B0E04C015D01022E04C0880C991CE1 +:10280000AA1CBB1C0A94D2F7D4FF12C08FE090E040 +:10281000A0E0B0E004C0880F991FAA1FBB1F2A9533 +:10282000D2F7BC01CD01609570958095909503C05D +:1028300060E070E0CB01C695C695C370C23051F020 +:1028400080F4682979298A299B29C13071F00E9476 +:10285000A519EBC0682979298A299B290E94B719F3 +:10286000E4C00E94A519C501B4010E949319DDC0FE +:10287000112319F08C2F817001C08695882309F4EB +:10288000D4C02D2F229526952770220F220F6D2F51 +:102890006F70862F90E0A0E0B0E04C015D01022E49 +:1028A00004C0880C991CAA1CBB1C0A94D2F7D4FF44 +:1028B00012C08FE090E0A0E0B0E004C0880F991F44 +:1028C000AA1FBB1F2A95D2F7BC01CD016095709558 +:1028D0008095909503C060E070E0CB01C695C695E9 +:1028E000C370C23051F080F4682979298A299B2964 +:1028F000C13071F00E946A1A98C0682979298A2922 +:102900009B290E947C1A91C00E946A1AC501B401D9 +:102910000E94581A8AC08D2F90E0FC01E05EF109F8 +:10292000E531F10508F04FC0E858FF4F0C94E32B58 +:10293000DF708C2F8F71112331F00E94F1198D2FD0 +:102940000E94D51269C00E94121A8D2F0E94DC12BB +:1029500063C0112341F0053008F05EC08C2F8F71E9 +:102960000E94371A59C0063008F056C0F7CF11231D +:1029700039F08C2F8F710E94F1194EC01123C9F3C9 +:102980008C2F8F710E94121A47C0112329F08C2FAF +:102990008F710E94DC1940C00E94D7193DC01123DD +:1029A00049F0CF718C2F0E94F11963E08C2F0E94A7 +:1029B0005D1B32C081E00E94661B023068F182E03C +:1029C0000E94661B29C0112331F0002391F28D2F44 +:1029D0000E94731121C0002399F2D93349F4FFEF0B +:1029E00027EE83E0F15020408040E1F700C0000076 +:1029F0008D2F0E946F1210C04C2F4F706D2FC7018A +:102A00000E94AF050E94041914C04C2F4F706D2F07 +:102A1000C7010E94B2050DC098E0B91631F0B91691 +:102A200040F086EF8B0D823020F40E9421100E942E +:102A3000F702DD20E1F00E94591B80FD18C0F7016C +:102A400012820E94531B0E94F119C7010E94431574 +:102A50000E94531BDF91CF911F910F91FF90EF9038 +:102A6000DF90BF90AF909F908F900C94121ADF91DF +:102A7000CF911F910F91FF90EF90DF90BF90AF909B +:102A80009F908F9008950F931F93CF93DF93EC0146 +:102A9000988189812B813C81232B31F08F3F31F448 +:102AA00081E09F3F19F403C081E001C080E080FD18 +:102AB00013C0CE010E940F03882371F068817981D1 +:102AC0008A810E94301B8C010E948E1A0E948119FB +:102AD000B801CE010E94E312DF91CF911F910F91B7 +:102AE00008950E94D71B0E94E71B80910D019091D1 +:102AF0000E010E94AD1C0E94841B0E9432210E9484 +:102B0000902080E090E00E94431080E090E00C94E0 +:102B100059100E94C71B0C9471150E94251BE92FA8 +:102B2000E295EF704E2F50E0FA013297EE30F1054A +:102B3000B0F4E357FF4F0C94E32B803F91F018F46F +:102B4000803E68F40EC0843F51F40BC0803E48F0D4 +:102B5000813F29F406C093FB882780F9089580E01F +:102B6000089581E00895CF93DF9300D000D01F92A5 +:102B7000CDB7DEB70F900F900F900F900F90DF91B1 +:102B8000CF910895CF93DF9300D000D000D0CDB780 +:102B9000DEB726960FB6F894DEBF0FBECDBFDF912D +:102BA000CF9108951F93CF93DF93C091920116E0C8 +:102BB00080919301C81799F0D0E01C9FF0011D9FF0 +:102BC000F00D1124EC56FE4F4081518162817381DA +:102BD000848195810E94C2152196C770E9CFDF914B +:102BE000CF911F9108954091C4015091C50160910A +:102BF000C6017091C7018091C8019091C9010C94E0 +:102C0000C215CF938091C90182958F7009F05FC082 +:102C10008091C601882309F45AC080919201B09135 +:102C200093017091C401A091C5014091C7015091D9 +:102C3000C80191E07F3F09F090E0692FC6E08B1753 +:102C400009F445C04115510521F0AF3F21F020E0C6 +:102C500003C021E001C0262F90E020FD35C0C89FB1 +:102C6000F001C99FF00D1124EC56FE4F21812A136B +:102C70002BC02081271328C02281211125C0238148 +:102C800034812417350710F421503109241B350BEA +:102C9000283C3105C8F42091C9012F702061209390 +:102CA000C90126E0289FF001299FF00D1124E75665 +:102CB000FE4F80818F708061808384EC91E00E9460 +:102CC0004315CF910C94D21501968770B8CFCF9150 +:102CD0000895AF92BF92CF92DF92EF92FF920F933F +:102CE0001F93CF93DF93CDB7DEB761970FB6F894FC +:102CF000DEBF0FBECDBF8C0185E0F801DE011D9661 +:102D000001900D928A95E1F7D8014C9111965C9152 +:102D100011971296EC903091C4016091C501809199 +:102D2000C7019091C801009731F06F3F31F421E065 +:102D30003F3F19F403C021E001C020E0B22FB17081 +:102D4000BB2E20FD60C1F801C380D480A090C601D5 +:102D5000AA2009F4EEC02091C901C816D90628F0AE +:102D6000D601A81BB90BCD0104C0809590958C0DA0 +:102D70009D1DFF24F394883C910580F0F12C207F69 +:102D800009F09CC07C2DD98AC88A6E2D89890E9441 +:102D9000B31584EC91E00E9443152DC1822F807FF2 +:102DA00009F054C0561314C0431312C0FE2CE11096 +:102DB0000FC02F7020612093C9010E94F31584EC8D +:102DC00091E00E9443158091C901F80185835CC19F +:102DD000CD2831F05F3F31F481E04F3F19F403C05B +:102DE00081E001C080E080FD03C081E08E2502C04B +:102DF00080E090E0F82FF170FF2E80FF1CC08091E2 +:102E000092012091930136E0821709F41AC190E0F3 +:102E1000389FF001399FF00D1124EC56FE4F61816F +:102E2000561306C06081461303C06281E61203C0D8 +:102E300001968770E9CFFE2CEE2009F425C1809120 +:102E4000C90181608093C901F12C1EC1561309C0CC +:102E5000431307C0E11005C08091C901F8018583C3 +:102E6000A4C04D875E878D859E850E948D15882321 +:102E700079F1EE2069F12091C901822F82958F703E +:102E800090E0029774F08091C4019091C5019887F9 +:102E90008F831986DB86CA862C87CE0107960E940F +:102EA000431586E0F801A4ECB1E001900D928A95FB +:102EB000E1F70E9401160E94F3150DC0561771F03C +:102EC0004D875E878D859E850E948D1581111AC064 +:102ED000C8010E944315FF24F394D6C04313F0CFDA +:102EE000E110EECF8091C901F8018583C8010E94ED +:102EF000431586E0E4ECF1E0DF011D928A95E9F7E5 +:102F0000FA2CC2C0EE2021F32091C901822F8295B4 +:102F10008F7090E002972CF28091C4019091C501CE +:102F20009A8389831B82DD82CC822E83CE01019617 +:102F3000B6CFC816D90628F0F601E81BF90BCF0169 +:102F400004C0809590958C0D9D1D883C910548F09E +:102F5000F12C7C2DD98AC88A6E2D89890E94B315DF +:102F60004AC0FE2CEE2009F4B3CF561333C04313EE +:102F700031C02091C90120FD24C0822F82958F701D +:102F8000482F50E041155105E1F0D80115962C93DA +:102F900015974F30510549F08F5F982F9295907F8C +:102FA000822F8F70892B15968C93C8010E94431530 +:102FB00086E0F801A4ECB1E001900D928A95E1F76A +:102FC0003DC086E0F801A4ECB1E001900D928A9535 +:102FD000E1F75AC04D875E878D859E850E948D15CD +:102FE00081115FCF8091C90181608093C901C801BF +:102FF0000E94431549C0E4ECF1E086E0DF011D9238 +:103000008A95E9F71BC0EE2009F462CF4D875E87F1 +:103010008D859E850E948D15F82E882309F458CF42 +:1030200086E0F801A4ECB1E001900D928A95E1F7F9 +:1030300084EC91E00E946D110E9401160E94F3152C +:1030400023C04D875E878D859E850E94251B292F75 +:1030500022952F70223028F49F7039F0811105C01D +:103060000BC0243028F49F7049F4805E883020F033 +:10307000C8010E944315BF2CFB2C06C0D801159631 +:103080009C91907F91F7F8CF8F2D61960FB6F894B1 +:10309000DEBF0FBECDBFDF91CF911F910F91FF908B +:1030A000EF90DF90CF90BF90AF9008951F93CF9394 +:1030B000DF93CDB7DEB72C970FB6F894DEBF0FBE07 +:1030C000CDBF4F83588769877A878B879C87CE01CE +:1030D00007960E9469168823D1F09F8188852A85EA +:1030E0003B85232B31F08F3F31F481E09F3F19F472 +:1030F00003C081E001C080E080FD47C04F8158855A +:1031000069857A858B859C850E94C2153EC086E0C4 +:10311000FE013796DE01119601900D928A95E1F736 +:10312000FF81E8856A857B856115710531F0EF3F88 +:1031300031F481E0FF3F19F403C081E001C080E079 +:1031400080FD23C02091930130E0C9010196877072 +:1031500099274091920150E084179507F1F1F98386 +:10316000EA837D836C8396E0929FD001939FB00D9C +:103170001124AC56BE4FFE01319601900D929A95E6 +:10318000E1F7809393010E94D21516E0809192019D +:1031900090919301891771F1189FC00111248C56E9 +:1031A0009E4F0E946916882329F1E09192011E9F8B +:1031B000F0011124EC56FE4F4081518162817381F0 +:1031C000848195810E94C2158091920190E00196C0 +:1031D0008770992780939201D9CF0E948915109208 +:1031E000930110929201E4ECF1E086E0DF011D9280 +:1031F0008A95E9F72C960FB6F894DEBF0FBECDBFC7 +:10320000DF91CF911F910895EF92FF920F931F933B +:10321000CF93DF938C01892B09F46CC0F12CEE2441 +:10322000E394E8012196F8018491843740F48430D6 +:1032300008F051C0813081F0823019F15BC08537D0 +:1032400009F444C0A8F19CE7980F903708F052C0E9 +:103250008F770E946F1241C00E5F1F4FFE01849155 +:1032600090E2980F983050F48770FE2D01C0FF0F48 +:103270008A95EAF78F2F0E94DA1B14C00E947311FF +:103280002DC00E5F1F4FFE01849190E2980F983081 +:1032900060F48770FE2D01C0FF0F8A95EAF78F2F2B +:1032A0000E94E01B0E94841B19C00E946F1216C06E +:1032B0000E5F1F4FFE01C491CC2381F08FE99FE088 +:1032C0000197F1F700C00000C150F6CF0E5F1F4F0D +:1032D000FE01F49003C00E9473118E018F2D88238C +:1032E00009F49FCFEFE9FFE03197F1F700C000004C +:1032F0008150F5CFDF91CF911F910F91FF90EF900B +:103300000895089508950C9482190E94831960937A +:10331000E2017093E3018093E4019093E5010C9442 +:1033200071150C9485190F931F930091E201109170 +:10333000E3012091E4013091E501602B712B822B98 +:10334000932B1F910F910C9485190F931F9300914C +:10335000E2011091E3012091E4013091E501602345 +:103360007123822393231F910F910C9485190F933E +:103370001F930091E2011091E3012091E40130914B +:10338000E50160277127822793271F910F910C94E5 +:1033900085190C9482190E94C9196093DE017093FB +:1033A000DF018093E0019093E1010C94711560E0DE +:1033B00070E0CB010C94CB190F931F9341E050E0C8 +:1033C00060E070E08A019B0104C0000F111F221F02 +:1033D000331F8A95D2F7C901B8011F910F910C9440 +:1033E000CB190F931F9341E050E060E070E004C000 +:1033F000440F551F661F771F8A95D2F78091DE0113 +:103400009091DF01A091E001B091E1018A019B015F +:10341000082B192B2A2B3B2BC901B8011F910F91A7 +:103420000C94CB190F931F9341E050E060E070E0E3 +:1034300004C0440F551F661F771F8A95D2F7409529 +:103440005095609570958091DE019091DF01A0917B +:10345000E001B091E1018A019B01082319232A238D +:103460003B23C901B8011F910F910C94CB190F9305 +:103470001F9341E050E060E070E004C0440F551F2E +:10348000661F771F8A95D2F78091DE019091DF0148 +:10349000A091E001B091E1018A019B010827192761 +:1034A0002A273B27C901B8011F910F910C94CB1912 +:1034B0000F931F930091DE011091DF012091E00135 +:1034C0003091E101602B712B822B932B1F910F9177 +:1034D0000C94CB190F931F930091DE011091DF0123 +:1034E0002091E0013091E101602371238223932335 +:1034F0001F910F910C94CB190F931F930091DE0134 +:103500001091DF012091E0013091E10160277127E6 +:10351000822793271F910F910C94CB1908952AE0CD +:10352000929F800D1124E82FE695E695E695877029 +:1035300051E001C0550F8A95EAF785E0E89FF00158 +:103540001124E653FE4F20E030E070E04081CB01D3 +:10355000022E02C0969587950A94E2F781708195B4 +:1035600084278523842781932F5F3F4F25303105A2 +:1035700069F708952AE0929F800D1124682F6695BF +:1035800066956695982F977085E0689FB001112425 +:1035900040E050E080E0FB01E40FF51FE653FE4FF2 +:1035A000208130E0092E02C0369527950A94E2F773 +:1035B00021703327042E01C0220F0A94EAF7822BD0 +:1035C0004F5F5F4F4530510531F70895CF92DF923D +:1035D000EF92FF920F931F93CF93DF938C01C090D4 +:1035E000DE01D090DF01E090E001F090E1018091F8 +:1035F000E2019091E301A091E401B091E501C82AB4 +:10360000D92AEA2AFB2ACFE1D0E0D701C6010C2E45 +:1036100004C0B695A795979587950A94D2F780FD33 +:1036200004C0219790F780E007C0B8018C2F0E945A +:10363000CE050197B1F38C2FDF91CF911F910F91A0 +:10364000FF90EF90DF90CF900895CF93DF93EC0140 +:103650000E94E61ABE010E94CE05DF91CF91089527 +:103660001F93CF93DF93EB0190919101992321F068 +:10367000CB010E94251B13C0882349F0CB010E9477 +:10368000E61A182F682FCE010E948F1A04C0CB01B2 +:103690000E94BA1A182FBE01812F0E94CE05DF9119 +:1036A000CF911F9108958091E60185958595859527 +:1036B00008958091E6018770089598E0899F9001B0 +:1036C0001124262B2093E6010C94F1192091E60198 +:1036D000809582238093E601982F977069F430E0FB +:1036E000482F082E000C550B2417350729F0859517 +:1036F000859585950C94121A08959091E60197701E +:1037000081E009F480E00895E0910D01F0910E014F +:1037100080910A028083E0910D01F0910E01908169 +:1037200080910902892B8083E0910D01F0910E01B7 +:10373000908180910802892B80838091E701882302 +:1037400081F0E0910D01F0910E019081892B808331 +:1037500080910D0190910E010E943A1C81111092EE +:10376000E70180910D0190910E010C942D10809134 +:103770000A02089590910A02892B80930A02089503 +:10378000809590910A02892380930A0208951092ED +:103790000A02089590910902892B809309020895E5 +:1037A00080959091090289238093090208951092CF +:1037B0000902089590910802892B809308020895C8 +:1037C00080959091080289238093080208951092B1 +:1037D000080208958093E70108951092E701089583 +:1037E0008091E70108956DEE7EEF80E090E00E9409 +:1037F000282C60E082E090E00E940A2C60E083E0E8 +:1038000090E00E940A2C60E084E090E00E940A2C84 +:1038100060E085E090E00E940A2C40E050E0BA01B0 +:1038200088E090E00C941C2C80E090E00E94042C36 +:1038300021E08D3E9E4F09F020E0822F089582E026 +:1038400090E00C94F62B682F82E090E00C940A2C08 +:1038500083E090E00C94F62B682F83E090E00C94CA +:103860000A2C84E090E00C94F62B682F84E090E022 +:103870000C940A2CFC0131969C01205E3F4F80E0A5 +:10388000919191118F5FE217F307D1F708959C0191 +:10389000FC0132969FEF80E04191461789F09F3FEF +:1038A00019F4411101C0982F8F5F8E31A9F79F3F06 +:1038B00039F0F901E90FF11D97FDFA95628308953A +:1038C00008959C01225E3F4FFC014281461301C0D6 +:1038D0001282019682179307B9F70895262F26952D +:1038E000269526952F3169F0FC01E20FF11D6770D6 +:1038F00021E030E001C0220F6A95EAF78181282B90 +:1039000021830895262F2695269526952F3171F02F +:10391000FC01E20FF11D677021E030E001C0220FD1 +:103920006A95EAF7209581812823218308952091C3 +:103930001F01222329F02091530227FD0C946E1CB5 +:103940000C94471C20911F01222329F0209153023F +:1039500027FD0C94821C0C94611CFC01319680960E +:103960001192E817F907E1F7089508950C94B51C32 +:103970000C94B51CCF930E94B81C0E94BF080E94F3 +:10398000B61CC0E08C2F0E948309892B29F4CF5FDD +:10399000C330C1F780E001C081E0CF9108950C945D +:1039A000B51C0C94CF1C0E94D11C8091590284300C +:1039B00049F110920C0220E488E190E00FB6F894EF +:1039C000A895809360000FBE2093600080E00E9465 +:1039D000F7020E94D11C83B7817F846083BF83B7C5 +:1039E000816083BF7894889583B78E7F83BF0FB63D +:1039F000F894A8958091600088618093600010928F +:103A000060000FBE08950C94B51C0E9489150E9499 +:103A100021100E94F7020C94031D1F920F920FB603 +:103A20000F9211248F939F93AF93BF9380910C02B9 +:103A3000811113C080914F0290915002A0915102C8 +:103A4000B09152024196A11DB11D80934F029093F7 +:103A50005002A0935102B0935202BF91AF919F9137 +:103A60008F910F900FBE0F901F90189582E084BD2C +:103A700093E095BD9AEF97BD80936E0008952FB7A0 +:103A8000F89480914F0290915002A0915102B09110 +:103A900052022FBF0895CF92DF92EF92FF920F93C1 +:103AA0001F932FB7F89440914F02509150026091AC +:103AB0005102709152022FBF6A017B01EE24FF2454 +:103AC0008C0120E030E0C016D106E206F30610F4C7 +:103AD000415051099A01281B390BC9011F910F91BF +:103AE000FF90EF90DF90CF90089578941F920F92FF +:103AF0000FB60F9211248F939F93AF93BF93809132 +:103B00004F0290915002A0915102B0915202019641 +:103B1000A11DB11D80934F0290935002A0935102BA +:103B2000B0935202BF91AF919F918F910F900FBEB2 +:103B30000F901F90189587E797E79093010880935F +:103B400000089AE088E10FB6F894A8958093600089 +:103B50000FBE90936000FFCFAF92BF92CF92DF92E3 +:103B6000EF92FF920F931F93CF93C0E0CC24C394A6 +:103B7000D12CE82EF12C8C2F0E9483095C0100E0EF +:103B800010E0C601002E02C0880F991F0A94E2F7C8 +:103B90008A219B21892B31F40F5F1F4F0A301105B9 +:103BA00081F70AC0602F7C2F80E00E94B305E816E1 +:103BB000F90691F781E004C0CF5FC330E1F680E001 +:103BC000CF911F910F91FF90EF90DF90CF90BF901A +:103BD000AF900895CF93C82F8CE20E94AC1D88232C +:103BE00021F08C2FCF910C94AC1D80E0CF910895E3 +:103BF000CF930E94141C811102C00E94F31BC5E6E2 +:103C0000C15049F00E94BF088FE39CE90197F1F78A +:103C100000C00000F5CF89E20E94EA1D81110FC1AA +:103C20008AE20E94EA1D81110E94F31B85E00E9436 +:103C3000EA1D81110E949B1D0E941F1C80930B0294 +:103C400087E00E94EA1D8823A9F18BE10E94EA1D0A +:103C5000882351F080910B0281FB222720F991E00B +:103C6000922790FB81F90EC08EE00E94EA1D882306 +:103C700061F080910B0282FB222720F991E09227CC +:103C800090FB82F980930B0215C080E10E94EA1D2F +:103C900090910B02882341F093FB222720F981E0C9 +:103CA000822780FB93F904C0892F809580FB90F9CF +:103CB00090930B0280910B020E94231C0E94311CE6 +:103CC00090E0909354028093530280EE0E94EA1D8C +:103CD000882341F080915302982F909590FB80F9B2 +:103CE0008093530289E30E94EA1D882359F0809152 +:103CF000530281FB222720F991E0922790FB81F962 +:103D00008093530282EE0E94EA1D882359F080912D +:103D1000530282FB222720F991E0922790FB82F93F +:103D20008093530286EE0E94EA1D882359F0809109 +:103D3000530283FB222720F991E0922790FB83F91D +:103D40008093530283EE0E94EA1D882359F08091EC +:103D5000530284FB222720F991E0922790FB84F9FB +:103D60008093530285E30E94EA1D882359F08091D5 +:103D7000530285FB222720F991E0922790FB85F9D9 +:103D80008093530281E30E94EA1D882359F08091B9 +:103D9000530286FB222720F991E0922790FB86F9B7 +:103DA0008093530281E10E94EA1D882359F080919B +:103DB000530287FB222720F991E0922790FB87F995 +:103DC00080935302809153020E94351C87E20E9427 +:103DD000EA1DC82F8EE10E94EA1D8111C2608FE1A9 +:103DE0000E94EA1D8111C46080E20E94EA1D8111D7 +:103DF000C86081E20E94EA1D8111C06182E20E94D6 +:103E0000EA1D8111C06283E20E94EA1D8111C06433 +:103E100084E20E94EA1D882311F0C06802C0CC230E +:103E200029F08C2F0E942C1C6C2F03C00E94281C90 +:103E3000682F70E080E090E0CF910C949119CF91C1 +:103E4000089580910F0280FF0BC06091120185E000 +:103E5000689FB001112475956795759567952BC07E +:103E600081FF09C06091120185E0689FB0011124B3 +:103E70007595679520C082FF07C06091120185E0AB +:103E8000689FB001112417C0909110029923D1F0BE +:103E900060911101961788F72091120185E0289F03 +:103EA00090011124929FA001939F500D112470E066 +:103EB000CA010E94CF2B6038710540F4611571056D +:103EC00019F406C065E070E0862F08958FE7089525 +:103ED00081E0089580910F0280FF08C06091100179 +:103EE00070E0759567957595679521C081FF06C04F +:103EF0006091100170E07595679519C082FF04C04C +:103F00006091100170E010C090911002992399F017 +:103F100060910F019617A0F780911001899FC00151 +:103F2000112470E00E94CF2B6038710540F46115B8 +:103F3000710519F406C061E070E0862F08958FE7DF +:103F4000089581E00895803F21F40E94211F81950A +:103F500004C0813F29F40E94211F80931302089519 +:103F6000823F21F40E94211F819504C0833F29F4E0 +:103F70000E94211F809312020895893F19F40E9424 +:103F80006A1F05C08A3F31F40E946A1F81958093A1 +:103F9000140208958B3F21F40E946A1F819504C08A +:103FA0008C3F29F40E946A1F809315020895843F74 +:103FB00021F480911102816017C0853F21F4809126 +:103FC0001102826011C0863F21F480911102846049 +:103FD0000BC0873F21F480911102886005C0883FA3 +:103FE00031F48091110280618093110208958D3F18 +:103FF00021F480910F0281600BC08E3F21F48091EB +:104000000F02826005C08F3F29F480910F02846007 +:1040100080930F020895803F39F48091130287FF47 +:104020006CC01092130269C0813F29F48091130281 +:104030001816BCF362C090911202823F29F497FFD8 +:104040005CC01092120259C0833F19F41916CCF3C8 +:1040500054C0893F41F48091140218160CF04DC0F1 +:10406000109214024AC08A3F29F48091140287FFFB +:1040700044C0F6CF8B3F39F48091150287FF3DC0D5 +:10408000109215023AC08C3F29F48091150218163F +:10409000BCF333C0843F21F4809111028E7F17C09E +:1040A000853F21F4809111028D7F11C0863F21F45C +:1040B000809111028B7F0BC0873F21F48091110208 +:1040C000877F05C0883F31F4809111028F7E8093F5 +:1040D000110213C08D3F21F480910F028E7F0BC01F +:1040E0008E3F21F480910F028D7F05C08F3F29F410 +:1040F00080910F028B7F80930F02809112028111B9 +:104100000EC08091130281110AC0809114028111A6 +:1041100006C080911502811102C01092100208950C +:1041200081E192E00E9438100E943F1D90930E02A0 +:1041300080930D0208951F93CF93DF9380910D021A +:1041400090910E020E944B1DAC0190911002992398 +:1041500021F02091130130E006C0209114018AE083 +:10416000289F900111244217530708F477C08091CB +:104170001202C0911302D091140210911502811104 +:1041800007C0C11167C0D11165C0111163C066C0FD +:104190009F3F19F09F5F90931002181624F40E941D +:1041A000211F809312028091120287FF05C00E9496 +:1041B000211F8195809312021C1624F40E94211F56 +:1041C000809313028091130287FF05C00E94211F74 +:1041D000819580931302309112023323C1F0209114 +:1041E00013022223A1F045EB3403C0011124892FCF +:1041F000911101C081E08093120235EB2303C001CD +:104200001124892F911101C081E0809313021D16A2 +:1042100024F40E946A1F809314028091140287FF85 +:1042200005C00E946A1F819580931402111624F420 +:104230000E946A1F809315028091150287FF05C0B6 +:104240000E946A1F819580931502DF91CF911F9183 +:104250000C9490209F3F09F09DCFAECFDF91CF917E +:104260001F910895E1E1F2E085E0DF011D928A955A +:10427000E9F71092100210920F0208958091360211 +:1042800008950F931F93CF93DF9300D01F92CDB764 +:10429000DEB78C010E94B723823011F0843019F50B +:1042A00083E089831B830A838093E9008FEF9091D9 +:1042B000E800815095FD06C095ED9A95F1F7000054 +:1042C0008111F5CF8091E80085FF0DC040E050E0FE +:1042D00063E070E0CE0101960E94D4238091E80053 +:1042E0008E778093E8000F900F900F90DF91CF9121 +:1042F0001F910F910895CF93DF9300D01F92CDB7F8 +:10430000DEB720915902243031F522E0298380580C +:1043100091099B838A8383E08093E9008FEF9091DA +:10432000E800815095FD06C095ED9A95F1F70000E3 +:104330008111F5CF8091E80085FF0DC040E050E08D +:1043400063E070E0CE0101960E94D4238091E800E2 +:104350008E778093E8000F900F900F90DF91CF91B0 +:104360000895CF93DF93EC010E94B723823011F0C0 +:104370008430F9F482E08093E9008FEF9091E800B7 +:10438000815095FD06C095ED9A95F1F700008111D9 +:10439000F5CF8091E80085FF0CC040E050E065E07B +:1043A00070E0CE010E94D4238091E8008E77809344 +:1043B000E800DF91CF910895CF93DF93EC010E9445 +:1043C000B723823019F0843009F047C080911F0173 +:1043D0008823E1F08091530287FF18C084E0809326 +:1043E000E9008FEF9091E800815095FD06C095E1BE +:1043F0009A95F1F700008111F5CF8091E80085FFD3 +:104400002CC040E050E060E270E017C081E0809393 +:10441000E9008FEF9091E800815095FD06C095ED81 +:104420009A95F1F700008111F5CF8091E80085FFA2 +:1044300014C040E050E068E070E0CE010E94D42358 +:104440008091E8008E778093E80080E2FE01A6E18B +:10445000B2E001900D928A95E1F7DF91CF91089536 +:1044600080915802811109C00E9465250E94C225D1 +:104470008091E20084608093E200089510925802D7 +:104480000895089508950C94051D42E061EC81E0C3 +:104490000E94DE2442E061EC82E00E94DE2442E0E1 +:1044A00061EC83E00E94DE2442E261EC84E00C9443 +:1044B000DE2480915B02833009F455C030F48130F2 +:1044C00071F0823009F48EC008958A3009F47AC000 +:1044D0008B3009F460C0893009F09CC020C0809105 +:1044E0005A02813A09F096C08091E800877F809354 +:1044F000E80080915E0290915F02892B21F460E2D6 +:1045000086E192E003C060E080E090E070E00E940D +:104510001F248091E8008B778093E80008958091B4 +:104520005A02813209F076C080915E0290915F025A +:10453000009719F0039709F06DC08091E800877F1C +:104540008093E8008091E80082FD05C080915902C7 +:104550008111F8CF5FC08091F10080933602809185 +:10456000E8008B7753C080915A02813A09F052C01B +:1045700080915E0290915F02892B09F04BC080917F +:10458000E800877F8093E8008091E80080FFFCCFFF +:1045900080911F0136C080915A028132D9F58091F5 +:1045A0005E0290915F02892BA9F58091E800877FD8 +:1045B0008093E8000E94132580915C0280931F0184 +:1045C0000C94891580915A02813221F58091E8007E +:1045D000877F8093E8000E94132580915D0280937D +:1045E0003702089580915A02813AA1F48091E8003F +:1045F000877F8093E8008091E80080FFFCCF809166 +:1046000037028093F1008091E8008E778093E80074 +:104610000C941325089584B7877F84BF0FB6F89450 +:10462000A89580916000886180936000109260007E +:104630000FBE80E880936100109261000E947010AC +:104640000E9465250E94C2258091E20084608093CB +:10465000E20078940E9457280E94741085E191E04E +:104660000E941C1080915902853069F40E94D31C6D +:10467000809157028823B1F30E94BA1C882391F3DA +:104680000E94BE23EFCF0E9482100E94A70FEACFA4 +:104690000C944A23292F332723303105C9F060F4C5 +:1046A0002130310581F02230310509F047C08DE617 +:1046B00090E022EC33E046C02132310511F1223284 +:1046C000310561F13BC082E190E02FE234E03AC075 +:1046D00099278130910561F040F08230910559F0C1 +:1046E000039761F5ECE9F3E008C0EEEBF3E005C0F9 +:1046F000E0EBF3E002C0E2EAF3E0849190E09F0196 +:1047000021C064307105D0F4660F771FFB01E75CB0 +:10471000FE4F2081318189E090E014C06430710542 +:1047200068F4FB01EE0FFF1FEF5CFE4F208131812B +:10473000FB01E35DFE4F808190E004C080E090E0EB +:1047400020E030E0FA013183208308950895CF936B +:10475000C82F0E94A623C0933802CF91089580915C +:104760005902843011F081E0089582E0089580912B +:104770003802811102C00C94AF23089580E189BDF5 +:1047800082E189BD09B400FEFDCF8091D8008F7D04 +:104790008093D8008091E00082608093E000809157 +:1047A000E00081FDFCCF0895CF92DF92EF92FF925F +:1047B0000F931F93CF93DF93EC018B017A010E943B +:1047C0003225811133C0E114F10439F0F701808101 +:1047D0009181081B190BC80FD91FC12CD12C0115B1 +:1047E000110519F18091E80085FD16C08091E8005F +:1047F0008E778093E800E114F10449F0F70180819D +:104800009181C80ED91ED182C08285E00FC00E945E +:104810003225882321F30AC089918093F100015049 +:104820001109FFEFCF1ADF0ADACF80E0DF91CF91D5 +:104830001F910F91FF90EF90DF90CF9008952091FE +:104840006002309161022617370748F06115710543 +:1048500039F42091E8002E772093E80001C0B901D7 +:10486000FC0120E06115710579F1809159028823DE +:10487000F1F18530F1F18091E80083FD3CC0809139 +:10488000E80082FD2EC08091E80080FFEBCF2091F0 +:10489000F3008091F20090E0922B6115710551F0C8 +:1048A0008830910538F421912093F100615071090D +:1048B0000196F3CF21E0089709F020E08091E8000D +:1048C0008E778093E800CECF2111CFCF0AC08091A0 +:1048D0005902882361F0853061F08091E80083FD02 +:1048E0000AC08091E80082FFF2CF80E0089582E064 +:1048F000089583E0089581E0089520916002309149 +:1049000061022617370748F06115710539F42091C7 +:10491000E8002E772093E80001C0B901FC0120E0F7 +:104920006115710591F180915902882309F440C005 +:10493000853009F43FC08091E80083FD3DC080913F +:10494000E80082FD2FC08091E80080FFE9CF209130 +:10495000F3008091F20090E0922B6115710559F0FF +:104960008830910540F424912093F10031966150F4 +:1049700071090196F2CF21E0089709F020E08091BB +:10498000E8008E778093E800CBCF2111CCCF0AC00E +:1049900080915902882361F0853061F08091E800B0 +:1049A00083FD0AC08091E80082FFF2CF80E0089585 +:1049B00082E0089583E0089581E00895982F97306C +:1049C00068F59093E900981739F07091EC00209108 +:1049D000ED005091F00003C0242F762F50E021FD10 +:1049E00002C09F5FECCF3091EB003E7F3093EB0035 +:1049F0003091ED003D7F3093ED003091EB00316060 +:104A00003093EB007093EC002093ED005093F00096 +:104A10002091EE0027FDE5CF80E008958F70809310 +:104A2000E90081E0089580915A0287FF11C08091CA +:104A3000E80082FD05C0809159028111F8CF11C0B4 +:104A40008091E8008B770BC080915902882349F050 +:104A50008091E80080FFF8CF8091E8008E77809306 +:104A6000E80008952091E4003091E50095E640913A +:104A7000EC00842F817040FF23C08091E80080FD0E +:104A80001DC080915902882399F0853099F080915A +:104A9000EB0085FD11C04091E4005091E500241722 +:104AA000350729F3915011F09A01E1CF84E0089580 +:104AB00082E0089583E0089581E0089580E00895FC +:104AC0004091E80042FFDDCF08950E94D3250E9467 +:104AD000DB25E0EEF0E0808181608083E8EDF0E0AE +:104AE00080818F77808319BCA7EDB0E08C918E7F99 +:104AF0008C9380818F7E80831092580208950F934B +:104B00001F93CF93DF930E94D3250E94DB25C8ED2E +:104B1000D0E088818F7788838881806888838881C6 +:104B20008F7D888319BC1092590210925502109201 +:104B300057021092560200EE10E0F80180818B7F40 +:104B4000808388818160888342E060E080E00E9409 +:104B5000DE24E1EEF0E080818E7F8083E2EEF0E003 +:104B6000808181608083808188608083F80180817A +:104B70008E7F8083888180618883DF91CF911F91B0 +:104B80000F910895E8EDF0E080818F7E8083E7ED5E +:104B9000F0E080818160808384E082BF81E0809347 +:104BA00058020C947F25E8EDF0E080818E7F8083B1 +:104BB0001092E20008951092DA001092E100089538 +:104BC0001F920F920FB60F9211242F933F934F9382 +:104BD0005F936F937F938F939F93AF93BF93EF9365 +:104BE000FF938091E10082FF0BC08091E20082FF81 +:104BF00007C08091E1008B7F8093E1000E945628DE +:104C00008091DA0080FF1FC08091D80080FF1BC018 +:104C10008091DA008E7F8093DA008091D90080FF46 +:104C20000DC080E189BD82E189BD09B400FEFDCFE0 +:104C300081E0809359020E94302205C019BC109275 +:104C400059020E943E228091E10080FF19C08091AC +:104C5000E20080FF15C08091E2008E7F8093E20029 +:104C60008091E20080618093E2008091D8008062B0 +:104C70008093D80019BC85E0809359020E9442229B +:104C80008091E10084FF30C08091E20084FF2CC05D +:104C900080E189BD82E189BD09B400FEFDCF80912C +:104CA000D8008F7D8093D8008091E1008F7E809323 +:104CB000E1008091E2008F7E8093E2008091E2002B +:104CC00081608093E20080915502882311F084E096 +:104CD00007C08091E30087FD02C081E001C083E04E +:104CE000809359020E9443228091E10083FF29C0F2 +:104CF0008091E20083FF25C08091E100877F80934F +:104D0000E10082E080935902109255028091E10007 +:104D10008E7F8093E1008091E2008E7F8093E2009D +:104D20008091E20080618093E20042E060E080E0F8 +:104D30000E94DE248091F00088608093F0000E9441 +:104D40004122FF91EF91BF91AF919F918F917F9100 +:104D50006F915F914F913F912F910F900FBE0F90E8 +:104D60001F9018951F920F920FB60F9211242F9338 +:104D70003F934F935F936F937F938F939F93AF93E3 +:104D8000BF93CF93DF93EF93FF93C091E900CF7070 +:104D90008091EC00D82FD17080FDD0E81092E9000E +:104DA0008091F000877F8093F00078940E94F6262F +:104DB0001092E9008091F00088608093F000CD2B84 +:104DC000CF70C093E900FF91EF91DF91CF91BF9138 +:104DD000AF919F918F917F916F915F914F913F9193 +:104DE0002F910F900FBE0F901F9018951F93CF9388 +:104DF000DF93CDB7DEB7AA970FB6F894DEBF0FBE2C +:104E0000CDBFEAE5F2E08091F100819322E0E23645 +:104E1000F207C9F70E9459228091E80083FF2EC152 +:104E200080915A0290915B02492F50E04A3051051F +:104E300008F024C1FA01E556FF4F0C94E32B8038AB +:104E400021F0823809F01AC108C080915602909171 +:104E50005702992389F082600FC080915E028F70A3 +:104E6000873008F00BC18093E9008091EB0085FB4F +:104E7000882780F91092E9009091E800977F90933D +:104E8000E8008093F1001092F100D1C0282F2D7F0F +:104E900009F0F4C0882319F0823061F0EFC08091EE +:104EA0005C02813009F0EAC0933009F080E0809321 +:104EB00057022EC080915C0281112AC080915E024F +:104EC0008F702FEF280F263008F0D8C08093E900AC +:104ED0002091EB0020FF1CC0933021F48091EB0067 +:104EE000806214C09091EB0090619093EB0021E000 +:104EF00030E0A90102C0440F551F8A95E2F74093A4 +:104F0000EA001092EA008091EB0088608093EB0049 +:104F10001092E9008091E800877F8093E8000E946A +:104F20001325ACC08111AAC010915C021F7780913B +:104F3000E3008078812B8093E3008091E800877FF5 +:104F40008093E8000E9413258091E80080FFFCCF49 +:104F50008091E30080688093E300111102C082E039 +:104F600001C083E08093590289C08058823008F0E4 +:104F700085C080915C0290915D028C3D53E0950765 +:104F800079F583E08A838AE289834FB7F894DE015A +:104F9000139620E03EE051E2E32FF0E050935700FB +:104FA000E49120FF03C0E295EF703F5FEF708E2F1A +:104FB00090E0EA3010F0C79601C0C0968D939D93A3 +:104FC0002F5F243149F74FBF8091E800877F80939E +:104FD000E8006AE270E0CE0101960E941F2416C02C +:104FE00060915E0270915F02AE014F5F5F4F0E9461 +:104FF0004823BC01892B09F441C09091E800977FB8 +:105000009093E80089819A810E947D248091E80034 +:105010008B778093E80032C0803881F58091E8007A +:10502000877F8093E800809155028093F100809102 +:10503000E8008E7772CF811121C080915C0290913F +:105040005D0299270297D4F48091E800877F8093CE +:10505000E80080915C02809355020E9413258091A4 +:105060005502811106C08091E30087FD02C081E0F6 +:1050700001C084E0809359020E9445228091E8009B +:1050800083FF0AC08091E800877F8093E8008091C9 +:10509000EB0080628093EB00AA960FB6F894DEBF17 +:1050A0000FBECDBFDF91CF911F9108950895CF938B +:1050B000809159028823A1F0C091E900CF709091AE +:1050C000EC00892F817090FD80E8C82B1092E900D8 +:1050D0008091E80083FD0E94F626CF70C093E9001E +:1050E000CF9108955058BB27AA270E948A280C9474 +:1050F000352A0E94272A38F00E942E2A20F039F4FF +:105100009F3F19F426F40C94FD290EF4E095E7FB7B +:105110000C94F729E92F0E94462A58F3BA17620720 +:1051200073078407950720F079F4A6F50C94682A94 +:105130000EF4E0950B2EBA2FA02D0B01B9019001B2 +:105140000C01CA01A0011124FF27591B99F0593FF6 +:1051500050F4503E68F11A16F040A22F232F342F3E +:105160004427585FF3CF469537952795A795F0408C +:105170005395C9F77EF41F16BA0B620B730B840BA1 +:10518000BAF09150A1F0FF0FBB1F661F771F881F59 +:10519000C2F70EC0BA0F621F731F841F48F48795B1 +:1051A00077956795B795F7959E3F08F0B0CF9395A3 +:1051B000880F08F09927EE0F9795879508950E941C +:1051C000F3280C94352A0E942E2A58F00E94272A90 +:1051D00040F029F45F3F29F00C94F72951110C9409 +:1051E000692A0C94FD290E94462A68F39923B1F399 +:1051F000552391F3951B550BBB27AA2762177307FD +:10520000840738F09F5F5F4F220F331F441FAA1F90 +:10521000A9F335D00E2E3AF0E0E832D0915050404C +:10522000E695001CCAF72BD0FE2F29D0660F771FFA +:10523000881FBB1F261737074807AB07B0E809F0E0 +:10524000BB0B802DBF01FF2793585F4F3AF09E3F65 +:10525000510578F00C94F7290C94692A5F3FE4F328 +:10526000983ED4F3869577956795B795F7959F5FA8 +:10527000C9F7880F911D9695879597F90895E1E0F4 +:10528000660F771F881FBB1F621773078407BA0753 +:1052900020F0621B730B840BBA0BEE1F88F7E095AE +:1052A000089529F416F00C94F7290C94682A0C94AC +:1052B000FD290E944E2AA8F39638A0F707F80F920E +:1052C000E8942BE33AEA48EB5FE70E94FB2A0F924F +:1052D0000F920F924DB75EB70F920E94B12AEAE487 +:1052E000F1E00E94002A4F915F91EF91FF91E595C7 +:1052F000EE1FFF1F49F0FE57E0684427EE0F441FE2 +:10530000FA95E1F74195550B0E947B2A0F9007FE15 +:105310000C946F2A08950E944E2A88F09F5798F0A7 +:10532000B92F9927B751B0F0E1F0660F771F881FAA +:10533000991F1AF0BA95C9F714C0B13091F00E94C4 +:10534000682AB1E008950C94682A672F782F88277F +:10535000B85F39F0B93FCCF3869577956795B395EB +:10536000D9F73EF490958095709561957F4F8F4F5A +:105370009F4F0895E89409C097FB3EF4909580955F +:10538000709561957F4F8F4F9F4F9923A9F0F92F0B +:1053900096E9BB279395F695879577956795B79589 +:1053A000F111F8CFFAF4BB0F11F460FF1BC06F5F6F +:1053B0007F4F8F4F9F4F16C0882311F096E911C081 +:1053C000772321F09EE8872F762F05C0662371F0A2 +:1053D00096E8862F70E060E02AF09A95660F771FB6 +:1053E000881FDAF7880F9695879597F9089597F9AA +:1053F0009F6780E870E060E008959FEF80EC08957B +:10540000DF93CF931F930F93FF92EF92DF927B0175 +:105410008C01689406C0DA2EEF010E94F82AFE0182 +:10542000E894A5912591359145915591A6F3EF0109 +:105430000E948A28FE019701A801DA9469F7DF909B +:10544000EF90FF900F911F91CF91DF91089500246D +:105450000A941616170618060906089500240A94D9 +:1054600012161306140605060895092E0394000C5F +:1054700011F4882352F0BB0F40F4BF2B11F460FFEE +:1054800004C06F5F7F4F8F4F9F4F089557FD905817 +:10549000440F551F59F05F3F71F04795880F97FBF8 +:1054A000991F61F09F3F79F08795089512161306B2 +:1054B0001406551FF2CF4695F1DF08C016161706E1 +:1054C0001806991FF1CF8695710561050894089516 +:1054D000E894BB2766277727CB0197F908959B01AE +:1054E000AC0160E070E080E89FE30C94DF280C944E +:1054F000F7290C945A2B0E944E2AD8F39923C9F30A +:10550000940F511DA3F39150504094F059F088230B +:1055100032F0660F771F881F91505040C1F79E3FB1 +:1055200051052CF7880F911D9695879597F9089549 +:105530005F3FACF0983E9CF0BB27869577956795CA +:10554000B79508F4B1609395C1F7BB0F58F711F404 +:1055500060FFE8CF6F5F7F4F8F4F9F4FE3CF0C947B +:10556000692AFA01DC01AA0FBB1F9B01AC01BF57DE +:1055700028F4222733274427507820C0B75190F4CD +:10558000AB2F0024469537952795011CA395D2F3A0 +:10559000002071F0220F331F441FB395DAF30ED0B1 +:1055A0000C94722861307105A0E88A07B94630F47E +:1055B0009B01AC016627772788279078309621F0E9 +:1055C000208331834283538308950E94F82A0C94E8 +:1055D000352A0E94272A38F00E942E2A20F095238F +:1055E00011F00C94F7290C94FD2911240C94692ACC +:1055F0000E94462A70F3959FC1F3950F50E0551F06 +:10560000629FF001729FBB27F00DB11D639FAA2717 +:10561000F00DB11DAA1F649F6627B00DA11D661F66 +:10562000829F2227B00DA11D621F739FB00DA11D87 +:10563000621F839FA00D611D221F749F3327A00D41 +:10564000611D231F849F600D211D822F762F6A2FDD +:1056500011249F5750409AF0F1F088234AF0EE0F42 +:10566000FF1FBB1F661F771F881F91505040A9F76F +:105670009E3F510580F00C94F7290C94692A5F3FF6 +:10568000E4F3983ED4F3869577956795B795F795AB +:10569000E7959F5FC1F7FE2B880F911D9695879523 +:1056A00097F908959F930E946A2B0F9007FCEE5F75 +:1056B0000C94932B9F3F31F0915020F48795779570 +:1056C0006795B795880F911D9695879597F90895D9 +:1056D0000C94FD290E944E2AD8F3E894E0E0BB2701 +:1056E0009F57F0F02AED3FE049EC06C0EE0FBB0FEC +:1056F000661F771F881F28F0B23A62077307840776 +:1057000028F0B25A620B730B840BE3959A9572F7EB +:10571000803830F49A95BB0F661F771F881FD2F729 +:1057200090480C945C2BEF93E0FF07C0A2EA2AEDAF +:105730003FE049EC5FEB0E948A280E94352A0F90D7 +:10574000039401FC9058E2E7F1E00C94A72B9F939F +:105750008F937F936F93FF93EF939B01AC010E9414 +:10576000E52AEF91FF910E94002A2F913F914F91DE +:105770005F910C94E52AAA1BBB1B51E107C0AA1F2D +:10578000BB1FA617B70710F0A61BB70B881F991FE2 +:105790005A95A9F780959095BC01CD01089597FB86 +:1057A000072E16F4009407D077FD09D00E94BB2B7A +:1057B00007FC05D03EF4909581959F4F0895709514 +:1057C00061957F4F0895EE0FFF1F0590F491E02D36 +:1057D0000994FC014150504030F001900616D1F779 +:1057E0003197CF010895882799270895F999FECF19 +:1057F00092BD81BDF89A992780B50895A6E1B0E0E1 +:1058000044E050E00C94302CA8E1B0E042E050E0DD +:105810000C94302C262FF999FECF92BD81BDF89AB9 +:10582000019700B4021639F01FBA20BD0FB6F894E4 +:10583000FA9AF99A0FBE08950396272F0E940B2C0F +:105840000E940A2C252F0E940B2C242F0C940B2C29 +:105850000196272F0E940B2C0C940A2CDC01CB0103 +:10586000FC01F999FECF06C0F2BDE1BDF89A319670 +:1058700000B40D9241505040B8F70895F894FFCF0E +:10588000010201191A1B1C1D1E1F202122E80128DC +:1058900008140A321E3E21DC21B1217B2141210165 +:1058A00097C66636323331F7F6F5943435404D36C7 +:1058B00039FD04B0047A044104D403ED0306041F47 +:0258C0000400E2 +:00000001FF diff --git a/keyboards/alpha/keymaps/vderm/keymap.c b/keyboards/alpha/keymaps/vderm/keymap.c new file mode 100644 index 000000000000..5fc642319b8c --- /dev/null +++ b/keyboards/alpha/keymaps/vderm/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + +#define HOME 0 +#define FN 1 +#define FNCHAR 2 +#define FKEYS 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [HOME] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, + MT(MOD_LCTL, KC_Z), MT(MOD_LALT, KC_X), LT(1, KC_C), LT(2, KC_V), MT(MOD_LSFT, KC_SPC), MT(MOD_RGUI,KC_B), MT(MOD_RALT, KC_N), MT(MOD_RCTL, KC_M)), + + [FN] = LAYOUT( + KC_ESC, KC__MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_NO, + KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BSPC, + KC_LCTL, KC_LALT, KC_TRNS, MO(3), MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL), + + [FNCHAR] = LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_GRV,KC_NO,KC_MINS,KC_EQL,KC_BSLS,KC_LBRC,KC_RBRC,KC_SCLN,KC_QUOT,KC_BSPC, + KC_LCTL, KC_LALT, MO(3), KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_COMM, KC_DOT, KC_SLSH), + + [FKEYS] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11,KC_F12,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_DEL, + KC_LCTL, KC_LALT, KC_TRNS, KC_TRNS, MT(MOD_LSFT, KC_SPC), KC_RGUI, KC_RALT, KC_RCTL), +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} From 9eb7b7919f2a77493961af73a7f01609db326fba Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 7 Jan 2019 23:16:50 -0800 Subject: [PATCH 088/458] Keyboard: Downbubble refactor and Configurator fix (#4798) * Downbubble: Configurator fix Fix the visual key alignment and some typos. * Downbubble: refactor Rename layout macros: - LAYOUT_downbubble_standard to LAYOUT_standard - LAYOUT_downbubble_splitbackspace to LAYOUT_split_bs - LAYOUT_downbubble_splitrightshift to LAYOUT_split_rshift - LAYOUT_downbubble_splitnumpad to LAYOUT_split_numpad - LAYOUT_downbubble_spliteverything to LAYOUT_all --- keyboards/handwired/downbubble/downbubble.h | 10 +- keyboards/handwired/downbubble/info.json | 1095 +++++++++-------- .../downbubble/keymaps/default/keymap.c | 10 +- 3 files changed, 560 insertions(+), 555 deletions(-) diff --git a/keyboards/handwired/downbubble/downbubble.h b/keyboards/handwired/downbubble/downbubble.h index a25a9a5db56e..0df39dd9ee05 100644 --- a/keyboards/handwired/downbubble/downbubble.h +++ b/keyboards/handwired/downbubble/downbubble.h @@ -25,7 +25,7 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_downbubble_standard( \ +#define LAYOUT_standard( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -42,7 +42,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_splitbackspace( \ +#define LAYOUT_split_bs( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -59,7 +59,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_splitrightshift( \ +#define LAYOUT_split_rshift( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -76,7 +76,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, KC_NO, K58, KC_NO, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_splitnumpad( \ +#define LAYOUT_split_numpad( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ @@ -93,7 +93,7 @@ { K50, K51, K52, K53, K54, KC_NO, K56, K57, K58, K59, K510, KC_NO, K512, K513, K514, KC_NO, K516, K517, K518, K519 }, \ } -#define LAYOUT_downbubble_spliteverything( \ +#define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019,\ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, K113, K114, K115, K116, K117, K118, K119,\ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, K213, K214, K215, K216, K217, K218, K219,\ diff --git a/keyboards/handwired/downbubble/info.json b/keyboards/handwired/downbubble/info.json index cd64c0e36958..c5cd97de5483 100644 --- a/keyboards/handwired/downbubble/info.json +++ b/keyboards/handwired/downbubble/info.json @@ -5,550 +5,555 @@ "width": 22.75, "height": 6, "layouts": { - "LAYOUT_downbubble_standard": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5, "w":2}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K29", "x":10.75, "y":2.5, "h":2}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":2.75}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5, "w":2}, - {"label":"K58", "x":9.75, "y":5.5}, - {"label":"K49", "x":10.75, "y":4.5, "h":2}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubbled_splitbackspace": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5}, - {"label":"K117", "x":19.75, "y":1}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K29", "x":10.75, "y":2.5, "h":2}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":2.75}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5, "w":2}, - {"label":"K58", "x":9.75, "y":5.5}, - {"label":"K49", "x":10.75, "y":4.5, "h":2}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubble_splitrightshift": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5, "w":2}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K29", "x":10.75, "y":2.5, "h":2}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":1.75}, - {"label":"K417", "x":19.75, "y":4}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5, "w":2}, - {"label":"K58", "x":9.75, "y":5.5}, - {"label":"K49", "x":10.75, "y":4.5, "h":2}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubble_splitnumpad": { - "layout": [ - {"label":"K00", "x":0, "y":0.5}, - {"label":"K01", "x":1, "y":0.5}, - {"label":"K02", "x":2, "y":0.5}, - {"label":"K03", "x":3, "y":0.5}, - {"label":"K04", "x":4, "y":0.5}, - {"label":"K05", "x":5, "y":0.5}, - {"label":"K06", "x":6, "y":0.5}, - {"label":"K010", "x":12.75, "y":0.5}, - {"label":"K011", "x":13.75, "y":0.5}, - {"label":"K012", "x":14.75, "y":0.5}, - {"label":"K013", "x":15.75, "y":0.5}, - {"label":"K014", "x":16.75, "y":0.5}, - {"label":"K015", "x":17.75, "y":0.5}, - {"label":"K016", "x":18.75, "y":0.5}, - {"label":"K017", "x":19.75, "y":0.5}, - {"label":"K018", "x":20.75, "y":0.5}, - {"label":"K019", "x":21.75, "y":0.5}, - {"label":"K10", "x":0, "y":1.5}, - {"label":"K11", "x":1, "y":1.5}, - {"label":"K12", "x":2, "y":1.5}, - {"label":"K13", "x":3, "y":1.5}, - {"label":"K14", "x":4, "y":1.5}, - {"label":"K15", "x":5, "y":1.5}, - {"label":"K16", "x":6, "y":1.5}, - {"label":"K17", "x":8.75, "y":1.5}, - {"label":"K18", "x":9.75, "y":1.5}, - {"label":"K19", "x":10.75, "y":1.5}, - {"label":"K110", "x":12.75, "y":1.5}, - {"label":"K111", "x":13.75, "y":1.5}, - {"label":"K112", "x":14.75, "y":1.5}, - {"label":"K113", "x":15.75, "y":1.5}, - {"label":"K114", "x":16.75, "y":1.5}, - {"label":"K115", "x":17.75, "y":1.5}, - {"label":"K116", "x":18.75, "y":1.5, "w":2}, - {"label":"K118", "x":20.75, "y":1.5}, - {"label":"K119", "x":21.75, "y":1.5}, - {"label":"K20", "x":0, "y":2.5, "w":1.5}, - {"label":"K21", "x":1.5, "y":2.5}, - {"label":"K22", "x":2.5, "y":2.5}, - {"label":"K23", "x":3.5, "y":2.5}, - {"label":"K24", "x":4.5, "y":2.5}, - {"label":"K25", "x":5.5, "y":2.5}, - {"label":"K26", "x":7.75, "y":2.5}, - {"label":"K17", "x":8.75, "y":2.5}, - {"label":"K28", "x":9.75, "y":2.5}, - {"label":"K29", "x":10.75, "y":2}, - {"label":"K210", "x":12.25, "y":2.5}, - {"label":"K211", "x":13.25, "y":2.5}, - {"label":"K212", "x":14.25, "y":2.5}, - {"label":"K213", "x":15.25, "y":2.5}, - {"label":"K214", "x":16.25, "y":2.5}, - {"label":"K215", "x":17.25, "y":2.5}, - {"label":"K216", "x":18.25, "y":2.5}, - {"label":"K217", "x":19.25, "y":2.5, "w":1.5}, - {"label":"K218", "x":20.75, "y":2.5}, - {"label":"K219", "x":21.75, "y":2.5}, - {"label":"K30", "x":0, "y":3.5, "w":1.75}, - {"label":"K31", "x":1.75, "y":3.5}, - {"label":"K32", "x":2.75, "y":3.5}, - {"label":"K33", "x":3.75, "y":3.5}, - {"label":"K34", "x":4.75, "y":3.5}, - {"label":"K35", "x":5.75, "y":3.5}, - {"label":"K36", "x":7.75, "y":3.5}, - {"label":"K37", "x":8.75, "y":3.5}, - {"label":"K38", "x":9.75, "y":3.5}, - {"label":"K39", "x":10.75, "y":3}, - {"label":"K310", "x":12.5, "y":3.5}, - {"label":"K311", "x":13.5, "y":3.5}, - {"label":"K312", "x":14.5, "y":3.5}, - {"label":"K313", "x":15.5, "y":3.5}, - {"label":"K314", "x":16.5, "y":3.5}, - {"label":"K315", "x":17.5, "y":3.5}, - {"label":"K317", "x":18.5, "y":3.5, "w":2.25}, - {"label":"K40", "x":0, "y":4.5, "w":2.25}, - {"label":"K41", "x":2.25, "y":4.5}, - {"label":"K42", "x":3.25, "y":4.5}, - {"label":"K43", "x":4.25, "y":4.5}, - {"label":"K44", "x":5.25, "y":4.5}, - {"label":"K45", "x":6.25, "y":4.5}, - {"label":"K46", "x":7.75, "y":4.5}, - {"label":"K47", "x":8.75, "y":4.5}, - {"label":"K48", "x":9.75, "y":4.5}, - {"label":"K49", "x":10.75, "y":4}, - {"label":"K410", "x":13, "y":4.5}, - {"label":"K411", "x":14, "y":4.5}, - {"label":"K412", "x":15, "y":4.5}, - {"label":"K413", "x":16, "y":4.5}, - {"label":"K414", "x":17, "y":4.5}, - {"label":"K416", "x":18, "y":4.5, "w":2.75}, - {"label":"K418", "x":20.75, "y":4.5}, - {"label":"K50", "x":0, "y":5.5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5.5, "w":1.25}, - {"label":"K54", "x":5, "y":5.5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5.5}, - {"Label":"K57", "x":8.75, "y":5}, - {"label":"K58", "x":9.75, "y":5}, - {"label":"K59", "x":10.75, "y":5}, - {"label":"K510", "x":13, "y":5.5, "w":2}, - {"label":"K512", "x":15, "y":5.5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5.5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5.5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5.5}, - {"label":"K517", "x":19.75, "y":5.5}, - {"label":"K518", "x":20.75, "y":5.5}, - {"label":"K519", "x":21.75, "y":5.5}] - }, - "LAYOUT_downbubble_spliteverything": { - "layout": [ - {"label":"K00", "x":0, "y":0}, - {"label":"K01", "x":1, "y":0}, - {"label":"K02", "x":2, "y":0}, - {"label":"K03", "x":3, "y":0}, - {"label":"K04", "x":4, "y":0}, - {"label":"K05", "x":5, "y":0}, - {"label":"K06", "x":6, "y":0}, - {"label":"K010", "x":12.75, "y":0}, - {"label":"K011", "x":13.75, "y":0}, - {"label":"K012", "x":14.75, "y":0}, - {"label":"K013", "x":15.75, "y":0}, - {"label":"K014", "x":16.75, "y":0}, - {"label":"K015", "x":17.75, "y":0}, - {"label":"K016", "x":18.75, "y":0}, - {"label":"K017", "x":19.75, "y":0}, - {"label":"K018", "x":20.75, "y":0}, - {"label":"K019", "X":21.75, "y":0}, - {"label":"K10", "x":0, "y":1}, - {"label":"K11", "x":1, "y":1}, - {"label":"K12", "x":2, "y":1}, - {"label":"K13", "x":3, "y":1}, - {"label":"K14", "x":4, "y":1}, - {"label":"K15", "x":5, "y":1}, - {"label":"K16", "x":6, "y":1}, - {"label":"K17", "x":8.75, "y":1}, - {"label":"K18", "x":9.75, "y":1}, - {"label":"K19", "x":10.75, "y":1}, - {"label":"K110", "x":12.75, "y":1}, - {"label":"K111", "x":13.75, "y":1}, - {"label":"K112", "x":14.75, "y":1}, - {"label":"K113", "x":15.75, "y":1}, - {"label":"K114", "x":16.75, "y":1}, - {"label":"K115", "x":17.75, "y":1}, - {"label":"K116", "x":18.75, "y":1}, - {"label":"K117", "x":19.75, "y":1}, - {"label":"K118", "x":20.75, "y":1}, - {"label":"K119", "x":21.75, "y":1}, - {"label":"K20", "x":0, "y":2, "w":1.5}, - {"label":"K21", "x":1.5, "y":2}, - {"label":"K22", "x":2.5, "y":2}, - {"label":"K23", "x":3.5, "y":2}, - {"label":"K24", "x":4.5, "y":2}, - {"label":"K25", "x":5.5, "y":2}, - {"label":"K26", "x":7.75, "y":2}, - {"label":"K27", "x":8.75, "y":2}, - {"label":"K28", "x":9.75, "y":2}, - {"label":"K29", "x":10.75, "y":2}, - {"label":"K210", "x":12.25, "y":2}, - {"label":"K211", "x":13.25, "y":2}, - {"label":"K212", "x":14.25, "y":2}, - {"label":"K213", "x":15.25, "y":2}, - {"label":"K214", "x":16.25, "y":2}, - {"label":"K215", "x":17.25, "y":2}, - {"label":"K216", "x":18.25, "y":2}, - {"label":"K217", "x":19.25, "y":2, "w":1.5}, - {"label":"K218", "x":20.75, "y":2}, - {"label":"K219", "x":21.75, "y":2}, - {"label":"K30", "x":0, "y":3, "w":1.75}, - {"label":"K31", "x":1.75, "y":3}, - {"label":"K32", "x":2.75, "y":3}, - {"label":"K33", "x":3.75, "y":3}, - {"label":"K34", "x":4.75, "y":3}, - {"label":"K35", "x":5.75, "y":3}, - {"label":"K36", "x":7.75, "y":3}, - {"label":"K37", "x":8.75, "y":3}, - {"label":"K38", "x":9.75, "y":3}, - {"label":"K39", "x":10.75, "y":3}, - {"label":"K310", "x":12.5, "y":3}, - {"label":"K311", "x":13.5, "y":3}, - {"label":"K312", "x":14.5, "y":3}, - {"label":"K313", "x":15.5, "y":3}, - {"label":"K314", "x":16.5, "y":3}, - {"label":"K315", "x":17.5, "y":3}, - {"label":"K317", "x":18.5, "y":3, "w":2.25}, - {"label":"K40", "x":0, "y":4, "w":2.25}, - {"label":"K41", "x":2.25, "y":4}, - {"label":"K42", "x":3.25, "y":4}, - {"label":"K43", "x":4.25, "y":4}, - {"label":"K44", "x":5.25, "y":4}, - {"label":"K45", "x":6.25, "y":4}, - {"label":"K46", "x":7.75, "y":4}, - {"label":"K47", "x":8.75, "y":4}, - {"label":"K48", "x":9.75, "y":4}, - {"label":"K49", "x":10.75, "y":4}, - {"label":"K410", "x":13, "y":4}, - {"label":"K411", "x":14, "y":4}, - {"label":"K412", "x":15, "y":4}, - {"label":"K413", "x":16, "y":4}, - {"label":"K414", "x":17, "y":4}, - {"label":"K416", "x":18, "y":4, "w":1.75}, - {"label":"K417", "x":19.75, "y":4}, - {"label":"K418", "x":20.75, "y":4}, - {"label":"K50", "x":0, "y":5, "w":1.25}, - {"label":"K51", "x":1.25, "y":5, "w":1.25}, - {"label":"K52", "x":2.5, "y":5, "w":1.25}, - {"label":"K53", "x":3.75, "y":5, "w":1.25}, - {"label":"K54", "x":5, "y":5, "w":2.25}, - {"label":"K56", "x":7.75, "y":5}, - {"label":"K57", "x":8.75, "y":5}, - {"label":"K58", "x":9.75, "y":5}, - {"label":"K59", "x":10.75, "y":5}, - {"label":"K510", "x":13, "y":5, "w":2}, - {"label":"K512", "x":15, "y":5, "w":1.25}, - {"label":"K513", "x":16.25, "y":5, "w":1.25}, - {"label":"K514", "x":17.5, "y":5, "w":1.25}, - {"label":"K516", "x":18.75, "y":5}, - {"label":"K517", "x":19.75, "y":5}, - {"label":"K518", "x":20.75, "y":5}, - {"label":"K519", "x":21.75, "y":5}] + "LAYOUT_standard": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1, "w":2}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K29", "x":10.75, "y":2, "h":2}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":2.75}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5, "w":2}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K49", "x":10.75, "y":4, "h":2}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K29", "x":10.75, "y":2, "h":2}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":2.75}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5, "w":2}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K49", "x":10.75, "y":4, "h":2}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_split_rshift": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1, "w":2}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K29", "x":10.75, "y":2, "h":2}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5, "w":2}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K49", "x":10.75, "y":4, "h":2}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_split_numpad": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1, "w":2}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K17", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":2.75}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5}, + {"Label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] + }, + "LAYOUT_all": { + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K010", "x":12.75, "y":0}, + {"label":"K011", "x":13.75, "y":0}, + {"label":"K012", "x":14.75, "y":0}, + {"label":"K013", "x":15.75, "y":0}, + {"label":"K014", "x":16.75, "y":0}, + {"label":"K015", "x":17.75, "y":0}, + {"label":"K016", "x":18.75, "y":0}, + {"label":"K017", "x":19.75, "y":0}, + {"label":"K018", "x":20.75, "y":0}, + {"label":"K019", "x":21.75, "y":0}, + {"label":"K10", "x":0, "y":1}, + {"label":"K11", "x":1, "y":1}, + {"label":"K12", "x":2, "y":1}, + {"label":"K13", "x":3, "y":1}, + {"label":"K14", "x":4, "y":1}, + {"label":"K15", "x":5, "y":1}, + {"label":"K16", "x":6, "y":1}, + {"label":"K17", "x":8.75, "y":1}, + {"label":"K18", "x":9.75, "y":1}, + {"label":"K19", "x":10.75, "y":1}, + {"label":"K110", "x":12.75, "y":1}, + {"label":"K111", "x":13.75, "y":1}, + {"label":"K112", "x":14.75, "y":1}, + {"label":"K113", "x":15.75, "y":1}, + {"label":"K114", "x":16.75, "y":1}, + {"label":"K115", "x":17.75, "y":1}, + {"label":"K116", "x":18.75, "y":1}, + {"label":"K117", "x":19.75, "y":1}, + {"label":"K118", "x":20.75, "y":1}, + {"label":"K119", "x":21.75, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.5}, + {"label":"K21", "x":1.5, "y":2}, + {"label":"K22", "x":2.5, "y":2}, + {"label":"K23", "x":3.5, "y":2}, + {"label":"K24", "x":4.5, "y":2}, + {"label":"K25", "x":5.5, "y":2}, + {"label":"K26", "x":7.75, "y":2}, + {"label":"K27", "x":8.75, "y":2}, + {"label":"K28", "x":9.75, "y":2}, + {"label":"K29", "x":10.75, "y":2}, + {"label":"K210", "x":12.25, "y":2}, + {"label":"K211", "x":13.25, "y":2}, + {"label":"K212", "x":14.25, "y":2}, + {"label":"K213", "x":15.25, "y":2}, + {"label":"K214", "x":16.25, "y":2}, + {"label":"K215", "x":17.25, "y":2}, + {"label":"K216", "x":18.25, "y":2}, + {"label":"K217", "x":19.25, "y":2, "w":1.5}, + {"label":"K218", "x":20.75, "y":2}, + {"label":"K219", "x":21.75, "y":2}, + {"label":"K30", "x":0, "y":3, "w":1.75}, + {"label":"K31", "x":1.75, "y":3}, + {"label":"K32", "x":2.75, "y":3}, + {"label":"K33", "x":3.75, "y":3}, + {"label":"K34", "x":4.75, "y":3}, + {"label":"K35", "x":5.75, "y":3}, + {"label":"K36", "x":7.75, "y":3}, + {"label":"K37", "x":8.75, "y":3}, + {"label":"K38", "x":9.75, "y":3}, + {"label":"K39", "x":10.75, "y":3}, + {"label":"K310", "x":12.5, "y":3}, + {"label":"K311", "x":13.5, "y":3}, + {"label":"K312", "x":14.5, "y":3}, + {"label":"K313", "x":15.5, "y":3}, + {"label":"K314", "x":16.5, "y":3}, + {"label":"K315", "x":17.5, "y":3}, + {"label":"K317", "x":18.5, "y":3, "w":2.25}, + {"label":"K40", "x":0, "y":4, "w":2.25}, + {"label":"K41", "x":2.25, "y":4}, + {"label":"K42", "x":3.25, "y":4}, + {"label":"K43", "x":4.25, "y":4}, + {"label":"K44", "x":5.25, "y":4}, + {"label":"K45", "x":6.25, "y":4}, + {"label":"K46", "x":7.75, "y":4}, + {"label":"K47", "x":8.75, "y":4}, + {"label":"K48", "x":9.75, "y":4}, + {"label":"K49", "x":10.75, "y":4}, + {"label":"K410", "x":13, "y":4}, + {"label":"K411", "x":14, "y":4}, + {"label":"K412", "x":15, "y":4}, + {"label":"K413", "x":16, "y":4}, + {"label":"K414", "x":17, "y":4}, + {"label":"K416", "x":18, "y":4, "w":1.75}, + {"label":"K417", "x":19.75, "y":4}, + {"label":"K418", "x":20.75, "y":4}, + {"label":"K50", "x":0, "y":5, "w":1.25}, + {"label":"K51", "x":1.25, "y":5, "w":1.25}, + {"label":"K52", "x":2.5, "y":5, "w":1.25}, + {"label":"K53", "x":3.75, "y":5, "w":1.25}, + {"label":"K54", "x":5, "y":5, "w":2.25}, + {"label":"K56", "x":7.75, "y":5}, + {"label":"K57", "x":8.75, "y":5}, + {"label":"K58", "x":9.75, "y":5}, + {"label":"K59", "x":10.75, "y":5}, + {"label":"K510", "x":13, "y":5, "w":2}, + {"label":"K512", "x":15, "y":5, "w":1.25}, + {"label":"K513", "x":16.25, "y":5, "w":1.25}, + {"label":"K514", "x":17.5, "y":5, "w":1.25}, + {"label":"K516", "x":18.75, "y":5}, + {"label":"K517", "x":19.75, "y":5}, + {"label":"K518", "x":20.75, "y":5}, + {"label":"K519", "x":21.75, "y":5} + ] } - } + } } diff --git a/keyboards/handwired/downbubble/keymaps/default/keymap.c b/keyboards/handwired/downbubble/keymaps/default/keymap.c index d35d36739461..48303900fb81 100644 --- a/keyboards/handwired/downbubble/keymaps/default/keymap.c +++ b/keyboards/handwired/downbubble/keymaps/default/keymap.c @@ -22,7 +22,7 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_downbubble_standard(\ + [0] = LAYOUT_standard(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -31,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_splitbackspace(\ + LAYOUT_split_bs(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_splitrightshift(\ + LAYOUT_split_rshift(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_PDOT, KC_PENT, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_splitnumpad(\ + LAYOUT_split_numpad(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC, KC_SPC, KC_P0, KC_TRNS, KC_PDOT, KC_TRNS, KC_BSPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ), - LAYOUT_downbubble_spliteverything(\ + LAYOUT_all(\ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NLCK, KC_HOME, KC_TRNS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_PSLS, KC_PAST, KC_PMNS, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_END, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_PGDN, From 64c957d907fc7476eca3c26c977ca55cf8a56b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 9 Jan 2019 00:08:17 +0100 Subject: [PATCH 089/458] Add missing parentheses to some important macros (#4775) * Add missing parentheses to quantum_keycodes macros * Add missing parentheses to progmem macros --- quantum/quantum_keycodes.h | 21 ++++++++++----------- tmk_core/common/progmem.h | 6 +++--- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index ccf5371f0ee4..583ba8264663 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -489,9 +489,8 @@ enum quantum_keycodes { #define SWIN(kc) SGUI(kc) #define LCA(kc) (QK_LCTL | QK_LALT | (kc)) -#define MOD_HYPR 0xf -#define MOD_MEH 0x7 - +#define MOD_HYPR 0xF +#define MOD_MEH 0x7 // Aliases for shifted symbols // Each key has a 4-letter code, and some have longer aliases too. @@ -601,7 +600,7 @@ enum quantum_keycodes { #define RGB_M_T RGB_MODE_RGBTEST // L-ayer, T-ap - 256 keycode max, 16 layer max -#define LT(layer, kc) (QK_LAYER_TAP | ((layer & 0xF) << 8) | ((kc) & 0xFF)) +#define LT(layer, kc) (QK_LAYER_TAP | (((layer) & 0xF) << 8) | ((kc) & 0xFF)) #define AG_SWAP MAGIC_SWAP_ALT_GUI #define AG_NORM MAGIC_UNSWAP_ALT_GUI @@ -615,28 +614,28 @@ enum quantum_keycodes { // In fact, we changed it to assume ON_PRESS for sanity/simplicity. If needed, you can add your own // keycode modeled after the old version, kept below for this. /* #define TO(layer, when) (QK_TO | (when << 0x4) | (layer & 0xFF)) */ -#define TO(layer) (QK_TO | (ON_PRESS << 0x4) | (layer & 0xFF)) +#define TO(layer) (QK_TO | (ON_PRESS << 0x4) | ((layer) & 0xFF)) // Momentary switch layer - 256 layer max -#define MO(layer) (QK_MOMENTARY | (layer & 0xFF)) +#define MO(layer) (QK_MOMENTARY | ((layer) & 0xFF)) // Set default layer - 256 layer max -#define DF(layer) (QK_DEF_LAYER | (layer & 0xFF)) +#define DF(layer) (QK_DEF_LAYER | ((layer) & 0xFF)) // Toggle to layer - 256 layer max -#define TG(layer) (QK_TOGGLE_LAYER | (layer & 0xFF)) +#define TG(layer) (QK_TOGGLE_LAYER | ((layer) & 0xFF)) // One-shot layer - 256 layer max -#define OSL(layer) (QK_ONE_SHOT_LAYER | (layer & 0xFF)) +#define OSL(layer) (QK_ONE_SHOT_LAYER | ((layer) & 0xFF)) // L-ayer M-od: Momentary switch layer with modifiers active - 16 layer max, left mods only -#define LM(layer, mod) (QK_LAYER_MOD | ((layer & 0xF) << 4) | ((mod) & 0xF)) +#define LM(layer, mod) (QK_LAYER_MOD | (((layer) & 0xF) << 4) | ((mod) & 0xF)) // One-shot mod #define OSM(mod) (QK_ONE_SHOT_MOD | ((mod) & 0xFF)) // Layer tap-toggle -#define TT(layer) (QK_LAYER_TAP_TOGGLE | (layer & 0xFF)) +#define TT(layer) (QK_LAYER_TAP_TOGGLE | ((layer) & 0xFF)) // M-od, T-ap - 256 keycode max #define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h index dcc9efb3cef8..de931383972d 100644 --- a/tmk_core/common/progmem.h +++ b/tmk_core/common/progmem.h @@ -5,9 +5,9 @@ # include #else # define PROGMEM -# define pgm_read_byte(p) *((unsigned char*)p) -# define pgm_read_word(p) *((uint16_t*)p) -# define pgm_read_dword(p) *((uint32_t*)p) +# define pgm_read_byte(p) *((unsigned char*)(p)) +# define pgm_read_word(p) *((uint16_t*)(p)) +# define pgm_read_dword(p) *((uint32_t*)(p)) #endif #endif From 3bd30085d891ee28aa1a26babd0de2d26a9e59be Mon Sep 17 00:00:00 2001 From: fauxpark Date: Wed, 9 Jan 2019 11:22:09 +1100 Subject: [PATCH 090/458] Tidy up Mod-Tap shortcuts (#4806) --- docs/feature_advanced_keycodes.md | 34 +++++++++++++++---------------- docs/keycodes.md | 34 +++++++++++++++---------------- quantum/quantum_keycodes.h | 31 ++++++++++++++-------------- 3 files changed, 50 insertions(+), 49 deletions(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 8c0a22fc6720..f116e478cc0d 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -107,23 +107,23 @@ This key would activate Left Control and Left Shift when held, and send Escape w For convenience, QMK includes some Mod-Tap shortcuts to make common combinations more compact in your keymap: -|Key |Aliases |Description | -|------------|---------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|-------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## Caveats diff --git a/docs/keycodes.md b/docs/keycodes.md index bd325b7fa259..6f28bbb97aaa 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -342,23 +342,23 @@ This is a reference only. Each group of keys links to the page documenting their ## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap) -|Key |Aliases |Description | -|------------|---------------------------------------|-------------------------------------------------------| -|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | -|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | -|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | -|`LGUI_T(kc)`|`LCMD_T(kc)`, `RWIN_T(kc)`, `GUI_T(kc)`|Left GUI when held, `kc` when tapped | -|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| -|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | -|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | -|`ALL_T(kc)` | |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | +|Key |Aliases |Description | +|------------|-----------------------------------------------------------------|-------------------------------------------------------| +|`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | +|`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | +|`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## [RGB Lighting](feature_rgblight.md) diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 583ba8264663..9f9d35b1c013 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -640,38 +640,39 @@ enum quantum_keycodes { // M-od, T-ap - 256 keycode max #define MT(mod, kc) (QK_MOD_TAP | (((mod) & 0x1F) << 8) | ((kc) & 0xFF)) -#define CTL_T(kc) MT(MOD_LCTL, kc) #define LCTL_T(kc) MT(MOD_LCTL, kc) #define RCTL_T(kc) MT(MOD_RCTL, kc) +#define CTL_T(kc) LCTL_T(kc) -#define SFT_T(kc) MT(MOD_LSFT, kc) #define LSFT_T(kc) MT(MOD_LSFT, kc) #define RSFT_T(kc) MT(MOD_RSFT, kc) +#define SFT_T(kc) LSFT_T(kc) -#define ALT_T(kc) MT(MOD_LALT, kc) #define LALT_T(kc) MT(MOD_LALT, kc) #define RALT_T(kc) MT(MOD_RALT, kc) +#define ALT_T(kc) LALT_T(kc) #define ALGR_T(kc) RALT_T(kc) -#define GUI_T(kc) MT(MOD_LGUI, kc) -#define CMD_T(kc) GUI_T(kc) -#define WIN_T(kc) GUI_T(kc) #define LGUI_T(kc) MT(MOD_LGUI, kc) +#define RGUI_T(kc) MT(MOD_RGUI, kc) #define LCMD_T(kc) LGUI_T(kc) #define LWIN_T(kc) LGUI_T(kc) -#define RGUI_T(kc) MT(MOD_RGUI, kc) #define RCMD_T(kc) RGUI_T(kc) #define RWIN_T(kc) RGUI_T(kc) - -#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Control + Shift e.g. for gnome-terminal -#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include Win or Cmd, so just alt+shift+ctrl -#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left control alt and gui -#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right control alt and gui -#define ALL_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ -#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) +#define GUI_T(kc) LGUI_T(kc) +#define CMD_T(kc) LCMD_T(kc) +#define WIN_T(kc) LWIN_T(kc) + +#define C_S_T(kc) MT(MOD_LCTL | MOD_LSFT, kc) // Left Control + Shift e.g. for gnome-terminal +#define MEH_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT, kc) // Meh is a less hyper version of the Hyper key -- doesn't include GUI, so just Left Control + Shift + Alt +#define LCAG_T(kc) MT(MOD_LCTL | MOD_LALT | MOD_LGUI, kc) // Left Control + Alt + GUI +#define RCAG_T(kc) MT(MOD_RCTL | MOD_RALT | MOD_RGUI, kc) // Right Control + Alt + GUI +#define HYPR_T(kc) MT(MOD_LCTL | MOD_LSFT | MOD_LALT | MOD_LGUI, kc) // see http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/ +#define SGUI_T(kc) MT(MOD_LGUI | MOD_LSFT, kc) // Left Shift + GUI #define SCMD_T(kc) SGUI_T(kc) #define SWIN_T(kc) SGUI_T(kc) -#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left control and left alt +#define LCA_T(kc) MT(MOD_LCTL | MOD_LALT, kc) // Left Control + Alt +#define ALL_T(kc) HYPR_T(kc) // Dedicated keycode versions for Hyper and Meh, if you want to use them as standalone keys rather than mod-tap #define KC_HYPR HYPR(KC_NO) From 84c24188176c3235b7064a9a77855f042ada2314 Mon Sep 17 00:00:00 2001 From: Danny Nguyen Date: Mon, 7 Jan 2019 09:16:27 -0500 Subject: [PATCH 091/458] Fix pinout of split hand and LED, remove flip half option --- keyboards/nyquist/rev3/config.h | 5 +++-- keyboards/nyquist/rev3/rev3.h | 29 ----------------------------- keyboards/nyquist/rev3/rules.mk | 1 + 3 files changed, 4 insertions(+), 31 deletions(-) diff --git a/keyboards/nyquist/rev3/config.h b/keyboards/nyquist/rev3/config.h index 8054ba79c251..0caf8c423cb6 100644 --- a/keyboards/nyquist/rev3/config.h +++ b/keyboards/nyquist/rev3/config.h @@ -33,6 +33,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { F0, F5, D7, F6, F7 } #define MATRIX_COL_PINS { F1, F4, B7, D2, D3, D4 } +#define SPLIT_HAND_PIN D5 /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -58,11 +59,11 @@ along with this program. If not, see . /* ws2812 RGB LED */ #define RGB_DI_PIN B4 -#define RGBLIGHT_TIMER +#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 /* Backlight LEDs */ -#define BACKLIGHT_PIN D5 +#define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 7 /* diff --git a/keyboards/nyquist/rev3/rev3.h b/keyboards/nyquist/rev3/rev3.h index 3a3141f6e05f..274b83926b5b 100644 --- a/keyboards/nyquist/rev3/rev3.h +++ b/keyboards/nyquist/rev3/rev3.h @@ -11,33 +11,6 @@ #endif #endif -//void promicro_bootloader_jmp(bool program); - -#ifndef FLIP_HALF -// Standard Keymap -// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ - L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { L40, L41, L42, L43, L44, L45 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30 }, \ - { R45, R44, R43, R42, R41, R40 } \ - } -#else -// Keymap with right side flipped -// (TRRS jack on both halves are to the right) #define LAYOUT( \ L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ @@ -57,7 +30,5 @@ { R30, R31, R32, R33, R34, R35 }, \ { R40, R41, R42, R43, R44, R45 } \ } -#endif #define LAYOUT_ortho_5x12 LAYOUT - diff --git a/keyboards/nyquist/rev3/rules.mk b/keyboards/nyquist/rev3/rules.mk index bd518d8f273f..31077066a364 100644 --- a/keyboards/nyquist/rev3/rules.mk +++ b/keyboards/nyquist/rev3/rules.mk @@ -1 +1,2 @@ BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes From dc6b6c29bac7f52efe812e6e9c623c9c9b1553d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Wed, 9 Jan 2019 13:52:11 -0200 Subject: [PATCH 092/458] Add KBD75 keymap (#4808) * Add KBD75 keymap * Fix README * Fix README images --- keyboards/kbd75/keymaps/edulpn/README.md | 13 +++++ keyboards/kbd75/keymaps/edulpn/keymap.c | 67 ++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 keyboards/kbd75/keymaps/edulpn/README.md create mode 100644 keyboards/kbd75/keymaps/edulpn/keymap.c diff --git a/keyboards/kbd75/keymaps/edulpn/README.md b/keyboards/kbd75/keymaps/edulpn/README.md new file mode 100644 index 000000000000..57989ff9b66b --- /dev/null +++ b/keyboards/kbd75/keymaps/edulpn/README.md @@ -0,0 +1,13 @@ +# Edulpn Keymap for the KBD75 PCB + +## Additional Notes +75% Keymap for KBD75 with default ANSI layout + default layer switching for Windows and Mac "modes" + custom Fn layers for each mode. + +### Windows Mode +![Edulpn Keymap for the KBD75 PCB Windows Mode](https://imgur.com/doI46vP.png) + +### Mac Mode +![Edulpn Keymap for the KBD75 PCB Mac Mode](https://i.imgur.com/t7oTjjc.png) + +## Build +To build the default keymap, simply run `make kbd75/rev2:edulpn`. diff --git a/keyboards/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbd75/keymaps/edulpn/keymap.c new file mode 100644 index 000000000000..40e55cbaf2b8 --- /dev/null +++ b/keyboards/kbd75/keymaps/edulpn/keymap.c @@ -0,0 +1,67 @@ +#include QMK_KEYBOARD_H + +#define WINDOWS_LAYER 0 +#define WINDOWS_FN_LAYER 1 +#define MAC_LAYER 2 +#define MAC_FN_LAYER 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [WINDOWS_LAYER] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, TG(MAC_LAYER), KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LWIN, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(WINDOWS_FN_LAYER), KC_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [WINDOWS_FN_LAYER] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [MAC_LAYER] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, TG(MAC_LAYER), KC_DEL, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_HOME, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LALT, KC_LCMD, KC_SPC, KC_SPC, KC_SPC, MO(MAC_FN_LAYER), KC_TRNS, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [MAC_FN_LAYER] = LAYOUT( + RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +uint32_t layer_state_set_user(uint32_t state) { + switch (biton32(state)) { + case WINDOWS_LAYER: + rgblight_setrgb_blue(); + break; + case WINDOWS_FN_LAYER: + rgblight_setrgb_blue(); + break; + case MAC_LAYER: + rgblight_setrgb_white(); + break; + case MAC_FN_LAYER: + rgblight_setrgb_white(); + break; + default: + rgblight_setrgb (0x00, 0xFF, 0xFF); + break; + } + return state; +} + From 722cee33629beab51ac7a5557f0aa50e872d0460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Louren=C3=A7o=20Pinto=20Neto?= Date: Wed, 9 Jan 2019 15:23:09 -0200 Subject: [PATCH 093/458] Fix Mac mute keycode (#4809) --- keyboards/kbd75/keymaps/edulpn/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbd75/keymaps/edulpn/keymap.c index 40e55cbaf2b8..78a501ec4ece 100644 --- a/keyboards/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbd75/keymaps/edulpn/keymap.c @@ -35,12 +35,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [MAC_FN_LAYER] = LAYOUT( - RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + RESET, KC_BRID, KC_BRIU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MRWD, KC_MPLY, KC_MFFD, KC__MUTE, KC__VOLDOWN, KC__VOLUP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; From 808ff7275ecd6d07dd81b8c8472fb2bf39192ae0 Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 9 Jan 2019 15:23:41 -0500 Subject: [PATCH 094/458] Update bakingpy 4x12 keymap and add test mode for debugging/development (#4810) --- .../community/ortho_4x12/bakingpy/config.h | 11 +-- .../community/ortho_4x12/bakingpy/keymap.c | 77 +++++++------------ 2 files changed, 29 insertions(+), 59 deletions(-) diff --git a/layouts/community/ortho_4x12/bakingpy/config.h b/layouts/community/ortho_4x12/bakingpy/config.h index a90f38001a07..b6b2ac577901 100644 --- a/layouts/community/ortho_4x12/bakingpy/config.h +++ b/layouts/community/ortho_4x12/bakingpy/config.h @@ -1,20 +1,15 @@ #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C +#define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS +//#define MASTER_RIGHT #define TAPPING_TERM 150 #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 +#define RGBLED_NUM 12 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/layouts/community/ortho_4x12/bakingpy/keymap.c b/layouts/community/ortho_4x12/bakingpy/keymap.c index e71e5d5d2c20..06e4a589c5b8 100644 --- a/layouts/community/ortho_4x12/bakingpy/keymap.c +++ b/layouts/community/ortho_4x12/bakingpy/keymap.c @@ -2,18 +2,18 @@ extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 +#define _MAC 0 +#define _WINDOWS 1 +#define _TESTMODE 2 #define _LOWER 3 #define _RAISE 4 #define _FKEYS 5 #define _ADJUST 16 enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, + MAC = SAFE_RANGE, + WINDOWS, + TESTMODE, LOWER, RAISE, ADJUST, @@ -34,11 +34,11 @@ enum custom_keycodes { #define KC_ENTS MT(MOD_LSFT, KC_ENT) #define KC_BL_S BL_STEP #define KC_BL_T BL_TOGG -#define KC_ALLS PLAY_ALLSTAR +#define KC_RMOD RGB_MOD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_kc_ortho_4x12( + [_MAC] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ @@ -50,33 +50,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //└────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ ), - [_COLEMAK] = LAYOUT_kc_ortho_4x12( + [_WINDOWS] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,MINS, + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - ESCC, A , R , S , T , D , H , N , E , I , O ,QUOT, + ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - LSFT, Z , X , C , V , B , K , M ,COMM,DOT ,SLSH,ENTS, + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - GRVF,LCTL,LALT,LGUI,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT + GRVF,LALT,LGUI,LCTL,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT //└────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ ), - [_DVORAK] = LAYOUT_kc_ortho_4x12( + [_TESTMODE] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,MINS, + TAB , Q , W , E , R , T , Y , U , I , O , P ,MINS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - ESCC, A , O , E , U , I , D , H , T , N , S ,SLSH, + RMOD,BL_S, S , D , F , G , RMOD,BL_S, K , L ,SCLN,QUOT, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,ENTS, + LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ - GRVF,LCTL,LALT,LGUI,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT + GRVF,LALT,LGUI,LCTL,LOWR,SPC , BSPC,RASE,LEFT,DOWN, UP ,RGHT //└────┴────┴────┴────┴────┴────┘ └────┴────┴────┴────┴────┴────┘ ), [_LOWER] = LAYOUT_kc_ortho_4x12( //┌────┬────┬────┬────┬────┬────┐ ┌────┬────┬────┬────┬────┬────┐ - ALLS, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , + , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ DEL ,CAPP,LEFT,RGHT, UP ,LBRC, RBRC, P4 , P5 , P6 ,PLUS,PIPE, //├────┼────┼────┼────┼────┼────┤ ├────┼────┼────┼────┼────┼────┤ @@ -123,7 +123,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = LAYOUT_ortho_4x12( \ _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, MAC, WINDOWS, TESTMODE,_______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) @@ -131,13 +131,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float all_star_song[][2] = SONG(ALL_STAR); -#endif - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); @@ -145,30 +138,21 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case MAC: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistent_default_layer_set(1UL<<_QWERTY); + persistent_default_layer_set(1UL<<_MAC); } return false; break; - case COLEMAK: + case WINDOWS: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_colemak); - #endif - persistent_default_layer_set(1UL<<_COLEMAK); + persistent_default_layer_set(1UL<<_WINDOWS); } return false; break; - case DVORAK: + case TESTMODE: if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_dvorak); - #endif - persistent_default_layer_set(1UL<<_DVORAK); + persistent_default_layer_set(1UL<<_TESTMODE); } return false; break; @@ -200,15 +184,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case PLAY_ALLSTAR: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(all_star_song); - SEND_STRING("Hey now, you're an all-star, get your game on, go play. Hey now, you're a rock star, get the show on, get paid. All that glitters is gold. Only shooting stars break the mold."); - #endif - } - return false; - break; } return true; } From 9c2d77612391c1c762dc53e53aab4f91c50d22f8 Mon Sep 17 00:00:00 2001 From: ave-63 Date: Wed, 9 Jan 2019 14:16:36 -0800 Subject: [PATCH 095/458] Keymap: ave-63's iris layout (#4812) --- keyboards/iris/keymaps/ave-63/config.h | 38 ++++++++ keyboards/iris/keymaps/ave-63/keymap.c | 120 +++++++++++++++++++++++++ 2 files changed, 158 insertions(+) create mode 100644 keyboards/iris/keymaps/ave-63/config.h create mode 100644 keyboards/iris/keymaps/ave-63/keymap.c diff --git a/keyboards/iris/keymaps/ave-63/config.h b/keyboards/iris/keymaps/ave-63/config.h new file mode 100644 index 000000000000..381a494b758f --- /dev/null +++ b/keyboards/iris/keymaps/ave-63/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_TERM 150 + +/* Select hand configuration */ +//#define MASTER_LEFT +#define MASTER_RIGHT +// #define EE_HANDS + +/*#undef RGBLED_NUMvbvbvbvbvbvbvtesting +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 1 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8*/ diff --git a/keyboards/iris/keymaps/ave-63/keymap.c b/keyboards/iris/keymaps/ave-63/keymap.c new file mode 100644 index 000000000000..3d393a71c7ad --- /dev/null +++ b/keyboards/iris/keymaps/ave-63/keymap.c @@ -0,0 +1,120 @@ +/* Features of this keymap: + +--Lots of functionality on left hand for conjunction with mouse or pen in right hand +--_COMMAND layer ESDF arrow keys +--_MEH layer ESDF is super handy for switching tabs (SF) and apps (ED) +--_MEH layer other keys are linked with my AutoHotKey script +--macro for handling parentheses is very nice (credit: u/drashna) + +Some things are very non-standard, like position of number keys, etc. +Will require heavy modification for most people. +*/ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +enum my_layers { + _QWERTY, + _SYMBOL, + _COMMAND, + _MEH +}; + +enum custom_keycodes { + KC_MPRN = SAFE_RANGE, + KC_MBRC, + KC_MCBR, + KC_MABK +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT( + KC_ESC, KC_GRV, KC_AT, KC_BSLS, KC_NO, TG(_SYMBOL), KC_NO, KC_LGUI, KC_MBRC, KC_RBRC, KC_NO, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_SYMBOL), + KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_MEH), KC_QUOT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_NO, KC_LSFT, MO(_COMMAND), KC_ENT, KC_SPC, KC_NO +), +[_SYMBOL] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_EQL, KC_9, KC_8, KC_7, KC_PLUS, KC_HASH, KC_UNDS, KC_MCBR, KC_RCBR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_0, KC_6, KC_5, KC_4, KC_MINS, KC_CIRC, KC_AMPR, KC_MPRN, KC_RPRN, KC_RBRC, KC_TRNS, + KC_TRNS, KC_SLSH, KC_3, KC_2, KC_1, KC_ASTR, KC_TRNS, KC_TRNS, KC_EXLM, KC_DLR, KC_MABK, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[_COMMAND] = LAYOUT( + KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_VOLU, KC_SLCK, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_VOLD, KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[_MEH] = LAYOUT( + LALT(KC_F4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, + KC_TRNS, MEH(KC_Q), LCTL(KC_W), LSFT(KC_TAB), KC_DEL, MEH(KC_T), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, MEH(KC_A),LSFT(LCTL(KC_TAB)),KC_TAB,LCTL(KC_TAB),MEH(KC_G), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS,MEH(KC_Z),MEH(KC_X),MEH(KC_C),MEH(KC_V),MEH(KC_B),KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + static uint16_t code_timer; + switch (keycode) { + case KC_MCBR: + if(record->event.pressed){ + code_timer= timer_read(); + SEND_STRING("{"); + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + SEND_STRING("}" SS_TAP(X_LEFT)); + } + } + return false; + break; + case KC_MBRC: + if(record->event.pressed){ + code_timer= timer_read(); + SEND_STRING("["); + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + SEND_STRING("]" SS_TAP(X_LEFT)); + } + } + return false; + break; + case KC_MPRN: + if(record->event.pressed){ + code_timer= timer_read(); + SEND_STRING("("); + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + SEND_STRING(")" SS_TAP(X_LEFT)); + } + } + return false; + break; + case KC_MABK: + if(record->event.pressed){ + code_timer= timer_read(); + if (get_mods() & MODS_SHIFT_MASK){ + SEND_STRING("<"); + } else { + SEND_STRING(","); + } + } else { + if (timer_elapsed(code_timer) > TAPPING_TERM) { + if (get_mods() & MODS_SHIFT_MASK){ + SEND_STRING(">" SS_TAP(X_LEFT)); + } + } + } + return false; + break; + } + return true; +} \ No newline at end of file From ebbc372f72993123cd24fe27228e8d07c9b8d7fb Mon Sep 17 00:00:00 2001 From: reasonsandreasons Date: Thu, 10 Jan 2019 11:21:21 -0500 Subject: [PATCH 096/458] Added my Prime_O Layout (#4811) * initial prime_o commit * Cleaned up comments, other things. * Update bakingpy 4x12 keymap and add test mode for debugging/development (#4810) * Keymap: ave-63's iris layout (#4812) * Updated keymap to use standard seven-underscore KC_TRNS notation * initial prime_o commit * Cleaned up comments, other things. * Updated keymap to use standard seven-underscore KC_TRNS notation --- .../keymaps/reasonsandreasons/config.h | 21 ++ .../keymaps/reasonsandreasons/keymap.c | 186 ++++++++++++++++++ .../keymaps/reasonsandreasons/readme.md | 5 + .../keymaps/reasonsandreasons/rules.mk | 20 ++ 4 files changed, 232 insertions(+) create mode 100644 keyboards/primekb/prime_o/keymaps/reasonsandreasons/config.h create mode 100644 keyboards/primekb/prime_o/keymaps/reasonsandreasons/keymap.c create mode 100644 keyboards/primekb/prime_o/keymaps/reasonsandreasons/readme.md create mode 100644 keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk diff --git a/keyboards/primekb/prime_o/keymaps/reasonsandreasons/config.h b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/config.h new file mode 100644 index 000000000000..4bcfa2ce5c62 --- /dev/null +++ b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/config.h @@ -0,0 +1,21 @@ +/* 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 + +#define TAPPING_TERM 200 + +// place overrides here diff --git a/keyboards/primekb/prime_o/keymaps/reasonsandreasons/keymap.c b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/keymap.c new file mode 100644 index 000000000000..2a320aecf2e0 --- /dev/null +++ b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/keymap.c @@ -0,0 +1,186 @@ +/* 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 + +#define L1BS LT(2, KC_BSPC) +#define LSUP LSFT_T(KC_UP) +#define CTLL LCTL_T(KC_LEFT) +#define ECTL LCTL_T(KC_ESC) +#define ALLM ALL_T(KC_MINS) +#define SCLS LT(3, KC_SCLN) + +// Establishes tap dance keys +enum { + TD_SPC_ENT = 0 +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_SPC_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT) + +}; + +// 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 + * ,---------------------------------------------------------------------------------------------------------------, + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | NMLK | / | * | - | + * | | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | 7 | 8 | 9 | + | + * | | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | 4 | 5 | 6 | = | + * | Ctrl | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Z | X | C | V | B | N | M | , | . | / | Up | 1 | 2 | 3 | | + * | Shift| | | | | | | | | | | Shift| | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+ Enter| + * | - | | | | Backspace | Space | | | Left | Down | Right| 0 | . | | + * | ALL | Ctrl | Alt | GUI | Fn1 | | GUI | Alt | Ctrl | | | | | | + * `---------------------------------------------------------------------------------------------------------------' + */ + + [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_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_BSLS, KC_7, KC_8, KC_9, KC_PPLS, + ECTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SCLS, KC_QUOT, KC_4, KC_5, KC_6, KC_PEQL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LSUP, KC_1, KC_2, KC_3, KC_ENT, + ALLM, KC_LCTL, KC_LALT, KC_LGUI, L1BS, L1BS, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, CTLL, KC_DOWN, KC_RIGHT, KC_0, KC_PDOT, KC_ENT + ), + +/* GAME + * ,---------------------------------------------------------------------------------------------------------------, + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | NMLK | / | * | - | + * | ` | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | ' | 7 | 8 | 9 | + | + * | | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | A | S | D | F | G | H | J | K | L | ; | Rtrn | 4 | 5 | 6 | = | + * | | | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Z | X | C | V | B | N | M | , | . | / | Up | 1 | 2 | 3 | | + * | Shift| | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------+ Enter| + * | | | | | Space | Backspace | | | Left | Down | Right| 0 | . | | + * | Fn1 | Ctrl | Alt | Alt | | | GUI | DF(0)| | | | | | | + * `---------------------------------------------------------------------------------------------------------------' + */ + + [1] = LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 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_QUOT, KC_7, KC_8, KC_9, 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_ENT, KC_4, KC_5, KC_6, 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_UP, KC_1, KC_2, KC_3, KC_ENT, + MO(2), KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_SPC, KC_BSPC, KC_BSPC, KC_RGUI, DF(0), KC_LEFT, KC_DOWN, KC_RIGHT, KC_0, KC_PDOT, KC_ENT + ), + +/* SYMBOL + * ,---------------------------------------------------------------------------------------------------------------, + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | | | | + * | | | | | | | | | | | | | | | | | + * |------+-------------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | # | [ | < | > | ] | _ | | | | | | | | | + * | | | | | | | | | | | | | | | | | + * |------+------|------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ~ | ( | { | } | ) | @ | - | | | | | | | + * | | | | | | | | | | | | | | | | | + * |------+------|------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | + * |------+------|------+------+------+------+------+------+------+------+------+------+------+------+------+ | + * | | | | | | Enter | | | | | | | | | + * | | | | | | | | | | | | | | | + * `---------------------------------------------------------------------------------------------------------------' + */ + + [2] = 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_HASH, KC_LBRC, KC_LT, KC_GT, KC_RBRC, KC_UNDS, KC_PIPE, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_TILD, KC_LPRN, KC_LCBR, KC_RCBR, KC_RPRN, KC_AT, KC_MINS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +/* SYSTEM + * ,---------------------------------------------------------------------------------------------------------------, + * | | | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | + * |------+-------------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | PgUp | Home | Up | End | | | Vol- | Vol+ | Mute | | | | | | | + * | | | | | | | | | | | | | | | | | + * |------+------|------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | PgDn | Left | Down |Right | | | Play | Prev | Next | | | | | | RESET| + * | | | | | | | | | | | | | | | | | + * |------+------|------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | + * |------+------|------+------+------+------+------+------+------+------+------+------+------+------+------+ BL | + * | | | | | | | | | | | | | BL | TGGL | + * | GAME | | | | | | | | | | | | STEP | | + * `---------------------------------------------------------------------------------------------------------------' + */ + + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_PGUP, KC_HOME, KC_UP, KC_END, _______, _______, KC__VOLDOWN, KC__VOLUP, KC__MUTE, _______, _______, _______, _______, _______, _______, + _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MPLY, KC_MRWD, KC_MFFD, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_TOGG, + DF(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, BL_TOGG + ), + +}; + +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/primekb/prime_o/keymaps/reasonsandreasons/readme.md b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/readme.md new file mode 100644 index 000000000000..e14e989e3226 --- /dev/null +++ b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/readme.md @@ -0,0 +1,5 @@ +![reasonsandreasons Layout Image](https://imgur.com/a/xIpn2U5) + +# reasonsandreasons's Prime_O Layout + +This is a relatively simple layout for the Prime_O, designed for mostly typing use and occasional gaming. I'm still testing it and there will likely be minor changes, but most of the bones of it will likely stay the same. diff --git a/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk new file mode 100644 index 000000000000..b6c57629e9fa --- /dev/null +++ b/keyboards/primekb/prime_o/keymaps/reasonsandreasons/rules.mk @@ -0,0 +1,20 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +TAP_DANCE_ENABLE=yes # Enable Tap Dance + +# 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 3cf179be61a10860b2b66aecf2ec5ca6f0e30605 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 10 Jan 2019 11:22:57 -0500 Subject: [PATCH 097/458] Adds Proton C Conversion (#4661) * adds proton c base * fixes custom matrix include * adds readme.md * initial proton coversion, no pin mapping * start of mcu selection * add pin mapping and sweet16 test * add at90 to list * disable backlight, fix d7 * update flag names * doc updates * proton c update for mcu selection --- build_keyboard.mk | 87 +- docs/_sidebar.md | 100 -- docs/_summary.md | 2 + docs/index.html | 2 +- docs/proton_c_conversion.md | 21 + docs/zh/{_sidebar.md => _summary.md} | 0 .../boards/GENERIC_STM32_F303XC/board.c | 0 .../boards/GENERIC_STM32_F303XC/board.h | 4 +- .../boards/GENERIC_STM32_F303XC/board.mk | 0 .../GENERIC_STM32_F303XC}/bootloader_defs.h | 0 .../sweet16/keymaps/default/keymap.c | 8 +- keyboards/planck/rev6/rules.mk | 35 +- keyboards/planck/rules.mk | 33 - .../boards/GENERIC_STM32_F303XC/board.c | 126 -- .../boards/GENERIC_STM32_F303XC/board.h | 1187 ----------------- .../boards/GENERIC_STM32_F303XC/board.mk | 5 - keyboards/proton_c/bootloader_defs.h | 7 - keyboards/proton_c/chconf.h | 520 -------- keyboards/proton_c/config.h | 1 - keyboards/proton_c/halconf.h | 388 ------ keyboards/proton_c/mcuconf.h | 257 ---- keyboards/proton_c/rules.mk | 36 +- quantum/config_common.h | 40 + quantum/mcu_selection.mk | 70 + .../planck/rev6 => quantum/stm32}/chconf.h | 0 .../planck/rev6 => quantum/stm32}/halconf.h | 0 .../planck/rev6 => quantum/stm32}/mcuconf.h | 0 quantum/stm32/proton_c.mk | 44 + 28 files changed, 241 insertions(+), 2732 deletions(-) delete mode 100644 docs/_sidebar.md create mode 100644 docs/proton_c_conversion.md rename docs/zh/{_sidebar.md => _summary.md} (100%) rename {keyboards/planck/rev6 => drivers}/boards/GENERIC_STM32_F303XC/board.c (100%) rename {keyboards/planck/rev6 => drivers}/boards/GENERIC_STM32_F303XC/board.h (99%) rename {keyboards/planck/rev6 => drivers}/boards/GENERIC_STM32_F303XC/board.mk (100%) rename {keyboards/planck/rev6 => drivers/boards/GENERIC_STM32_F303XC}/bootloader_defs.h (100%) delete mode 100644 keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.c delete mode 100644 keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.h delete mode 100644 keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.mk delete mode 100644 keyboards/proton_c/bootloader_defs.h delete mode 100644 keyboards/proton_c/chconf.h delete mode 100644 keyboards/proton_c/halconf.h delete mode 100644 keyboards/proton_c/mcuconf.h create mode 100644 quantum/mcu_selection.mk rename {keyboards/planck/rev6 => quantum/stm32}/chconf.h (100%) rename {keyboards/planck/rev6 => quantum/stm32}/halconf.h (100%) rename {keyboards/planck/rev6 => quantum/stm32}/mcuconf.h (100%) create mode 100644 quantum/stm32/proton_c.mk diff --git a/build_keyboard.mk b/build_keyboard.mk index b639b92d3eae..1d60f3ad7984 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -16,6 +16,7 @@ include common.mk KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD)) TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP) KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE) +STM32_PATH := quantum/stm32 # Force expansion TARGET := $(TARGET) @@ -72,6 +73,7 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/)","") KEYBOARD_PATHS += $(KEYBOARD_PATH_1) endif + # Pull in rules.mk files from all our subfolders ifneq ("$(wildcard $(KEYBOARD_PATH_5)/rules.mk)","") include $(KEYBOARD_PATH_5)/rules.mk @@ -89,6 +91,58 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/rules.mk)","") include $(KEYBOARD_PATH_1)/rules.mk endif + +MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP) +MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP) +MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP) +MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP) +MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) + +ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_5)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_4)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_3)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_2)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) +else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") + -include $(MAIN_KEYMAP_PATH_1)/rules.mk + KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c + KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) +else ifneq ($(LAYOUTS),) + include build_layout.mk +else + $(error Could not find keymap) + # this state should never be reached +endif + +ifeq ($(strip $(CTPC)), yes) + CONVERT_TO_PROTON_C=yes +endif + +ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) + TARGET := $(TARGET)_proton_c + include $(STM32_PATH)/proton_c.mk + OPT_DEFS += -DCONVERT_TO_PROTON_C +endif + +include quantum/mcu_selection.mk + +ifdef MCU_FAMILY + OPT_DEFS += -DQMK_STM32 + KEYBOARD_PATHS += $(STM32_PATH) +endif + + # Find all the C source files to be compiled in subfolders. KEYBOARD_SRC := @@ -227,39 +281,6 @@ PROJECT_DEFS := $(OPT_DEFS) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS) PROJECT_CONFIG := $(CONFIG_H) -MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP) -MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP) -MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP) -MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP) -MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP) - -ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_5)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_4)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_3)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_2)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2) -else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","") - -include $(MAIN_KEYMAP_PATH_1)/rules.mk - KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c - KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1) -else ifneq ($(LAYOUTS),) - include build_layout.mk -else - $(error Could not find keymap) - # this state should never be reached -endif - # Userspace setup and definitions ifeq ("$(USER_NAME)","") USER_NAME := $(KEYMAP) diff --git a/docs/_sidebar.md b/docs/_sidebar.md deleted file mode 100644 index b209c5e0b872..000000000000 --- a/docs/_sidebar.md +++ /dev/null @@ -1,100 +0,0 @@ -* [Complete Newbs Guide](newbs.md) - * [Getting Started](newbs_getting_started.md) - * [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) - * [Learning Resources](newbs_learn_more_resources.md) - -* [QMK Basics](README.md) - * [QMK Introduction](getting_started_introduction.md) - * [Contributing to QMK](contributing.md) - * [How to Use Github](getting_started_github.md) - * [Getting Help](getting_started_getting_help.md) - -* [FAQ](faq.md) - * [General FAQ](faq_general.md) - * [Build/Compile QMK](faq_build.md) - * [Debugging/Troubleshooting QMK](faq_debug.md) - * [Keymap](faq_keymap.md) - -* Detailed Guides - * [Install Build Tools](getting_started_build_tools.md) - * [Vagrant Guide](getting_started_vagrant.md) - * [Build/Compile Instructions](getting_started_make_guide.md) - * [Flashing Firmware](flashing.md) - * [Customizing Functionality](custom_quantum_functions.md) - * [Keymap Overview](keymap.md) - -* [Hardware](hardware.md) - * [AVR Processors](hardware_avr.md) - * [Drivers](hardware_drivers.md) - -* Reference - * [Keyboard Guidelines](hardware_keyboard_guidelines.md) - * [Config Options](config_options.md) - * [Keycodes](keycodes.md) - * [Documentation Best Practices](documentation_best_practices.md) - * [Documentation Templates](documentation_templates.md) - * [Glossary](reference_glossary.md) - * [Unit Testing](unit_testing.md) - * [Useful Functions](ref_functions.md) - * [Configurator Support](reference_configurator_support.md) - -* [Features](features.md) - * [Basic Keycodes](keycodes_basic.md) - * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) - * [Quantum Keycodes](quantum_keycodes.md) - * [Advanced Keycodes](feature_advanced_keycodes.md) - * [Audio](feature_audio.md) - * [Auto Shift](feature_auto_shift.md) - * [Backlight](feature_backlight.md) - * [Bluetooth](feature_bluetooth.md) - * [Bootmagic](feature_bootmagic.md) - * [Combos](feature_combo) - * [Command](feature_command.md) - * [Dynamic Macros](feature_dynamic_macros.md) - * [Encoders](feature_encoders.md) - * [Grave Escape](feature_grave_esc.md) - * [Key Lock](feature_key_lock.md) - * [Layouts](feature_layouts.md) - * [Leader Key](feature_leader_key.md) - * [Macros](feature_macros.md) - * [Mouse Keys](feature_mouse_keys.md) - * [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - * [Pointing Device](feature_pointing_device.md) - * [PS/2 Mouse](feature_ps2_mouse.md) - * [RGB Lighting](feature_rgblight.md) - * [RGB Matrix](feature_rgb_matrix.md) - * [Space Cadet Shift](feature_space_cadet_shift.md) - * [Space Cadet Shift Enter](feature_space_cadet_shift_enter.md) - * [Stenography](feature_stenography.md) - * [Swap Hands](feature_swap_hands.md) - * [Tap Dance](feature_tap_dance.md) - * [Terminal](feature_terminal.md) - * [Thermal Printer](feature_thermal_printer.md) - * [Unicode](feature_unicode.md) - * [Userspace](feature_userspace.md) - -* For Makers and Modders - * [Hand Wiring Guide](hand_wire.md) - * [ISP Flashing Guide](isp_flashing_guide.md) - * [ARM Debugging Guide](arm_debugging.md) - * [I2C Driver](i2c_driver.md) - -* For a Deeper Understanding - * [How Keyboards Work](how_keyboards_work.md) - * [Understanding QMK](understanding_qmk.md) - -* Other Topics - * [Using Eclipse with QMK](eclipse.md) - * [Support](support.md) - -* QMK Internals (In Progress) - * [Defines](internals_defines.md) - * [Input Callback Reg](internals_input_callback_reg.md) - * [Midi Device](internals_midi_device.md) - * [Midi Device Setup Process](internals_midi_device_setup_process.md) - * [Midi Util](internals_midi_util.md) - * [Send Functions](internals_send_functions.md) - * [Sysex Tools](internals_sysex_tools.md) diff --git a/docs/_summary.md b/docs/_summary.md index b209c5e0b872..c467a7231aa5 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -81,6 +81,8 @@ * [ISP Flashing Guide](isp_flashing_guide.md) * [ARM Debugging Guide](arm_debugging.md) * [I2C Driver](i2c_driver.md) + * [GPIO Controls](internals_gpio_control.md) + * [Proton C Conversion](proton_c_conversion.md) * For a Deeper Understanding * [How Keyboards Work](how_keyboards_work.md) diff --git a/docs/index.html b/docs/index.html index f5aa92b531c2..d6fdbdbcc14d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,7 @@ name: 'QMK Firmware', nameLink: 'https://qmk.fm/', repo: 'qmk/qmk_firmware', - loadSidebar: true, + loadSidebar: '_summary.md', auto2top: true, formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}', search: { diff --git a/docs/proton_c_conversion.md b/docs/proton_c_conversion.md new file mode 100644 index 000000000000..be7d50a9f41c --- /dev/null +++ b/docs/proton_c_conversion.md @@ -0,0 +1,21 @@ +# Converting a board to use the Proton C + +If a board currently supported in QMK uses a Pro Micro (or compatible board) and you want to use the Proton C, you can generate the firmware by appending `CONVERT_TO_PROTON_C=yes` (or `CTPC=yes`) to your make argument, like this: + + make 40percentclub/mf68:default CTPC=yes + +You can add the same argument to your keymap's `rules.mk`, which will accomplish the same thing. + +This exposes the `CONVERT_TO_PROTON_C` flag that you can use in your code with `#ifdef`s, like this: + + #ifdef CONVERT_TO_PROTON_C + // Proton C code + #else + // Pro Micro code + #endif + +Before being able to compile, you may get some errors about `PORTB/DDRB`, etc not being defined, so you'll need to convert the keyboard's code to use the [GPIO Controls](internals_gpio_control.md) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all. + +The Proton C only has one on-board LED (C13), and by default, the TXLED (D5) is mapped to it. If you want the RXLED (B0) mapped to it instead, add this like to your `config.h`: + + #define CONVERT_TO_PROTON_C_RXLED diff --git a/docs/zh/_sidebar.md b/docs/zh/_summary.md similarity index 100% rename from docs/zh/_sidebar.md rename to docs/zh/_summary.md diff --git a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.c b/drivers/boards/GENERIC_STM32_F303XC/board.c similarity index 100% rename from keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.c rename to drivers/boards/GENERIC_STM32_F303XC/board.c diff --git a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.h b/drivers/boards/GENERIC_STM32_F303XC/board.h similarity index 99% rename from keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.h rename to drivers/boards/GENERIC_STM32_F303XC/board.h index ec26557f3a62..11120dfd7463 100644 --- a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.h +++ b/drivers/boards/GENERIC_STM32_F303XC/board.h @@ -18,14 +18,14 @@ #define _BOARD_H_ /* - * Setup for Clueboard 60% Keyboard + * Setup for Generic STM32_F303 Board */ /* * Board identifier. */ #define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Planck PCB" +#define BOARD_NAME "STM32_F303" /* * Board oscillators-related settings. diff --git a/keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.mk b/drivers/boards/GENERIC_STM32_F303XC/board.mk similarity index 100% rename from keyboards/planck/rev6/boards/GENERIC_STM32_F303XC/board.mk rename to drivers/boards/GENERIC_STM32_F303XC/board.mk diff --git a/keyboards/planck/rev6/bootloader_defs.h b/drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h similarity index 100% rename from keyboards/planck/rev6/bootloader_defs.h rename to drivers/boards/GENERIC_STM32_F303XC/bootloader_defs.h diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c index 2ddf8acb4107..899afaba1742 100644 --- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c @@ -6,9 +6,9 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT_ortho_4x4( - KC_7, KC_8, KC_9, KC_ASTR, - KC_4, KC_5, KC_6, KC_SLSH, - KC_1, KC_2, KC_3, KC_MINS, + KC_7, KC_8, KC_9, KC_ASTR, + KC_4, KC_5, KC_6, KC_SLSH, + KC_1, KC_2, KC_3, KC_MINS, KC_0, KC_ENT, KC_DOT, KC_EQL ) }; @@ -27,6 +27,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { + #ifndef CONVERT_TO_PROTON_C /* Map RXLED to USB_LED_NUM_LOCK */ if (usb_led & (1 << USB_LED_NUM_LOCK)) { DDRB |= (1 << 0); PORTB &= ~(1 << 0); @@ -40,4 +41,5 @@ void led_set_user(uint8_t usb_led) { } else { DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); } + #endif } diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index dce683a7fff9..1f3d1dfe5840 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -2,41 +2,8 @@ SRC = matrix.c LAYOUTS += ortho_4x12 -## 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 = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +MCU = STM32F303 # Build Options # comment out to disable the options. diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk index e194dcd5111d..609790238419 100644 --- a/keyboards/planck/rules.mk +++ b/keyboards/planck/rules.mk @@ -1,39 +1,6 @@ # 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 diff --git a/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.c b/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 4331155df4b6..000000000000 --- a/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - 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. -*/ - -#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_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#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/proton_c/boards/GENERIC_STM32_F303XC/board.h b/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index ec26557f3a62..000000000000 --- a/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - 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 _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Clueboard 60% Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Planck PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 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_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 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_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 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 - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#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_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * 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 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_ALTERNATE(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_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(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_PIN0) | \ - 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_PIN0) | \ - PIN_OSPEED_HIGH(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_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_FLOATING(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_FLOATING(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_PIN0) | \ - 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_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 1) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(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_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#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_OPENDRAIN(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_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(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_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(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_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#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_LOW(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_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - 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_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - 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_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - 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_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - 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_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - 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_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * 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). - * PD11 - 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, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(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_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(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_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(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_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (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_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - 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_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#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/proton_c/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3cc..000000000000 --- a/keyboards/proton_c/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/proton_c/bootloader_defs.h b/keyboards/proton_c/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a6ab..000000000000 --- a/keyboards/proton_c/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* 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/proton_c/chconf.h b/keyboards/proton_c/chconf.h deleted file mode 100644 index 1d9f12ff1f8b..000000000000 --- a/keyboards/proton_c/chconf.h +++ /dev/null @@ -1,520 +0,0 @@ -/* - 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/proton_c/config.h b/keyboards/proton_c/config.h index 1a2346d415d0..13a608f9b182 100644 --- a/keyboards/proton_c/config.h +++ b/keyboards/proton_c/config.h @@ -33,7 +33,6 @@ #define MATRIX_ROW_PINS { B9 } #define MATRIX_COL_PINS { B0 } - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 6 diff --git a/keyboards/proton_c/halconf.h b/keyboards/proton_c/halconf.h deleted file mode 100644 index 8fe8e0c6f586..000000000000 --- a/keyboards/proton_c/halconf.h +++ /dev/null @@ -1,388 +0,0 @@ -/* - 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 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 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 TRUE -#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/proton_c/mcuconf.h b/keyboards/proton_c/mcuconf.h deleted file mode 100644 index 7c3c6e570cec..000000000000 --- a/keyboards/proton_c/mcuconf.h +++ /dev/null @@ -1,257 +0,0 @@ -/* - 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 FALSE -#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 TRUE -#define STM32_PWM_USE_TIM3 TRUE -#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 TRUE -#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/proton_c/rules.mk b/keyboards/proton_c/rules.mk index f682c1fd6b0f..4edc75929eba 100644 --- a/keyboards/proton_c/rules.mk +++ b/keyboards/proton_c/rules.mk @@ -1,38 +1,4 @@ -## 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 = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +MCU = STM32F303 # Build Options # comment out to disable the options. diff --git a/quantum/config_common.h b/quantum/config_common.h index cbff372eaf36..606cd9381ae0 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -125,6 +125,45 @@ #endif #elif defined(PROTOCOL_CHIBIOS) + // Defines mapping for Proton C replacement + #ifdef CONVERT_TO_PROTON_C + // Left side (front) + #define D3 PAL_LINE(GPIOA, 9) + #define D2 PAL_LINE(GPIOA, 10) + // GND + // GND + #define D1 PAL_LINE(GPIOB, 7) + #define D0 PAL_LINE(GPIOB, 6) + #define D4 PAL_LINE(GPIOB, 5) + #define C6 PAL_LINE(GPIOB, 4) + #define D7 PAL_LINE(GPIOB, 3) + #define E6 PAL_LINE(GPIOB, 2) + #define B4 PAL_LINE(GPIOB, 1) + #define B5 PAL_LINE(GPIOB, 0) + + // Right side (front) + // RAW + // GND + // RESET + // VCC + #define F4 PAL_LINE(GPIOA, 2) + #define F5 PAL_LINE(GPIOA, 1) + #define F6 PAL_LINE(GPIOA, 0) + #define F7 PAL_LINE(GPIOB, 8) + #define B1 PAL_LINE(GPIOB, 13) + #define B3 PAL_LINE(GPIOB, 14) + #define B2 PAL_LINE(GPIOB, 15) + #define B6 PAL_LINE(GPIOB, 9) + + // LEDs (only D5/C13 uses an actual LED) + #ifdef CONVERT_TO_PROTON_C_RXLED + #define D5 PAL_LINE(GPIOC, 13) + #define B0 PAL_LINE(GPIOC, 13) + #else + #define D5 PAL_LINE(GPIOC, 13) + #define B0 PAL_LINE(GPIOC, 14) + #endif + #else #define A0 PAL_LINE(GPIOA, 0) #define A1 PAL_LINE(GPIOA, 1) #define A2 PAL_LINE(GPIOA, 2) @@ -221,6 +260,7 @@ #define F13 PAL_LINE(GPIOF, 13) #define F14 PAL_LINE(GPIOF, 14) #define F15 PAL_LINE(GPIOF, 15) + #endif #endif /* USART configuration */ diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk new file mode 100644 index 000000000000..209b578ea55e --- /dev/null +++ b/quantum/mcu_selection.mk @@ -0,0 +1,70 @@ + +ifneq ($(findstring STM32F303, $(MCU)),) + ## 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 + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:df11 -a 0 -s 0x08000000:leave +endif + +ifneq (,$(filter $(MCU),atmega32u4 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) +endif diff --git a/keyboards/planck/rev6/chconf.h b/quantum/stm32/chconf.h similarity index 100% rename from keyboards/planck/rev6/chconf.h rename to quantum/stm32/chconf.h diff --git a/keyboards/planck/rev6/halconf.h b/quantum/stm32/halconf.h similarity index 100% rename from keyboards/planck/rev6/halconf.h rename to quantum/stm32/halconf.h diff --git a/keyboards/planck/rev6/mcuconf.h b/quantum/stm32/mcuconf.h similarity index 100% rename from keyboards/planck/rev6/mcuconf.h rename to quantum/stm32/mcuconf.h diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk new file mode 100644 index 000000000000..a0fa013736b8 --- /dev/null +++ b/quantum/stm32/proton_c.mk @@ -0,0 +1,44 @@ +# Proton C MCU settings for converting AVR projects + +# These are defaults based on what has been implemented for ARM boards +AUDIO_ENABLE = yes +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no + +# The rest of these settings shouldn't change + +## 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 = + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave From d28684da90536b54ff7d145decb80e0bd9290996 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 10 Jan 2019 11:26:40 -0500 Subject: [PATCH 098/458] Adds support for JacoBurge's TouchPad (#4186) * add touchpad * progress * working with leds and vibrations * adds readme * Update keyboards/touchpad/readme.md Co-Authored-By: jackhumbert * updates --- drivers/avr/i2c_master.c | 5 +- keyboards/touchpad/config.h | 70 +++++ keyboards/touchpad/keymaps/default/keymap.c | 30 ++ keyboards/touchpad/matrix.c | 291 ++++++++++++++++++++ keyboards/touchpad/readme.md | 15 + keyboards/touchpad/rules.mk | 67 +++++ keyboards/touchpad/touchpad.c | 1 + keyboards/touchpad/touchpad.h | 2 + 8 files changed, 480 insertions(+), 1 deletion(-) create mode 100644 keyboards/touchpad/config.h create mode 100644 keyboards/touchpad/keymaps/default/keymap.c create mode 100644 keyboards/touchpad/matrix.c create mode 100644 keyboards/touchpad/readme.md create mode 100644 keyboards/touchpad/rules.mk create mode 100644 keyboards/touchpad/touchpad.c create mode 100644 keyboards/touchpad/touchpad.h diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c index a04e6570d764..19bae33e9f17 100755 --- a/drivers/avr/i2c_master.c +++ b/drivers/avr/i2c_master.c @@ -179,6 +179,9 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 status = i2c_write(regaddr, timeout); if (status) return status; + status = i2c_stop(timeout); + if (status) return status; + status = i2c_start(devaddr | 0x01, timeout); if (status) return status; @@ -217,4 +220,4 @@ i2c_status_t i2c_stop(uint16_t timeout) } return I2C_STATUS_SUCCESS; -} \ No newline at end of file +} diff --git a/keyboards/touchpad/config.h b/keyboards/touchpad/config.h new file mode 100644 index 000000000000..8d34daae1294 --- /dev/null +++ b/keyboards/touchpad/config.h @@ -0,0 +1,70 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x16D0 +#define PRODUCT_ID 0x0DB8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER JacoBurge +#define PRODUCT TouchPad +#define DESCRIPTION A capacitive touchpad + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 6 + + +/* 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 diff --git a/keyboards/touchpad/keymaps/default/keymap.c b/keyboards/touchpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..92f772aaa8c9 --- /dev/null +++ b/keyboards/touchpad/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +/* 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = { + { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, + { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, + { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, + { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, + { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F }, + { KC_A, KC_B, KC_C, KC_D, KC_E, KC_F } +} + +}; diff --git a/keyboards/touchpad/matrix.c b/keyboards/touchpad/matrix.c new file mode 100644 index 000000000000..3af4c5c3c791 --- /dev/null +++ b/keyboards/touchpad/matrix.c @@ -0,0 +1,291 @@ +/* +MIT License +Copyright (c) 2018, JacoBurge +Adapted for QMK by Jack Humbert in 2018 + +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. +*/ + +#include "matrix.h" +#include "i2c_master.h" +#include "quantum.h" + +#define VIBRATE_LENGTH 50 //Defines number of interrupts motor will vibrate for, must be bigger than 8 for correct operation +volatile uint8_t vibrate = 0; //Trigger vibration in interrupt + +static matrix_row_t matrix[MATRIX_ROWS]; + +const uint8_t SENr[6] = {1, 2, 3, 5, 6, 7};//Maps capacitive pads to pins +const uint8_t SENc[6] = {0, 4, 8, 9, 10, 11}; + +volatile uint8_t LEDs[6][6] = {{0}};//Stores current LED values + +//Read data from the cap touch IC +uint8_t readDataFromTS(uint8_t reg) { + uint8_t rx[1] = { 0 }; + if (i2c_readReg(0x1C << 1, reg, rx, 1, 100) == 0) { + return rx[0]; + } + return 0; +} + +//Write data to cap touch IC +uint8_t writeDataToTS(uint8_t reg, uint8_t data) { + uint8_t tx[2] = { reg, data }; + if (i2c_transmit(0x1C << 1, tx, 2, 100) == 0) { + return 1; + } else { + return 0; + } +} + + +uint8_t checkTSPres(void) { + return (readDataFromTS(0x00) == 0x3E); +} + +uint8_t capSetup(void) { + + uint8_t temp_return = checkTSPres(); + + if (temp_return == 1) { + // Perform measurements every 16ms + writeDataToTS(0x08, 1); + + // Increase detection integrator value + writeDataToTS(0x0B, 1); + + // Oversample to gain two bits for columns + writeDataToTS(0x28, 0x42); + writeDataToTS(0x29, 0x00); + writeDataToTS(0x2A, 0x00); + writeDataToTS(0x2B, 0x00); + writeDataToTS(0x2C, 0x42); + writeDataToTS(0x2D, 0x00); + writeDataToTS(0x2E, 0x00); + writeDataToTS(0x2F, 0x00); + writeDataToTS(0x30, 0x42); + writeDataToTS(0x31, 0x42); + writeDataToTS(0x32, 0x42); + writeDataToTS(0x33, 0x42); + + // Recalibration if touch detected for more than 8 seconds n*0.16s + writeDataToTS(0x0C, 50); + + // Enable keys and set key groups + writeDataToTS(0x1C, 0x00 | 0x04); + writeDataToTS(0x1D, 0x00 | 0x08); + writeDataToTS(0x1E, 0x00 | 0x08); + writeDataToTS(0x1F, 0x00 | 0x08); + writeDataToTS(0x20, 0x00 | 0x04); + writeDataToTS(0x21, 0x00 | 0x08); + writeDataToTS(0x22, 0x00 | 0x08); + writeDataToTS(0x23, 0x00 | 0x08); + writeDataToTS(0x24, 0x00 | 0x04); + writeDataToTS(0x25, 0x00 | 0x04); + writeDataToTS(0x26, 0x00 | 0x04); + writeDataToTS(0x27, 0x00 | 0x04); + + } + return temp_return; +} + +__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) { + + i2c_init(); + + //Motor enable + setPinOutput(E6); + //Motor PWM + setPinOutput(D7); + + //Power LED + setPinOutput(B7); + writePinHigh(B7); + + //LEDs Columns + setPinOutput(F7); + setPinOutput(F6); + setPinOutput(F5); + setPinOutput(F4); + setPinOutput(F1); + setPinOutput(F0); + + //LEDs Rows + setPinOutput(D6); + setPinOutput(B4); + setPinOutput(B5); + setPinOutput(B6); + setPinOutput(C6); + setPinOutput(C7); + + //Capacitive Interrupt + setPinInput(D2); + + capSetup(); + writeDataToTS(0x06, 0x12); //Calibrate capacitive touch IC + + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + + matrix_init_quantum(); +} + + +uint16_t touchDetectionRoutine(void) { + uint16_t data; + uint8_t temp1, temp2; + + temp1 = readDataFromTS(0x04); + temp2 = readDataFromTS(0x03); + data = temp1; + data = (data << 8) | temp2; + return data; + +} + +//Process raw capacitive data, map pins to rows and columns +void decodeArray(uint16_t dataIn, uint8_t *column, uint8_t *row) { + uint8_t i1 = 20, i2 = 20; + for (uint8_t i = 0; i < 12; i++) { + if ((dataIn & 0b1) == 1) { + if (i1 == 20) { + i1 = i; + } else if (i2 == 20) { + i2 = i; + } + } + dataIn = dataIn >> 1; + } + + for (uint8_t j = 0; j < 6; j++) { + if (SENr[j] == i1 || SENr[j] == i2) { + *row = j; + } + if (SENc[j] == i1 || SENc[j] == i2) { + *column = j; + } + } +} + +void touchClearCurrentDetections(void) { + readDataFromTS(0x05); + readDataFromTS(0x02); + readDataFromTS(0x03); + readDataFromTS(0x04); +} + +//Check interrupt pin +uint8_t isTouchChangeDetected(void) { + return !readPin(D2); +} + +uint8_t matrix_scan(void) { + if (isTouchChangeDetected()) { + uint16_t dataIn = touchDetectionRoutine(); + if ((dataIn & 0b111100010001) > 0 && (dataIn & 0b000011101110) > 0) { + uint8_t column = 10, row = 10; + decodeArray(dataIn, &column, &row); + if (column != 10 && row != 10) { + vibrate = VIBRATE_LENGTH; //Trigger vibration + matrix[row] = _BV(column); + } else { + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + } + } else { + memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); + } + touchClearCurrentDetections(); + } + + for (uint8_t c = 0; c < 6; c++) { + for (uint8_t r = 0; r < 6; r++) { + switch (r) { + case 0: writePin(D6, matrix_is_on(r, c)); break; + case 1: writePin(B4, matrix_is_on(r, c)); break; + case 2: writePin(B5, matrix_is_on(r, c)); break; + case 3: writePin(B6, matrix_is_on(r, c)); break; + case 4: writePin(C6, matrix_is_on(r, c)); break; + case 5: writePin(C7, matrix_is_on(r, c)); break; + } + + switch (c) { + case 0: writePin(F5, !matrix_is_on(r, c)); break; + case 1: writePin(F4, !matrix_is_on(r, c)); break; + case 2: writePin(F1, !matrix_is_on(r, c)); break; + case 3: writePin(F0, !matrix_is_on(r, c)); break; + case 4: writePin(F6, !matrix_is_on(r, c)); break; + case 5: writePin(F7, !matrix_is_on(r, c)); break; + } + } + } + + if (vibrate == VIBRATE_LENGTH) { + writePinHigh(E6); + writePinHigh(D7); + vibrate--; + } else if (vibrate > 0) { + vibrate--; + } else if (vibrate == 0) { + writePinLow(D7); + writePinLow(E6); + } + + matrix_scan_quantum(); + + return 1; + +} + +bool matrix_is_on(uint8_t row, uint8_t col) { + return (matrix[row] & (1< Date: Thu, 10 Jan 2019 14:28:52 -0200 Subject: [PATCH 099/458] docs: Add Manjaro/Arch dependencies on getting started page (#2701) * Update getting_started_build_tools.md * Update getting_started_build_tools.md --- docs/getting_started_build_tools.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md index 375e9d108f5f..dbed200d1bdf 100644 --- a/docs/getting_started_build_tools.md +++ b/docs/getting_started_build_tools.md @@ -41,6 +41,12 @@ Debian / Ubuntu example: Fedora / Red Hat example: sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib + +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) ## Nix From 3ac6989cc13b2198f107d518e221effe55d98cd4 Mon Sep 17 00:00:00 2001 From: orbitingorca <32821588+orbitingorca@users.noreply.github.com> Date: Thu, 10 Jan 2019 16:30:30 +0000 Subject: [PATCH 100/458] Documentation clarification (#3611) * Documentation fix * Further clarification --- docs/config_options.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index 085ab3ee58ae..63bcc41d0af8 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -109,9 +109,9 @@ If you define these options you will disable the associated feature, which can s * `#define NO_ACTION_ONESHOT` * disable one-shot modifiers * `#define NO_ACTION_MACRO` - * disable all macro handling + * disable old style macro handling: MACRO() & action_get_macro * `#define NO_ACTION_FUNCTION` - * disable the action function (deprecated) + * disable calling of action_function() from the fn_actions array (deprecated) ## Features That Can Be Enabled From 07c6c4acb93b2faefb504bfdc076bc35134f0bee Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 10 Jan 2019 11:35:58 -0800 Subject: [PATCH 101/458] [Keymap] Alps64 Keymap + Readme Updates (#4807) * update readme to adhere to modern QMK standards * add in my keymap as I keep losing the darn hex file * no need for KC_FNX * update readme --- keyboards/alps64/keymaps/mechmerlin/keymap.c | 26 +++++++++++++++++++ keyboards/alps64/keymaps/mechmerlin/readme.md | 10 +++++++ keyboards/alps64/readme.md | 9 ++++--- 3 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 keyboards/alps64/keymaps/mechmerlin/keymap.c create mode 100644 keyboards/alps64/keymaps/mechmerlin/readme.md diff --git a/keyboards/alps64/keymaps/mechmerlin/keymap.c b/keyboards/alps64/keymaps/mechmerlin/keymap.c new file mode 100644 index 000000000000..d32d9f61e99d --- /dev/null +++ b/keyboards/alps64/keymaps/mechmerlin/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H +#include "mechmerlin.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* 0: qwerty */ + [_BL] = LAYOUT_infinity( \ + 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_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_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, TG(_AL), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_RALT, KC_RGUI, KC_RCTL), + + [_FL] = LAYOUT_infinity( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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), + + [_AL] = LAYOUT_infinity( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RSFT_T(KC_UP), KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), +}; diff --git a/keyboards/alps64/keymaps/mechmerlin/readme.md b/keyboards/alps64/keymaps/mechmerlin/readme.md new file mode 100644 index 000000000000..896e7ec3cb6b --- /dev/null +++ b/keyboards/alps64/keymaps/mechmerlin/readme.md @@ -0,0 +1,10 @@ +# MechMerlin Alps64 Infinity Keymap + +This is the 60% infinity layout used by u/merlin36, host of the [MechMerlin](www.youtube.com/mechmerlin) +YouTube channel. + +## Keymap Notes +- `Caps Lock` can be held to act as a `Left Control` + +### Build +To build the firmware file associated with this keymap, simply run `make alps64:mechmerlin`. diff --git a/keyboards/alps64/readme.md b/keyboards/alps64/readme.md index d6308ab190e3..1188d7819cba 100644 --- a/keyboards/alps64/readme.md +++ b/keyboards/alps64/readme.md @@ -1,14 +1,15 @@ -Alps64 -=== +# Alps64 -An Alps-only 60% board designed by Hasu. +An Alps only 60% board designed by Hasu. Keyboard Maintainer: QMK Community Hardware Supported: Alps64 PCB Hardware Availability: https://geekhack.org/index.php?topic=69666.0 +QMK is not the Alps64 official firmware. To use the official tools, refer to [TMK Keymap Editor](http://www.tmk-kbd.com/tmk_keyboard/editor/unimap/?alps64) or [TMK Keyboard Firmware on Github](https://github.com/tmk/tmk_keyboard). + Make example for this keyboard (after setting up your build environment): make alps64:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From d9c5e5870efe730af52688b9a268927872f93eb7 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 11 Jan 2019 17:11:48 -0800 Subject: [PATCH 102/458] [Keyboard] Turn on KBD67 Lighting by default (#4826) * remove broken link * enable lighting for QMK Configurator folk --- keyboards/kbd67/readme.md | 2 -- keyboards/kbd67/rules.mk | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/keyboards/kbd67/readme.md b/keyboards/kbd67/readme.md index 734b1a63aebc..f9e25099949c 100644 --- a/keyboards/kbd67/readme.md +++ b/keyboards/kbd67/readme.md @@ -1,7 +1,5 @@ # kbd67 -![kbd67](imgur.com image replace me!) - 65% keyboard with blocker. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) diff --git a/keyboards/kbd67/rules.mk b/keyboards/kbd67/rules.mk index 9d25d7b21ab4..65c82dd7f566 100644 --- a/keyboards/kbd67/rules.mk +++ b/keyboards/kbd67/rules.mk @@ -65,13 +65,13 @@ 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 +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 +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 From 2c4109394fa9ee71b10b8b2d3d1473a409d7003e Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 12 Jan 2019 12:22:06 +1100 Subject: [PATCH 103/458] Fix Caps Lock LEDs once and for all (#4824) * Check the size of the SET_REPORT packet If we have two bytes, that probably means the first is a report ID. The 6KRO interface may or may not have one, but the NKRO interface always does, so we need to check this regardless of whether KEYBOARD_SHARED_EP is defined. * Fix indentation --- tmk_core/protocol/lufa/lufa.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 27cf51b16121..cdabaf16e61d 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -517,17 +517,20 @@ void EVENT_USB_Device_ControlRequest(void) if (USB_DeviceState == DEVICE_STATE_Unattached) return; } -#ifdef KEYBOARD_SHARED_EP - uint8_t report_id = REPORT_ID_KEYBOARD; - if (keyboard_protocol) { - report_id = Endpoint_Read_8(); - } - if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) { + + if (Endpoint_BytesInEndpoint() == 2) { + uint8_t report_id = REPORT_ID_KEYBOARD; + + if (keyboard_protocol) { + report_id = Endpoint_Read_8(); + } + + if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) { keyboard_led_stats = Endpoint_Read_8(); + } + } else { + keyboard_led_stats = Endpoint_Read_8(); } -#else - keyboard_led_stats = Endpoint_Read_8(); -#endif Endpoint_ClearOUT(); Endpoint_ClearStatusStage(); From 9c136e1168a1f6d0637f59164b6d9adb9ba0bdee Mon Sep 17 00:00:00 2001 From: James Churchill Date: Fri, 11 Jan 2019 18:30:20 +1000 Subject: [PATCH 104/458] Improved fix for __always_inline redefinition bug Instead of changing based on the version of GCC, check for the presence of the macro instead. --- tmk_core/protocol/arm_atsam/usb/compiler.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tmk_core/protocol/arm_atsam/usb/compiler.h b/tmk_core/protocol/arm_atsam/usb/compiler.h index 7d8350896b54..b2ccfd73edb5 100644 --- a/tmk_core/protocol/arm_atsam/usb/compiler.h +++ b/tmk_core/protocol/arm_atsam/usb/compiler.h @@ -134,13 +134,15 @@ * heuristics and inline the function no matter how big it thinks it * becomes. */ +#if !defined(__always_inline) #if defined(__CC_ARM) # define __always_inline __forceinline -#elif (defined __GNUC__ && __GNUC__ <= 6) +#elif (defined __GNUC__) # define __always_inline __attribute__((__always_inline__)) #elif (defined __ICCARM__) # define __always_inline _Pragma("inline=forced") #endif +#endif /** * \def __no_inline From 81ad6cac7e850e1962fcc2c4057f5357a0056838 Mon Sep 17 00:00:00 2001 From: gorbachev Date: Fri, 11 Jan 2019 20:27:15 -0500 Subject: [PATCH 105/458] [Keymap] Sweet16 as a switch tester (#4822) * Sweet16 as a switch tester * pragma once * QMK_KEYBOARD_H instead of sweet16.h --- .../sweet16/keymaps/switchtester/keymap.c | 31 +++ .../sweet16/keymaps/switchtester/readme.md | 5 + .../sweet16/keymaps/switchtester/rules.mk | 12 ++ .../sweet16/keymaps/switchtester/switches.c | 99 +++++++++ .../sweet16/keymaps/switchtester/switches.h | 189 ++++++++++++++++++ 5 files changed, 336 insertions(+) create mode 100644 keyboards/1upkeyboards/sweet16/keymaps/switchtester/keymap.c create mode 100644 keyboards/1upkeyboards/sweet16/keymaps/switchtester/readme.md create mode 100644 keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk create mode 100644 keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c create mode 100644 keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.h diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/keymap.c new file mode 100644 index 000000000000..caab5b343a0f --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/keymap.c @@ -0,0 +1,31 @@ +#include QMK_KEYBOARD_H +#include "switches.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_4x4( + 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 + ) +}; + +struct mechswitch switches[MATRIX_ROWS][MATRIX_COLS] = { + {CHERRY_MX_BLUE, CHERRY_MX_RED, CHERRY_MX_BLACK, CHERRY_MX_BROWN}, + {GATERON_BLUE, GATERON_RED, GATERON_BLACK, GATERON_BROWN}, + {KAILH_BLUE, KAILH_RED, KAILH_BLACK, KAILH_BROWN}, + {HAKO_CLEAR, HAKO_TRUE, HAKO_VIOLET, HAKO_ROYAL_TRUE} +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + uint8_t col = record->event.key.col; + uint8_t row = record->event.key.row; + + if (record->event.pressed) { + char name[MAX_SWITCH_NAME_LENGTH]; + switch_name(switches[row][col], name); + send_string(name); + SEND_STRING("\n"); + } + return false; +} diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/readme.md b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/readme.md new file mode 100644 index 000000000000..9edb4e181315 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/readme.md @@ -0,0 +1,5 @@ +# Sweet16 as a switch tester + +This keymap uses the Sweet16 as a switch tester. The functionality outputs the switch name of whatever key the user pressed. + +the `switches` two-dimensional (4x4) array contains the switches attached to the macropad. The switches supported are defined as macros in the `switches.h` header file. diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk new file mode 100644 index 000000000000..c0f2d0182d6b --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/rules.mk @@ -0,0 +1,12 @@ +# 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no + +SRC += switches.c diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c new file mode 100644 index 000000000000..ae3799544885 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.c @@ -0,0 +1,99 @@ +#include +#include +#include "switches.h" + +static const char *BRAND_NAMES[] = { + "Kailh", + "Kailh Low Profile Choc", + "Gateron", + "Cherry MX", + "Cherry ML", + "Outemu", + "Greetech", + "Varmilo", + "MOD", + "Hako" +}; + +static const char *COLOR_NAMES[] = { + "", + "White", + "Black", + "Blue", + "Red", + "Yellow", + "Brown", + "Green", + "Clear", + "Silver", + "Nature White", + "Grey", + "Jade", + "Navy", + "Burnt Orange", + "Pale Blue", + "Dark Yellow", + "Gold", + "Chocolate White", + "Burgundy", + "Purple", + "Light Green", + "True", + "Berry", + "Plum", + "Sage", + "Violet", + "L", + "M", + "H", + "SH" +}; + +static const char *VARIANT_NAMES[] = { + "", + "BOX", + "BOX Thick", + "BOX Heavy", + "Silent", + "Tactile", + "Linear", + "Speed", + "Speed Heavy", + "Speed Thick Click", + "Pro", + "Pro Heavy", + "Royal", + "Thick Click", + "Heavy" +}; + +const char *brand_name(struct mechswitch ms) { + return BRAND_NAMES[ms.brand - 1]; +} + +const char *variant_name(struct mechswitch ms) { + return VARIANT_NAMES[ms.variant]; +} + +const char *color_name(struct mechswitch ms) { + return COLOR_NAMES[ms.color]; +} + +void switch_name(struct mechswitch ms, char *buf) { + const char *v_name = variant_name(ms); + const char *c_name = color_name(ms); + + snprintf(buf, MAX_SWITCH_NAME_LENGTH, "%s", brand_name(ms)); + strncat(buf, " ", MAX_SWITCH_NAME_LENGTH - strlen(buf)); + if (strlen(v_name) > 0) { + strncat(buf, v_name, MAX_SWITCH_NAME_LENGTH - strlen(buf)); + strncat(buf, " ", MAX_SWITCH_NAME_LENGTH - strlen(buf)); + } + if (strlen(c_name) > 0) { + strncat(buf, c_name, MAX_SWITCH_NAME_LENGTH - strlen(buf)); + } +} + +int bitfieldtoi(struct mechswitch ms) { + return ((ms.brand << 9) | (ms.variant << 5) | ms.color); +} diff --git a/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.h b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.h new file mode 100644 index 000000000000..6e58068bf5e3 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/switchtester/switches.h @@ -0,0 +1,189 @@ +#pragma once + +struct mechswitch +{ + unsigned int brand: 4; + unsigned int variant: 4; + unsigned int color: 5; +}; + +#define MAX_SWITCH_NAME_LENGTH 256 + +#define BRAND_KAILH 1 +#define BRAND_KAILH_LOW 2 +#define BRAND_GATERON 3 +#define BRAND_CHERRY_MX 4 +#define BRAND_CHERRY_ML 5 +#define BRAND_OUTEMU 6 +#define BRAND_GREETECH 7 +#define BRAND_VARMILO 8 +#define BRAND_MOD 9 +#define BRAND_HAKO 10 + +#define COLOR_NO 0 +#define COLOR_WHITE 1 +#define COLOR_BLACK 2 +#define COLOR_BLUE 3 +#define COLOR_RED 4 +#define COLOR_YELLOW 5 +#define COLOR_BROWN 6 +#define COLOR_GREEN 7 +#define COLOR_CLEAR 8 +#define COLOR_SILVER 9 +#define COLOR_NATURE_WHITE 10 +#define COLOR_GREY 11 +#define COLOR_JADE 12 +#define COLOR_NAVY 13 +#define COLOR_BURNT_ORANGE 14 +#define COLOR_PALE_BLUE 15 +#define COLOR_DARK_YELLOW 16 +#define COLOR_GOLD 17 +#define COLOR_CHOCOLATE_WHITE 18 +#define COLOR_BURGUNDY 19 +#define COLOR_PURPLE 20 +#define COLOR_LIGHT_GREEN 21 +#define COLOR_TRUE 22 +#define COLOR_BERRY 23 +#define COLOR_PLUM 24 +#define COLOR_SAGE 25 +#define COLOR_VIOLET 26 +#define COLOR_L 27 +#define COLOR_M 28 +#define COLOR_H 29 +#define COLOR_SH 30 + +#define VARIANT_NO 0 +#define VARIANT_BOX 1 +#define VARIANT_BOX_THICK 2 +#define VARIANT_BOX_HEAVY 3 +#define VARIANT_SILENT 4 +#define VARIANT_TACTILE 5 +#define VARIANT_LINEAR 6 +#define VARIANT_SPEED 7 +#define VARIANT_SPEED_HEAVY 8 +#define VARIANT_SPEED_CLICK_THICK 9 +#define VARIANT_PRO 10 +#define VARIANT_PRO_HEAVY 11 +#define VARIANT_ROYAL 12 +#define VARIANT_CLICK_THICK 13 + +#define CHERRY_MX_BLUE {BRAND_CHERRY_MX, VARIANT_NO, COLOR_BLUE} +#define CHERRY_MX_RED {BRAND_CHERRY_MX, VARIANT_NO, COLOR_RED} +#define CHERRY_MX_BROWN {BRAND_CHERRY_MX, VARIANT_NO, COLOR_BROWN} +#define CHERRY_MX_BLACK {BRAND_CHERRY_MX, VARIANT_NO, COLOR_BLACK} +#define CHERRY_MX_GREEN {BRAND_CHERRY_MX, VARIANT_NO, COLOR_GREEN} +#define CHERRY_MX_CLEAR {BRAND_CHERRY_MX, VARIANT_NO, COLOR_CLEAR} +#define CHERRY_MX_WHITE {BRAND_CHERRY_MX, VARIANT_NO, COLOR_WHITE} +#define CHERRY_MX_SILVER {BRAND_CHERRY_MX, VARIANT_NO, COLOR_SILVER} +#define CHERRY_MX_NATURE_WHITE {BRAND_CHERRY_MX, VARIANT_NO, COLOR_NATURE_WHITE} +#define CHERRY_MX_SILENT_BLACK {BRAND_CHERRY_MX, VARIANT_SILENT, COLOR_BLACK} +#define CHERRY_MX_SILENT_RED {BRAND_CHERRY_MX, VARIANT_SILENT, COLOR_RED} +#define CHERRY_MX_TACTILE_BLACK {BRAND_CHERRY_MX, VARIANT_SILENT, COLOR_GREY} +#define CHERRY_MX_LINEAR_BLACK {BRAND_CHERRY_MX, VARIANT_LINEAR, COLOR_GREY} + +#define CHERRY_ML {BRAND_CHERRY_ML, VARIANT_NO, COLOR_NO} + +#define GATERON_BLUE {BRAND_GATERON, VARIANT_NO, COLOR_BLUE} +#define GATERON_BROWN {BRAND_GATERON, VARIANT_NO, COLOR_BROWN} +#define GATERON_BLACK {BRAND_GATERON, VARIANT_NO, COLOR_BLACK} +#define GATERON_RED {BRAND_GATERON, VARIANT_NO, COLOR_RED} +#define GATERON_CLEAR {BRAND_GATERON, VARIANT_NO, COLOR_CLEAR} +#define GATERON_GREEN {BRAND_GATERON, VARIANT_NO, COLOR_GREEN} +#define GATERON_YELLOW {BRAND_GATERON, VARIANT_NO, COLOR_YELLOW} + +#define GATERON_SILENT_CLEAR {BRAND_GATERON, VARIANT_SILENT, COLOR_CLEAR} +#define GATERON_SILENT_RED {BRAND_GATERON, VARIANT_SILENT, COLOR_RED} +#define GATERON_SILENT_YELLOW {BRAND_GATERON, VARIANT_SILENT, COLOR_YELLOW} +#define GATERON_SILENT_BLACK {BRAND_GATERON, VARIANT_SILENT, COLOR_BLACK} +#define GATERON_SILENT_BROWN {BRAND_GATERON, VARIANT_SILENT, COLOR_BROWN} + +#define GREETECH_BLUE {BRAND_GREETECH, VARIANT_NO, COLOR_BLUE} +#define GREETECH_BROWN {BRAND_GREETECH, VARIANT_NO, COLOR_BROWN} +#define GREETECH_BLACK {BRAND_GREETECH, VARIANT_NO, COLOR_BLACK} +#define GREETECH_RED {BRAND_GREETECH, VARIANT_NO, COLOR_RED} + +#define OUTEMU_BLUE {BRAND_OUTEMU, VARIANT_NO, COLOR_BLUE} +#define OUTEMU_BROWN {BRAND_OUTEMU, VARIANT_NO, COLOR_BROWN} +#define OUTEMU_BLACK {BRAND_OUTEMU, VARIANT_NO, COLOR_BLACK} +#define OUTEMU_RED {BRAND_OUTEMU, VARIANT_NO, COLOR_RED} + +#define KAILH_BLUE {BRAND_KAILH, VARIANT_NO, COLOR_BLUE} +#define KAILH_BROWN {BRAND_KAILH, VARIANT_NO, COLOR_BROWN} +#define KAILH_BLACK {BRAND_KAILH, VARIANT_NO, COLOR_BLACK} +#define KAILH_RED {BRAND_KAILH, VARIANT_NO, COLOR_RED} +#define KAILH_GREEN {BRAND_KAILH, VARIANT_NO, COLOR_GREEN} + +#define KAILH_BOX_WHITE {BRAND_KAILH, VARIANT_BOX, COLOR_WHITE} +#define KAILH_BOX_RED {BRAND_KAILH, VARIANT_BOX, COLOR_RED} +#define KAILH_BOX_BLACK {BRAND_KAILH, VARIANT_BOX, COLOR_BLACK} +#define KAILH_BOX_BROWN {BRAND_KAILH, VARIANT_BOX, COLOR_BROWN} +#define KAILH_BOX_ROYAL {BRAND_KAILH, VARIANT_BOX, COLOR_ROYAL} + +#define KAILH_BOX_THICK_JADE {BRAND_KAILH, VARIANT_BOX_THICK, COLOR_JADE} +#define KAILH_BOX_THICK_NAVY {BRAND_KAILH, VARIANT_BOX_THICK, COLOR_NAVY} +#define KAILH_BOX_HEAVY_BURNT_ORANGE {BRAND_KAILH, VARIANT_BOX_HEAVY, COLOR_BURNT_ORANGE} +#define KAILH_BOX_HEAVY_PALE_BLUE {BRAND_KAILH, VARIANT_BOX_HEAVY, COLOR_PALE_BLUE} +#define KAILH_BOX_HEAVY_DARK_YELLOW {BRAND_KAILH, VARIANT_BOX_HEAVY, COLOR_DARK_YELLOW} + +#define KAILH_SPEED_BRONZE {BRAND_KAILH, VARIANT_SPEED, COLOR_BRONZE} +#define KAILH_SPEED_COPPER {BRAND_KAILH, VARIANT_SPEED, COLOR_COPPER} +#define KAILH_SPEED_GOLD {BRAND_KAILH, VARIANT_SPEED, COLOR_GOLD} +#define KAILH_SPEED_SILVER {BRAND_KAILH, VARIANT_SPEED, COLOR_SILVER} + +#define KAILH_SPEED_HEAVY_BURNT_ORANGE {BRAND_KAILH, VARIANT_SPEED_HEAVY, COLOR_BURNT_ORANGE} +#define KAILH_SPEED_HEAVY_PALE_BLUE {BRAND_KAILH, VARIANT_SPEED_HEAVY, COLOR_PALE_BLUE} +#define KAILH_SPEED_HEAVY_DARK_YELLOW {BRAND_KAILH, VARIANT_SPEED_HEAVY, COLOR_DARK_YELLOW} + +#define KAILH_SPEED_THICK_CLICK_NAVY {BRAND_KAILH, VARIANT_SPEED_CLICK_THICK, COLOR_NAVY} + +#define KAILH_PRO_BURGUNDY {BRAND_KAILH, VARIANT_PRO, COLOR_BURGUNDY} +#define KAILH_PRO_PURPLE {BRAND_KAILH, VARIANT_PRO, COLOR_PURPLE} +#define KAILH_PRO_LIGHT_GREEN {BRAND_KAILH, VARIANT_PRO, COLOR_LIGHT_GREEN} + +#define KAILH_PRO_HEAVY_BERRY {BRAND_KAILH, VARIANT_PRO_HEAVY, COLOR_BERRY} +#define KAILH_PRO_HEAVY_PLUM {BRAND_KAILH, VARIANT_PRO_HEAVY, COLOR_PLUM} +#define KAILH_PRO_GEAVY_SAGE {BRAND_KAILH, VARIANT_PRO_HEAVY, COLOR_SAGE} + +#define KAILH_LOW_WHITE {BRAND_KAILH_LOW, VARIANT_NO, COLOR_WHITE} +#define KAILH_LOW_BROWN {BRAND_KAILH_LOW, VARIANT_NO, COLOR_BROWN} +#define KAILH_LOW_RED {BRAND_KAILH_LOW, VARIANT_NO, COLOR_RED} +#define KAILH_LOW_CHOCOLATE_WHITE {BRAND_KAILH_LOW, VARIANT_NO, COLOR_CHOCOLATE_WHITE} +#define KAILH_LOW_THICK_CLICK_NAVY {BRAND_KAILH_LOW, VARIANT_THICK_CLICK, COLOR_NAVY} +#define KAILH_LOW_THICK_CLICK_JADE {BRAND_KAILH_LOW, VARIANT_THICK_CLICK, COLOR_JADE} +#define KAILH_LOW_HEAVY_DARK_YELLOW {BRAND_KAILH_LOW, VARIANT_HEAVY, COLOR_DARK_YELLOW} +#define KAILH_LOW_HEAVY_BURNT_ORANGE {BRAND_KAILH_LOW, VARIANT_HEAVY, COLOR_BURNT_ORANGE} +#define KAILH_LOW_HEAVY_PALE_BLUE {BRAND_KAILH_LOW, VARIANT_HEAVY, COLOR_PALE_BLUE} + +#define HAKO_ROYAL_CLEAR {BRAND_HAKO, VARIANT_ROYAL, COLOR_CLEAR} +#define HAKO_ROYAL_TRUE {BRAND_HAKO, VARIANT_ROYAL, COLOR_TRUE} + +#define HAKO_CLEAR {BRAND_HAKO, VARIANT_NO, COLOR_CLEAR} +#define HAKO_TRUE {BRAND_HAKO, VARIANT_NO, COLOR_TRUE} +#define HAKO_VIOLET {BRAND_HAKO, VARIANT_NO, COLOR_VIOLET} + +#define MOD_L_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_L} +#define MOD_M_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_M} +#define MOD_H_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_H} +#define MOD_SH_TACTILE {BRAND_MOD, VARIANT_TACTILE, COLOR_SH} + +#define MOD_L_LINEAR {BRAND_MOD, VARIANT_LINEAR, COLOR_L} +#define MOD_M_LINEAR {BRAND_MOD, VARIANT_LINEAR, COLOR_M} +#define MOD_H_LINEAR {BRAND_MOD, VARIANT_LINEAR, COLOR_H} + +#define BYTE_TO_BINARY_PATTERN "%c%c%c%c%c%c%c%c" +#define BYTE_TO_BINARY(byte) \ + (byte & 0x80 ? '1' : '0'), \ + (byte & 0x40 ? '1' : '0'), \ + (byte & 0x20 ? '1' : '0'), \ + (byte & 0x10 ? '1' : '0'), \ + (byte & 0x08 ? '1' : '0'), \ + (byte & 0x04 ? '1' : '0'), \ + (byte & 0x02 ? '1' : '0'), \ + (byte & 0x01 ? '1' : '0') + + +const char *brand_name(struct mechswitch ms); +const char *variant_name(struct mechswitch ms); +const char *color_name(struct mechswitch ms); +void switch_name(struct mechswitch ms, char *buf); +int bitfieldtoi(struct mechswitch ms); From cad0e3b90c49402cc4f4a539ae8c303129e75b6c Mon Sep 17 00:00:00 2001 From: Spaceman Date: Fri, 11 Jan 2019 20:30:54 -0500 Subject: [PATCH 106/458] [Keymap] added new planck keymap /sebas (#4821) * Create readme.md * Add files via upload * Add files via upload * Update readme.md * Add files via upload * Update keymap.c * Delete temp.c * updated per request removed 41-69 and changed keymap to layout * Update keymap.c * Added Guide * Update keymap.c * Update readme.md * Create readme.md * Add files via upload * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c --- .../hadron/ver3/keymaps/sebaslayout/config.h | 1 + .../hadron/ver3/keymaps/sebaslayout/keymap.c | 57 ++++++++++++ .../hadron/ver3/keymaps/sebaslayout/readme.md | 7 ++ keyboards/planck/keymaps/sebas/keymap.c | 90 +++++++++++++++++++ keyboards/planck/keymaps/sebas/readme.md | 3 + 5 files changed, 158 insertions(+) create mode 100644 keyboards/hadron/ver3/keymaps/sebaslayout/config.h create mode 100644 keyboards/hadron/ver3/keymaps/sebaslayout/keymap.c create mode 100644 keyboards/hadron/ver3/keymaps/sebaslayout/readme.md create mode 100644 keyboards/planck/keymaps/sebas/keymap.c create mode 100644 keyboards/planck/keymaps/sebas/readme.md diff --git a/keyboards/hadron/ver3/keymaps/sebaslayout/config.h b/keyboards/hadron/ver3/keymaps/sebaslayout/config.h new file mode 100644 index 000000000000..6f70f09beec2 --- /dev/null +++ b/keyboards/hadron/ver3/keymaps/sebaslayout/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/hadron/ver3/keymaps/sebaslayout/keymap.c b/keyboards/hadron/ver3/keymaps/sebaslayout/keymap.c new file mode 100644 index 000000000000..01fe45bd05e7 --- /dev/null +++ b/keyboards/hadron/ver3/keymaps/sebaslayout/keymap.c @@ -0,0 +1,57 @@ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, + 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_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_QUOT, KC_SCLN, 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_UP, KC_SLSH, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_SPC, MO(1), KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), +/* Primary + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | PRTSN| + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | ˜ | Q | W | E | R | T | Y | U | I | O | P | BKSP | 7 | 8 | 9 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ' | ; | 4 | 5 | 6 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up | /? | 1 | 2 | 3 | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | Raise| Space | Raise| Ctrl | Left | Down |Right | 0 | . | Enter| + * `--------------------------------------------------------------------------------------------------------' + */ + LAYOUT( + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_HOME, KC_INS, 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_END, KC_DEL, KC_PGDN, + 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +/* Secondary + * ,------+------+------+------+------+------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------+------+------+------+------+------+------+--------------------. + * | | | | | | | | | | F11 | F12 | | Home | Ins | PgUP | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | End | Del | PgDN | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Vol+ | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | Vol- | | | | | + * `--------------------------------------------------------------------------------------------------------' + */ +}; + + +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/hadron/ver3/keymaps/sebaslayout/readme.md b/keyboards/hadron/ver3/keymaps/sebaslayout/readme.md new file mode 100644 index 000000000000..ce6974ce0968 --- /dev/null +++ b/keyboards/hadron/ver3/keymaps/sebaslayout/readme.md @@ -0,0 +1,7 @@ +![Hadron v3 Layout Image](https://i.imgur.com/Mi5L57j.png) + +# My Custome Hadron Layout + ++ Moved numpad to the right ++ changed F row to standard numbers ++ Bottom row subject to change diff --git a/keyboards/planck/keymaps/sebas/keymap.c b/keyboards/planck/keymaps/sebas/keymap.c new file mode 100644 index 000000000000..1076531f13e3 --- /dev/null +++ b/keyboards/planck/keymaps/sebas/keymap.c @@ -0,0 +1,90 @@ +#include QMK_KEYBOARD_H +enum planck_layers { + _DEFAULT, + _LOWER, + _RAISE, + _FN +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FN MO(_FN) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Default + * ,-----------------------------------------------------------------------------------. + * | 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 | Alt | GUI | FN | Lower| Space |Raise | / | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DEFAULT] = 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_QUOT, KC_SCLN, + 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_LALT, KC_LGUI, FN, LOWER, KC_SPC, KC_SPC, RAISE, KC_SLSH, KC_LEFT, KC_DOWN, KC_RGHT +), + + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | _ | + | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | { | } | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | ? | | Vol- | | + * `-----------------------------------------------------------------------------------' + */ +[_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_UNDS, KC_PLUS, _______, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_QUES, _______, KC_VOLD, _______ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | - | = | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | [ | ] | Vol- | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Vol+ | | + * `-----------------------------------------------------------------------------------' + */ +[_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_MINS, KC_EQL, _______, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_VOLU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______ +), + + /* FN + * ,-----------------------------------------------------------------------------------. + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | F11 | F12 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | TRNS | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FN] = LAYOUT_planck_grid( + 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, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + + +}; + diff --git a/keyboards/planck/keymaps/sebas/readme.md b/keyboards/planck/keymaps/sebas/readme.md new file mode 100644 index 000000000000..4a0ad84fb69e --- /dev/null +++ b/keyboards/planck/keymaps/sebas/readme.md @@ -0,0 +1,3 @@ + +# Sebas Planck layout +My personal layout From 52ccd8d89f7e4c8fca0dc15c269e8b140de520d9 Mon Sep 17 00:00:00 2001 From: Leszek111 Date: Sat, 12 Jan 2019 02:39:24 +0100 Subject: [PATCH 107/458] [Keymap] Adds layout for Ergodox, colemak_code_friendly (#4819) * Adds layout for Ergodox, colemak_code_friendly * code cleanup * code cleanup * code cleanup --- .../ergodox/colemak_code_friendly/keymap.c | 335 ++++++++++++++++++ .../ergodox/colemak_code_friendly/readme.md | 106 ++++++ .../ergodox/colemak_code_friendly/rules.mk | 7 + 3 files changed, 448 insertions(+) create mode 100644 layouts/community/ergodox/colemak_code_friendly/keymap.c create mode 100644 layouts/community/ergodox/colemak_code_friendly/readme.md create mode 100644 layouts/community/ergodox/colemak_code_friendly/rules.mk diff --git a/layouts/community/ergodox/colemak_code_friendly/keymap.c b/layouts/community/ergodox/colemak_code_friendly/keymap.c new file mode 100644 index 000000000000..936ddbc2a59d --- /dev/null +++ b/layouts/community/ergodox/colemak_code_friendly/keymap.c @@ -0,0 +1,335 @@ +/* -*- Mode:C; c-basic-offset:2; tab-width:2; indent-tabs-mode:nil; evil-indent-convert-tabs:t; -*- */ + +#include QMK_KEYBOARD_H + +//#define DYNAMIC_MACRO_SIZE 128 + +#define LAYER_BASE 0 /* default layer */ +#define LAYER_NUM 1 /* numbers and symbols */ +#define LAYER_LNUM 2 /* Left side -> LAYER_NUM, Right side -> Shift + LAYER_BASE */ +#define LAYER_RNUM 3 /* Left side -> Shift + LAYER_BASE, Right side -> LAYER_NUM */ + +enum custom_keycodes5 { + PLACEHOLDER = SAFE_RANGE, /* can always be here */ + + M_POINER, /* -> */ + M_LAMBDA, /* => */ + M_IN_CBR, /* {} */ + M_IN_PRN, /* () */ + M_IN_BRC, /* [] */ + M_IN_ANG, /* <> */ + M_NOT_EQL, /* != */ + M_COL_EQL, /* := */ + M_PLUS_EQL,/* += */ + + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * .--------------------------------------------------. .--------------------------------------------------. + * | Grave | ! | @ | # | $ | % | ^ | | TG(1)| & | * | ( | ) | - | Bspc | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | = | | _ | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| { | | } |------+------+------+------+------+--------| + * | LShift |Z/LCtl|X/Supe| C | V |B/RAlt| | | |K/RAlt| M | , |./Supe|/ RCtl| RShift | + * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + * | LCtl |Super | Alt | [ | ] | | Left | Down | Up |Right | Del | + * '----------------------------------' '----------------------------------' + * .-------------. .-------------. + * | Home | End | | Ins |ScrLck| + * .------+------+------| |------+------+------. + * | | |PrnScr| | PgUp | | | + * | LNUM | Enter|------| |------| Space| RNUM | + * | | | Super| | PgDn | | | + * '--------------------' '--------------------' + */ + +[LAYER_BASE] = LAYOUT_ergodox( /* layer 0 : default */ + /* left hand */ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_EQL, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, LCTL_T(KC_Z), LGUI_T(KC_X), KC_C, KC_V, RALT_T(KC_B), KC_LCBR, + KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, KC_RBRC, + + KC_HOME, KC_END, + KC_PSCR, + MO(LAYER_LNUM), KC_ENT, KC_LGUI, + /* right hand */ + TG(1), KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_BSPC, + KC_UNDS, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_RCBR, RALT_T(KC_K), KC_M, KC_COMM, LGUI_T(KC_DOT), RCTL_T(KC_SLSH), KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, + KC_INS, KC_SLCK, + KC_PGUP, + KC_PGDN, KC_SPC, MO(LAYER_RNUM) +), +/* Keymap 1: Numbers, Macro Record + * + * .--------------------------------------------------. .--------------------------------------------------. + * | | | | | | <> | | | | | * | ( | ) | - | | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | F12 | F11 | F10 | F9 | {} | | | = | => | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F8 | F7 | F6 | F5 | () |------| |------| -> | 4 | 5 | 6 | 0 | | + * |--------+------+------+------+------+------| | | Enter|------+------+------+------+------+--------| + * | | F4 | F3 | F2 | F1 | [] | | | | != | 1 | 2 | 3 | | | + * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + * | MUTE | VOLD | VOLU | | | | 0 | , | . | | | + * '----------------------------------' '----------------------------------' + * .-------------. .-------------. + * | | | | | Stop | + * .------+------+------| |------+------+------. + * | | |Start1| |Start2| | | + * | | |------| |------| | | + * | | |Play1 | |Play2 | | | + * '--------------------' '--------------------' + */ +[LAYER_NUM] = LAYOUT_ergodox( + /* left hand */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_IN_ANG, KC_TRNS, + KC_TRNS, KC_F12, KC_F11, KC_F10, KC_F9, M_IN_CBR, KC_TRNS, + KC_TRNS, KC_F8, KC_F7, KC_F6, KC_F5, M_IN_PRN, + KC_TRNS, KC_F4, KC_F3, KC_F2, KC_F1, M_IN_BRC, KC_TRNS, + KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + DYN_REC_START1, + KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, + /* right hand */ + KC_TRNS, KC_TRNS, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_TRNS, + KC_EQL, M_LAMBDA, KC_7, KC_8, KC_9, KC_PLUS, KC_TRNS, + M_POINER, KC_4, KC_5, KC_6, KC_0, KC_TRNS, + KC_ENT, M_NOT_EQL, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, DYN_REC_STOP, + DYN_REC_START2, + DYN_MACRO_PLAY2, KC_TRNS, KC_TRNS +), +/* Keymap 2: Left side -> LAYER_NUM, Right side -> Shift + LAYER_BASE + * + * .--------------------------------------------------. .--------------------------------------------------. + * | | | | | | <> | | | TG(1)| & | * | ( | ) | - | Bspc | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | F12 | F11 | F10 | F9 | {} | | | _ | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F8 | F7 | F6 | F5 | () |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| | | } |------+------+------+------+------+--------| + * | | F4 | F3 | F2 | F1 | [] | | | |K/RAlt| M | , |./Supe|/ RCtl| RShift | + * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + * | MUTE | VOLD | VOLU | | | | Left | Down | Up |Right | Del | + * '----------------------------------' '----------------------------------' + * .-------------. .-------------. + * | | | | Ins |ScrLck| + * .------+------+------| |------+------+------. + * | | |Start1| | PgUp | | | + * | | |------| |------| Space|CapsLk| + * | | |Play1 | | PgDn | | | + * '--------------------' '--------------------' + */ +[LAYER_LNUM] = LAYOUT_ergodox( + /* left hand */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M_IN_ANG, KC_TRNS, + KC_TRNS, KC_F12, KC_F11, KC_F10, KC_F9, M_IN_CBR, KC_TRNS, + KC_TRNS, KC_F8, KC_F7, KC_F6, KC_F5, M_IN_PRN, + KC_TRNS, KC_F4, KC_F3, KC_F2, KC_F1, M_IN_BRC, KC_TRNS, + KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + DYN_REC_START1, + KC_TRNS, KC_TRNS, DYN_MACRO_PLAY1, + /* right hand */ + TG(1), KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, S(KC_MINS), S(KC_BSPC), + KC_UNDS, S(KC_J), S(KC_L), S(KC_U), S(KC_Y), S(KC_SCLN), S(KC_BSLS), + S(KC_H), S(KC_N), S(KC_E), S(KC_I), S(KC_O), S(KC_QUOT), + KC_RCBR, S(KC_K), S(KC_M), S(KC_COMM), S(KC_DOT), S(KC_SLSH), KC_RSFT, + S(KC_LEFT), S(KC_DOWN), S(KC_UP), S(KC_RGHT), S(KC_DEL), + S(KC_INS), S(KC_SLCK), + S(KC_PGUP), + S(KC_PGDN), S(KC_SPC), KC_CAPS +), +/* Keymap 3: Left side -> Shift + LAYER_BASE, Right side -> LAYER_NUM + * + * .--------------------------------------------------. .--------------------------------------------------. + * | Grave | ! | @ | # | $ | % | ^ | | | | * | ( | ) | - | | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | = | | = | => | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Esc | A | R | S | T | D |------| |------| -> | 4 | 5 | 6 | 0 | | + * |--------+------+------+------+------+------| { | | Enter|------+------+------+------+------+--------| + * | LShift |Z/LCtl|X/Supe| C | V |B/RAlt| | | | != | 1 | 2 | 3 | | | + * '--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + * | LCtl |Super | Alt | [ | ] | | 0 | , | . | | | + * '----------------------------------' '----------------------------------' + * .-------------. .-------------. + * | Home | End | | | Stop | + * .------+------+------| |------+------+------. + * | | |PrnScr| |Start2| | | + * |CapsLk| Enter|------| |------| | | + * | | | Super| |Play2 | | | + * '--------------------' '--------------------' + */ +[LAYER_RNUM] = LAYOUT_ergodox( + /* left hand */ + S(KC_GRV), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, + S(KC_TAB), S(KC_Q), S(KC_W), S(KC_F), S(KC_P), S(KC_G), S(KC_EQL), + S(KC_ESC), S(KC_A), S(KC_R), S(KC_S), S(KC_T), S(KC_D), + KC_LSFT, S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), KC_LCBR, + S(KC_LCTL), S(KC_LGUI), S(KC_LALT), S(KC_LBRC), S(KC_RBRC), + + S(KC_HOME), S(KC_END), + S(KC_PSCR), + KC_CAPS, S(KC_ENT), S(KC_LGUI), + /* right hand */ + KC_TRNS, KC_TRNS, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_TRNS, + KC_EQL, M_LAMBDA, KC_7, KC_8, KC_9, KC_PLUS, KC_TRNS, + M_POINER, KC_4, KC_5, KC_6, KC_0, KC_TRNS, + KC_ENT, M_NOT_EQL, KC_1, KC_2, KC_3, KC_TRNS, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, + KC_TRNS, DYN_REC_STOP, + DYN_REC_START2, + DYN_MACRO_PLAY2, KC_TRNS, KC_TRNS +), +}; + +static bool recording_dynamic_macro; + +static bool process_record_dynamic_macro_wrapper(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + /* detect dynamic macro recording state */ + case DYN_REC_START1: + case DYN_REC_START2: + if (record->event.pressed) { + recording_dynamic_macro = true; + } + break; + case DYN_REC_STOP: + if (record->event.pressed) { + recording_dynamic_macro = false; + } + break; + } + + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + return true; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + /* the purpose of the ..._wrapper is to detect START/ST0P keys to + light the blue led during recording */ + if (!process_record_dynamic_macro_wrapper(keycode, record)) { + return false; + } + + switch (keycode) { + /* static macro keys */ + case M_IN_CBR: + if (record->event.pressed) { + SEND_STRING("{}" SS_TAP(X_LEFT)); + return false; + } + break; + case M_IN_PRN: + if (record->event.pressed) { + SEND_STRING("()" SS_TAP(X_LEFT)); + return false; + } + break; + case M_IN_BRC: + if (record->event.pressed) { + SEND_STRING("[]" SS_TAP(X_LEFT)); + return false; + } + break; + case M_IN_ANG: + if (record->event.pressed) { + SEND_STRING("<>" SS_TAP(X_LEFT)); + return false; + } + break; + case M_POINER: + if (record->event.pressed) { + SEND_STRING("->"); + return false; + } + break; + case M_LAMBDA: + if (record->event.pressed) { + SEND_STRING("=>"); + return false; + } + break; + case M_NOT_EQL: + if (record->event.pressed) { + SEND_STRING("!="); + return false; + } + break; + case M_COL_EQL: + if (record->event.pressed) { + SEND_STRING(":="); + return false; + } + break; + case M_PLUS_EQL: + if (record->event.pressed) { + SEND_STRING("+="); + return false; + } + break; + } + + return true; +} + +/* Runs just one time when the keyboard initializes. */ +void matrix_init_user(void) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + ergodox_right_led_1_set(5); + ergodox_right_led_2_set(5); + ergodox_right_led_3_set(5); +}; + +/* Runs constantly in the background, in a loop. */ +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + //led 1, RED, Caps-Lock ON + //if (host_keyboard_leds() & (1< | | | | | * | ( | ) | - | | +|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| +| | F12 | F11 | F10 | F9 | {} | | | = | => | 7 | 8 | 9 | + | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | F8 | F7 | F6 | F5 | () |------| |------| -> | 4 | 5 | 6 | 0 | | +|--------+------+------+------+------+------| | | Enter|------+------+------+------+------+--------| +| | F4 | F3 | F2 | F1 | [] | | | | != | 1 | 2 | 3 | | | +'--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + | MUTE | VOLD | VOLU | | | | 0 | , | . | | | + '----------------------------------' '----------------------------------' + .-------------. .-------------. + | | | | | Stop | + .------+------+------| |------+------+------. + | | |Start1| |Start2| | | + | | |------| |------| | | + | | |Play1 | |Play2 | | | + '--------------------' '--------------------' +``` + +## Keymap 2: Left side -> LAYER_NUM, Right side -> Shift + LAYER_BASE + + +``` +.--------------------------------------------------. .--------------------------------------------------. +| | | | | | <> | | | TG(1)| & | * | ( | ) | - | Bspc | +|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| +| | F12 | F11 | F10 | F9 | {} | | | _ | J | L | U | Y | ; | \ | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | F8 | F7 | F6 | F5 | () |------| |------| H | N | E | I | O | ' | +|--------+------+------+------+------+------| | | } |------+------+------+------+------+--------| +| | F4 | F3 | F2 | F1 | [] | | | |K/RAlt| M | , |./Supe|/ RCtl| RShift | +'--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + | MUTE | VOLD | VOLU | | | | Left | Down | Up |Right | Del | + '----------------------------------' '----------------------------------' + .-------------. .-------------. + | | | | Ins |ScrLck| + .------+------+------| |------+------+------. + | | |Start1| | PgUp | | | + | | |------| |------| Space|CapsLk| + | | |Play1 | | PgDn | | | + '--------------------' '--------------------' +``` + +## Keymap 3: Left side -> Shift + LAYER_BASE, Right side -> LAYER_NUM + + +``` +.--------------------------------------------------. .--------------------------------------------------. +| Grave | ! | @ | # | $ | % | ^ | | | | * | ( | ) | - | | +|--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| +| Tab | Q | W | F | P | G | = | | = | => | 7 | 8 | 9 | + | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Esc | A | R | S | T | D |------| |------| -> | 4 | 5 | 6 | 0 | | +|--------+------+------+------+------+------| { | | Enter|------+------+------+------+------+--------| +| LShift |Z/LCtl|X/Supe| C | V |B/RAlt| | | | != | 1 | 2 | 3 | | | +'--------+------+------+------+------+-------------' '-------------+------+------+------+------+--------' + | LCtl |Super | Alt | [ | ] | | 0 | , | . | | | + '----------------------------------' '----------------------------------' + .-------------. .-------------. + | Home | End | | | Stop | + .------+------+------| |------+------+------. + | | |PrnScr| |Start2| | | + |CapsLk| Enter|------| |------| | | + | | | Super| |Play2 | | | + '--------------------' '--------------------' +``` diff --git a/layouts/community/ergodox/colemak_code_friendly/rules.mk b/layouts/community/ergodox/colemak_code_friendly/rules.mk new file mode 100644 index 000000000000..2bff0c5cf29b --- /dev/null +++ b/layouts/community/ergodox/colemak_code_friendly/rules.mk @@ -0,0 +1,7 @@ +COMMAND_ENABLE = no +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +CONSOLE_ENABLE = no +RGBLIGHT_ENABLE = no +LEADER_ENABLE = no +MIDI_ENABLE = no From d8eace35ebae454923f3ed30fc93ad357640d804 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Fri, 11 Jan 2019 19:44:06 -0600 Subject: [PATCH 108/458] [Keyboard] Adding support for Gergo (#4792) * Commited into clean repo * Gergo initial release * Cleaning up * Cleaning up * Update readme.md * Updated image, fixed MD formatting, added clairity * Moved keymap to keyboard subdir, modified rules.mk * Cleaned header guards * Cleaned header guards. Read the rest of the PR comments * Update keyboards/gergo/keymaps/default/keymap.c Co-Authored-By: germ * Update keyboards/gergo/readme.md Co-Authored-By: germ * Moved makefiles to keymap mod-area-thingy-with-overrides * Update rules.mk Slow the roll on the defaults while I wait for merge * Update rules.mk * Cleaning cleaning cleaning * More housekeeping. Keeping optdefs * moved keyboard specfic conf to config.h. Can we merge yet? * added info.json --- keyboards/gergo/config.h | 73 +++ keyboards/gergo/gergo.c | 66 +++ keyboards/gergo/gergo.h | 58 +++ keyboards/gergo/i2cmaster.h | 178 ++++++++ keyboards/gergo/info.json | 277 ++++++++++++ keyboards/gergo/keymaps/default/keymap.c | 151 +++++++ keyboards/gergo/keymaps/default/readme.md | 10 + keyboards/gergo/keymaps/default/rules.mk | 36 ++ keyboards/gergo/matrix.c | 517 ++++++++++++++++++++++ keyboards/gergo/readme.md | 26 ++ keyboards/gergo/rules.mk | 20 + 11 files changed, 1412 insertions(+) create mode 100644 keyboards/gergo/config.h create mode 100644 keyboards/gergo/gergo.c create mode 100644 keyboards/gergo/gergo.h create mode 100644 keyboards/gergo/i2cmaster.h create mode 100644 keyboards/gergo/info.json create mode 100644 keyboards/gergo/keymaps/default/keymap.c create mode 100644 keyboards/gergo/keymaps/default/readme.md create mode 100644 keyboards/gergo/keymaps/default/rules.mk create mode 100644 keyboards/gergo/matrix.c create mode 100644 keyboards/gergo/readme.md create mode 100644 keyboards/gergo/rules.mk diff --git a/keyboards/gergo/config.h b/keyboards/gergo/config.h new file mode 100644 index 000000000000..a795f8dba110 --- /dev/null +++ b/keyboards/gergo/config.h @@ -0,0 +1,73 @@ +/* +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 */ +#ifndef BALLSTEP +#define BALLSTEP 20 +#endif + +#ifndef SCROLLSTEP +#define SCROLLSTEP 1 +#endif + +#define VERBOSE + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER g Heavy Industries +#define PRODUCT Gergo +#define DESCRIPTION QMK keyboard firmware for Gergo + +/* 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 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() ( \ + 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/gergo/gergo.c b/keyboards/gergo/gergo.c new file mode 100644 index 000000000000..c6ba91bb284d --- /dev/null +++ b/keyboards/gergo/gergo.c @@ -0,0 +1,66 @@ +#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 - 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(ERGODOX_EZ_I2C_TIMEOUT); + + // 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(ERGODOX_EZ_I2C_TIMEOUT); + // SREG=sreg_prev; + //uprintf("Init %x\n", mcp23018_status); + return mcp23018_status; +} diff --git a/keyboards/gergo/gergo.h b/keyboards/gergo/gergo.h new file mode 100644 index 000000000000..c0d885029b75 --- /dev/null +++ b/keyboards/gergo/gergo.h @@ -0,0 +1,58 @@ +#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_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) \ + \ + /* matrix positions */ \ + { \ + { 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}, \ + \ + { R10, KC_NO, 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/gergo/i2cmaster.h b/keyboards/gergo/i2cmaster.h new file mode 100644 index 000000000000..72e05084942f --- /dev/null +++ b/keyboards/gergo/i2cmaster.h @@ -0,0 +1,178 @@ +#ifndef _I2CMASTER_H +#define _I2CMASTER_H 1 +/************************************************************************* +* Title: C include file for the I2C master interface +* (i2cmaster.S or twimaster.c) +* Author: Peter Fleury http://jump.to/fleury +* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device +* Usage: see Doxygen manual +**************************************************************************/ + +#ifdef DOXYGEN +/** + @defgroup pfleury_ic2master I2C Master library + @code #include @endcode + + @brief I2C (TWI) Master Software Library + + Basic routines for communicating with I2C slave devices. This single master + implementation is limited to one bus master on the I2C bus. + + This I2c library is implemented as a compact assembler software implementation of the I2C protocol + which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). + Since the API for these two implementations is exactly the same, an application can be linked either against the + software I2C implementation or the hardware I2C implementation. + + Use 4.7k pull-up resistor on the SDA and SCL pin. + + Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module + i2cmaster.S to your target when using the software I2C implementation ! + + Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. + + @note + The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted + to GNU assembler and AVR-GCC C call interface. + Replaced the incorrect quarter period delays found in AVR300 with + half period delays. + + @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury + + @par API Usage Example + The following code shows typical usage of this library, see example test_i2cmaster.c + + @code + + #include + + + #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet + + int main(void) + { + unsigned char ret; + + i2c_init(); // initialize I2C library + + // write 0x75 to EEPROM address 5 (Byte Write) + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + i2c_write(0x05); // write address = 5 + i2c_write(0x75); // write value 0x75 to EEPROM + i2c_stop(); // set stop conditon = release bus + + + // read previously written value back from EEPROM address 5 + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + + i2c_write(0x05); // write address = 5 + i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode + + ret = i2c_readNak(); // read one byte from EEPROM + i2c_stop(); + + for(;;); + } + @endcode + +*/ +#endif /* DOXYGEN */ + +/**@{*/ + +#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 +#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" +#endif + +#include + +/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_READ 1 + +/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_WRITE 0 + + +/** + @brief initialize the I2C master interace. Need to be called only once + @param void + @return none + */ +void i2c_init(void); + + +/** + @brief Terminates the data transfer and releases the I2C bus + @param void + @return none + */ +void i2c_stop(void); + + +/** + @brief Issues a start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +unsigned char i2c_start(unsigned char addr); + + +/** + @brief Issues a repeated start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +unsigned char i2c_rep_start(unsigned char addr); + + +/** + @brief Issues a start condition and sends address and transfer direction + + If device is busy, use ack polling to wait until device ready + @param addr address and transfer direction of I2C device + @return none + */ +void i2c_start_wait(unsigned char addr); + + +/** + @brief Send one byte to I2C device + @param data byte to be transfered + @retval 0 write successful + @retval 1 write failed + */ +unsigned char i2c_write(unsigned char data); + + +/** + @brief read one byte from the I2C device, request more data from device + @return byte read from I2C device + */ +unsigned char i2c_readAck(void); + +/** + @brief read one byte from the I2C device, read is followed by a stop condition + @return byte read from I2C device + */ +unsigned char i2c_readNak(void); + +/** + @brief read one byte from the I2C device + + Implemented as a macro, which calls either i2c_readAck or i2c_readNak + + @param ack 1 send ack, request more data from device
+ 0 send nak, read is followed by a stop condition + @return byte read from I2C device + */ +unsigned char i2c_read(unsigned char ack); +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + + +/**@}*/ +#endif diff --git a/keyboards/gergo/info.json b/keyboards/gergo/info.json new file mode 100644 index 000000000000..433582b54bfc --- /dev/null +++ b/keyboards/gergo/info.json @@ -0,0 +1,277 @@ +{ + "maintainer": "germ", + "height": 4.75, + "width": 19.5, + "keyboard_name": "Gergo", + "url": "http://gboards.ca", + "layouts": { + "LAYOUT": { + "layout": [ + { + "label": "L00", + "w": 1.5, + "x": 0, + "y": 0.38 + }, + { + "label": "L01", + "x": 1.5, + "y": 0.38 + }, + { + "label": "L02", + "x": 2.5, + "y": 0.13 + }, + { + "label": "L03", + "x": 3.5, + "y": 0 + }, + { + "label": "L04", + "x": 4.5, + "y": 0.13 + }, + { + "label": "L05", + "x": 5.5, + "y": 0.25 + }, + { + "label": "R00", + "x": 13, + "y": 0.25 + }, + { + "label": "R01", + "x": 14, + "y": 0.13 + }, + { + "label": "R02", + "x": 15, + "y": 0 + }, + { + "label": "R03", + "x": 16, + "y": 0.13 + }, + { + "label": "R04", + "x": 17, + "y": 0.38 + }, + { + "label": "R05", + "w": 1.5, + "x": 18, + "y": 0.38 + }, + { + "label": "L10", + "w": 1.5, + "x": 0, + "y": 1.3800000000000001 + }, + { + "label": "L11", + "x": 1.5, + "y": 1.3800000000000001 + }, + { + "label": "L12", + "x": 2.5, + "y": 1.1300000000000001 + }, + { + "label": "L13", + "x": 3.5, + "y": 1.0 + }, + { + "label": "L14", + "x": 4.5, + "y": 1.1300000000000001 + }, + { + "label": "L15", + "x": 5.5, + "y": 1.25 + }, + { + "h": 1.5, + "label": "L16", + "x": 6.5, + "y": 0.25 + }, + { + "h": 1.5, + "label": "R10", + "x": 12, + "y": 0.25 + }, + { + "label": "R11", + "x": 13, + "y": 1.25 + }, + { + "label": "R12", + "x": 14, + "y": 1.1300000000000001 + }, + { + "label": "R13", + "x": 15, + "y": 1.0 + }, + { + "label": "R14", + "x": 16, + "y": 1.1300000000000001 + }, + { + "label": "R15", + "x": 17, + "y": 1.3800000000000001 + }, + { + "label": "R16", + "w": 1.5, + "x": 18, + "y": 1.3800000000000001 + }, + { + "label": "L20", + "w": 1.5, + "x": 0, + "y": 2.38 + }, + { + "label": "L21", + "x": 1.5, + "y": 2.38 + }, + { + "label": "L22", + "x": 2.5, + "y": 2.13 + }, + { + "label": "L23", + "x": 3.5, + "y": 2 + }, + { + "label": "L24", + "x": 4.5, + "y": 2.13 + }, + { + "label": "L25", + "x": 5.5, + "y": 2.25 + }, + { + "h": 1.5, + "label": "L26", + "x": 6.5, + "y": 1.75 + }, + { + "h": 1.5, + "label": "R20", + "x": 12, + "y": 1.75 + }, + { + "label": "R21", + "x": 13, + "y": 2.25 + }, + { + "label": "R22", + "x": 14, + "y": 2.13 + }, + { + "label": "R23", + "x": 15, + "y": 2 + }, + { + "label": "R24", + "x": 16, + "y": 2.13 + }, + { + "label": "R25", + "x": 17, + "y": 2.38 + }, + { + "label": "R26", + "w": 1.5, + "x": 18, + "y": 2.38 + }, + { + "label": "L31", + "x": 4.75, + "y": 3.25 + }, + { + "label": "L32", + "x": 6, + "y": 3.63 + }, + { + "label": "R33", + "x": 12.5, + "y": 3.63 + }, + { + "label": "R34", + "x": 13.75, + "y": 3.25 + }, + { + "label": "L30", + "x": 8.25, + "y": 2.75 + }, + { + "label": "R30", + "x": 10.25, + "y": 2.75 + }, + { + "h": 2, + "label": "L33", + "x": 7.25, + "y": 3.75 + }, + { + "h": 2, + "label": "L34", + "x": 8.25, + "y": 3.75 + }, + { + "h": 2, + "label": "R31", + "x": 10.25, + "y": 3.75 + }, + { + "h": 2, + "label": "R32", + "x": 11.25, + "y": 3.75 + } + ] + } + } +} diff --git a/keyboards/gergo/keymaps/default/keymap.c b/keyboards/gergo/keymaps/default/keymap.c new file mode 100644 index 000000000000..fabd945fef6c --- /dev/null +++ b/keyboards/gergo/keymaps/default/keymap.c @@ -0,0 +1,151 @@ +/* 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 IGNORE_MOD_TAP_INTERRUPT +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers/motion + +// Blank template at the bottom + +enum customKeycodes { + URL = 1 +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | L1/ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * |Ctrl/BS | A | S | D | F | G | RMB | | | H | J | K | L | ; : | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | LMB | | | N | M | , < | . > | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .----------. .-------. .------. .-----. + * | Super/Del| |Ent/ALT| | Tab | |BKSP | + * '----------' '-------' `------. '-----' + * ,-------. ,-------. + * | MMB | | PgDn | + * ,------|-------| |-------|------. + * | SYMB | NUMB | | SYMB | NUMB | + * | Space| Escape| | Mod |Space | + * | | | | | | + * `--------------' `--------------' + */ +[BASE] = LAYOUT_GERGO( +LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE, +MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, +KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + + MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), KC_TAB, KC_BSPC, + + KC_BTN3, KC_PGDN, + LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC)), +/* Keymap 1: Symbols layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | ! | @ | { | } | | | | | | | | | \ | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` | | | | + | - | / | * | % | ' " | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | = | , | . | / ? | - _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | DEL | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | PgUp | + * ,------|-------| |-------|------. + * | | | | | | + * | ; | = | | = | ; | + * | | | | | | + * `--------------' `--------------' + */ +[SYMB] = LAYOUT_GERGO( +KC_TRNS, KC_EXLM, KC_AT, KC_LCBR,KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, +KC_TRNS, KC_HASH, KC_DLR, KC_LPRN,KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT, +KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS, + + KC_TRNS, KC_TRNS, KC_PGUP, KC_DEL, + KC_TRNS, KC_TRNS, + KC_SCLN, KC_EQL, KC_EQL, KC_SCLN), +/* Keymap 2: Pad/Function layer + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | | LEFT | DOWN | UP | RIGHT|VolDn | VolUp | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT|Ply/Pa| Skip | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | PgUp | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' + */ +[NUMB] = LAYOUT_GERGO( +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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU, +KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT, + + KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + +/* Keymap template + * + * ,-------------------------------------------. ,-------------------------------------------. + * | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * .------. .------. .------. .-----. + * | | | | | | | | + * '------' '------' `------. '-----' + * ,-------. ,-------. + * | | | | + * ,------|-------| |-------|------. + * | | | | | | + * | | | | | | + * | | | | | | + * `--------------' `--------------' +[SYMB] = LAYOUT_GERGO( +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, +KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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) { + //uint8_t layer = biton32(layer_state); + biton32(layer_state); +}; + + diff --git a/keyboards/gergo/keymaps/default/readme.md b/keyboards/gergo/keymaps/default/readme.md new file mode 100644 index 000000000000..471a20fbdff2 --- /dev/null +++ b/keyboards/gergo/keymaps/default/readme.md @@ -0,0 +1,10 @@ +# [Gergo! By g Heavy Industries](http://gboards.ca) + +![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg) + +This is the default keymap for Gergo, it's based heavily off of the naps62 ErgoDox layout and is aimed at a programmer friendly keymap. + +## Settings +To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/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/gergo/keymaps/default/rules.mk b/keyboards/gergo/keymaps/default/rules.mk new file mode 100644 index 000000000000..2f825a76639f --- /dev/null +++ b/keyboards/gergo/keymaps/default/rules.mk @@ -0,0 +1,36 @@ +#---------------------------------------------------------------------------- +# make gergo:germ:dfu +# Make sure you have dfu-programmer installed! +#---------------------------------------------------------------------------- +# Firmware options +BALLER = yes # Enable to ball out +BALLSTEP = 20 # Multiple in px to move, multiplied by layer number +SCROLLSTEP = 1 # Lines to scroll with ball +MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller + +#Debug options +VERBOSE = yes +DEBUG_MATRIX_SCAN_RATE = no +DEBUG_BALLER = no +DEBUG_MATRIX = 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 +ifneq ($(strip $(BALLSTEP)),) + OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP)) +endif +ifneq ($(strip $(SCROLLSTEP)),) + OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) +endif +ifeq ($(strip $(BALLER)), yes) + OPT_DEFS += -DBALLER +endif +ifeq ($(strip $(DEBUG_BALLER)), yes) + OPT_DEFS += -DDEBUG_BALLER +endif +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c new file mode 100644 index 000000000000..29fe48ccb317 --- /dev/null +++ b/keyboards/gergo/matrix.c @@ -0,0 +1,517 @@ +/* +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 "pointing_device.h" +#include QMK_KEYBOARD_H +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +#ifdef BALLER +#include +#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) + +//Trackball pin defs +#define TRKUP (1<<4) +#define TRKDN (1<<5) +#define TRKLT (1<<6) +#define TRKRT (1<<7) +#define TRKBTN (1<<6) + + +// Multiple for mouse moves +#ifndef TRKSTEP +#define TRKSTEP 20 +#endif + +// multiple for mouse scroll +#ifndef SCROLLSTEP +#define SCROLLSTEP 5 +#endif + +// 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) +#define TRKMASK (TRKUP | TRKDN | TRKRT | TRKLT) + +// 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; + +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]; +/* + * 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 void enableInterrupts(void); + +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) +{ + // TODO: Find what is trashing interrupts + enableInterrupts(); + + // First we handle the mouse inputs + #ifdef BALLER + uint8_t pBtn = PINE & TRKBTN; + + #ifdef DEBUG_BALLER + // 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 + report_mouse_t pRprt = pointing_device_get_report(); + + // Scroll by default, move on layer + if (layer_state == 0) { + pRprt.h += tbLtCnt * SCROLLSTEP; tbLtCnt = 0; + pRprt.h -= tbRtCnt * SCROLLSTEP; tbRtCnt = 0; + pRprt.v -= tbUpCnt * SCROLLSTEP; tbUpCnt = 0; + pRprt.v += tbDnCnt * SCROLLSTEP; tbDnCnt = 0; + } else { + pRprt.x -= tbLtCnt * TRKSTEP * (layer_state - 1); tbLtCnt = 0; + pRprt.x += tbRtCnt * TRKSTEP * (layer_state - 1); tbRtCnt = 0; + pRprt.y -= tbUpCnt * TRKSTEP * (layer_state - 1); tbUpCnt = 0; + pRprt.y += tbDnCnt * TRKSTEP * (layer_state - 1); tbDnCnt = 0; + } + + #ifdef DEBUG_BALLER + if (pRprt.x != 0 || pRprt.y != 0) + xprintf("X: %d Y: %d\n", pRprt.x, pRprt.y); + #endif + + if ((pBtn != trkBtnState) && ((pBtn >> 6) == 0)) pRprt.buttons |= MOUSE_BTN1; + 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)) + pointing_device_set_report(pRprt); + + trkBtnState = pBtn; + #endif + + // 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(); + enableInterrupts(); + +#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 | TRKMASK); + PORTB &= ~(BMASK); + DDRC &= ~CMASK; + PORTC &= ~CMASK; + DDRD &= ~DMASK; + PORTD &= ~DMASK; + + // Fix trashing of DDRB for TB + PORTB |= TRKMASK; +} + +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< Date: Fri, 11 Jan 2019 09:50:14 +1100 Subject: [PATCH 109/458] Remove empty fn_actions[] --- keyboards/412_64/keymaps/default/keymap.c | 6 ---- keyboards/al1/keymaps/splitbs/keymap.c | 4 --- keyboards/alf/dc60/keymaps/default/keymap.c | 4 --- keyboards/alps64/keymaps/crd/keymap.c | 2 -- keyboards/alps64/keymaps/default/keymap.c | 1 - keyboards/amj96/keymaps/default/keymap.c | 4 --- keyboards/atomic/keymaps/default/keymap.c | 4 --- keyboards/atomic/keymaps/michelle.c | 3 -- keyboards/atreus/keymaps/alphadox/keymap.c | 4 --- keyboards/atreus/keymaps/classic/keymap.c | 4 --- keyboards/atreus/keymaps/default/keymap.c | 4 --- .../atreus/keymaps/dvorak_42_key/keymap.c | 4 --- keyboards/atreus/keymaps/gerb/keymap.c | 4 --- keyboards/atreus/keymaps/jeremy/keymap.c | 4 --- keyboards/atreus/keymaps/nojjan/keymap.c | 4 --- keyboards/atreus/keymaps/xyverz/keymap.c | 4 --- keyboards/atreus62/keymaps/default/keymap.c | 6 ---- keyboards/atreus62/keymaps/mfluid/keymap.c | 6 ---- keyboards/atreus62/keymaps/mneme/keymap.c | 3 -- keyboards/atreus62/keymaps/pcewing/keymap.c | 4 --- keyboards/atreus62/keymaps/xyverz/keymap.c | 3 -- keyboards/bantam44/keymaps/default/keymap.c | 3 -- .../kitten_paw/keymaps/default/keymap.c | 6 +--- .../unloved_bastard/keymaps/default/keymap.c | 5 --- .../keymaps/default_ansi/keymap.c | 5 --- keyboards/catch22/keymaps/default/keymap.c | 3 -- .../chibios_test/keymaps/default/keymap.c | 3 -- .../chimera_ergo/keymaps/default/keymap.c | 5 --- .../chimera_ortho/keymaps/gordon/keymap.c | 5 --- .../ckeys/nakey/keymaps/default/keymap.c | 4 --- .../clueboard/17/keymaps/default/keymap.c | 3 -- keyboards/cod67/keymaps/default/keymap.c | 4 --- keyboards/daisy/keymaps/default/keymap.c | 4 --- keyboards/dichotomy/keymaps/default/keymap.c | 5 --- .../duck/lightsaver/keymaps/rasmus/keymap.c | 3 -- .../ergodox_ez/keymaps/matrixman/keymap.c | 5 --- keyboards/ergodox_ez/util/compile_keymap.py | 3 -- keyboards/fc660c/keymaps/dbroqua/keymap.c | 3 -- keyboards/fc660c/keymaps/default/keymap.c | 3 -- .../keymaps/actuation-point-example/keymap.c | 2 -- .../fc980c/keymaps/coloneljesus/keymap.c | 2 -- keyboards/fc980c/keymaps/default/keymap.c | 2 -- keyboards/gh60/keymaps/bluezio/keymap.c | 3 -- keyboards/gh60/keymaps/xyverz/keymap.c | 4 --- keyboards/gonnerd/keymaps/default/keymap.c | 4 --- keyboards/gonnerd/keymaps/tkl/keymap.c | 4 --- keyboards/h87a/keymaps/default/keymap.c | 4 --- .../frenchdev/keymaps/default/keymap.c | 5 --- .../handwired/ibm122m/keymaps/lukaus/keymap.c | 4 --- .../retro_refit/keymaps/default/keymap.c | 4 --- .../woodpad/keymaps/default/keymap.c | 4 --- keyboards/hhkb/keymaps/cinaeco/keymap.c | 4 --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 4 --- keyboards/hhkb/keymaps/default/keymap.c | 4 --- keyboards/hhkb/keymaps/enoch_jp/keymap.c | 4 --- keyboards/hhkb/keymaps/eric/keymap.c | 4 --- keyboards/hhkb/keymaps/jp/keymap.c | 4 --- keyboards/hhkb/keymaps/jp_mac/keymap.c | 4 --- keyboards/hhkb/keymaps/krusli/keymap.c | 4 --- keyboards/hhkb/keymaps/mjt/keymap.c | 4 --- keyboards/hhkb/keymaps/rdg_jp/keymap.c | 4 --- keyboards/hhkb/keymaps/sh_jp/keymap.c | 4 --- keyboards/hhkb/keymaps/smt/keymap.c | 4 --- keyboards/infinity60/keymaps/default/keymap.c | 4 --- .../infinity60/keymaps/depariel/keymap.c | 4 --- keyboards/infinity60/keymaps/hasu/keymap.c | 7 ---- keyboards/k_type/keymaps/belak/keymap.c | 4 --- keyboards/k_type/keymaps/default/keymap.c | 4 --- keyboards/kbd66/keymaps/ansi/keymap.c | 4 --- keyboards/kbd66/keymaps/default/keymap.c | 4 --- keyboards/kbd66/keymaps/iso/keymap.c | 4 --- keyboards/kbd8x/keymaps/default/keymap.c | 4 --- .../keymaps/default_backlighting/keymap.c | 4 --- keyboards/kc60/keymaps/default/keymap.c | 4 --- keyboards/kc60/keymaps/sgoodwin/keymap.c | 4 --- keyboards/kc60/keymaps/wigguno/keymap.c | 4 --- keyboards/kinesis/keymaps/carpalx/keymap.c | 5 --- keyboards/kinesis/keymaps/default/keymap.c | 5 --- .../kinesis/keymaps/default_pretty/keymap.c | 5 --- keyboards/kinesis/keymaps/dvorak/keymap.c | 5 --- keyboards/kinesis/keymaps/xyverz/keymap.c | 5 --- keyboards/kira75/keymaps/default/keymap.c | 4 --- keyboards/kmac/keymaps/default/keymap.c | 4 --- keyboards/kmac/keymaps/winkeyless/keymap.c | 4 --- .../massdrop/alt/keymaps/default/keymap.c | 4 --- keyboards/massdrop/alt/keymaps/mac/keymap.c | 4 --- .../massdrop/alt/keymaps/reywood/keymap.c | 4 --- .../massdrop/ctrl/keymaps/default/keymap.c | 4 --- keyboards/massdrop/ctrl/keymaps/mac/keymap.c | 4 --- keyboards/maxipad/keymaps/default/keymap.c | 3 -- keyboards/meira/keymaps/cole/keymap.c | 4 --- keyboards/meira/keymaps/default/keymap.c | 4 --- keyboards/meira/keymaps/grahampheath/keymap.c | 4 --- keyboards/meira/keymaps/takmiya/keymap.c | 4 --- keyboards/mint60/keymaps/default/keymap.c | 4 --- keyboards/mint60/keymaps/eucalyn/keymap.c | 4 --- keyboards/mitosis/keymaps/default/keymap.c | 5 --- keyboards/mitosis/keymaps/mjt/keymap.c | 3 -- keyboards/mxss/keymaps/default/keymap.c | 5 --- keyboards/nyquist/keymaps/bramver/keymap.c | 9 ----- keyboards/paladin64/keymaps/default/keymap.c | 1 - keyboards/phantom/keymaps/xyverz/keymap.c | 5 --- keyboards/planck/keymaps/alexey/keymap.c | 4 --- keyboards/planck/keymaps/basic/keymap.c | 4 --- keyboards/planck/keymaps/bone2planck/keymap.c | 5 --- keyboards/planck/keymaps/cbbrowne/keymap.c | 5 --- keyboards/planck/keymaps/gabriel/keymap.c | 4 --- keyboards/planck/keymaps/jacob/keymap.c | 4 --- keyboards/planck/keymaps/johannes/keymap.c | 4 --- keyboards/planck/keymaps/lukas/keymap.c | 4 --- keyboards/planck/keymaps/luke/keymap.c | 4 --- keyboards/planck/keymaps/neo2planck/keymap.c | 4 --- keyboards/planck/keymaps/pete/keymap.c | 3 -- keyboards/planck/keymaps/tak3over/keymap.c | 4 --- keyboards/planck/keymaps/unicode/keymap.c | 4 --- keyboards/planck/keymaps/yale/keymap.c | 4 --- .../preonic/keymaps/CMD-Preonic/keymap.c | 4 --- keyboards/s60_x/keymaps/custom/keymap.c | 2 -- keyboards/s60_x/keymaps/plain/keymap.c | 1 - .../satan/keymaps/admiralStrokers/keymap.c | 7 ---- keyboards/satan/keymaps/bri/keymap.c | 35 ------------------- .../scrabblepad/keymaps/default/keymap.c | 4 --- .../sixkeyboard/keymaps/default/keymap.c | 6 +--- keyboards/speedo/keymaps/default/keymap.c | 4 --- .../bananasplit/keymaps/0010/keymap.c | 4 --- .../bananasplit/keymaps/coloneljesus/keymap.c | 4 --- .../bananasplit/keymaps/default/keymap.c | 3 -- .../bananasplit/keymaps/hhkbanana/keymap.c | 3 -- .../keymaps/jockyxu1122_ansi/keymap.c | 3 -- .../keymaps/jockyxu1122_iso/keymap.c | 3 -- .../bananasplit/keymaps/kamon/keymap.c | 4 --- .../bananasplit/keymaps/nic/keymap.c | 3 -- .../minivan/keymaps/belak/keymap.c | 2 -- .../minivan/keymaps/core/keymap.c | 3 -- .../minivan/keymaps/default/keymap.c | 4 --- .../minivan/keymaps/jetpacktuxedo/keymap.c | 3 -- .../roadkit/keymaps/default/keymap.c | 4 --- .../roadkit/keymaps/flipphone/keymap.c | 4 --- .../roadkit/keymaps/mjt/keymap.c | 4 --- .../roadkit/keymaps/singles/keymap.c | 4 --- .../roadkit/keymaps/singlesBrent/keymap.c | 4 --- keyboards/v60_type_r/keymaps/default/keymap.c | 7 ---- keyboards/v60_type_r/keymaps/vimouse/keymap.c | 3 -- .../whitefox/keymaps/dudeofawesome/keymap.c | 4 --- keyboards/xd75/keymaps/adi/keymap.c | 4 --- keyboards/xd75/keymaps/atomic_style/keymap.c | 4 --- keyboards/xd75/keymaps/boy_314/keymap.c | 6 ---- keyboards/xd75/keymaps/bramver/keymap.c | 2 -- .../xd75/keymaps/c4software_bepo/keymap.c | 4 --- keyboards/xd75/keymaps/cbbrowne/keymap.c | 4 --- keyboards/xd75/keymaps/default/keymap.c | 4 --- .../xd75/keymaps/dyn_macro_tap_dance/keymap.c | 4 --- keyboards/xd75/keymaps/emilyh/keymap.c | 4 --- keyboards/xd75/keymaps/french/keymap.c | 4 --- keyboards/xd75/keymaps/kim-kim-xd73/keymap.c | 4 --- keyboards/xd75/keymaps/kim-kim/keymap.c | 4 --- keyboards/xd75/keymaps/kloki/keymap.c | 3 -- layouts/community/ergodox/ab/keymap.c | 3 -- layouts/community/ergodox/alphadox/keymap.c | 3 -- layouts/community/ergodox/bepo_csa/keymap.c | 3 -- layouts/community/ergodox/dave/keymap.c | 5 --- .../ergodox/german-manuneo/compile_keymap.py | 3 -- .../community/ergodox/german-manuneo/keymap.c | 2 -- .../ergodox/neo2_on_qwertz_hardware/keymap.c | 2 -- layouts/community/ergodox/osx_de/keymap.c | 4 --- .../ergodox/osx_de_adnw_koy/keymap.c | 4 --- .../ergodox/osx_de_experimental/keymap.c | 4 --- .../romanzolotarev-norman-osx/keymap.c | 3 -- .../romanzolotarev-norman-qwerty-osx/keymap.c | 3 -- layouts/community/ergodox/sethbc/keymap.c | 3 -- .../community/ergodox/software_neo2/keymap.c | 4 --- layouts/community/ergodox/supercoder/keymap.c | 3 -- layouts/community/ergodox/tm2030/keymap.c | 3 -- layouts/community/ergodox/xyverz/keymap.c | 4 --- layouts/community/ergodox/yoruian/keymap.c | 3 -- 175 files changed, 2 insertions(+), 712 deletions(-) diff --git a/keyboards/412_64/keymaps/default/keymap.c b/keyboards/412_64/keymaps/default/keymap.c index c098a37e5ef4..405c563056a9 100644 --- a/keyboards/412_64/keymaps/default/keymap.c +++ b/keyboards/412_64/keymaps/default/keymap.c @@ -71,12 +71,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { keyevent_t event = record->event; (void)event; diff --git a/keyboards/al1/keymaps/splitbs/keymap.c b/keyboards/al1/keymaps/splitbs/keymap.c index 095c9b9785dd..42bdfc7ec109 100644 --- a/keyboards/al1/keymaps/splitbs/keymap.c +++ b/keyboards/al1/keymaps/splitbs/keymap.c @@ -15,10 +15,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/alf/dc60/keymaps/default/keymap.c b/keyboards/alf/dc60/keymaps/default/keymap.c index b7425178bc3b..f67a11b93a9c 100644 --- a/keyboards/alf/dc60/keymaps/default/keymap.c +++ b/keyboards/alf/dc60/keymaps/default/keymap.c @@ -33,10 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/alps64/keymaps/crd/keymap.c b/keyboards/alps64/keymaps/crd/keymap.c index 0b12f02ad73a..9268083522e6 100644 --- a/keyboards/alps64/keymaps/crd/keymap.c +++ b/keyboards/alps64/keymaps/crd/keymap.c @@ -28,5 +28,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______ ) }; - -const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index dd598379e8d9..72d29a06fef1 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -10,4 +10,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL ), }; -const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/amj96/keymaps/default/keymap.c b/keyboards/amj96/keymaps/default/keymap.c index 0976d856e46c..514c2166816a 100644 --- a/keyboards/amj96/keymaps/default/keymap.c +++ b/keyboards/amj96/keymaps/default/keymap.c @@ -36,10 +36,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/atomic/keymaps/default/keymap.c b/keyboards/atomic/keymaps/default/keymap.c index ae1efb2b6632..6e8cd9f05c75 100644 --- a/keyboards/atomic/keymaps/default/keymap.c +++ b/keyboards/atomic/keymaps/default/keymap.c @@ -211,10 +211,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/keyboards/atomic/keymaps/michelle.c b/keyboards/atomic/keymaps/michelle.c index 9c22423d6855..61953bf6606a 100644 --- a/keyboards/atomic/keymaps/michelle.c +++ b/keyboards/atomic/keymaps/michelle.c @@ -168,9 +168,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/keyboards/atreus/keymaps/alphadox/keymap.c b/keyboards/atreus/keymaps/alphadox/keymap.c index 575a640c4f15..15485f287d8d 100644 --- a/keyboards/atreus/keymaps/alphadox/keymap.c +++ b/keyboards/atreus/keymaps/alphadox/keymap.c @@ -31,10 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case TEENSY: diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c index 529b58a13b4f..dce9dd96deee 100644 --- a/keyboards/atreus/keymaps/classic/keymap.c +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -31,10 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 2e991ac6f27e..d353728a97e4 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -43,10 +43,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c index 3672a40c1fa0..a6efd1befa37 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c +++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c @@ -65,10 +65,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if(record->event.pressed) { switch (keycode) { diff --git a/keyboards/atreus/keymaps/gerb/keymap.c b/keyboards/atreus/keymaps/gerb/keymap.c index c52f32ef61d9..f858aa49c45c 100644 --- a/keyboards/atreus/keymaps/gerb/keymap.c +++ b/keyboards/atreus/keymaps/gerb/keymap.c @@ -46,10 +46,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c index 890980f41f7a..baf506b9744b 100644 --- a/keyboards/atreus/keymaps/jeremy/keymap.c +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -55,10 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) {} diff --git a/keyboards/atreus/keymaps/nojjan/keymap.c b/keyboards/atreus/keymaps/nojjan/keymap.c index 8f56e5746770..d0aa3b279a38 100644 --- a/keyboards/atreus/keymaps/nojjan/keymap.c +++ b/keyboards/atreus/keymaps/nojjan/keymap.c @@ -41,10 +41,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c index fb0c5077f84b..dc9c308c3894 100644 --- a/keyboards/atreus/keymaps/xyverz/keymap.c +++ b/keyboards/atreus/keymaps/xyverz/keymap.c @@ -163,10 +163,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/atreus62/keymaps/default/keymap.c b/keyboards/atreus62/keymaps/default/keymap.c index 89ff7012ea06..e39f5ad12582 100644 --- a/keyboards/atreus62/keymaps/default/keymap.c +++ b/keyboards/atreus62/keymaps/default/keymap.c @@ -47,12 +47,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; - - -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch (id) { diff --git a/keyboards/atreus62/keymaps/mfluid/keymap.c b/keyboards/atreus62/keymaps/mfluid/keymap.c index f19c02d8e6de..206a4655be50 100644 --- a/keyboards/atreus62/keymaps/mfluid/keymap.c +++ b/keyboards/atreus62/keymaps/mfluid/keymap.c @@ -38,12 +38,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - - -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch (id) { diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 299b0c96b1e1..ba46d405ea62 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -171,9 +171,6 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { } } -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { diff --git a/keyboards/atreus62/keymaps/pcewing/keymap.c b/keyboards/atreus62/keymaps/pcewing/keymap.c index 49d3c9084285..46ec3d548ea1 100644 --- a/keyboards/atreus62/keymaps/pcewing/keymap.c +++ b/keyboards/atreus62/keymaps/pcewing/keymap.c @@ -76,10 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 0f2e8ea08fce..cc45e25fa402 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -137,9 +137,6 @@ void matrix_init_user(void) { #endif }; -const uint16_t PROGMEM fn_actions[] = { -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/bantam44/keymaps/default/keymap.c b/keyboards/bantam44/keymaps/default/keymap.c index 0e15bebf86d3..dff91d6c20ef 100644 --- a/keyboards/bantam44/keymaps/default/keymap.c +++ b/keyboards/bantam44/keymaps/default/keymap.c @@ -24,9 +24,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function { return MACRO_NONE; diff --git a/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c index 6767f04145d9..3ad3247d492e 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/default/keymap.c @@ -14,10 +14,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -48,4 +44,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void led_set_user(uint8_t usb_led) { -} \ No newline at end of file +} diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c index ea103154eaad..0576cb24226f 100644 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/keymap.c @@ -25,11 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c b/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c index 16c0342d2376..afae406b1e9a 100644 --- a/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c +++ b/keyboards/bpiphany/unloved_bastard/keymaps/default_ansi/keymap.c @@ -25,11 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/catch22/keymaps/default/keymap.c b/keyboards/catch22/keymaps/default/keymap.c index f36478d44019..790ae1eeb908 100644 --- a/keyboards/catch22/keymaps/default/keymap.c +++ b/keyboards/catch22/keymaps/default/keymap.c @@ -22,9 +22,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function { return MACRO_NONE; diff --git a/keyboards/chibios_test/keymaps/default/keymap.c b/keyboards/chibios_test/keymaps/default/keymap.c index a362e2ccf67d..11616cf55901 100644 --- a/keyboards/chibios_test/keymaps/default/keymap.c +++ b/keyboards/chibios_test/keymaps/default/keymap.c @@ -20,6 +20,3 @@ along with this program. If not, see . const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {{KC_CAPS}}, // test with KC_CAPS, KC_A, RESET }; - -const uint16_t fn_actions[] = { -}; diff --git a/keyboards/chimera_ergo/keymaps/default/keymap.c b/keyboards/chimera_ergo/keymaps/default/keymap.c index f24e6194bc6b..1b83877266ea 100644 --- a/keyboards/chimera_ergo/keymaps/default/keymap.c +++ b/keyboards/chimera_ergo/keymaps/default/keymap.c @@ -92,11 +92,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/chimera_ortho/keymaps/gordon/keymap.c b/keyboards/chimera_ortho/keymaps/gordon/keymap.c index c6766bed3af8..c0543f2e0413 100644 --- a/keyboards/chimera_ortho/keymaps/gordon/keymap.c +++ b/keyboards/chimera_ortho/keymaps/gordon/keymap.c @@ -301,11 +301,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/keyboards/ckeys/nakey/keymaps/default/keymap.c b/keyboards/ckeys/nakey/keymaps/default/keymap.c index 9c3e45b94611..ee14c1716e54 100644 --- a/keyboards/ckeys/nakey/keymaps/default/keymap.c +++ b/keyboards/ckeys/nakey/keymaps/default/keymap.c @@ -25,10 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { diff --git a/keyboards/clueboard/17/keymaps/default/keymap.c b/keyboards/clueboard/17/keymaps/default/keymap.c index e8f3525a869f..67fa79c811dd 100644 --- a/keyboards/clueboard/17/keymaps/default/keymap.c +++ b/keyboards/clueboard/17/keymaps/default/keymap.c @@ -55,9 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /*enum function_id { };*/ -const uint16_t PROGMEM fn_actions[] = { -}; - void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { switch (id) { } diff --git a/keyboards/cod67/keymaps/default/keymap.c b/keyboards/cod67/keymaps/default/keymap.c index a85dc2c288b1..9e1273a18973 100644 --- a/keyboards/cod67/keymaps/default/keymap.c +++ b/keyboards/cod67/keymaps/default/keymap.c @@ -26,10 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/daisy/keymaps/default/keymap.c b/keyboards/daisy/keymaps/default/keymap.c index f1a5e353fae3..9a520ba55d9f 100644 --- a/keyboards/daisy/keymaps/default/keymap.c +++ b/keyboards/daisy/keymaps/default/keymap.c @@ -70,10 +70,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case LOWER: diff --git a/keyboards/dichotomy/keymaps/default/keymap.c b/keyboards/dichotomy/keymaps/default/keymap.c index e44bd21d9efc..f3417a3fcd71 100755 --- a/keyboards/dichotomy/keymaps/default/keymap.c +++ b/keyboards/dichotomy/keymaps/default/keymap.c @@ -87,11 +87,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - static uint16_t special_timers[LONGPRESS_COUNT] = {0xFFFF,0xFFFF,0xFFFF,0xFFFF}; static bool special_key_states[LONGPRESS_COUNT] = {0,0,0,0}; static bool special_key_pressed[LONGPRESS_COUNT] = {0,0,0,0}; diff --git a/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c b/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c index 518ba2d21a77..70dc17bb1394 100644 --- a/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c +++ b/keyboards/duck/lightsaver/keymaps/rasmus/keymap.c @@ -91,9 +91,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case SHRG: diff --git a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c index d40f6475bc81..f5d0a0cf799d 100644 --- a/keyboards/ergodox_ez/keymaps/matrixman/keymap.c +++ b/keyboards/ergodox_ez/keymaps/matrixman/keymap.c @@ -162,11 +162,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -// [1] = ACTION_LAYER_TAP_TOGGLE(SYMB), // FN1 - Tap/Toggle Layer 1 (Symbols) -// [2] = ACTION_LAYER_TAP_TOGGLE(NAV) // FN2 - Tap/Toggle Layer 2 (Nav) -}; - 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/util/compile_keymap.py b/keyboards/ergodox_ez/util/compile_keymap.py index 7076a6ecb2e0..f427d6fd8020 100644 --- a/keyboards/ergodox_ez/util/compile_keymap.py +++ b/keyboards/ergodox_ez/util/compile_keymap.py @@ -668,9 +668,6 @@ def iter_keymap_parts(config, keymaps): yield "};\n\n" - # no idea what this is for - yield "const uint16_t PROGMEM fn_actions[] = {};\n" - # macros yield MACROCODE.format( macro_cases="", diff --git a/keyboards/fc660c/keymaps/dbroqua/keymap.c b/keyboards/fc660c/keymaps/dbroqua/keymap.c index 62ef234c75fe..0c6931a3f280 100644 --- a/keyboards/fc660c/keymaps/dbroqua/keymap.c +++ b/keyboards/fc660c/keymaps/dbroqua/keymap.c @@ -42,6 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______, _______,_______,MO(1), _______,_______,_______ ) }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/fc660c/keymaps/default/keymap.c b/keyboards/fc660c/keymaps/default/keymap.c index eae07c08b177..bf890c2c1d99 100644 --- a/keyboards/fc660c/keymaps/default/keymap.c +++ b/keyboards/fc660c/keymaps/default/keymap.c @@ -32,6 +32,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______, _______,_______,MO(1), _______,_______,_______ ) }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/fc980c/keymaps/actuation-point-example/keymap.c b/keyboards/fc980c/keymaps/actuation-point-example/keymap.c index ac993ae6baa3..96393a4d76f9 100644 --- a/keyboards/fc980c/keymaps/actuation-point-example/keymap.c +++ b/keyboards/fc980c/keymaps/actuation-point-example/keymap.c @@ -80,5 +80,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) return true; } }; - -const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/fc980c/keymaps/coloneljesus/keymap.c b/keyboards/fc980c/keymaps/coloneljesus/keymap.c index 26d476ab6140..664d146fa7bf 100644 --- a/keyboards/fc980c/keymaps/coloneljesus/keymap.c +++ b/keyboards/fc980c/keymaps/coloneljesus/keymap.c @@ -32,5 +32,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, KC_HOME, KC_PGDN, KC_END, _______, _______), }; - -const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/fc980c/keymaps/default/keymap.c b/keyboards/fc980c/keymaps/default/keymap.c index b3f7bb7b1149..b3d86192d31d 100644 --- a/keyboards/fc980c/keymaps/default/keymap.c +++ b/keyboards/fc980c/keymaps/default/keymap.c @@ -32,5 +32,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, KC_HOME, KC_PGDN, KC_END, _______, _______), }; - -const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/gh60/keymaps/bluezio/keymap.c b/keyboards/gh60/keymaps/bluezio/keymap.c index 7b2f16fadaad..c0f650ecc5a6 100644 --- a/keyboards/gh60/keymaps/bluezio/keymap.c +++ b/keyboards/gh60/keymaps/bluezio/keymap.c @@ -36,6 +36,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_HOME, KC_SPC, KC_END, KC_PSCREEN, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/gh60/keymaps/xyverz/keymap.c b/keyboards/gh60/keymaps/xyverz/keymap.c index 3709a0c0526f..6179ce386be2 100644 --- a/keyboards/gh60/keymaps/xyverz/keymap.c +++ b/keyboards/gh60/keymaps/xyverz/keymap.c @@ -118,10 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c index 1055ddc53f74..19b796016170 100644 --- a/keyboards/gonnerd/keymaps/default/keymap.c +++ b/keyboards/gonnerd/keymaps/default/keymap.c @@ -20,7 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - -}; diff --git a/keyboards/gonnerd/keymaps/tkl/keymap.c b/keyboards/gonnerd/keymaps/tkl/keymap.c index 1b7e7031a0dc..404f3825f65b 100644 --- a/keyboards/gonnerd/keymaps/tkl/keymap.c +++ b/keyboards/gonnerd/keymaps/tkl/keymap.c @@ -25,7 +25,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -const uint16_t PROGMEM fn_actions[] = { - -}; diff --git a/keyboards/h87a/keymaps/default/keymap.c b/keyboards/h87a/keymaps/default/keymap.c index 20418604ce53..89178453d58d 100644 --- a/keyboards/h87a/keymaps/default/keymap.c +++ b/keyboards/h87a/keymaps/default/keymap.c @@ -35,10 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index 635383b55bb6..9912a3e98ab9 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -176,11 +176,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - void hold_shift(void) { shift_count = shift_count + 1; register_code(KC_LSHIFT); diff --git a/keyboards/handwired/ibm122m/keymaps/lukaus/keymap.c b/keyboards/handwired/ibm122m/keymaps/lukaus/keymap.c index 9cd58c0ec9a9..130465e8d880 100644 --- a/keyboards/handwired/ibm122m/keymaps/lukaus/keymap.c +++ b/keyboards/handwired/ibm122m/keymaps/lukaus/keymap.c @@ -137,10 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ),*/ }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c index 598541a05be3..a850bd508044 100644 --- a/keyboards/handwired/retro_refit/keymaps/default/keymap.c +++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c @@ -11,10 +11,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/woodpad/keymaps/default/keymap.c b/keyboards/handwired/woodpad/keymaps/default/keymap.c index 1fa90ba919ae..70c05fc27162 100644 --- a/keyboards/handwired/woodpad/keymaps/default/keymap.c +++ b/keyboards/handwired/woodpad/keymaps/default/keymap.c @@ -59,10 +59,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void numlock_led_on(void) { PORTF |= (1<<7); } diff --git a/keyboards/hhkb/keymaps/cinaeco/keymap.c b/keyboards/hhkb/keymaps/cinaeco/keymap.c index f50f90a84379..c27e37d8a0a9 100644 --- a/keyboards/hhkb/keymaps/cinaeco/keymap.c +++ b/keyboards/hhkb/keymaps/cinaeco/keymap.c @@ -162,10 +162,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c index 666471a03b30..4da9b1d4abf0 100644 --- a/keyboards/hhkb/keymaps/dbroqua/keymap.c +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -97,10 +97,6 @@ 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, DEF, ALT, KC_TRNS, KC_TRNS, KC_TRNS)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/hhkb/keymaps/default/keymap.c b/keyboards/hhkb/keymaps/default/keymap.c index 3a01fd80205f..af6102f10842 100644 --- a/keyboards/hhkb/keymaps/default/keymap.c +++ b/keyboards/hhkb/keymaps/default/keymap.c @@ -55,10 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/hhkb/keymaps/enoch_jp/keymap.c b/keyboards/hhkb/keymaps/enoch_jp/keymap.c index 60bf832a741c..b685300a76bc 100644 --- a/keyboards/hhkb/keymaps/enoch_jp/keymap.c +++ b/keyboards/hhkb/keymaps/enoch_jp/keymap.c @@ -44,10 +44,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; diff --git a/keyboards/hhkb/keymaps/eric/keymap.c b/keyboards/hhkb/keymaps/eric/keymap.c index 0f3b4c7f3619..bf788b2ffda4 100644 --- a/keyboards/hhkb/keymaps/eric/keymap.c +++ b/keyboards/hhkb/keymaps/eric/keymap.c @@ -53,10 +53,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/hhkb/keymaps/jp/keymap.c b/keyboards/hhkb/keymaps/jp/keymap.c index 24e4a04a53d5..fefe61452e87 100644 --- a/keyboards/hhkb/keymaps/jp/keymap.c +++ b/keyboards/hhkb/keymaps/jp/keymap.c @@ -49,7 +49,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t o { return MACRO_NONE; } - -const uint16_t PROGMEM fn_actions[] = { - -}; diff --git a/keyboards/hhkb/keymaps/jp_mac/keymap.c b/keyboards/hhkb/keymaps/jp_mac/keymap.c index 326f22cd123d..80fa14e7a876 100644 --- a/keyboards/hhkb/keymaps/jp_mac/keymap.c +++ b/keyboards/hhkb/keymaps/jp_mac/keymap.c @@ -49,7 +49,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t o { return MACRO_NONE; } - -const uint16_t PROGMEM fn_actions[] = { - -}; diff --git a/keyboards/hhkb/keymaps/krusli/keymap.c b/keyboards/hhkb/keymaps/krusli/keymap.c index 3a01fd80205f..af6102f10842 100644 --- a/keyboards/hhkb/keymaps/krusli/keymap.c +++ b/keyboards/hhkb/keymaps/krusli/keymap.c @@ -55,10 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/hhkb/keymaps/mjt/keymap.c b/keyboards/hhkb/keymaps/mjt/keymap.c index d1725f5c75a6..e51eb8bf9226 100644 --- a/keyboards/hhkb/keymaps/mjt/keymap.c +++ b/keyboards/hhkb/keymaps/mjt/keymap.c @@ -82,10 +82,6 @@ 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_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_STOP, KC_TRNS, KC_TRNS)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/hhkb/keymaps/rdg_jp/keymap.c b/keyboards/hhkb/keymaps/rdg_jp/keymap.c index 2afac7a0b0e3..f7df543abe96 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/keymap.c +++ b/keyboards/hhkb/keymaps/rdg_jp/keymap.c @@ -55,7 +55,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t o { return MACRO_NONE; } - -const uint16_t PROGMEM fn_actions[] = { - -}; diff --git a/keyboards/hhkb/keymaps/sh_jp/keymap.c b/keyboards/hhkb/keymaps/sh_jp/keymap.c index 39710a654289..5dbbea8c8c37 100644 --- a/keyboards/hhkb/keymaps/sh_jp/keymap.c +++ b/keyboards/hhkb/keymaps/sh_jp/keymap.c @@ -50,7 +50,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t macro_id, uint8_t o { return MACRO_NONE; } - -const uint16_t PROGMEM fn_actions[] = { - -}; diff --git a/keyboards/hhkb/keymaps/smt/keymap.c b/keyboards/hhkb/keymaps/smt/keymap.c index 428861640fc1..d6cbaac4b7d9 100644 --- a/keyboards/hhkb/keymaps/smt/keymap.c +++ b/keyboards/hhkb/keymaps/smt/keymap.c @@ -121,10 +121,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, QWERTY, COLEMAK, DVORAK, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______)}; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 5d310e3b295c..4882469c0035 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -42,10 +42,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), }; -const uint16_t fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index d1a1a04a459e..22d74b866bbf 100755 --- a/keyboards/infinity60/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -76,10 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index ec0d32183379..51def265691d 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -105,13 +105,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -/* - * Fn action definition - */ -const uint16_t fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboards/k_type/keymaps/belak/keymap.c b/keyboards/k_type/keymaps/belak/keymap.c index 6bddeb13e188..1f59630b1e2b 100644 --- a/keyboards/k_type/keymaps/belak/keymap.c +++ b/keyboards/k_type/keymaps/belak/keymap.c @@ -22,10 +22,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), }; -const uint16_t fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index 90b3ac7686f8..29d93c107223 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -10,10 +10,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), }; -const uint16_t fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboards/kbd66/keymaps/ansi/keymap.c b/keyboards/kbd66/keymaps/ansi/keymap.c index f2275d9f634d..d73e5aec8a30 100644 --- a/keyboards/kbd66/keymaps/ansi/keymap.c +++ b/keyboards/kbd66/keymaps/ansi/keymap.c @@ -66,10 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kbd66/keymaps/default/keymap.c b/keyboards/kbd66/keymaps/default/keymap.c index 6a4c0b57f6a9..a969d651011a 100644 --- a/keyboards/kbd66/keymaps/default/keymap.c +++ b/keyboards/kbd66/keymaps/default/keymap.c @@ -66,10 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kbd66/keymaps/iso/keymap.c b/keyboards/kbd66/keymaps/iso/keymap.c index 4e304098497b..5ee64e352265 100644 --- a/keyboards/kbd66/keymaps/iso/keymap.c +++ b/keyboards/kbd66/keymaps/iso/keymap.c @@ -66,10 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kbd8x/keymaps/default/keymap.c b/keyboards/kbd8x/keymaps/default/keymap.c index bfbc841d58fb..3d315035beec 100644 --- a/keyboards/kbd8x/keymaps/default/keymap.c +++ b/keyboards/kbd8x/keymaps/default/keymap.c @@ -27,10 +27,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kbd8x/keymaps/default_backlighting/keymap.c b/keyboards/kbd8x/keymaps/default_backlighting/keymap.c index 6e3950e50049..e664575d5fb3 100644 --- a/keyboards/kbd8x/keymaps/default_backlighting/keymap.c +++ b/keyboards/kbd8x/keymaps/default_backlighting/keymap.c @@ -34,10 +34,6 @@ 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), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c index 045ab810f9e2..073ae9c4a5d9 100644 --- a/keyboards/kc60/keymaps/default/keymap.c +++ b/keyboards/kc60/keymaps/default/keymap.c @@ -11,10 +11,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kc60/keymaps/sgoodwin/keymap.c b/keyboards/kc60/keymaps/sgoodwin/keymap.c index 25870d0a78c8..c78e3108f791 100644 --- a/keyboards/kc60/keymaps/sgoodwin/keymap.c +++ b/keyboards/kc60/keymaps/sgoodwin/keymap.c @@ -29,10 +29,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kc60/keymaps/wigguno/keymap.c b/keyboards/kc60/keymaps/wigguno/keymap.c index a4a946f0dfa1..aa730c22f9d3 100644 --- a/keyboards/kc60/keymaps/wigguno/keymap.c +++ b/keyboards/kc60/keymaps/wigguno/keymap.c @@ -51,10 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kinesis/keymaps/carpalx/keymap.c b/keyboards/kinesis/keymaps/carpalx/keymap.c index c00c5327b321..922e8e7615b8 100644 --- a/keyboards/kinesis/keymaps/carpalx/keymap.c +++ b/keyboards/kinesis/keymaps/carpalx/keymap.c @@ -168,11 +168,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/kinesis/keymaps/default/keymap.c b/keyboards/kinesis/keymaps/default/keymap.c index f36d6dd1ddc2..98de455e58f0 100644 --- a/keyboards/kinesis/keymaps/default/keymap.c +++ b/keyboards/kinesis/keymaps/default/keymap.c @@ -52,11 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kinesis/keymaps/default_pretty/keymap.c b/keyboards/kinesis/keymaps/default_pretty/keymap.c index 58d749074dcd..cb4cb6f26a47 100644 --- a/keyboards/kinesis/keymaps/default_pretty/keymap.c +++ b/keyboards/kinesis/keymaps/default_pretty/keymap.c @@ -45,11 +45,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kinesis/keymaps/dvorak/keymap.c b/keyboards/kinesis/keymaps/dvorak/keymap.c index 5d9739866c28..9e44c10ce506 100644 --- a/keyboards/kinesis/keymaps/dvorak/keymap.c +++ b/keyboards/kinesis/keymaps/dvorak/keymap.c @@ -55,11 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index 2eab62a2bcc8..3c697f8f075a 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -270,11 +270,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/kira75/keymaps/default/keymap.c b/keyboards/kira75/keymaps/default/keymap.c index cba4ca9927f8..7a08c4e50af2 100644 --- a/keyboards/kira75/keymaps/default/keymap.c +++ b/keyboards/kira75/keymaps/default/keymap.c @@ -26,10 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kmac/keymaps/default/keymap.c b/keyboards/kmac/keymaps/default/keymap.c index 8ae8627a06ff..ca5975753944 100644 --- a/keyboards/kmac/keymaps/default/keymap.c +++ b/keyboards/kmac/keymaps/default/keymap.c @@ -42,10 +42,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/kmac/keymaps/winkeyless/keymap.c b/keyboards/kmac/keymaps/winkeyless/keymap.c index 985d5a89fb2e..d714e46d3274 100644 --- a/keyboards/kmac/keymaps/winkeyless/keymap.c +++ b/keyboards/kmac/keymaps/winkeyless/keymap.c @@ -42,10 +42,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index a5c443ffcde2..7ffa53dcaa38 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -52,10 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { }; diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index d6978fd80128..9fd4816ccfdf 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -52,10 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { }; diff --git a/keyboards/massdrop/alt/keymaps/reywood/keymap.c b/keyboards/massdrop/alt/keymaps/reywood/keymap.c index 8b69f0e8ebbb..48b804efea12 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/keymap.c +++ b/keyboards/massdrop/alt/keymaps/reywood/keymap.c @@ -52,10 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { }; diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 88c1ac31239a..11597f987962 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -55,10 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { }; diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index 6c5dfe19c026..badb566b371b 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -55,10 +55,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { }; diff --git a/keyboards/maxipad/keymaps/default/keymap.c b/keyboards/maxipad/keymaps/default/keymap.c index e730200a2034..5cec84c5457c 100644 --- a/keyboards/maxipad/keymaps/default/keymap.c +++ b/keyboards/maxipad/keymaps/default/keymap.c @@ -17,9 +17,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function { return MACRO_NONE; diff --git a/keyboards/meira/keymaps/cole/keymap.c b/keyboards/meira/keymaps/cole/keymap.c index b1c230d92641..71c8d9711dc0 100644 --- a/keyboards/meira/keymaps/cole/keymap.c +++ b/keyboards/meira/keymaps/cole/keymap.c @@ -118,10 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // 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)) { diff --git a/keyboards/meira/keymaps/default/keymap.c b/keyboards/meira/keymaps/default/keymap.c index 4bbd014cb799..b25d789192a4 100644 --- a/keyboards/meira/keymaps/default/keymap.c +++ b/keyboards/meira/keymaps/default/keymap.c @@ -162,10 +162,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // 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)) { diff --git a/keyboards/meira/keymaps/grahampheath/keymap.c b/keyboards/meira/keymaps/grahampheath/keymap.c index 69815ef97542..cd02137877b9 100644 --- a/keyboards/meira/keymaps/grahampheath/keymap.c +++ b/keyboards/meira/keymaps/grahampheath/keymap.c @@ -204,10 +204,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/meira/keymaps/takmiya/keymap.c b/keyboards/meira/keymaps/takmiya/keymap.c index 48602dfaf4c3..12dad6d69017 100644 --- a/keyboards/meira/keymaps/takmiya/keymap.c +++ b/keyboards/meira/keymaps/takmiya/keymap.c @@ -112,10 +112,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // 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)) { diff --git a/keyboards/mint60/keymaps/default/keymap.c b/keyboards/mint60/keymaps/default/keymap.c index 36895cb47417..e07d199ea984 100644 --- a/keyboards/mint60/keymaps/default/keymap.c +++ b/keyboards/mint60/keymaps/default/keymap.c @@ -52,10 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // define variables for reactive RGB bool TOG_STATUS = false; int RGB_current_mode; diff --git a/keyboards/mint60/keymaps/eucalyn/keymap.c b/keyboards/mint60/keymaps/eucalyn/keymap.c index 566d734a5238..c26dd38d31c1 100644 --- a/keyboards/mint60/keymaps/eucalyn/keymap.c +++ b/keyboards/mint60/keymaps/eucalyn/keymap.c @@ -52,10 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // define variables for reactive RGB bool TOG_STATUS = false; int RGB_current_mode; diff --git a/keyboards/mitosis/keymaps/default/keymap.c b/keyboards/mitosis/keymaps/default/keymap.c index 99f57c55fd66..60ebdac60a23 100644 --- a/keyboards/mitosis/keymaps/default/keymap.c +++ b/keyboards/mitosis/keymaps/default/keymap.c @@ -80,11 +80,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - static uint16_t key_timer; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/mitosis/keymaps/mjt/keymap.c b/keyboards/mitosis/keymaps/mjt/keymap.c index 260fa133f0c4..379738951a7b 100644 --- a/keyboards/mitosis/keymaps/mjt/keymap.c +++ b/keyboards/mitosis/keymaps/mjt/keymap.c @@ -119,9 +119,6 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif -const uint16_t PROGMEM fn_actions[] = { - -}; static uint16_t function_layer = _FUNCTIONMAC; static uint16_t key_timer; diff --git a/keyboards/mxss/keymaps/default/keymap.c b/keyboards/mxss/keymaps/default/keymap.c index 47983c90c6c8..7ac107f37109 100644 --- a/keyboards/mxss/keymaps/default/keymap.c +++ b/keyboards/mxss/keymaps/default/keymap.c @@ -51,11 +51,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/nyquist/keymaps/bramver/keymap.c b/keyboards/nyquist/keymaps/bramver/keymap.c index c5eac853ccf2..f1562546791a 100644 --- a/keyboards/nyquist/keymaps/bramver/keymap.c +++ b/keyboards/nyquist/keymaps/bramver/keymap.c @@ -103,15 +103,6 @@ enum custom_keycodes { CTRL_V }; -// 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] = , //Hold for momentary LMouse layer, Tap for Space, -// [1] = , //Hold for momentary RMouse layer, Tap for Space, -// [2] = , //Hold for momentary Lower -// [3] = , //Hold for momentary Raise -// [4] = , //Hold for momentary Emoji -// }; - #define SP_LMS LT(_LMOUSE, KC_SPC) #define SP_RMS LT(_RMOUSE, KC_SPC) #define LOW TT(_LOWER) diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/paladin64/keymaps/default/keymap.c index 8a3f57c0bf2b..3f4608438c88 100755 --- a/keyboards/paladin64/keymaps/default/keymap.c +++ b/keyboards/paladin64/keymaps/default/keymap.c @@ -1,6 +1,5 @@ #include QMK_KEYBOARD_H -const uint16_t PROGMEM fn_actions[] = {}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY */ diff --git a/keyboards/phantom/keymaps/xyverz/keymap.c b/keyboards/phantom/keymaps/xyverz/keymap.c index f47a7ad623d8..ac38e5524317 100644 --- a/keyboards/phantom/keymaps/xyverz/keymap.c +++ b/keyboards/phantom/keymaps/xyverz/keymap.c @@ -68,11 +68,6 @@ enum function_id { SHIFT_ESC, }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/planck/keymaps/alexey/keymap.c b/keyboards/planck/keymaps/alexey/keymap.c index f3ddc8a8a702..90bdd2c37f09 100644 --- a/keyboards/planck/keymaps/alexey/keymap.c +++ b/keyboards/planck/keymaps/alexey/keymap.c @@ -30,10 +30,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/basic/keymap.c b/keyboards/planck/keymaps/basic/keymap.c index f34291323c41..cc70aeea3bce 100644 --- a/keyboards/planck/keymaps/basic/keymap.c +++ b/keyboards/planck/keymaps/basic/keymap.c @@ -67,10 +67,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, -}; - -const uint16_t PROGMEM fn_actions[] = { - }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index ce862ef9a8e4..e26aff07e729 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -142,11 +142,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 8fdbcf1a7d49..f5e9cdbcd8c0 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -153,11 +153,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; - -/* What is fn_actions actually used for??? */ -const uint16_t PROGMEM fn_actions[] = { -}; - /* This bit of logic seeds a wee linear congruential random number generator */ /* lots of prime numbers everywhere... */ static uint16_t random_value = 157; diff --git a/keyboards/planck/keymaps/gabriel/keymap.c b/keyboards/planck/keymaps/gabriel/keymap.c index cbb44f68aef9..96e4a17ee615 100644 --- a/keyboards/planck/keymaps/gabriel/keymap.c +++ b/keyboards/planck/keymaps/gabriel/keymap.c @@ -88,10 +88,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/jacob/keymap.c b/keyboards/planck/keymaps/jacob/keymap.c index f44faff743fa..5d823157bbe9 100644 --- a/keyboards/planck/keymaps/jacob/keymap.c +++ b/keyboards/planck/keymaps/jacob/keymap.c @@ -34,10 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index 86748daf2e60..2432a8673587 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -90,10 +90,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; diff --git a/keyboards/planck/keymaps/lukas/keymap.c b/keyboards/planck/keymaps/lukas/keymap.c index d7702ad09fb3..7adb6a3dd0ec 100644 --- a/keyboards/planck/keymaps/lukas/keymap.c +++ b/keyboards/planck/keymaps/lukas/keymap.c @@ -33,10 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c index 5fc895803413..121e5314852f 100644 --- a/keyboards/planck/keymaps/luke/keymap.c +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -274,10 +274,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { -}; - - void matrix_init_user(){ set_unicode_input_mode(UC_LNX); } diff --git a/keyboards/planck/keymaps/neo2planck/keymap.c b/keyboards/planck/keymaps/neo2planck/keymap.c index 1ecc800595f1..a8c4f93066fe 100644 --- a/keyboards/planck/keymaps/neo2planck/keymap.c +++ b/keyboards/planck/keymaps/neo2planck/keymap.c @@ -97,10 +97,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/pete/keymap.c b/keyboards/planck/keymaps/pete/keymap.c index de5c50cd1c66..faf41302eb82 100644 --- a/keyboards/planck/keymaps/pete/keymap.c +++ b/keyboards/planck/keymaps/pete/keymap.c @@ -117,9 +117,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; int currentOs = _MAC; -const uint16_t PROGMEM fn_actions[] = { - -}; #ifdef AUDIO_ENABLE diff --git a/keyboards/planck/keymaps/tak3over/keymap.c b/keyboards/planck/keymaps/tak3over/keymap.c index f8fb0fb37d74..8b26520bf9bf 100644 --- a/keyboards/planck/keymaps/tak3over/keymap.c +++ b/keyboards/planck/keymaps/tak3over/keymap.c @@ -106,10 +106,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/planck/keymaps/unicode/keymap.c b/keyboards/planck/keymaps/unicode/keymap.c index d869eedd4fba..749aaa8682e3 100644 --- a/keyboards/planck/keymaps/unicode/keymap.c +++ b/keyboards/planck/keymaps/unicode/keymap.c @@ -189,10 +189,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } -}; - -const uint16_t PROGMEM fn_actions[] = { - }; #ifdef AUDIO_ENABLE diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index bbecc66fbcee..89be16f5fd73 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -84,10 +84,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/preonic/keymaps/CMD-Preonic/keymap.c b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c index 590a8dc8a757..ba703a2080b3 100644 --- a/keyboards/preonic/keymaps/CMD-Preonic/keymap.c +++ b/keyboards/preonic/keymaps/CMD-Preonic/keymap.c @@ -199,10 +199,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) -}; - -const uint16_t PROGMEM fn_actions[] = { - }; #ifdef AUDIO_ENABLE diff --git a/keyboards/s60_x/keymaps/custom/keymap.c b/keyboards/s60_x/keymaps/custom/keymap.c index 942fadf4a894..c98d14349fef 100644 --- a/keyboards/s60_x/keymaps/custom/keymap.c +++ b/keyboards/s60_x/keymaps/custom/keymap.c @@ -24,5 +24,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LSFT, HOME, Z, X, C, V, B, N, M, COMM, DOT, SLSH, END, RSFT, UP, \ LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL), }; -const uint16_t PROGMEM fn_actions[] = {}; - diff --git a/keyboards/s60_x/keymaps/plain/keymap.c b/keyboards/s60_x/keymaps/plain/keymap.c index abf7ede2c47a..3cdda7562028 100644 --- a/keyboards/s60_x/keymaps/plain/keymap.c +++ b/keyboards/s60_x/keymaps/plain/keymap.c @@ -22,4 +22,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LSFT, NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL), }; -const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/satan/keymaps/admiralStrokers/keymap.c b/keyboards/satan/keymaps/admiralStrokers/keymap.c index a728f5a5393e..a3626dff874c 100644 --- a/keyboards/satan/keymaps/admiralStrokers/keymap.c +++ b/keyboards/satan/keymaps/admiralStrokers/keymap.c @@ -187,10 +187,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { if (record->event.pressed) { } else { }; break; } return MACRO_NONE; }; -/* - Later use: - void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { } - enum function_id { }; - const uint16_t PROGMEM fn_actions[] = { }; - -*/ diff --git a/keyboards/satan/keymaps/bri/keymap.c b/keyboards/satan/keymaps/bri/keymap.c index 96775488e531..7f38ba6f5f1c 100644 --- a/keyboards/satan/keymaps/bri/keymap.c +++ b/keyboards/satan/keymaps/bri/keymap.c @@ -66,38 +66,3 @@ 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; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} -*/ diff --git a/keyboards/scrabblepad/keymaps/default/keymap.c b/keyboards/scrabblepad/keymaps/default/keymap.c index bfbab6e885c7..8d110dbd5bcb 100644 --- a/keyboards/scrabblepad/keymaps/default/keymap.c +++ b/keyboards/scrabblepad/keymaps/default/keymap.c @@ -35,10 +35,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/sixkeyboard/keymaps/default/keymap.c b/keyboards/sixkeyboard/keymaps/default/keymap.c index 78b55478b6ae..393974b5d09e 100644 --- a/keyboards/sixkeyboard/keymaps/default/keymap.c +++ b/keyboards/sixkeyboard/keymaps/default/keymap.c @@ -9,10 +9,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; @@ -24,4 +20,4 @@ void matrix_scan_user(void) { clear_keyboard(); bootloader_jump(); } -}; \ No newline at end of file +}; diff --git a/keyboards/speedo/keymaps/default/keymap.c b/keyboards/speedo/keymaps/default/keymap.c index cd8c14e26b8f..7c9685d3d3a6 100644 --- a/keyboards/speedo/keymaps/default/keymap.c +++ b/keyboards/speedo/keymaps/default/keymap.c @@ -56,10 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/thevankeyboards/bananasplit/keymaps/0010/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/0010/keymap.c index 617812149c14..2744c9100025 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/0010/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/0010/keymap.c @@ -67,7 +67,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ______, ______, ______, ______, RESET, ______, ______, ______, ______, ______, KC_PGDN \ ), }; - - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/keymap.c index 275bfe32a142..8a35f896f0ea 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/coloneljesus/keymap.c @@ -62,10 +62,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void matrix_init_user(void) { } diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/default/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/default/keymap.c index dcef38bca15a..156e164a2574 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/default/keymap.c @@ -20,6 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/hhkbanana/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/hhkbanana/keymap.c index f2f829f93e39..e2c062dc56bc 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/hhkbanana/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/hhkbanana/keymap.c @@ -20,6 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c index 89e275daf7be..828c82673e7d 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_ansi/keymap.c @@ -87,6 +87,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_MNXT ) }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c index 859944991b88..107a6eed521f 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/jockyxu1122_iso/keymap.c @@ -86,9 +86,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { -}; - /* Capslock's led cannot be controlled separately on bananasplit and you can only turn on/off all leds at once. If you only install led for capslock, it will look like capslock has toggable diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/keymap.c index 34306e183052..c0bc1b2686ef 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/kamon/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/kamon/keymap.c @@ -60,10 +60,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case 0: diff --git a/keyboards/thevankeyboards/bananasplit/keymaps/nic/keymap.c b/keyboards/thevankeyboards/bananasplit/keymaps/nic/keymap.c index 5ed1c65e9990..39cfc0d8fe50 100644 --- a/keyboards/thevankeyboards/bananasplit/keymaps/nic/keymap.c +++ b/keyboards/thevankeyboards/bananasplit/keymaps/nic/keymap.c @@ -40,6 +40,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c index 19051574a5de..cc4f23979272 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/belak/keymap.c @@ -73,8 +73,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = {}; - // Tap dance functions void mod_tap_fn(qk_tap_dance_state_t *state, void *user_data) { switch (state->count) { diff --git a/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c index cf1e0d3f51ed..6a069713faea 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/core/keymap.c @@ -27,6 +27,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ ), }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c index 90b188b55ffe..13ef62406b48 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/default/keymap.c @@ -67,10 +67,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c index 02ba6842166f..4c045ac0a57a 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/thevankeyboards/minivan/keymaps/jetpacktuxedo/keymap.c @@ -34,6 +34,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPACE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; - -const uint16_t PROGMEM fn_actions[] = { -}; diff --git a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c index 4ec0f6cfdc68..ecd25be48f63 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/default/keymap.c @@ -26,10 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c index fed9d0270677..d541b1a579f7 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/flipphone/keymap.c @@ -77,10 +77,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistant_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c index a1af5b1f2800..e7f6485e2353 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/mjt/keymap.c @@ -76,10 +76,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c index 4c246f5136c1..fd5d99503dee 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/singles/keymap.c @@ -34,10 +34,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c index b4da80e28433..853bb783a507 100644 --- a/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c +++ b/keyboards/thevankeyboards/roadkit/keymaps/singlesBrent/keymap.c @@ -206,10 +206,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 4f9b7f9b2114..77546c0a6549 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -63,13 +63,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index fba7111480fd..2586683127f6 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -97,9 +97,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _____, _____, _____, _____, _____, _____, _____, _____), }; -const uint16_t PROGMEM fn_actions[] = { -}; - 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/whitefox/keymaps/dudeofawesome/keymap.c b/keyboards/whitefox/keymaps/dudeofawesome/keymap.c index 8c94df2c14f3..2388201b7e90 100644 --- a/keyboards/whitefox/keymaps/dudeofawesome/keymap.c +++ b/keyboards/whitefox/keymaps/dudeofawesome/keymap.c @@ -119,10 +119,6 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -// const uint16_t fn_actions[] = { -// [0] = ACTION_LAYER_MOMENTARY(1), -// }; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case QWERTY: diff --git a/keyboards/xd75/keymaps/adi/keymap.c b/keyboards/xd75/keymaps/adi/keymap.c index d96a215073d5..24b450c8d4e0 100644 --- a/keyboards/xd75/keymaps/adi/keymap.c +++ b/keyboards/xd75/keymaps/adi/keymap.c @@ -106,10 +106,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/atomic_style/keymap.c b/keyboards/xd75/keymaps/atomic_style/keymap.c index 986732299388..c40d89bc79d5 100644 --- a/keyboards/xd75/keymaps/atomic_style/keymap.c +++ b/keyboards/xd75/keymaps/atomic_style/keymap.c @@ -163,10 +163,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/boy_314/keymap.c b/keyboards/xd75/keymaps/boy_314/keymap.c index d807d1d8618e..1de733f0f6ef 100644 --- a/keyboards/xd75/keymaps/boy_314/keymap.c +++ b/keyboards/xd75/keymaps/boy_314/keymap.c @@ -125,12 +125,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; - - -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/bramver/keymap.c b/keyboards/xd75/keymaps/bramver/keymap.c index 831278d001b3..142d8efd2b1d 100644 --- a/keyboards/xd75/keymaps/bramver/keymap.c +++ b/keyboards/xd75/keymaps/bramver/keymap.c @@ -96,8 +96,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = {}; - void matrix_init_user(void) { _delay_ms(20); // Gets rid of tick set_unicode_input_mode(UC_LNX); diff --git a/keyboards/xd75/keymaps/c4software_bepo/keymap.c b/keyboards/xd75/keymaps/c4software_bepo/keymap.c index e0a71d7c4fbd..2c70f287609b 100644 --- a/keyboards/xd75/keymaps/c4software_bepo/keymap.c +++ b/keyboards/xd75/keymaps/c4software_bepo/keymap.c @@ -67,10 +67,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/cbbrowne/keymap.c b/keyboards/xd75/keymaps/cbbrowne/keymap.c index ec98b6d5a622..322fffdadb44 100644 --- a/keyboards/xd75/keymaps/cbbrowne/keymap.c +++ b/keyboards/xd75/keymaps/cbbrowne/keymap.c @@ -197,10 +197,6 @@ Missing still... }, }; -const uint16_t PROGMEM fn_actions[] = { - -}; - /* This bit of logic seeds a wee linear congruential random number generator */ /* lots of prime numbers everywhere... */ static uint16_t random_value = 157; diff --git a/keyboards/xd75/keymaps/default/keymap.c b/keyboards/xd75/keymaps/default/keymap.c index 028fc270de4d..03f605385320 100644 --- a/keyboards/xd75/keymaps/default/keymap.c +++ b/keyboards/xd75/keymaps/default/keymap.c @@ -66,10 +66,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/dyn_macro_tap_dance/keymap.c b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c index 52cae7f715fb..594e5c41cfa1 100644 --- a/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c +++ b/keyboards/xd75/keymaps/dyn_macro_tap_dance/keymap.c @@ -114,10 +114,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/emilyh/keymap.c b/keyboards/xd75/keymaps/emilyh/keymap.c index 034bb55ac839..04c239636d5c 100644 --- a/keyboards/xd75/keymaps/emilyh/keymap.c +++ b/keyboards/xd75/keymaps/emilyh/keymap.c @@ -164,10 +164,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/french/keymap.c b/keyboards/xd75/keymaps/french/keymap.c index a5d14674a927..1ffec2202ef7 100644 --- a/keyboards/xd75/keymaps/french/keymap.c +++ b/keyboards/xd75/keymaps/french/keymap.c @@ -54,7 +54,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { RESET, FR_EMPT, FR_EMPT, FR_TRANS, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_EMPT, FR_0, FR_DOT, FR_ENTK, FR_EMPT, BL_STEP }, }, }; - -const uint16_t PROGMEM fn_actions[] = { -}; - diff --git a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c b/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c index 19f13ed322b2..8820b4ef5072 100644 --- a/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c +++ b/keyboards/xd75/keymaps/kim-kim-xd73/keymap.c @@ -118,10 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/kim-kim/keymap.c b/keyboards/xd75/keymaps/kim-kim/keymap.c index 0ec506e179d8..c67ce2287182 100644 --- a/keyboards/xd75/keymaps/kim-kim/keymap.c +++ b/keyboards/xd75/keymaps/kim-kim/keymap.c @@ -118,10 +118,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - 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/xd75/keymaps/kloki/keymap.c b/keyboards/xd75/keymaps/kloki/keymap.c index 62023cf70dc3..340d9a8dc63a 100644 --- a/keyboards/xd75/keymaps/kloki/keymap.c +++ b/keyboards/xd75/keymaps/kloki/keymap.c @@ -64,9 +64,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______,_______,_______, _______, _______, _______,_______,_______, _______, _______, _______ }, } }; -const uint16_t PROGMEM fn_actions[] = { - -}; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/layouts/community/ergodox/ab/keymap.c b/layouts/community/ergodox/ab/keymap.c index 7bda0cd22331..d8d7accdcbe3 100644 --- a/layouts/community/ergodox/ab/keymap.c +++ b/layouts/community/ergodox/ab/keymap.c @@ -105,9 +105,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - 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/alphadox/keymap.c b/layouts/community/ergodox/alphadox/keymap.c index 8acd86b7ae8d..75784f7a910b 100644 --- a/layouts/community/ergodox/alphadox/keymap.c +++ b/layouts/community/ergodox/alphadox/keymap.c @@ -73,9 +73,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { case TEENSY: diff --git a/layouts/community/ergodox/bepo_csa/keymap.c b/layouts/community/ergodox/bepo_csa/keymap.c index 125301d443f4..8dfb95a337cd 100644 --- a/layouts/community/ergodox/bepo_csa/keymap.c +++ b/layouts/community/ergodox/bepo_csa/keymap.c @@ -362,9 +362,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - void hold_shift(void) { register_code(KC_LSHIFT); } diff --git a/layouts/community/ergodox/dave/keymap.c b/layouts/community/ergodox/dave/keymap.c index f50be71fabb0..4287496479b4 100644 --- a/layouts/community/ergodox/dave/keymap.c +++ b/layouts/community/ergodox/dave/keymap.c @@ -137,11 +137,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - //[1] = ACTION_LAYER_TAP_TOGGLE(PROG), // FN1 - Momentary Layer 1 (Symbols) - //[2] = ACTION_LAYER_TAP_TOGGLE(NAVI) // FN2 - Momentary Layer 2 (Navigation) -}; - 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-manuneo/compile_keymap.py b/layouts/community/ergodox/german-manuneo/compile_keymap.py index 44f31b1c6e69..9ad5c88ecca5 100644 --- a/layouts/community/ergodox/german-manuneo/compile_keymap.py +++ b/layouts/community/ergodox/german-manuneo/compile_keymap.py @@ -668,9 +668,6 @@ def iter_keymap_parts(config, keymaps): yield "};\n\n" - # no idea what this is for - yield "const uint16_t PROGMEM fn_actions[] = {};\n" - # macros yield MACROCODE.format( macro_cases="", diff --git a/layouts/community/ergodox/german-manuneo/keymap.c b/layouts/community/ergodox/german-manuneo/keymap.c index 71988b7dda5e..9198bf6e30f9 100644 --- a/layouts/community/ergodox/german-manuneo/keymap.c +++ b/layouts/community/ergodox/german-manuneo/keymap.c @@ -376,8 +376,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = {}; - #define UC_MODE_WIN 0 #define UC_MODE_LINUX 1 #define UC_MODE_OSX 2 diff --git a/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c index 39913503379b..f93f03e92e4a 100644 --- a/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c +++ b/layouts/community/ergodox/neo2_on_qwertz_hardware/keymap.c @@ -282,8 +282,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = {}; - #define UC_MODE_WIN 0 #define UC_MODE_LINUX 1 #define UC_MODE_OSX 2 diff --git a/layouts/community/ergodox/osx_de/keymap.c b/layouts/community/ergodox/osx_de/keymap.c index a9a27a8d4327..cd9a35e21262 100644 --- a/layouts/community/ergodox/osx_de/keymap.c +++ b/layouts/community/ergodox/osx_de/keymap.c @@ -145,10 +145,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint16_t start; diff --git a/layouts/community/ergodox/osx_de_adnw_koy/keymap.c b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c index 9d2e117bc105..8fc0f1fd94ae 100644 --- a/layouts/community/ergodox/osx_de_adnw_koy/keymap.c +++ b/layouts/community/ergodox/osx_de_adnw_koy/keymap.c @@ -122,10 +122,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { diff --git a/layouts/community/ergodox/osx_de_experimental/keymap.c b/layouts/community/ergodox/osx_de_experimental/keymap.c index 15c700a78304..cedecd45cb1a 100644 --- a/layouts/community/ergodox/osx_de_experimental/keymap.c +++ b/layouts/community/ergodox/osx_de_experimental/keymap.c @@ -378,10 +378,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS), }; -const uint16_t PROGMEM fn_actions[] = { - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { static uint16_t start; diff --git a/layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c index e024d5fb95f5..caead7e160fa 100644 --- a/layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-osx/keymap.c @@ -26,9 +26,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; diff --git a/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c b/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c index d0b7520c3103..ffa106f70589 100644 --- a/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c +++ b/layouts/community/ergodox/romanzolotarev-norman-qwerty-osx/keymap.c @@ -46,9 +46,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; diff --git a/layouts/community/ergodox/sethbc/keymap.c b/layouts/community/ergodox/sethbc/keymap.c index 7f142a9760c5..26d3106ec4b5 100644 --- a/layouts/community/ergodox/sethbc/keymap.c +++ b/layouts/community/ergodox/sethbc/keymap.c @@ -69,9 +69,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/layouts/community/ergodox/software_neo2/keymap.c b/layouts/community/ergodox/software_neo2/keymap.c index 925caa01618a..7ec4f7b8382a 100644 --- a/layouts/community/ergodox/software_neo2/keymap.c +++ b/layouts/community/ergodox/software_neo2/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(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/supercoder/keymap.c b/layouts/community/ergodox/supercoder/keymap.c index a42937bd6beb..3aa34a8e42dd 100644 --- a/layouts/community/ergodox/supercoder/keymap.c +++ b/layouts/community/ergodox/supercoder/keymap.c @@ -58,9 +58,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; diff --git a/layouts/community/ergodox/tm2030/keymap.c b/layouts/community/ergodox/tm2030/keymap.c index fa919b5d88a8..1259a18ff266 100644 --- a/layouts/community/ergodox/tm2030/keymap.c +++ b/layouts/community/ergodox/tm2030/keymap.c @@ -194,9 +194,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { -}; - 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/xyverz/keymap.c b/layouts/community/ergodox/xyverz/keymap.c index 2e4b1e797ece..fe9080c2d645 100644 --- a/layouts/community/ergodox/xyverz/keymap.c +++ b/layouts/community/ergodox/xyverz/keymap.c @@ -250,10 +250,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - -}; - void persistent_default_layer_set(uint16_t default_layer) { eeconfig_update_default_layer(default_layer); default_layer_set(default_layer); diff --git a/layouts/community/ergodox/yoruian/keymap.c b/layouts/community/ergodox/yoruian/keymap.c index 367fe3c097b2..b304fa070419 100644 --- a/layouts/community/ergodox/yoruian/keymap.c +++ b/layouts/community/ergodox/yoruian/keymap.c @@ -37,9 +37,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TR, TR, TR, TR, TR, TR), }; -const uint16_t PROGMEM fn_actions[] = { -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; From 3ea7c2a4340d129266ecea2e38185455059274d2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 11 Jan 2019 10:58:59 +1100 Subject: [PATCH 110/458] Remove empty action_function() --- .../clueboard/17/keymaps/default/keymap.c | 9 ------- .../frenchdev/keymaps/default/keymap.c | 4 --- keyboards/meira/meira.c | 26 ------------------- keyboards/planck/keymaps/yang/keymap.c | 10 ------- keyboards/whitefox/keymaps/kim-kim/keymap.c | 21 --------------- keyboards/whitefox/keymaps/matt3o/keymap.c | 21 --------------- tests/basic/keymap.c | 3 --- 7 files changed, 94 deletions(-) diff --git a/keyboards/clueboard/17/keymaps/default/keymap.c b/keyboards/clueboard/17/keymaps/default/keymap.c index 67fa79c811dd..53bbbaa9dff2 100644 --- a/keyboards/clueboard/17/keymaps/default/keymap.c +++ b/keyboards/clueboard/17/keymaps/default/keymap.c @@ -51,12 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, RGB_SAD, KC_TRNS, RGB_VAD, \ RGB_MOD, KC_TRNS) }; - -/*enum function_id { -};*/ - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - } -} - diff --git a/keyboards/handwired/frenchdev/keymaps/default/keymap.c b/keyboards/handwired/frenchdev/keymaps/default/keymap.c index 9912a3e98ab9..3d0f1fbfb864 100644 --- a/keyboards/handwired/frenchdev/keymaps/default/keymap.c +++ b/keyboards/handwired/frenchdev/keymaps/default/keymap.c @@ -354,10 +354,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) { - -} - void matrix_init_user(void) { } diff --git a/keyboards/meira/meira.c b/keyboards/meira/meira.c index 3ff62a080b91..1d0db5e99721 100644 --- a/keyboards/meira/meira.c +++ b/keyboards/meira/meira.c @@ -89,32 +89,6 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } -//void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) -//{ -//#ifdef AUDIO_ENABLE -// int8_t sign = 1; -//#endif -// if(id == LFK_ESC_TILDE){ -// // Send ~ on shift-esc -// void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key; -// uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); -// method(shifted ? KC_GRAVE : KC_ESCAPE); -// send_keyboard_report(); -// }else if(event->event.pressed){ -// switch(id){ -// case LFK_CLEAR: -// // Go back to default layer -// layer_clear(); -// break; -//#ifdef ISSI_ENABLE -// case LFK_LED_TEST: -// led_test(); -// break; -//#endif -// } -// } -//} - void reset_keyboard_kb(){ #ifdef WATCHDOG_ENABLE MCUSR = 0; diff --git a/keyboards/planck/keymaps/yang/keymap.c b/keyboards/planck/keymaps/yang/keymap.c index e4a7a3312dcd..477eb5031220 100644 --- a/keyboards/planck/keymaps/yang/keymap.c +++ b/keyboards/planck/keymaps/yang/keymap.c @@ -56,10 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; -/*enum function_id { - -};*/ - const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(_RGB, KC_SPC), }; @@ -81,9 +77,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) { - - } -} diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c index 200098603c7b..459ec6437133 100644 --- a/keyboards/whitefox/keymaps/kim-kim/keymap.c +++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c @@ -70,24 +70,3 @@ const uint16_t fn_actions[] = { [7] = ACTION_USAGE_CONSUMER(0x1A0), }; - -/* custom action function */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - /* - (void)opt; - switch(id) { - case ACTION_LEDS_ALL: - if(record->event.pressed) { - // signal the LED controller thread - chMBPost(&led_mailbox, LED_MSG_GAME_TOGGLE, TIME_IMMEDIATE); - } - break; - case ACTION_LEDS_GAME: - if(record->event.pressed) { - // signal the LED controller thread - chMBPost(&led_mailbox, LED_MSG_ALL_TOGGLE, TIME_IMMEDIATE); - } - break; - } - */ -} diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index 136ae65fabf2..76fb72f8e3ef 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -69,24 +69,3 @@ const uint16_t fn_actions[] = { [7] = ACTION_USAGE_CONSUMER(0x1A0), }; - -/* custom action function */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - /* - (void)opt; - switch(id) { - case ACTION_LEDS_ALL: - if(record->event.pressed) { - // signal the LED controller thread - chMBPost(&led_mailbox, LED_MSG_GAME_TOGGLE, TIME_IMMEDIATE); - } - break; - case ACTION_LEDS_GAME: - if(record->event.pressed) { - // signal the LED controller thread - chMBPost(&led_mailbox, LED_MSG_ALL_TOGGLE, TIME_IMMEDIATE); - } - break; - } - */ -} diff --git a/tests/basic/keymap.c b/tests/basic/keymap.c index 3f97c0a0ee92..5dd9aaeb6ee9 100644 --- a/tests/basic/keymap.c +++ b/tests/basic/keymap.c @@ -41,6 +41,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) { -} \ No newline at end of file From 87b277c21af20e637302a859c88a60345c2ff1c8 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 12 Jan 2019 00:06:41 -0800 Subject: [PATCH 111/458] [Keyboard] Fix layout macro name for Gergo info.json (#4828) Layout macro name in info.json was named LAYOUT instead of LAYOUT_GERGO as it is in gergo.h. --- keyboards/gergo/info.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gergo/info.json b/keyboards/gergo/info.json index 433582b54bfc..71dcca40fcdf 100644 --- a/keyboards/gergo/info.json +++ b/keyboards/gergo/info.json @@ -5,7 +5,7 @@ "keyboard_name": "Gergo", "url": "http://gboards.ca", "layouts": { - "LAYOUT": { + "LAYOUT_GERGO": { "layout": [ { "label": "L00", From 4cde82ef57ff2f00dc637ac41175ace2f551da47 Mon Sep 17 00:00:00 2001 From: SpacebarRacecar <42380065+SpacebarRacecar@users.noreply.github.com> Date: Sat, 12 Jan 2019 18:32:50 +0100 Subject: [PATCH 112/458] [Keymap] Update to personal keymaps and userspace (#4831) * changed ortho keymaps and userspace * changed prime_o keymap * changed userspace * optimized keymaps and userspace * removed permissive hold as it doesn't seem to do anything * defined TAPPING_TERM in userspace config.h --- .../niu_mini/keymaps/spacebarracecar/keymap.c | 4 +- .../planck/keymaps/spacebarracecar/keymap.c | 4 +- .../prime_o/keymaps/spacebarracecar/keymap.c | 88 +++++++++---------- users/spacebarracecar/config.h | 2 + users/spacebarracecar/spacebarracecar.c | 6 +- users/spacebarracecar/spacebarracecar.h | 2 + 6 files changed, 55 insertions(+), 51 deletions(-) diff --git a/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c b/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c index 9bee87f38f9c..ea22ce94775a 100644 --- a/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c +++ b/keyboards/niu_mini/keymaps/spacebarracecar/keymap.c @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_ENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* Lower @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_ENT, _______, _______, _______, _______, CU_GAME + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ) }; diff --git a/keyboards/planck/keymaps/spacebarracecar/keymap.c b/keyboards/planck/keymaps/spacebarracecar/keymap.c index b1c0e3148a55..14b96c8472ff 100644 --- a/keyboards/planck/keymaps/spacebarracecar/keymap.c +++ b/keyboards/planck/keymaps/spacebarracecar/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_ENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* Lower @@ -111,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, MU_ON, XXXXXXX, XXXXXXX, XXXXXXX, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ) }; diff --git a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c index 6e2011770f71..87ae5d12420a 100644 --- a/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c +++ b/keyboards/primekb/prime_o/keymaps/spacebarracecar/keymap.c @@ -25,9 +25,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |= |4 |5 |6 |Esc/Nav |A |S |D |F |G |H |J |K |L |; |' | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Enter |1 |2 |3 |(/LShift |Y |X |C |V |B |N |M |, |. |/ |)/RShift | +|Backspace|1 |2 |3 |(/LShift |Y |X |C |V |B |N |M |, |. |/ |)/RShift | |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Backspace|. |0 |00 |RCtrl | |Alt |Win |Lower |Space |Enter |Raise |Win |AltGr | |LCtrl | +|Enter |. |0 |00 |RCtrl | |Alt |Win |Lower |Space |Enter |Raise |Win |AltGr | |LCtrl | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -35,8 +35,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PMNS, KC_PAST, KC_PSLS, KC_NLCK, 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_PPLS, KC_P7, KC_P8, KC_P9, 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_EQL, KC_P4, KC_P5, KC_P6, CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, - KC_PENT, KC_P1, KC_P2, KC_P3, 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_BSPC, KC_PDOT, KC_P0, KC_P00, KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + KC_BSPC, KC_P1, KC_P2, KC_P3, 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_PENT, KC_PDOT, KC_P0, KC_P00, KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* Lower @@ -47,9 +47,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |= |4 |5 |6 | |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Enter |1 |2 |3 | |? | | | | | | | | | | | +|Backspace|1 |2 |3 | |? | | | | | | | | | | | |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Backspace|. |0 |00 | | | | | | | | | | | | | +|Enter |. |0 |00 | | | | | | | | | | | | | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -69,9 +69,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |= |4 |5 |6 | |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Enter |1 |2 |3 | |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | +|Backspace|1 |2 |3 | |F7 |F8 |F9 |F10 |F11 |F12 | | | | | | |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Backspace|. |0 |00 | | | | | | | | | | | | | +|Enter |. |0 |00 | | | | | | | | | | | | | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -91,9 +91,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |= |4 |5 |6 | |Ä |ß | | | | | | | | | | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Enter |1 |2 |3 | | | | | | | | | | | | | +|Backspace|1 |2 |3 | | | | | | | | | | | | | |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Backspace|. |0 |00 | | | | | |" |" | | | | | | +|Enter |. |0 |00 | | | | | |" |" | | | | | | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -113,9 +113,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |= |4 |5 |6 | |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Enter |1 |2 |3 | |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | +|Backspace|1 |2 |3 | |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | | |---------+---------+---------+---------|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|Backspace|. |0 |00 |RESET |ESCT | | | | | | | | | |Game | +|Enter |. |0 |00 |RESET |ESCT | | | | | | | | | |Game | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -124,7 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, 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_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME + _______, _______, _______, _______, RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME ), // Can be used to place macros on the numpad @@ -146,9 +146,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |Esc/Nav |A |S |D |F |G |4 |5 |6 |+ |H |J |K |L |; |' | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|(/LShift |Y |X |C |V |B |1 |2 |3 |Enter |N |M |, |. |/ |)/RShift | +|(/LShift |Y |X |C |V |B |1 |2 |3 |Tab |N |M |, |. |/ |)/RShift | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|RCtrl | |Alt |Win |Lower |Space |00 |0 |. |Tab |Enter |Raise |Win |AltGr | |LCtrl | +|RCtrl | |Alt |Win |Lower |Space |00 |0 |. |Enter |Enter |Raise |Win |AltGr | |LCtrl | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -156,8 +156,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { CU_GRV, DE_1, DE_2, CU_3, DE_4, DE_5, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, CU_6, CU_7, CU_8, CU_9, CU_0, CU_BSLS, KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, KC_P7, KC_P8, KC_P9, KC_PPLS, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, KC_P4, KC_P5, KC_P6, CU_EQL, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, - CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, KC_P1, KC_P2, KC_P3, KC_PENT, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, - KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P00, KC_P0, KC_PDOT, KC_TAB, KC_ENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + CU_LSFT, CU_Y, DE_X, DE_C, DE_V, DE_B, KC_P1, KC_P2, KC_P3, KC_TAB, DE_N, DE_M, CU_COMM, CU_DOT, CU_SLSH, CU_RSFT, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_P00, KC_P0, KC_PDOT, KC_PENT, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* Lower @@ -168,9 +168,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |@ |Strg+X |Strg+C |Strg+V | |4 |5 |6 |= | |_ |+ |{ |} || | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |? | | | | |1 |2 |3 |Enter | | | | | | | +| |? | | | | |1 |2 |3 |Tab | | | | | | | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | |00 |0 |. |Tab | | | | | | | +| | | | | | |00 |0 |. |Enter | | | | | | | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -190,9 +190,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |F1 |F2 |F3 |F4 |F5 |4 |5 |6 |= |F6 |- |= |[ |] |\ | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |F7 |F8 |F9 |F10 |F11 |1 |2 |3 |Enter |F12 | | | | | | +| |F7 |F8 |F9 |F10 |F11 |1 |2 |3 |Tab |F12 | | | | | | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | |00 |0 |. |Tab | | | | | | | +| | | | | | |00 |0 |. |Enter | | | | | | | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -212,9 +212,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |Ä |ß | | | |4 |5 |6 |= | | | | | | | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | |1 |2 |3 |Enter | | | | | | | +| | | | | | |1 |2 |3 |Tab | | | | | | | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | |" |00 |0 |. |Tab |" | | | | | | +| | | | | |" |00 |0 |. |Enter |" | | | | | | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -234,9 +234,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |Left |Down |Right |End | |4 |5 |6 |= | |Win+Left |Win+Down |Win+Right| |Enter | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Prev |Pause |Next |LowerVol |RaiseVol |1 |2 |3 |Enter |Mute | | | | | | +| |Prev |Pause |Next |LowerVol |RaiseVol |1 |2 |3 |Tab |Mute | | | | | | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|RESET |ESCT | | | | |00 |0 |. |Tab | | | | | |Game | +|RESET |ESCT | | | | |00 |0 |. |Enter | | | | | |Game | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -245,7 +245,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______, CU_GAME + RESET, CU_ESCT, _______, _______, _______, KC_SPC, _______, _______, _______, _______, CTLENT, _______, _______, _______, _______, CU_GAME ), // Can be used to place macros on the numpad @@ -267,9 +267,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| |Esc/Nav |A |S |D |F |G |H |J |K |L |; |' |4 |5 |6 |+ | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|(/LShift |Y |X |C |V |B |N |M |, |. |/ |)/RShift |1 |2 |3 |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|RCtrl | |Alt |Win |Lower |Space |Enter |Raise |Win |AltGr | |LCtrl |00 |0 |. |Tab | +|(/LShift |Y |X |C |V |B |N |M |, |. |/ |)/RShift |1 |2 |3 |Tab | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +|RCtrl | |Alt |Win |Lower |Space |Enter |Raise |Win |AltGr | |LCtrl |00 |0 |. |Enter | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -277,8 +277,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, DE_Q, DE_W, DE_E, DE_R, DE_T, CU_Z, DE_U, DE_I, DE_O, DE_P, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PPLS, CU_NAV, DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, CU_SCLN, CU_QUOT, KC_P4, KC_P5, KC_P6, CU_EQL, - 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_ENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_P00, KC_P0, KC_PDOT, KC_TAB + 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_P1, KC_P2, KC_P3, KC_TAB, + KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, LOWER, KC_SPC, CTLENT, RAISE, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_P00, KC_P0, KC_PDOT, KC_PENT ), /* Lower @@ -289,9 +289,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |@ |Strg+X |Strg+C |Strg+V | | |_ |+ |{ |} || |4 |5 |6 |= | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |? | | | | | | | | | | |1 |2 |3 |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | |00 |0 |. |Tab | +| |? | | | | | | | | | | |1 |2 |3 |Tab | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| | | | | | | | | | | | |00 |0 |. |Enter | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -311,9 +311,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |F1 |F2 |F3 |F4 |F5 |F6 |- |= |[ |] |\ |4 |5 |6 |= | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | |1 |2 |3 |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | |00 |0 |. |Tab | +| |F7 |F8 |F9 |F10 |F11 |F12 | | | | | |1 |2 |3 |Tab | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| | | | | | | | | | | | |00 |0 |. |Enter | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -333,9 +333,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |Ä |ß | | | | | | | | | |4 |5 |6 |= | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | | | | | | | | |1 |2 |3 |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| | | | | |" |" | | | | | |00 |0 |. |Tab | +| | | | | | | | | | | | |1 |2 |3 |Tab | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| | | | | |" |" | | | | | |00 |0 |. |Enter | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -355,9 +355,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |Left |Down |Right |End | | |Win+Left |Win+Down |Win+Right| |Enter |4 |5 |6 |= | |---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | |1 |2 |3 |Enter | -|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| -|RESET |ESCT | | | | | | | | | |Game |00 |0 |. |Tab | +| |Prev |Pause |Next |LowerVol |RaiseVol |Mute | | | | | |1 |2 |3 |Tab | +|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +|RESET |ESCT | | | | | | | | | |Game |00 |0 |. |Enter | `---------------------------------------------------------------------------------------------------------------------------------------------------------------' */ @@ -366,7 +366,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, - RESET, CU_ESCT, _______, _______, _______, KC_SPC, KC_ENT, _______, _______, _______, _______, CU_GAME, _______, _______, _______, _______ + RESET, CU_ESCT, _______, _______, _______, KC_SPC, CTLENT, _______, _______, _______, _______, CU_GAME, _______, _______, _______, _______ ), // Can be used to place macros on the numpad diff --git a/users/spacebarracecar/config.h b/users/spacebarracecar/config.h index e69de29bb2d1..748c04715519 100644 --- a/users/spacebarracecar/config.h +++ b/users/spacebarracecar/config.h @@ -0,0 +1,2 @@ +#pragma once +#define TAPPING_TERM 200 diff --git a/users/spacebarracecar/spacebarracecar.c b/users/spacebarracecar/spacebarracecar.c index 130d7dc2d419..2ab10d9459e1 100644 --- a/users/spacebarracecar/spacebarracecar.c +++ b/users/spacebarracecar/spacebarracecar.c @@ -96,7 +96,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { navesc_timer = timer_read(); layer_on(_NAV); } else { - if (timer_elapsed(navesc_timer) < 200 && navesc) { + if (timer_elapsed(navesc_timer) < TAPPING_TERM && navesc) { register_code(KC_ESC); unregister_code(KC_ESC); } @@ -134,7 +134,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_LSFT); lshift = true; } else { - if (timer_elapsed(lshift_timer) < 200 && lshiftp && !game) { + if (timer_elapsed(lshift_timer) < TAPPING_TERM && lshiftp && !game) { register_code(KC_LSFT); register_code(KC_8); unregister_code(KC_8); @@ -154,7 +154,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { register_code(KC_LSFT); rshift = true; } else { - if (timer_elapsed(rshift_timer) < 200 && rshiftp && !game) { + if (timer_elapsed(rshift_timer) < TAPPING_TERM && rshiftp && !game) { register_code(KC_LSFT); register_code(KC_9); unregister_code(KC_9); diff --git a/users/spacebarracecar/spacebarracecar.h b/users/spacebarracecar/spacebarracecar.h index d0259b73cce0..b57cbed82425 100644 --- a/users/spacebarracecar/spacebarracecar.h +++ b/users/spacebarracecar/spacebarracecar.h @@ -88,6 +88,8 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); #define GUIL LGUI(KC_LEFT) #define GUIR RGUI(KC_RIGHT) +#define CTLENT CTL_T(KC_ENT) + /* Templates for Keys, with custom shifted and non shifted Characters */ From baaa138e90e5512ac58de7b627d537e6ce4c1197 Mon Sep 17 00:00:00 2001 From: VM Date: Sun, 13 Jan 2019 00:09:04 -0500 Subject: [PATCH 113/458] [Keymap] my keymap for the crkbd and update my iris keymap readme (#4788) * adding my keymap primarily to iris * adding my crkbd keymap and update my iris keymap readme with an extra pic * incorporting @drashna's suggestions --- keyboards/crkbd/keymaps/omgvee/config.h | 45 +++++ keyboards/crkbd/keymaps/omgvee/keymap.c | 239 +++++++++++++++++++++++ keyboards/crkbd/keymaps/omgvee/readme.md | 15 ++ keyboards/crkbd/keymaps/omgvee/rules.mk | 31 +++ keyboards/iris/keymaps/omgvee/readme.md | 8 +- 5 files changed, 337 insertions(+), 1 deletion(-) create mode 100644 keyboards/crkbd/keymaps/omgvee/config.h create mode 100644 keyboards/crkbd/keymaps/omgvee/keymap.c create mode 100644 keyboards/crkbd/keymaps/omgvee/readme.md create mode 100644 keyboards/crkbd/keymaps/omgvee/rules.mk diff --git a/keyboards/crkbd/keymaps/omgvee/config.h b/keyboards/crkbd/keymaps/omgvee/config.h new file mode 100644 index 000000000000..bed797e92164 --- /dev/null +++ b/keyboards/crkbd/keymaps/omgvee/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 + +/* 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 +#define BACKLIGHT_LEVELS 10 diff --git a/keyboards/crkbd/keymaps/omgvee/keymap.c b/keyboards/crkbd/keymaps/omgvee/keymap.c new file mode 100644 index 000000000000..fbd29e774f19 --- /dev/null +++ b/keyboards/crkbd/keymaps/omgvee/keymap.c @@ -0,0 +1,239 @@ +#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_SFCPS SFT_T(KC_CAPS) +#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,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + SFCPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + SFCPS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, ENT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + SFCPS, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, BSLS,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, BRID, BRIU, VOLD, VOLU, MUTE, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, ENT, SPC, 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 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/omgvee/readme.md b/keyboards/crkbd/keymaps/omgvee/readme.md new file mode 100644 index 000000000000..707f44a9ca08 --- /dev/null +++ b/keyboards/crkbd/keymaps/omgvee/readme.md @@ -0,0 +1,15 @@ +# Reade.md for what I want from my HeliDox(CRKBD) layout +====================================================== + + +![My beloved HeliDox keeb](https://imgur.com/a/t5m6rmW) + +- media keys and media controls +- 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) +- navigation keys should be the vim ones really; +- arrow keys on one layer(most likely on the ADJUST one) + +See keymap.c for layouts diff --git a/keyboards/crkbd/keymaps/omgvee/rules.mk b/keyboards/crkbd/keymaps/omgvee/rules.mk new file mode 100644 index 000000000000..21ec12ada184 --- /dev/null +++ b/keyboards/crkbd/keymaps/omgvee/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 = 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. +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 \ diff --git a/keyboards/iris/keymaps/omgvee/readme.md b/keyboards/iris/keymaps/omgvee/readme.md index bf9a5acb1fd1..82a6cd2cf560 100644 --- a/keyboards/iris/keymaps/omgvee/readme.md +++ b/keyboards/iris/keymaps/omgvee/readme.md @@ -4,6 +4,10 @@ ![My beloved IRIS keeb](https://i.imgur.com/wgsb37e.jpg) +![My beloved choc IRIS keeb](https://imgur.com/a/NDXqLGb) +======= + + - mouse keys - media keys and media controls - in-switch LED intensity controls (+/-) @@ -14,4 +18,6 @@ - also have alternates on the same layer, in the form of AWSD, as well as HJKL (keep in mind the order is Left, Up, Down, Right) - arrow keys on one layer, however with another modifier key, they become left=home, right=end, up=page up, down=page Down -See keymap.c for layouts \ No newline at end of file + +See keymap.c for layouts + From 9ef46494b2412061a8e0fff6f10d50e90a7152b0 Mon Sep 17 00:00:00 2001 From: Jason Pepas Date: Sat, 12 Jan 2019 23:30:19 -0600 Subject: [PATCH 114/458] [Keyboard] hexon38 and Dual-role key implementation (#4709) * initial dual-role key implementation for hexon38 * PR feedback, adding README * Moving to handwired subdir * Additional PR feedback --- keyboards/handwired/hexon38/config.h | 60 +++ keyboards/handwired/hexon38/hexon38.c | 3 + keyboards/handwired/hexon38/hexon38.h | 17 + .../hexon38/keymaps/default/keymap.c | 407 ++++++++++++++++++ keyboards/handwired/hexon38/readme.md | 11 + keyboards/handwired/hexon38/rules.mk | 64 +++ 6 files changed, 562 insertions(+) create mode 100644 keyboards/handwired/hexon38/config.h create mode 100644 keyboards/handwired/hexon38/hexon38.c create mode 100644 keyboards/handwired/hexon38/hexon38.h create mode 100644 keyboards/handwired/hexon38/keymaps/default/keymap.c create mode 100644 keyboards/handwired/hexon38/readme.md create mode 100644 keyboards/handwired/hexon38/rules.mk diff --git a/keyboards/handwired/hexon38/config.h b/keyboards/handwired/hexon38/config.h new file mode 100644 index 000000000000..23eb51e01481 --- /dev/null +++ b/keyboards/handwired/hexon38/config.h @@ -0,0 +1,60 @@ +// see https://github.com/pepaslabs/hexon38 + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER pepaslabs +#define PRODUCT hexon38 +#define DESCRIPTION "A handmade non-split ergonomic 38-key keyboard, inspired by the lil38. See https://github.com/pepaslabs/hexon38." + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, F0, B2, F4 } +#define MATRIX_COL_PINS { C6, D3, D2, D1, D0, B7, F6, F7, B6, B5, B4, D7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + + +// Disabled features: + +/* 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 + +/* prevent stuck modifiers */ +//#define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/handwired/hexon38/hexon38.c b/keyboards/handwired/hexon38/hexon38.c new file mode 100644 index 000000000000..d830adef3c7c --- /dev/null +++ b/keyboards/handwired/hexon38/hexon38.c @@ -0,0 +1,3 @@ +// see https://github.com/pepaslabs/hexon38 + +#include "hexon38.h" diff --git a/keyboards/handwired/hexon38/hexon38.h b/keyboards/handwired/hexon38/hexon38.h new file mode 100644 index 000000000000..f98f460faf82 --- /dev/null +++ b/keyboards/handwired/hexon38/hexon38.h @@ -0,0 +1,17 @@ +// see https://github.com/pepaslabs/hexon38 + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K002, K003, K004, K005, K006, K007, K008, K009, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ + K200, K201, K202, K203, K204, K207, K208, K209, K210, K211, \ + K302, K303, K304, K305, K306, K307, K308, K309 \ +) { \ + { KC_NO, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ + { K200, K201, K202, K203, K204, KC_NO, KC_NO, K207, K208, K209, K210, K211 }, \ + { KC_NO, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, KC_NO, KC_NO } \ +} diff --git a/keyboards/handwired/hexon38/keymaps/default/keymap.c b/keyboards/handwired/hexon38/keymaps/default/keymap.c new file mode 100644 index 000000000000..c3805991f0f0 --- /dev/null +++ b/keyboards/handwired/hexon38/keymaps/default/keymap.c @@ -0,0 +1,407 @@ +// see https://github.com/pepaslabs/hexon38 + +#include "hexon38.h" + +#define A_ KC_A +#define B_ KC_B +#define C_ KC_C +#define D_ KC_D +#define E_ KC_E +#define F_ KC_F +#define G_ KC_G +#define H_ KC_H +#define I_ KC_I +#define J_ KC_J +#define K_ KC_K +#define L_ KC_L +#define M_ KC_M +#define N_ KC_N +#define O_ KC_O +#define P_ KC_P +#define Q_ KC_Q +#define R_ KC_R +#define S_ KC_S +#define T_ KC_T +#define U_ KC_U +#define V_ KC_V +#define W_ KC_W +#define X_ KC_X +#define Y_ KC_Y +#define Z_ KC_Z + +// Dual-role keys: modifier when held, alpha when tapped. +#define A_CTL CTL_T(KC_A) +#define S_ALT ALT_T(KC_S) +#define D_GUI GUI_T(KC_D) +#define F_SFT SFT_T(KC_F) +#define J_SFT SFT_T(KC_J) +#define K_GUI GUI_T(KC_K) +#define L_ALT ALT_T(KC_L) +#define COLN_CTL CTL_T(KC_SCLN) + +#define ______ KC_TRNS +#define LSHIFT KC_LSHIFT +#define RSHIFT KC_RSHIFT +#define COMMA KC_COMM +#define SLASH KC_SLSH +#define SPACE KC_SPC +#define TAB KC_TAB +#define BKSPC KC_BSPC +#define ENTER KC_ENT +#define PERIOD KC_DOT + +#define BASE_LAYER LAYOUT +#define BLANK_LAYER LAYOUT + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + BASE_LAYER( +// ,--------+--------+--------+--------. ,--------+--------+--------+--------. + W_ , E_ , R_ , T_ , Y_ , U_ , I_ , O_ , +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------. + Q_ , A_CTL , S_ALT , D_GUI , F_SFT , G_ , H_ , J_SFT , K_GUI , L_ALT ,COLN_CTL, P_ , +//|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + B_ , Z_ , X_ , C_ , V_ , M_ , COMMA , PERIOD , SLASH , N_ , +//`--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------' + +// ,--------+--------+--------+--------. ,--------+--------+--------+--------. + LSHIFT , SPACE , TAB , DEBUG , SPACE , BKSPC , ENTER , RSHIFT +// `--------+--------+--------+--------' `--------+--------+--------+--------' +), + + BLANK_LAYER( +// ,--------+--------+--------+--------. ,--------+--------+--------+--------. + ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , +//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------. + ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , +//|--------+--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------+--------| + ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ , +//`--------+--------+--------+--------+--------' `--------+--------+--------+--------+--------' + +// ,--------+--------+--------+--------. ,--------+--------+--------+--------. + ______ , ______ , ______ , ______ , ______ , ______ , ______ , ______ +// `--------+--------+--------+--------' `--------+--------+--------+--------' +) + +}; + +// a linked list of pending key events (press or release) which we haven't processed yet. +struct _pending_key_t { + uint16_t keycode; + keyrecord_t record; + struct _pending_key_t *next; +}; +typedef struct _pending_key_t pending_key_t; + +// worst case is 10 down strokes and 1 up stroke before we can start disambiguating. +#define RINGSIZE 11 + +// a ring buffer and linked list to store pending key events (presses and releases). +// (basically, this is a fixed-allocation linked list.) +struct _kring_t { + // the actual key events. + pending_key_t items[RINGSIZE]; + // the index of the oldest item, or -1 if no items. + int8_t ifirst; + // the index of the most recently added item, or -1 if no items. + int8_t ilast; + // the number of items in the ring. + uint8_t count; + // the head of the linked list. + pending_key_t *head; +}; +typedef struct _kring_t kring_t; + +// safe accessor to the i-th item of the linked list (returns pointer or NULL). +pending_key_t* kring_get(kring_t *ring, uint8_t i) { + if (i >= ring->count) { + return NULL; + } + uint8_t j = (ring->ifirst + i) % RINGSIZE; + return &(ring->items[j]); +} + +// return the last key in the list of buffered keys. +pending_key_t* kring_last(kring_t *ring) { + if (ring->count == 0) { + return NULL; + } + return kring_get(ring, ring->count - 1); +} + +// remove the oldest item from the ring (the head of the list). +void kring_pop(kring_t *ring) { + if (ring->count > 0) { + ring->ifirst += 1; + ring->ifirst %= RINGSIZE; + ring->head = ring->head->next; + ring->count -= 1; + } +} + +// add an item to the ring (append to the list). +void kring_append(kring_t *ring, uint16_t keycode, keyrecord_t *record) { + if (ring->count >= RINGSIZE) { + // uh oh, we overflowed the capacity of our buffer :( + return; + } + + // if the ring is empty, insert at index 0. + if (ring->count == 0) { + ring->count += 1; + ring->ifirst = 0; + ring->ilast = 0; + ring->head = &(ring->items[0]); + } + // else, append it onto the end. + else { + ring->count += 1; + ring->ilast += 1; + ring->ilast %= RINGSIZE; + } + + // the index at which we should insert this item. + int8_t i = ring->ilast; + + // insert the item. + ring->items[i].keycode = keycode; + ring->items[i].record.event = record->event; +#ifndef NO_ACTION_TAPPING + ring->items[i].record.tap = record->tap; +#endif + ring->items[i].next = NULL; + + // update the previous item to point to this item. + if (ring->count > 1) { + kring_get(ring, ring->count - 2)->next = &(ring->items[i]); + } +} + +kring_t g_pending; + +void matrix_init_user(void) { + g_pending.ifirst = -1; + g_pending.ilast = -1; + g_pending.count = 0; + g_pending.head = NULL; +} + +void matrix_scan_user(void) {} + +/* +a_ a-: emit a +a_ b_ b- a-: emit SHIFT+b +a_ b_ a- b-: emit a, b +dual1down, dual1up -> norm1down, norm1up +dual1down, norm2down, norm2up -> mod1down, norm2down, norm2up +dual1down, norm2down, dual1up -> norm1down, norm2down, norm1up +dual1down, dual2down, norm3down, norm3up -> mod1down, mod2down, norm3down, norm3up +so, a dual key can't be disambiguated until the next keyup of a keydown (not including keyups from keys before it). +*/ + +bool is_ambiguous_kc(uint16_t kc) { + // See the MT() define: https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum_keycodes.h#L642 + // See the QK_MOD_TAP case: https://github.com/qmk/qmk_firmware/blob/master/quantum/keymap_common.c#L134 + uint8_t mod = mod_config((kc >> 0x8) & 0x1F); + return mod != 0; +} + +bool is_down(pending_key_t *k) { + return k->record.event.pressed; +} + +bool is_up(pending_key_t *k) { + return !is_down(k); +} + +bool keys_match(pending_key_t *a, pending_key_t *b) { + return a->record.event.key.col == b->record.event.key.col + && a->record.event.key.row == b->record.event.key.row; +} + +// both the down and corresponding upstroke of a keypress. +struct _pending_pair_t { + pending_key_t *down; + pending_key_t *up; +}; +typedef struct _pending_pair_t pending_pair_t; + +// returns true if this keydown event has a corresponding keyup event in the +// list of buffered keys. also fills out 'p'. +bool is_downup_pair(pending_key_t *k, pending_pair_t *p) { + // first, make sure this event is keydown. + if (!is_down(k)) { + return false; + } + // now find its matching keyup. + pending_key_t *next = k->next; + while (next != NULL) { + if (keys_match(k, next) && is_up(next)) { + // found it. + if (p != NULL) { + p->down = k; + p->up = next; + } + return true; + } + next = next->next; + } + // didn't find it. + return false; +} + +// given a QK_MOD_TAP keycode, return the KC_* version of the modifier keycode. +uint16_t get_mod_kc(uint16_t keycode) { + uint8_t mod = mod_config((keycode >> 0x8) & 0x1F); + switch (mod) { + case MOD_LCTL: + return KC_LCTL; + case MOD_RCTL: + return KC_RCTL; + case MOD_LSFT: + return KC_LSFT; + case MOD_RSFT: + return KC_RSFT; + case MOD_LALT: + return KC_LALT; + case MOD_RALT: + return KC_RALT; + case MOD_LGUI: + return KC_LGUI; + case MOD_RGUI: + return KC_RGUI; + default: + // shrug? this shouldn't happen. + return keycode; + } +} + +bool is_mod_kc(uint16_t keycode) { + switch (keycode) { + case QK_MODS ... QK_MODS_MAX: + return true; + default: + return false; + } +} + +void interpret_as_mod(pending_pair_t *p) { + // see https://github.com/qmk/qmk_firmware/issues/1503 + pending_key_t *k; + k = p->down; + if (k != NULL) { + k->keycode = get_mod_kc(k->keycode); + } + k = p->up; + if (k != NULL) { + k->keycode = get_mod_kc(k->keycode); + } +} + +void interpret_as_normal(pending_pair_t *p) { + pending_key_t *k; + k = p->down; + if (k != NULL) { + k->keycode = k->keycode & 0xFF; + } + k = p->up; + if (k != NULL) { + k->keycode = k->keycode & 0xFF; + } +} + +void execute_head_and_pop(kring_t *ring) { + pending_key_t *head = kring_get(ring, 0); + uint16_t kc = head->keycode; + if (is_mod_kc(kc)) { + if (is_down(head)) { + dprintf(" %s: mod down 0x%04X\n", __func__, kc); + set_mods(get_mods() | MOD_BIT(kc)); + } else { + dprintf(" %s: mod up 0x%04X\n", __func__, kc); + set_mods(get_mods() & ~MOD_BIT(kc)); + } + } else { + if (is_down(head)) { + dprintf(" %s: key down 0x%04X\n", __func__, kc); + register_code16(kc); + } else { + dprintf(" %s: key up 0x%04X\n", __func__, kc); + unregister_code16(kc); + } + } + kring_pop(ring); +} + +// try to figure out what the next pending keypress means. +bool parse_next(kring_t *pending) { + pending_pair_t p; + pending_key_t *first = kring_get(pending, 0); + if (!is_ambiguous_kc(first->keycode)) { + // this pending key isn't ambiguous, so execute it. + dprintf(" %s: found unambiguous key\n", __func__); + execute_head_and_pop(pending); + return true; + } else if (is_ambiguous_kc(first->keycode) && is_up(first)) { + dprintf(" %s: interpreting keyup as mod\n", __func__); + p.down = NULL; + p.up = first; + interpret_as_mod(&p); + execute_head_and_pop(pending); + return true; + } else if (is_downup_pair(first, &p)) { + // 'first' was released before any other pressed key, so treat this as + // a rolling series of normal key taps. + dprintf(" %s: found down-up pair, interpreting as normal key\n", __func__); + interpret_as_normal(&p); + execute_head_and_pop(pending); + return true; + } else { + // if another key was pressed and released while 'first' was held, then we + // should treat it like a modifier. + pending_key_t *next = first->next; + while (next != NULL) { + if (is_downup_pair(next, NULL)) { + dprintf(" %s: found subsequent downup pair, interpreting head as mod\n", __func__); + p.down = first; + p.up = NULL; + interpret_as_mod(&p); + execute_head_and_pop(pending); + return true; + } + next = next->next; + } + + // we can't disambiguate 'first' yet. wait for another keypress. + dprintf(" %s: can't disambiguate (yet)\n", __func__); + return false; + } +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (keycode == DEBUG) { + return true; + } + + if (g_pending.count == 0 && !is_ambiguous_kc(keycode)) { + // we have no pending keys and this key isn't ambiguous, so we should + // just let QMK take care of it. + dprintf("%s: handled by qmk\n", __func__); + return true; + } else { + dprintf("%s: got dual-role key\n", __func__); + // append the keypress and then try parsing all pending keypresses. + kring_append(&g_pending, keycode, record); + while (g_pending.count > 0) { + dprintf("%s: looping through %d keys...\n", __func__, g_pending.count); + if (!parse_next(&g_pending)) { + // one of our keypresses is ambiguous and we can't proceed until + // we get further keypresses to disambiguate it. + dprintf("%s: %d pending keys are ambiguous\n", __func__, g_pending.count); + break; + } + } + return false; + } +} diff --git a/keyboards/handwired/hexon38/readme.md b/keyboards/handwired/hexon38/readme.md new file mode 100644 index 000000000000..c8ada8e2b2f3 --- /dev/null +++ b/keyboards/handwired/hexon38/readme.md @@ -0,0 +1,11 @@ +# hexon38 + +QMK support for the [hexon38](https://github.com/pepaslabs/hexon38). + +## Building + +``` +$ cd qmk_firmware +$ make handwired/hexon38 +``` + diff --git a/keyboards/handwired/hexon38/rules.mk b/keyboards/handwired/hexon38/rules.mk new file mode 100644 index 000000000000..2b6f17afc288 --- /dev/null +++ b/keyboards/handwired/hexon38/rules.mk @@ -0,0 +1,64 @@ +# see https://github.com/pepaslabs/hexon38 + +# 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 + + +# Enabled 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 = 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 + +# Disabled build options: +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no From caf0c8e1647f1ed94b7e382959cd0d2bf604ce9a Mon Sep 17 00:00:00 2001 From: tw1t611 Date: Sun, 13 Jan 2019 06:40:12 +0100 Subject: [PATCH 115/458] [Keymap] Add tw1t611 german keyboard layout for minidox. (#4679) Apply core functions. Change layout. --- keyboards/minidox/keymaps/tw1t611/keymap.c | 59 +++++++++++++++++++++ keyboards/minidox/keymaps/tw1t611/readme.md | 23 ++++++++ keyboards/minidox/keymaps/tw1t611/rules.mk | 1 + 3 files changed, 83 insertions(+) create mode 100644 keyboards/minidox/keymaps/tw1t611/keymap.c create mode 100644 keyboards/minidox/keymaps/tw1t611/readme.md create mode 100644 keyboards/minidox/keymaps/tw1t611/rules.mk diff --git a/keyboards/minidox/keymaps/tw1t611/keymap.c b/keyboards/minidox/keymaps/tw1t611/keymap.c new file mode 100644 index 000000000000..e94625516e95 --- /dev/null +++ b/keyboards/minidox/keymaps/tw1t611/keymap.c @@ -0,0 +1,59 @@ +#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 1 +#define _RAISE 2 +#define _ADJUST 3 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// macro keys +#define CALTDEL LCTL(LALT(KC_DEL)) // ctrl-alt-del +#define CALTESC LCTL(LSFT(KC_ESC)) // ctrl-alt-esc +#define CALT LCTL(KC_LALT) // ctrl-alt + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTZ] = LAYOUT( \ + DE_Q, DE_W, DE_E, DE_R, DE_T, DE_Z, DE_U, DE_I, DE_O, DE_P, \ + DE_A, DE_S, DE_D, DE_F, DE_G, DE_H, DE_J, DE_K, DE_L, KC_SPC, \ + DE_Y, DE_X, DE_C, DE_V, DE_B, DE_N, DE_M, DE_COMM, DE_DOT, DE_MINS, \ + KC_LCTRL, MO(_LOWER), MO(_RAISE), KC_LGUI, KC_LSFT, KC_LALT \ +), + +[_RAISE] = LAYOUT( \ + DE_EXLM, DE_QST, DE_PARA, DE_DLR, DE_HASH, DE_PLUS, DE_7, DE_8, DE_9, DE_0, \ + DE_CIRC, DE_QUOT, DE_DQOT, DE_GRV, DE_AMPR, DE_ASTR, DE_4, DE_5, DE_6, DE_EQL, \ + DE_SLSH, DE_PIPE, DE_BSLS, DE_AT, DE_EURO, DE_PERC, DE_1, DE_2, DE_3, KC_TAB, \ + _______, _______, _______, _______, _______, _______ \ +), + +[_LOWER] = LAYOUT( \ + KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, DE_LBRC, DE_RBRC, KC_AUDIO_VOL_UP, KC_HOME, KC_PGDOWN, KC_PGUP, KC_END, DE_TILD, \ + KC_ESC, DE_LESS, DE_LPRN, DE_RPRN, DE_MORE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_ENT, \ + KC_BSPC, KC_DEL, DE_LCBR, DE_RCBR, KC_PSCR, _______, DE_AE, DE_OE, DE_UE, DE_SS, \ + _______, _______, _______, _______, MO(_ADJUST), _______ \ +), + +[_ADJUST] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, \ + CALTESC, CALTDEL, _______, CALT, _______, _______, KC_F4, KC_F5, KC_F6, KC_F11, \ + RESET, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F12, \ + _______, _______, _______, _______, _______, _______ \ +)}; + +void matrix_init_user(void) { + set_single_persistent_default_layer(_QWERTZ); +}; diff --git a/keyboards/minidox/keymaps/tw1t611/readme.md b/keyboards/minidox/keymaps/tw1t611/readme.md new file mode 100644 index 000000000000..7ab4526fbc4f --- /dev/null +++ b/keyboards/minidox/keymaps/tw1t611/readme.md @@ -0,0 +1,23 @@ +# Minidox Layout by tw1t611 +![](https://imgur.com/M95KSke.png) + +This is a german layout with support for umlauts and the euro sign. +You need to set your system layout to german. + +[keyboard-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/d58a82d8017d0c0cca044ef385def165) + +## Layers +| Layer | Legend | +| ----- | ------ | +| Base | Top left (white) | +| Lower | Top right (organge) | +| Raise | Bottom right (blue) | +| Adjust | Front print (orange + shift) | + +## Features +* German layout with support for umlauts and the euro sign +* Raise/lower layers focus first on one-handed use +* Numpad on right hand with raise layer +* Vim optimized + * Easy reachable Esc + * arrow keys on h, j, k, l diff --git a/keyboards/minidox/keymaps/tw1t611/rules.mk b/keyboards/minidox/keymaps/tw1t611/rules.mk new file mode 100644 index 000000000000..fcfd2225bcf8 --- /dev/null +++ b/keyboards/minidox/keymaps/tw1t611/rules.mk @@ -0,0 +1 @@ +EXTRAKEY_ENABLE = yes From 246c3e4ef434d95dd1ac58fd390893cd0a460328 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Sun, 13 Jan 2019 10:50:23 -0600 Subject: [PATCH 116/458] Changed rest note (#4837) * Changed rest term * Update quantum/audio/musical_notes.h Co-Authored-By: germ --- quantum/audio/musical_notes.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/audio/musical_notes.h b/quantum/audio/musical_notes.h index 065608cccea3..ce8d47d1c1ad 100644 --- a/quantum/audio/musical_notes.h +++ b/quantum/audio/musical_notes.h @@ -61,7 +61,11 @@ // Notes - # = Octave +#ifdef __arm__ +#define NOTE_REST 1.00f +#else #define NOTE_REST 0.00f +#endif /* These notes are currently bugged #define NOTE_C0 16.35f From a9982e3b6b7a0b612e0a96b7b264e99eef45c1f9 Mon Sep 17 00:00:00 2001 From: Mazin Power Date: Sun, 13 Jan 2019 17:01:21 +0000 Subject: [PATCH 117/458] [Keymap] Adds keymaps for muzfuz DZ60, Planck, Clueboard66 (#4825) * Adds keymaps for muzfuz * Remove unused keys from adjust layer * Bring in line with current QMK standards. --- .../clueboard/66/keymaps/muzfuz/keymap.c | 74 +++++ .../clueboard/66/keymaps/muzfuz/readme.md | 8 + keyboards/dz60/keymaps/muzfuz/README.md | 8 + keyboards/dz60/keymaps/muzfuz/keymap.c | 80 +++++ keyboards/planck/keymaps/muzfuz/config.h | 40 +++ keyboards/planck/keymaps/muzfuz/keymap.c | 297 ++++++++++++++++++ keyboards/planck/keymaps/muzfuz/readme.md | 8 + keyboards/planck/keymaps/muzfuz/rules.mk | 1 + 8 files changed, 516 insertions(+) create mode 100644 keyboards/clueboard/66/keymaps/muzfuz/keymap.c create mode 100644 keyboards/clueboard/66/keymaps/muzfuz/readme.md create mode 100644 keyboards/dz60/keymaps/muzfuz/README.md create mode 100644 keyboards/dz60/keymaps/muzfuz/keymap.c create mode 100644 keyboards/planck/keymaps/muzfuz/config.h create mode 100644 keyboards/planck/keymaps/muzfuz/keymap.c create mode 100644 keyboards/planck/keymaps/muzfuz/readme.md create mode 100644 keyboards/planck/keymaps/muzfuz/rules.mk diff --git a/keyboards/clueboard/66/keymaps/muzfuz/keymap.c b/keyboards/clueboard/66/keymaps/muzfuz/keymap.c new file mode 100644 index 000000000000..d4af3548315c --- /dev/null +++ b/keyboards/clueboard/66/keymaps/muzfuz/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +// Helpful defines +#define ESC_CTL CTL_T(KC_ESCAPE) // Tap for Esc, hold for Ctrl +#define _FL_KCF LT(1,KC_F) +#define _FL_KCJ LT(1,KC_J) +#define _AL_KCA LT(2,KC_A) +#define CMD_ENT LGUI(LSFT(KC_ENT)) + +// 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. +#define _BL 0 +#define _FL 1 +#define _AL 2 +#define _CL 3 + +enum custom_keycodes { + HASHRKT = SAFE_RANGE, + CLNEQLS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ + [_BL] = 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_BSLS, HASHRKT, LGUI(KC_C), + 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, LGUI(KC_V), + ESC_CTL, _AL_KCA, KC_S, KC_D, _FL_KCF, KC_G, KC_H, _FL_KCJ, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_LGUI, + 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_SLSH, KC_RSFT, KC_UP, + CMD_ENT, KC_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, MO(_CL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ + [_FL] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, KC_VOLU, + _______, HASHRKT, _______, KC_LCBR, KC_RCBR, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, _______, KC_MUTE, KC_VOLD, + _______, CLNEQLS, _______, KC_LBRC, KC_RBRC, _______, _______, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_GRV, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _FL: Function Layer + */ + [_AL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + + /* 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, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case HASHRKT: + if (record->event.pressed) { + SEND_STRING("=>"); + } + break; + case CLNEQLS: + if (record->event.pressed) { + SEND_STRING(":="); + } + break; + } + return true; +} diff --git a/keyboards/clueboard/66/keymaps/muzfuz/readme.md b/keyboards/clueboard/66/keymaps/muzfuz/readme.md new file mode 100644 index 000000000000..ce23a8a99c0e --- /dev/null +++ b/keyboards/clueboard/66/keymaps/muzfuz/readme.md @@ -0,0 +1,8 @@ +# muzfuz Clueboard layout + +```shell +make clueboard/66/rev3:muzfuz +dfu-programmer atmega32u4 erase --force && \ +dfu-programmer atmega32u4 flash .build/clueboard_66_rev3_muzfuz.hex && \ +dfu-programmer atmega32u4 reset +``` diff --git a/keyboards/dz60/keymaps/muzfuz/README.md b/keyboards/dz60/keymaps/muzfuz/README.md new file mode 100644 index 000000000000..711d6d5f56ac --- /dev/null +++ b/keyboards/dz60/keymaps/muzfuz/README.md @@ -0,0 +1,8 @@ +# muzfuz DZ60 layout + +```shell +make dz60:muzfuz +dfu-programmer atmega32u4 erase --force && \ +dfu-programmer atmega32u4 flash .build/dz60_muzfuz_v2.hex && \ +dfu-programmer atmega32u4 reset +``` diff --git a/keyboards/dz60/keymaps/muzfuz/keymap.c b/keyboards/dz60/keymaps/muzfuz/keymap.c new file mode 100644 index 000000000000..848569f61e12 --- /dev/null +++ b/keyboards/dz60/keymaps/muzfuz/keymap.c @@ -0,0 +1,80 @@ +#include QMK_KEYBOARD_H + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define ESC_CTL CTL_T(KC_ESCAPE) // Tap for Esc, hold for Ctrl + +enum custom_keycodes { + HASHRKT = SAFE_RANGE, + CLNEQLS, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_BSLS, HASHRKT, + 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, + ESC_CTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_RGUI, + 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_LCTL, KC_LALT, KC_LGUI, KC_ENT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_RGHT, KC_DOWN), + + 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, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, BL_STEP, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +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)) { + DDRB |= (1 << 2); PORTB &= ~(1 << 2); + } else { + DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); + } + + 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 { + + } + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) +{ + switch (keycode) + { + case HASHRKT: + if (record->event.pressed) + { + SEND_STRING("=>"); + } + break; + case CLNEQLS: + if (record->event.pressed) + { + SEND_STRING(":="); + } + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/muzfuz/config.h b/keyboards/planck/keymaps/muzfuz/config.h new file mode 100644 index 000000000000..fe44b5aa2b95 --- /dev/null +++ b/keyboards/planck/keymaps/muzfuz/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/muzfuz/keymap.c b/keyboards/planck/keymaps/muzfuz/keymap.c new file mode 100644 index 000000000000..16994a57629e --- /dev/null +++ b/keyboards/planck/keymaps/muzfuz/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, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes +{ + QWERTY = SAFE_RANGE, + BACKLIT, + EXT_PLV, + HASHRKT, + CLNEQLS +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ESC_CTL CTL_T(KC_ESCAPE) + +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 | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Enter|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, + ESC_CTL, 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, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |ESCCTL| := | | { | } | ( | ) | - | = | \ | ~ | GUI | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | => | | [ | ] | | | _ | + | | | Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + + [_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + ESC_CTL, CLNEQLS, _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_RGUI, + _______, HASHRKT, _______, KC_LBRC, KC_RBRC, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | | | Up | | | | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |ESCCTL| | Left | Down | Right | | | 4 | 5 | 6 | | GUI | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_planck_grid( + KC_GRV, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, _______, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + + /* 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, _______, _______, 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 HASHRKT: + if (record->event.pressed) + { + SEND_STRING("=>"); + } + break; + case CLNEQLS: + if (record->event.pressed) + { + SEND_STRING(":="); + } + break; + 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; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) +{ + if (muse_mode) + { + if (IS_LAYER_ON(_RAISE)) + { + if (clockwise) + { + muse_offset++; + } + else + { + muse_offset--; + } + } + else + { + if (clockwise) + { + muse_tempo += 1; + } + else + { + muse_tempo -= 1; + } + } + } + else + { + if (clockwise) + { +#ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); +#else + register_code(KC_PGDN); + unregister_code(KC_PGDN); +#endif + } + else + { +#ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); +#else + register_code(KC_PGUP); + unregister_code(KC_PGUP); +#endif + } + } +} + +void dip_update(uint8_t index, bool active) +{ + switch (index) + { + case 0: + if (active) + { +#ifdef AUDIO_ENABLE + PLAY_SONG(plover_song); +#endif + layer_on(_ADJUST); + } + else + { +#ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); +#endif + layer_off(_ADJUST); + } + break; + case 1: + if (active) + { + muse_mode = true; + } + else + { + muse_mode = false; +#ifdef AUDIO_ENABLE + stop_all_notes(); +#endif + } + } +} + +void matrix_scan_user(void) +{ +#ifdef AUDIO_ENABLE + if (muse_mode) + { + if (muse_counter == 0) + { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) + { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } +#endif +} + +bool music_mask_user(uint16_t keycode) +{ + switch (keycode) + { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/muzfuz/readme.md b/keyboards/planck/keymaps/muzfuz/readme.md new file mode 100644 index 000000000000..78153fb324a8 --- /dev/null +++ b/keyboards/planck/keymaps/muzfuz/readme.md @@ -0,0 +1,8 @@ +# The muzfuz Planck Layout + +```shell +docker run -e KEYMAP=muzfuz -e KEYBOARD=planck --rm -v $('pwd'):/qmk:rw qmk_firmware +dfu-programmer atmega32u4 erase +dfu-programmer atmega32u4 flash .build/planck_rev6_muzfuz.hex +dfu-programmer atmega32u4 launch +``` diff --git a/keyboards/planck/keymaps/muzfuz/rules.mk b/keyboards/planck/keymaps/muzfuz/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/planck/keymaps/muzfuz/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From 9bd4b932d08a036438c990608efcd5b15a2fb828 Mon Sep 17 00:00:00 2001 From: Christoffer Holmberg Date: Sun, 13 Jan 2019 19:02:57 +0200 Subject: [PATCH 118/458] [Keymap] Nyquist layout adapted from eorgodox_ez:skug (#4830) * Nyquist layout adapted from my eorgodox layout * Some layout tuning & cleanup * Removed deprecated defines * Added pgup + pgdown --- keyboards/nyquist/keymaps/skug/config.h | 43 ++++++ keyboards/nyquist/keymaps/skug/keymap.c | 170 ++++++++++++++++++++++++ keyboards/nyquist/keymaps/skug/rules.mk | 1 + 3 files changed, 214 insertions(+) create mode 100644 keyboards/nyquist/keymaps/skug/config.h create mode 100644 keyboards/nyquist/keymaps/skug/keymap.c create mode 100644 keyboards/nyquist/keymaps/skug/rules.mk diff --git a/keyboards/nyquist/keymaps/skug/config.h b/keyboards/nyquist/keymaps/skug/config.h new file mode 100644 index 000000000000..c36686329474 --- /dev/null +++ b/keyboards/nyquist/keymaps/skug/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 . +*/ + +#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 LSPO_KEY +#undef RSPC_KEY +#define LSPO_KEY KC_8 // Nordic Left SpaceCadet +#define RSPC_KEY KC_9 // Nordic Right SpaceCadet + + +#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/nyquist/keymaps/skug/keymap.c b/keyboards/nyquist/keymaps/skug/keymap.c new file mode 100644 index 000000000000..fe3229966f6f --- /dev/null +++ b/keyboards/nyquist/keymaps/skug/keymap.c @@ -0,0 +1,170 @@ +/* Copyright 2019 Christoffer Holmberg + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_swedish.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 SYMB 1 +#define MDIA 2 +#define ARRW 3 +#define _ADJUST 16 + +#define CT_APOS CTL_T(NO_APOS) +#define CT_TILD CTL_T(NO_TILD) +#define MD_OSLH LT(MDIA, NO_OSLH) +#define SM_AE LT(SYMB, NO_AE) +#define NO_LT NO_LESS +#define NO_GT LSFT(NO_LESS) + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, + ADJUST, + DVORAK, + COLEMAK, + QWERTY +}; + +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 | Å | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ARRW | A | S | D | F | G | | H | J | K | L | Ö | Ä | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift(| Z | X | C | V | B | | N | M | , | . | - |)Shift| + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * |'/Ctrl| ´ | Alt | Bsp |Space | Win | | Entr | Space| Bsb | AlGr | * |Ctrl/¨| + * `-----------------------------------------' '-----------------------------------------' + */ +[BASE] = LAYOUT( \ + // LEFT HAND RIGHT HAND + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA, \ + MO(ARRW), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MD_OSLH, SM_AE, \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, NO_MINS, KC_RSPC, \ + CT_APOS, NO_ACUT, KC_LALT, KC_BSPC, KC_SPC, KC_LGUI, KC_ENT, KC_SPC, KC_BSPC, KC_ALGR, NO_ASTR, CT_TILD \ +), + +/* Symbols layer + * ,-----------------------------------------. .-----------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | ! | @ | { | } | | | | Up | 7 | 8 | 9 | * | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | # | $ | ( | ) | ` | | Down | 4 | 5 | 6 | + | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | % | ^ | [ | ] | ~ | | & | 1 | 2 | 3 | - | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | < | > | | | | | . | 0 | = | | + * `-----------------------------------------' '-----------------------------------------' + */ +[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, NO_AT, NO_LCBR, NO_RCBR, NO_PIPE, KC_UP, KC_7, KC_8, KC_9, NO_ASTR, KC_F12, \ + _______, KC_HASH, NO_DLR, NO_LPRN, NO_RPRN, NO_GRV, KC_DOWN, KC_4, KC_5, KC_6, NO_PLUS, _______, \ + _______, KC_PERC, NO_CIRC, NO_LBRC, NO_RBRC, NO_TILD, NO_AMPR, KC_1, KC_2, KC_3, NO_MINS, _______, \ + _______, _______, _______, NO_LT, NO_GT, _______, _______, _______, KC_DOT, KC_0, NO_EQL, _______ \ +), + +/* Media layer + * ,-----------------------------------------. .-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * `-----------------------------------------' '-----------------------------------------' + */ +[MDIA] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Arrow layer + * ,-----------------------------------------. .-----------------------------------------. + * | | | | | | | | | | | | | PgUp | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | Up | | | | | | | | | | PgDn | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Left | Down | Right| | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | | | Del | | | | | | | | | | + * `-----------------------------------------' '-----------------------------------------' + */ +[ARRW] = LAYOUT( \ + NO_HALF, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, KC_UP , _______ , _______, _______, _______, _______, _______, _______, _______, KC_PGDN, \ + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______ , _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_DEL , _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +/* Adjust () + * ,-----------------------------------------. .-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+ +------+------+------+------+------+------| + * | | 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, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + + +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; +} diff --git a/keyboards/nyquist/keymaps/skug/rules.mk b/keyboards/nyquist/keymaps/skug/rules.mk new file mode 100644 index 000000000000..e0ed6f0c2d6f --- /dev/null +++ b/keyboards/nyquist/keymaps/skug/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no From c8cbee5d718244dd06fda66a0edf5d4cb73b2434 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Sat, 12 Jan 2019 18:51:21 -0600 Subject: [PATCH 119/458] Modified URLs to point to new locations --- keyboards/40percentclub/ut47/readme.md | 2 +- keyboards/6ball/readme.md | 2 +- keyboards/9key/readme.md | 2 +- keyboards/acr60/readme.md | 2 +- keyboards/al1/readme.md | 2 +- keyboards/alu84/readme.md | 2 +- keyboards/amj40/readme.md | 2 +- keyboards/amj60/readme.md | 2 +- keyboards/amj96/readme.md | 2 +- keyboards/amjpad/readme.md | 2 +- keyboards/atom47/readme.md | 2 +- keyboards/atom47/rev2/readme.md | 2 +- keyboards/atomic/readme.md | 2 +- keyboards/atreus/readme.md | 2 +- keyboards/atreus62/readme.md | 2 +- keyboards/bantam44/readme.md | 2 +- keyboards/bface/README.md | 2 +- keyboards/bfake/readme.md | 2 +- keyboards/bfo9000/readme.md | 2 +- keyboards/blockey/readme.md | 2 +- keyboards/bmini/readme.md | 2 +- keyboards/canoe/readme.md | 2 +- keyboards/chimera_ergo/readme.md | 2 +- keyboards/chimera_ortho/readme.md | 2 +- keyboards/chocopad/README.md | 2 +- keyboards/christmas_tree/readme.md | 2 +- keyboards/ckeys/nakey/readme.md | 2 +- keyboards/ckeys/obelus/readme.md | 2 +- keyboards/clueboard/17/readme.md | 2 +- keyboards/clueboard/2x1800/readme.md | 2 +- keyboards/clueboard/60/readme.md | 2 +- keyboards/clueboard/66/readme.md | 2 +- keyboards/clueboard/66_hotswap/readme.md | 2 +- keyboards/clueboard/card/readme.md | 2 +- keyboards/cod67/readme.md | 2 +- keyboards/contra/readme.md | 2 +- keyboards/converter/sun_usb/readme.md | 2 +- keyboards/converter/usb_usb/README.md | 2 +- keyboards/crawlpad/readme.md | 2 +- keyboards/cu24/readme.md | 2 +- keyboards/cu75/readme.md | 2 +- keyboards/daisy/readme.md | 2 +- keyboards/dc01/arrow/readme.md | 2 +- keyboards/dc01/left/readme.md | 2 +- keyboards/dc01/numpad/readme.md | 2 +- keyboards/dc01/right/readme.md | 2 +- keyboards/deltasplit75/readme.md | 2 +- keyboards/dilly/README.md | 2 +- keyboards/diverge3/readme.md | 2 +- keyboards/dk60/readme.md | 2 +- keyboards/duck/eagle_viper/readme.md | 2 +- keyboards/duck/eagle_viper/v2/readme.md | 2 +- keyboards/duck/jetfire/readme.md | 2 +- keyboards/duck/lightsaver/readme.md | 2 +- keyboards/duck/octagon/readme.md | 2 +- keyboards/duck/octagon/v1/readme.md | 2 +- keyboards/duck/octagon/v2/readme.md | 2 +- keyboards/dz60/readme.md | 2 +- keyboards/e6v2/le/readme.md | 2 +- keyboards/e6v2/oe/readme.md | 2 +- keyboards/eco/readme.md | 2 +- keyboards/ergo42/readme.md | 2 +- keyboards/ergoinu/readme.md | 2 +- keyboards/ergotravel/readme.md | 2 +- keyboards/facew/readme.md | 2 +- keyboards/fc660c/README.md | 2 +- keyboards/fc980c/README.md | 2 +- keyboards/felix/readme.md | 2 +- keyboards/fleuron/readme.md | 2 +- keyboards/fortitude60/readme.md | 2 +- keyboards/four_banger/readme.md | 2 +- keyboards/fourier/readme.md | 2 +- keyboards/gh60/readme.md | 2 +- keyboards/gh80_3000/readme.md | 2 +- keyboards/gonnerd/readme.md | 2 +- keyboards/hadron/readme.md | 2 +- keyboards/handwired/ibm122m/readme.md | 2 +- keyboards/handwired/not_so_minidox/readme.md | 2 +- keyboards/handwired/numpad20/readme.md | 2 +- keyboards/handwired/qc60/README.md | 2 +- keyboards/handwired/terminus_mini/readme.md | 2 +- keyboards/helix/readme.md | 2 +- keyboards/hhkb/readme.md | 2 +- keyboards/hid_liber/readme.md | 2 +- keyboards/hs60/v1/readme.md | 2 +- keyboards/hs60/v2/readme.md | 2 +- keyboards/iris/keymaps/s1carii/readme.md | 2 +- keyboards/jc65/v32a/readme.md | 2 +- keyboards/jc65/v32u4/readme.md | 2 +- keyboards/jj40/README.md | 2 +- keyboards/jj50/README.md | 2 +- keyboards/jm60/readme.md | 2 +- keyboards/k_type/readme.md | 2 +- keyboards/katana60/readme.md | 2 +- keyboards/kbd66/readme.md | 2 +- keyboards/kbd6x/readme.md | 2 +- keyboards/kbd75/readme.md | 2 +- keyboards/kbd8x/readme.md | 2 +- keyboards/kc60se/readme.md | 2 +- keyboards/kira75/readme.md | 2 +- keyboards/knops/mini/readme.md | 2 +- keyboards/kona_classic/README.md | 2 +- keyboards/laplace/readme.md | 2 +- keyboards/launchpad/readme.md | 2 +- keyboards/lets_split_eh/README.md | 2 +- keyboards/lfkeyboards/lfk65_hs/readme.md | 2 +- keyboards/lfkeyboards/lfk78/readme.md | 2 +- keyboards/lfkeyboards/lfk87/readme.md | 2 +- keyboards/lfkeyboards/mini1800/readme.md | 2 +- keyboards/lfkeyboards/readme.md | 2 +- keyboards/lfkeyboards/smk65/readme.md | 2 +- keyboards/m10a/readme.md | 2 +- keyboards/mechmini/readme.md | 2 +- keyboards/mechmini/v1/README.md | 2 +- keyboards/mechmini/v2/README.md | 2 +- keyboards/meira/readme.md | 2 +- keyboards/melody96/readme.md | 2 +- keyboards/meme/readme.md | 2 +- keyboards/minidox/readme.md | 2 +- keyboards/mitosis/readme.md | 2 +- keyboards/miuni32/readme.md | 2 +- keyboards/mxss/readme.md | 2 +- keyboards/niu_mini/readme.md | 2 +- keyboards/novelpad/README.md | 2 +- keyboards/noxary/268/readme.md | 2 +- keyboards/nyquist/readme.md | 2 +- keyboards/ok60/readme.md | 2 +- keyboards/omnikey_blackheart/readme.md | 2 +- keyboards/paladin64/readme.md | 2 +- keyboards/phantom/readme.md | 2 +- keyboards/planck/keymaps/phreed/readme.md | 4 ++-- keyboards/playkbtw/ca66/readme.md | 2 +- keyboards/preonic/readme.md | 2 +- keyboards/quefrency/readme.md | 2 +- keyboards/qwertyydox/readme.md | 2 +- keyboards/rama/m10_b/readme.md | 2 +- keyboards/rorschach/readme.md | 2 +- keyboards/s60_x/readme.md | 2 +- keyboards/satan/readme.md | 2 +- keyboards/scrabblepad/readme.md | 2 +- keyboards/singa/readme.md | 2 +- keyboards/sixkeyboard/readme.md | 2 +- keyboards/sixshooter/readme.md | 2 +- keyboards/speedo/readme.md | 2 +- keyboards/staryu/readme.md | 2 +- keyboards/sx60/readme.md | 2 +- keyboards/tanuki/readme.md | 2 +- keyboards/telophase/readme.md | 2 +- keyboards/tetris/readme.md | 2 +- keyboards/the_ruler/readme.md | 2 +- keyboards/tkc1800/README.md | 2 +- keyboards/tokyo60/readme.md | 2 +- keyboards/tragicforce68/README.md | 2 +- keyboards/uk78/readme.md | 2 +- keyboards/v60_type_r/readme.md | 2 +- keyboards/vinta/readme.md | 2 +- keyboards/vision_division/readme.md | 2 +- keyboards/viterbi/readme.md | 2 +- keyboards/wavelet/readme.md | 2 +- keyboards/whitefox/readme.md | 2 +- keyboards/xd60/readme.md | 2 +- keyboards/ymd75/README.md | 2 +- keyboards/zen/readme.md | 2 +- keyboards/zlant/readme.md | 2 +- 164 files changed, 165 insertions(+), 165 deletions(-) diff --git a/keyboards/40percentclub/ut47/readme.md b/keyboards/40percentclub/ut47/readme.md index bbae1384a99c..31be1d9f7737 100644 --- a/keyboards/40percentclub/ut47/readme.md +++ b/keyboards/40percentclub/ut47/readme.md @@ -33,7 +33,7 @@ Go to the [default layout README](keymaps/default/readme.md) for more informatio Credit: Forked from [di0ib TMK version](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/gnap) -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ### Build Guide diff --git a/keyboards/6ball/readme.md b/keyboards/6ball/readme.md index 7316a981696c..c9548453a939 100644 --- a/keyboards/6ball/readme.md +++ b/keyboards/6ball/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make 6ball:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/9key/readme.md b/keyboards/9key/readme.md index 8c6699129339..89629cc8c733 100644 --- a/keyboards/9key/readme.md +++ b/keyboards/9key/readme.md @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): make 9key:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/acr60/readme.md b/keyboards/acr60/readme.md index a0ba2ecdea65..54ea265f1c9d 100644 --- a/keyboards/acr60/readme.md +++ b/keyboards/acr60/readme.md @@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment): make acr60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/al1/readme.md b/keyboards/al1/readme.md index 0032885ff3d1..bdb336a7506f 100644 --- a/keyboards/al1/readme.md +++ b/keyboards/al1/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make al1:default make al1:splitbs -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/alu84/readme.md b/keyboards/alu84/readme.md index ab20c4138921..f98addd0bfbd 100644 --- a/keyboards/alu84/readme.md +++ b/keyboards/alu84/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make alu84:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/amj40/readme.md b/keyboards/amj40/readme.md index 42c5374d52e6..fbf1d9f22999 100755 --- a/keyboards/amj40/readme.md +++ b/keyboards/amj40/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make amj40:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/amj60/readme.md b/keyboards/amj60/readme.md index e87b1f9f8296..394f86456224 100644 --- a/keyboards/amj60/readme.md +++ b/keyboards/amj60/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make amj60:maximized -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/amj96/readme.md b/keyboards/amj96/readme.md index 7c1b61c768aa..f13130047977 100644 --- a/keyboards/amj96/readme.md +++ b/keyboards/amj96/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make amj96:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Notes - In-switch and underglow LEDs currently not supported. diff --git a/keyboards/amjpad/readme.md b/keyboards/amjpad/readme.md index 27d5e09270f1..c069af25ade7 100644 --- a/keyboards/amjpad/readme.md +++ b/keyboards/amjpad/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make amjpad:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/atom47/readme.md b/keyboards/atom47/readme.md index 66f599c6b386..c3cffcea7473 100644 --- a/keyboards/atom47/readme.md +++ b/keyboards/atom47/readme.md @@ -21,6 +21,6 @@ Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?t ## Build To build the default keymap for the latest revision, simply run `make atom47:default`. Specifiy the revision like so: `make atom47/rev3:default`. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ![Atom47](https://i.imgur.com/JfYnOba.jpg) diff --git a/keyboards/atom47/rev2/readme.md b/keyboards/atom47/rev2/readme.md index 30f44df1dc6c..b63e1bb44ce9 100644 --- a/keyboards/atom47/rev2/readme.md +++ b/keyboards/atom47/rev2/readme.md @@ -20,4 +20,4 @@ To build the default keymap, simply run `make atom47/rev2:default`. For an alternative, heavily modified layout you would just need to run `make atom47/rev2:LEdiodes`. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/atomic/readme.md b/keyboards/atomic/readme.md index 54a6ee9b543b..ab2fa4a23975 100644 --- a/keyboards/atomic/readme.md +++ b/keyboards/atomic/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make atomic:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 0756c186c487..50901ee328a1 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -18,4 +18,4 @@ the repository, not the directory containing this readme. If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/atreus62/readme.md b/keyboards/atreus62/readme.md index b2de90011cbd..bb2a24e87e3d 100644 --- a/keyboards/atreus62/readme.md +++ b/keyboards/atreus62/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make atreus62:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/bantam44/readme.md b/keyboards/bantam44/readme.md index 0103c164725d..08a5167c6f99 100644 --- a/keyboards/bantam44/readme.md +++ b/keyboards/bantam44/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make bantam44:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/bface/README.md b/keyboards/bface/README.md index 4120e3bc2de8..0dac7caf308f 100644 --- a/keyboards/bface/README.md +++ b/keyboards/bface/README.md @@ -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/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/bfake/readme.md b/keyboards/bfake/readme.md index ca12b499625c..1ccc25f2dc92 100644 --- a/keyboards/bfake/readme.md +++ b/keyboards/bfake/readme.md @@ -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/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/bfo9000/readme.md b/keyboards/bfo9000/readme.md index 20c9b2ff7934..d2175af23606 100644 --- a/keyboards/bfo9000/readme.md +++ b/keyboards/bfo9000/readme.md @@ -15,4 +15,4 @@ Example of flashing this keyboard: make bfo9000:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/blockey/readme.md b/keyboards/blockey/readme.md index 24626318fbe3..20cb7e98cc16 100644 --- a/keyboards/blockey/readme.md +++ b/keyboards/blockey/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make blockey:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/bmini/readme.md b/keyboards/bmini/readme.md index 38dc49307546..9c702621295b 100644 --- a/keyboards/bmini/readme.md +++ b/keyboards/bmini/readme.md @@ -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/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md index f58ffe4fd61a..b8ddadea78f6 100644 --- a/keyboards/canoe/readme.md +++ b/keyboards/canoe/readme.md @@ -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/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/chimera_ergo/readme.md b/keyboards/chimera_ergo/readme.md index 619229544cde..2b5d2d65c04d 100644 --- a/keyboards/chimera_ergo/readme.md +++ b/keyboards/chimera_ergo/readme.md @@ -12,5 +12,5 @@ Make example for this keyboard (after setting up your build environment): make chimera_ergo:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/chimera_ortho/readme.md b/keyboards/chimera_ortho/readme.md index 18ab3b09ebfd..644300f9862d 100644 --- a/keyboards/chimera_ortho/readme.md +++ b/keyboards/chimera_ortho/readme.md @@ -15,5 +15,5 @@ Make example for this keyboard (after setting up your build environment): make chimera_ortho:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/chocopad/README.md b/keyboards/chocopad/README.md index ad0f6b35602c..ae28009c3c16 100644 --- a/keyboards/chocopad/README.md +++ b/keyboards/chocopad/README.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make chocopad:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/christmas_tree/readme.md b/keyboards/christmas_tree/readme.md index e0252328dcee..b3337dd5ba6a 100644 --- a/keyboards/christmas_tree/readme.md +++ b/keyboards/christmas_tree/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make christmas_tree/V2017:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/ckeys/nakey/readme.md b/keyboards/ckeys/nakey/readme.md index c7250cf50643..b85e822abdf5 100644 --- a/keyboards/ckeys/nakey/readme.md +++ b/keyboards/ckeys/nakey/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make ckeys/nakey:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Quantum MK Firmware diff --git a/keyboards/ckeys/obelus/readme.md b/keyboards/ckeys/obelus/readme.md index 6767956bf9bc..640e0f55e417 100644 --- a/keyboards/ckeys/obelus/readme.md +++ b/keyboards/ckeys/obelus/readme.md @@ -15,5 +15,5 @@ Or to make and flash: make ckeys/obelus:default:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) and [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/clueboard/17/readme.md b/keyboards/clueboard/17/readme.md index 877adc784204..8b449be3f6ca 100644 --- a/keyboards/clueboard/17/readme.md +++ b/keyboards/clueboard/17/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make clueboard/17:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/clueboard/2x1800/readme.md b/keyboards/clueboard/2x1800/readme.md index cccd8ac15f1a..afc043f484e4 100644 --- a/keyboards/clueboard/2x1800/readme.md +++ b/keyboards/clueboard/2x1800/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make 2x1800:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/clueboard/60/readme.md b/keyboards/clueboard/60/readme.md index b81d70d0c3be..e3255f507598 100644 --- a/keyboards/clueboard/60/readme.md +++ b/keyboards/clueboard/60/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make clueboard/60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/clueboard/66/readme.md b/keyboards/clueboard/66/readme.md index 42a261e2abe4..b7ca6cb56753 100644 --- a/keyboards/clueboard/66/readme.md +++ b/keyboards/clueboard/66/readme.md @@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment): make clueboard/66/rev3:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/clueboard/66_hotswap/readme.md b/keyboards/clueboard/66_hotswap/readme.md index 014c761b02c4..8ece12e8886b 100644 --- a/keyboards/clueboard/66_hotswap/readme.md +++ b/keyboards/clueboard/66_hotswap/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make clueboard/66_hotswap:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/clueboard/card/readme.md b/keyboards/clueboard/card/readme.md index 27089d465ba3..00d7d285b117 100644 --- a/keyboards/clueboard/card/readme.md +++ b/keyboards/clueboard/card/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make clueboard/card:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/cod67/readme.md b/keyboards/cod67/readme.md index 9471a2034e15..5e64ff7588a8 100644 --- a/keyboards/cod67/readme.md +++ b/keyboards/cod67/readme.md @@ -20,7 +20,7 @@ Make example for this keyboard (after setting up your build environment): make cod67:default:bin -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Rename the resulting `.bin` file to `cod67.bin`. diff --git a/keyboards/contra/readme.md b/keyboards/contra/readme.md index c1915a811d20..f16598581ec6 100644 --- a/keyboards/contra/readme.md +++ b/keyboards/contra/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make contra:dana -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/converter/sun_usb/readme.md b/keyboards/converter/sun_usb/readme.md index 3470e6091c49..69bc6ef04c6b 100644 --- a/keyboards/converter/sun_usb/readme.md +++ b/keyboards/converter/sun_usb/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make converter/sun_usb/type5:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Hardware diff --git a/keyboards/converter/usb_usb/README.md b/keyboards/converter/usb_usb/README.md index faee7a5fd880..64334a85fba9 100644 --- a/keyboards/converter/usb_usb/README.md +++ b/keyboards/converter/usb_usb/README.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make converter/usb_usb:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Note that you have to choose the right hardware variant as your subproject, otherwise you will probably have issues. diff --git a/keyboards/crawlpad/readme.md b/keyboards/crawlpad/readme.md index 0bdc0f172240..b2ea0e8c27ca 100644 --- a/keyboards/crawlpad/readme.md +++ b/keyboards/crawlpad/readme.md @@ -12,6 +12,6 @@ Make example for this keyboard (after setting up your build environment): make crawlpad:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com). \ No newline at end of file diff --git a/keyboards/cu24/readme.md b/keyboards/cu24/readme.md index 4624c1aa9687..ca3f3f5a040d 100644 --- a/keyboards/cu24/readme.md +++ b/keyboards/cu24/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make CU24:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/cu75/readme.md b/keyboards/cu75/readme.md index a5193bd70706..43603440fd24 100644 --- a/keyboards/cu75/readme.md +++ b/keyboards/cu75/readme.md @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): make CU75:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/daisy/readme.md b/keyboards/daisy/readme.md index 427891d96e6d..c8175c28303b 100644 --- a/keyboards/daisy/readme.md +++ b/keyboards/daisy/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make daisy:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. # Other Keymaps diff --git a/keyboards/dc01/arrow/readme.md b/keyboards/dc01/arrow/readme.md index ae643114ad57..4c7178d785e6 100644 --- a/keyboards/dc01/arrow/readme.md +++ b/keyboards/dc01/arrow/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make dc01/arrow:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/dc01/left/readme.md b/keyboards/dc01/left/readme.md index 1613297d09b3..60b90a800719 100644 --- a/keyboards/dc01/left/readme.md +++ b/keyboards/dc01/left/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make dc01/left:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/dc01/numpad/readme.md b/keyboards/dc01/numpad/readme.md index c50fe6b992fd..3345b5f3689d 100644 --- a/keyboards/dc01/numpad/readme.md +++ b/keyboards/dc01/numpad/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make dc01/numpad:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/dc01/right/readme.md b/keyboards/dc01/right/readme.md index 32664ebb7e6c..a934593053fa 100644 --- a/keyboards/dc01/right/readme.md +++ b/keyboards/dc01/right/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make dc01/right:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/deltasplit75/readme.md b/keyboards/deltasplit75/readme.md index 990f8902d0e7..096fced97f2d 100644 --- a/keyboards/deltasplit75/readme.md +++ b/keyboards/deltasplit75/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make deltasplit75/v2:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Files are available here: [DeltaSplit75 Case Files](https://github.com/xyxjj/DeltaSplit75-Case-files) diff --git a/keyboards/dilly/README.md b/keyboards/dilly/README.md index 866d07ccbbf9..a676313f3e1b 100644 --- a/keyboards/dilly/README.md +++ b/keyboards/dilly/README.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make dilly:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/diverge3/readme.md b/keyboards/diverge3/readme.md index 43add9d990b2..45ddaa64cfd0 100644 --- a/keyboards/diverge3/readme.md +++ b/keyboards/diverge3/readme.md @@ -14,7 +14,7 @@ Or for the [Workman](https://github.com/ojbucao/workman) layout: make diverge3:workman -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. # Reflashing Animus Reflashing the stock firmware is pretty easy. Just follow the same steps in the [original guide](https://imgur.com/a/8UapN). You will have to manually reset the Pro Micro (by shorting the GND and RST pins) during the upload step. Then reapply your keymap through Arbites. \ No newline at end of file diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md index 3e6f6806157c..b9d9b6711310 100644 --- a/keyboards/dk60/readme.md +++ b/keyboards/dk60/readme.md @@ -12,6 +12,6 @@ Make example for this keyboard (after setting up your build environment): make dk60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Open Hardware project! diff --git a/keyboards/duck/eagle_viper/readme.md b/keyboards/duck/eagle_viper/readme.md index ded0fa72e96d..14fb1666983f 100644 --- a/keyboards/duck/eagle_viper/readme.md +++ b/keyboards/duck/eagle_viper/readme.md @@ -2,7 +2,7 @@ Non official firmware for custom Korean keyboard with 60% key layout made by Duck. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Newest version is the [Eagle/Viper V2](http://duck0113.tistory.com/127) diff --git a/keyboards/duck/eagle_viper/v2/readme.md b/keyboards/duck/eagle_viper/v2/readme.md index b613b63b90f7..32ad8453cafa 100644 --- a/keyboards/duck/eagle_viper/v2/readme.md +++ b/keyboards/duck/eagle_viper/v2/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make eagle_viper/v2:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Hardware Notes diff --git a/keyboards/duck/jetfire/readme.md b/keyboards/duck/jetfire/readme.md index fe641e622f90..34b351a7266b 100644 --- a/keyboards/duck/jetfire/readme.md +++ b/keyboards/duck/jetfire/readme.md @@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment): make duck/jetfire:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/duck/lightsaver/readme.md b/keyboards/duck/lightsaver/readme.md index 9d4b453c0ddc..a77a90111d00 100644 --- a/keyboards/duck/lightsaver/readme.md +++ b/keyboards/duck/lightsaver/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make lightsaver:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Notes Thanks to Ralf Schmitt for previous implementations in his [TMK fork](https://github.com/xauser/tmk_keyboard/tree/xauser/) and few helping words. diff --git a/keyboards/duck/octagon/readme.md b/keyboards/duck/octagon/readme.md index 7f5b2f7e6032..b91a76c7069b 100644 --- a/keyboards/duck/octagon/readme.md +++ b/keyboards/duck/octagon/readme.md @@ -2,7 +2,7 @@ Non official firmware for custom Korean keyboard with 75% key layout made by Duck. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Newest version is the [Octagon V2](http://duck0113.tistory.com/127) diff --git a/keyboards/duck/octagon/v1/readme.md b/keyboards/duck/octagon/v1/readme.md index f5cb2d789233..f614b357782c 100644 --- a/keyboards/duck/octagon/v1/readme.md +++ b/keyboards/duck/octagon/v1/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make duck/octagon/v1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Hardware Notes diff --git a/keyboards/duck/octagon/v2/readme.md b/keyboards/duck/octagon/v2/readme.md index 125f09f9cdc9..b409454fc669 100644 --- a/keyboards/duck/octagon/v2/readme.md +++ b/keyboards/duck/octagon/v2/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make octagon/v2:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Hardware Notes diff --git a/keyboards/dz60/readme.md b/keyboards/dz60/readme.md index 78b290fbadc9..a06db93b5f30 100644 --- a/keyboards/dz60/readme.md +++ b/keyboards/dz60/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make dz60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/e6v2/le/readme.md b/keyboards/e6v2/le/readme.md index 20848a2bc0cb..844b315681cd 100644 --- a/keyboards/e6v2/le/readme.md +++ b/keyboards/e6v2/le/readme.md @@ -16,4 +16,4 @@ Or to make and flash: make e6v2/le:default:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/e6v2/oe/readme.md b/keyboards/e6v2/oe/readme.md index 3e1c57530832..9d5dd6261537 100644 --- a/keyboards/e6v2/oe/readme.md +++ b/keyboards/e6v2/oe/readme.md @@ -16,4 +16,4 @@ Or to make and flash: make e6v2/oe:default:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index 0826337e757d..fac80e0a1bc7 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make eco/rev2:that_canadian -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/ergo42/readme.md b/keyboards/ergo42/readme.md index 9534bc713128..112e62b551ad 100644 --- a/keyboards/ergo42/readme.md +++ b/keyboards/ergo42/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make ergo42/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/ergoinu/readme.md b/keyboards/ergoinu/readme.md index a0d1c18a243a..06e0cf352ebf 100644 --- a/keyboards/ergoinu/readme.md +++ b/keyboards/ergoinu/readme.md @@ -18,4 +18,4 @@ Make example for this keyboard (after setting up your build environment): make ergoinu:default_jis -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/ergotravel/readme.md b/keyboards/ergotravel/readme.md index ad37bc1acce9..7c76d5fc0bbf 100644 --- a/keyboards/ergotravel/readme.md +++ b/keyboards/ergotravel/readme.md @@ -23,6 +23,6 @@ Example of flashing this keyboard: make ergotravel/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Build Guide](https://github.com/jpconstantineau) diff --git a/keyboards/facew/readme.md b/keyboards/facew/readme.md index 6d7186704b11..578dcf888843 100644 --- a/keyboards/facew/readme.md +++ b/keyboards/facew/readme.md @@ -50,4 +50,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/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/fc660c/README.md b/keyboards/fc660c/README.md index 5cb9bcea48c9..638c55957725 100644 --- a/keyboards/fc660c/README.md +++ b/keyboards/fc660c/README.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make fc660c:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. To flash the firmware, press the reset button on the controller and run: diff --git a/keyboards/fc980c/README.md b/keyboards/fc980c/README.md index 16ad9021cde1..768d7d3a3cb9 100644 --- a/keyboards/fc980c/README.md +++ b/keyboards/fc980c/README.md @@ -15,7 +15,7 @@ Make example for this keyboard (after setting up your build environment): make fc980c:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. To flash the firmware, press the reset button on the controller and run: diff --git a/keyboards/felix/readme.md b/keyboards/felix/readme.md index e41782c3ccfa..d671b0c01c54 100644 --- a/keyboards/felix/readme.md +++ b/keyboards/felix/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make felix:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/fleuron/readme.md b/keyboards/fleuron/readme.md index 077753a28792..286ceb7cf85e 100644 --- a/keyboards/fleuron/readme.md +++ b/keyboards/fleuron/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make fleuron:default to build firmware make fleuron:default:dfu to make and flash with dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/fortitude60/readme.md b/keyboards/fortitude60/readme.md index 58453ccc4742..369f5e24b044 100644 --- a/keyboards/fortitude60/readme.md +++ b/keyboards/fortitude60/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make fortitude60/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/four_banger/readme.md b/keyboards/four_banger/readme.md index ffb6091f95c2..913ca6ee85a9 100644 --- a/keyboards/four_banger/readme.md +++ b/keyboards/four_banger/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make four_banger:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/fourier/readme.md b/keyboards/fourier/readme.md index 9420fb30e529..ca29c7aba612 100644 --- a/keyboards/fourier/readme.md +++ b/keyboards/fourier/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: make fourier/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index 01a23aca7543..a1469accfd87 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md @@ -13,7 +13,7 @@ Make example for this keyboard (after setting up your build environment): make gh60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## GH60 Hardware Information diff --git a/keyboards/gh80_3000/readme.md b/keyboards/gh80_3000/readme.md index d6beebf90718..ca269470461a 100644 --- a/keyboards/gh80_3000/readme.md +++ b/keyboards/gh80_3000/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make gh80_3000:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md index 9bc879e3d542..223fdf3d3ff9 100644 --- a/keyboards/gonnerd/readme.md +++ b/keyboards/gonnerd/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make gonnerd:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Changing Bootloader diff --git a/keyboards/hadron/readme.md b/keyboards/hadron/readme.md index 13ef6c66ab08..a6119c4a1148 100644 --- a/keyboards/hadron/readme.md +++ b/keyboards/hadron/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make hadron:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/handwired/ibm122m/readme.md b/keyboards/handwired/ibm122m/readme.md index 09dac49c0d97..de89d7596e6f 100644 --- a/keyboards/handwired/ibm122m/readme.md +++ b/keyboards/handwired/ibm122m/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make handwired/ibm122m:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/handwired/not_so_minidox/readme.md b/keyboards/handwired/not_so_minidox/readme.md index bd406073577a..c791e6e3f9ec 100644 --- a/keyboards/handwired/not_so_minidox/readme.md +++ b/keyboards/handwired/not_so_minidox/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make not_so_minidox/rev1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Flashing ------- diff --git a/keyboards/handwired/numpad20/readme.md b/keyboards/handwired/numpad20/readme.md index 29c832daf06d..4e14fbb005b4 100644 --- a/keyboards/handwired/numpad20/readme.md +++ b/keyboards/handwired/numpad20/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make handwired/numpad20:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/handwired/qc60/README.md b/keyboards/handwired/qc60/README.md index 85570a8a76e4..8477bb04ded3 100644 --- a/keyboards/handwired/qc60/README.md +++ b/keyboards/handwired/qc60/README.md @@ -19,4 +19,4 @@ Example of flashing this keyboard: make handwired/qc60/proto:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/handwired/terminus_mini/readme.md b/keyboards/handwired/terminus_mini/readme.md index 94249d6a96ec..5f0271bb40b1 100644 --- a/keyboards/handwired/terminus_mini/readme.md +++ b/keyboards/handwired/terminus_mini/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make handwired/terminus_mini:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/helix/readme.md b/keyboards/helix/readme.md index 5ee233e8127f..a535df052703 100644 --- a/keyboards/helix/readme.md +++ b/keyboards/helix/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make helix:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index 8774a73f7752..57eb81439106 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make hhkb:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hid_liber/readme.md b/keyboards/hid_liber/readme.md index 77ea1babb168..bc16c165bed9 100755 --- a/keyboards/hid_liber/readme.md +++ b/keyboards/hid_liber/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make hid_liber:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hs60/v1/readme.md b/keyboards/hs60/v1/readme.md index 9034e9b88176..cbf5f4faaba0 100644 --- a/keyboards/hs60/v1/readme.md +++ b/keyboards/hs60/v1/readme.md @@ -19,4 +19,4 @@ Make example for this keyboard (after setting up your build environment): make hs60/v1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/hs60/v2/readme.md b/keyboards/hs60/v2/readme.md index 50c91698da62..e6658ced9a30 100644 --- a/keyboards/hs60/v2/readme.md +++ b/keyboards/hs60/v2/readme.md @@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment): make hs60/v2:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/iris/keymaps/s1carii/readme.md b/keyboards/iris/keymaps/s1carii/readme.md index 9b46e8670231..6d94b6c877c1 100644 --- a/keyboards/iris/keymaps/s1carii/readme.md +++ b/keyboards/iris/keymaps/s1carii/readme.md @@ -6,4 +6,4 @@ Make example for this keymap (after setting up your build environment): make iris/rev2:s1carii:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/jc65/v32a/readme.md b/keyboards/jc65/v32a/readme.md index b4d4f7e50422..5027f83613cc 100644 --- a/keyboards/jc65/v32a/readme.md +++ b/keyboards/jc65/v32a/readme.md @@ -29,4 +29,4 @@ Flashing on Windows can be accomplished by downloading [HIDBootFlash](http://vus To put the PS2AVRGB board into reset, hold down the left control key while plugging in the keyboard. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/jc65/v32u4/readme.md b/keyboards/jc65/v32u4/readme.md index 396c19e8db14..61ac70e28ef1 100644 --- a/keyboards/jc65/v32u4/readme.md +++ b/keyboards/jc65/v32u4/readme.md @@ -19,4 +19,4 @@ Or to make and flash: make jc65/v32u4:default:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md index 39e871d87357..26d551cf7247 100644 --- a/keyboards/jj40/README.md +++ b/keyboards/jj40/README.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make jj40:default:program -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. 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 diff --git a/keyboards/jj50/README.md b/keyboards/jj50/README.md index 2f04f036be5f..397889535e52 100644 --- a/keyboards/jj50/README.md +++ b/keyboards/jj50/README.md @@ -25,7 +25,7 @@ $ make jj50:default:program ``` It should detect the keyboard and set it to bootloader mode automatically, prior to flashing firmware. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. 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 diff --git a/keyboards/jm60/readme.md b/keyboards/jm60/readme.md index b513a2c4c0ab..51473fc090b6 100644 --- a/keyboards/jm60/readme.md +++ b/keyboards/jm60/readme.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make jm60:default:bin -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Flashing Instructions diff --git a/keyboards/k_type/readme.md b/keyboards/k_type/readme.md index ad4dd8ad84be..1118f8655ebc 100644 --- a/keyboards/k_type/readme.md +++ b/keyboards/k_type/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make k_type:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/katana60/readme.md b/keyboards/katana60/readme.md index 918c9b997237..5e1c7d39060c 100644 --- a/keyboards/katana60/readme.md +++ b/keyboards/katana60/readme.md @@ -12,6 +12,6 @@ Make example for this keyboard (after setting up your build environment): make katana60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. There is also ongoing discussion for the extend layer, at the [Colemak Forum](https://forum.colemak.com/topic/2327-developing-an-extend-layer-for-the-katana60/) \ No newline at end of file diff --git a/keyboards/kbd66/readme.md b/keyboards/kbd66/readme.md index 71fe1f2e3059..2ac5555711d8 100644 --- a/keyboards/kbd66/readme.md +++ b/keyboards/kbd66/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make kbd66:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/kbd6x/readme.md b/keyboards/kbd6x/readme.md index b50646ace131..0e8e865621b5 100644 --- a/keyboards/kbd6x/readme.md +++ b/keyboards/kbd6x/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make kbd6x:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/kbd75/readme.md b/keyboards/kbd75/readme.md index 0545eb66d831..4c93a8fbefe2 100644 --- a/keyboards/kbd75/readme.md +++ b/keyboards/kbd75/readme.md @@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment): make kbd75/rev1:default make kbd75/rev2:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/kbd8x/readme.md b/keyboards/kbd8x/readme.md index fe49819753bc..8c50af68f683 100644 --- a/keyboards/kbd8x/readme.md +++ b/keyboards/kbd8x/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make kbd8x:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/kc60se/readme.md b/keyboards/kc60se/readme.md index da004c40d201..d6edbdb351c7 100644 --- a/keyboards/kc60se/readme.md +++ b/keyboards/kc60se/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make kc60se:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/kira75/readme.md b/keyboards/kira75/readme.md index f2c0f3228b47..5ab0b3f2cc9c 100644 --- a/keyboards/kira75/readme.md +++ b/keyboards/kira75/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make kira75:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/knops/mini/readme.md b/keyboards/knops/mini/readme.md index 86cff4a61f0b..4df6c207a4bd 100644 --- a/keyboards/knops/mini/readme.md +++ b/keyboards/knops/mini/readme.md @@ -18,4 +18,4 @@ Make example for this keyboard (after setting up your build environment): make knops/mini:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/kona_classic/README.md b/keyboards/kona_classic/README.md index bd818ed92ccf..0ea5b00ea399 100644 --- a/keyboards/kona_classic/README.md +++ b/keyboards/kona_classic/README.md @@ -44,4 +44,4 @@ Make example for this keyboard (after setting up your build environment): make kona_classic:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/laplace/readme.md b/keyboards/laplace/readme.md index 71b3280082ba..7871992f76a5 100644 --- a/keyboards/laplace/readme.md +++ b/keyboards/laplace/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: make laplace:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/launchpad/readme.md b/keyboards/launchpad/readme.md index 80b5de321910..81281219467e 100644 --- a/keyboards/launchpad/readme.md +++ b/keyboards/launchpad/readme.md @@ -23,7 +23,7 @@ Make example for this keyboard (after setting up your build environment): make launchpad/rev1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- diff --git a/keyboards/lets_split_eh/README.md b/keyboards/lets_split_eh/README.md index 185e74dab0aa..180cb33d73d0 100644 --- a/keyboards/lets_split_eh/README.md +++ b/keyboards/lets_split_eh/README.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make lets_split_eh/eh:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/lfkeyboards/lfk65_hs/readme.md b/keyboards/lfkeyboards/lfk65_hs/readme.md index 382538c68bc6..8824804d7732 100644 --- a/keyboards/lfkeyboards/lfk65_hs/readme.md +++ b/keyboards/lfkeyboards/lfk65_hs/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make lfkeyboards/lfk65_hs:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/lfkeyboards/lfk78/readme.md b/keyboards/lfkeyboards/lfk78/readme.md index 3ca0b2e04a43..7cef9735dcf1 100644 --- a/keyboards/lfkeyboards/lfk78/readme.md +++ b/keyboards/lfkeyboards/lfk78/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make lfkeyboards/lfk78:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/lfkeyboards/lfk87/readme.md b/keyboards/lfkeyboards/lfk87/readme.md index 15e551710354..44a36c479fc8 100644 --- a/keyboards/lfkeyboards/lfk87/readme.md +++ b/keyboards/lfkeyboards/lfk87/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make lfkeyboards/lfk87:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/lfkeyboards/mini1800/readme.md b/keyboards/lfkeyboards/mini1800/readme.md index 96de85df1dad..e2839275ccc8 100644 --- a/keyboards/lfkeyboards/mini1800/readme.md +++ b/keyboards/lfkeyboards/mini1800/readme.md @@ -9,4 +9,4 @@ Make example for this keyboard (after setting up your build environment): make lfkeyboards/mini1800:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/lfkeyboards/readme.md b/keyboards/lfkeyboards/readme.md index 0fd05adefdd9..0c262f30b022 100644 --- a/keyboards/lfkeyboards/readme.md +++ b/keyboards/lfkeyboards/readme.md @@ -5,4 +5,4 @@ This is the parent directory for all LFKeyboard keyboards. Keyboard Maintainer: [LFKeyboards](https://github.com/lfkeyboards) Hardware Availability: [LFKeyboards.com](https://www.lfkeyboards.com/) -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/lfkeyboards/smk65/readme.md b/keyboards/lfkeyboards/smk65/readme.md index 8265e36e6802..0d04ac5f77e8 100644 --- a/keyboards/lfkeyboards/smk65/readme.md +++ b/keyboards/lfkeyboards/smk65/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make lfkeyboards/smk65:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/m10a/readme.md b/keyboards/m10a/readme.md index 6e48b228571b..7123e6462e76 100644 --- a/keyboards/m10a/readme.md +++ b/keyboards/m10a/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make m10a:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/mechmini/readme.md b/keyboards/mechmini/readme.md index 427cbbd03bad..fc43eb124845 100644 --- a/keyboards/mechmini/readme.md +++ b/keyboards/mechmini/readme.md @@ -19,7 +19,7 @@ Make example for this keyboard (after setting up your build environment), this w make mechmini:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Mechmini Notes diff --git a/keyboards/mechmini/v1/README.md b/keyboards/mechmini/v1/README.md index 9f44a9c2cd54..b4a1924c4f72 100644 --- a/keyboards/mechmini/v1/README.md +++ b/keyboards/mechmini/v1/README.md @@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment): make mechmini/v1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Mechmini Notes diff --git a/keyboards/mechmini/v2/README.md b/keyboards/mechmini/v2/README.md index a43afc6740b4..fdc9fef9bf2b 100644 --- a/keyboards/mechmini/v2/README.md +++ b/keyboards/mechmini/v2/README.md @@ -15,7 +15,7 @@ Make example for this keyboard (after setting up your build environment), this w make mechmini/v2:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Mechmini Notes diff --git a/keyboards/meira/readme.md b/keyboards/meira/readme.md index 6d5d9b553510..10c27ee94e28 100644 --- a/keyboards/meira/readme.md +++ b/keyboards/meira/readme.md @@ -18,7 +18,7 @@ or make meira/featherble:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information on generic QMK configuration and setup. +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 on generic QMK configuration and setup. Both the Pro Micro and the Feather BLE use the Catalina bootloader, which is typically programmed using avrdude. diff --git a/keyboards/melody96/readme.md b/keyboards/melody96/readme.md index b43398dd3585..3df1e48b46db 100644 --- a/keyboards/melody96/readme.md +++ b/keyboards/melody96/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make melody96:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/meme/readme.md b/keyboards/meme/readme.md index 9d3bce948555..94b55d746ef3 100644 --- a/keyboards/meme/readme.md +++ b/keyboards/meme/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make meme:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/minidox/readme.md b/keyboards/minidox/readme.md index 9ec306421d15..74afedc18b63 100644 --- a/keyboards/minidox/readme.md +++ b/keyboards/minidox/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make minidox/rev1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Build Guide diff --git a/keyboards/mitosis/readme.md b/keyboards/mitosis/readme.md index e1b0711019c6..d3cf12af8d0a 100644 --- a/keyboards/mitosis/readme.md +++ b/keyboards/mitosis/readme.md @@ -12,7 +12,7 @@ Make example for this keyboard (after setting up your build environment): make mitosis:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Notes diff --git a/keyboards/miuni32/readme.md b/keyboards/miuni32/readme.md index 7fc72d601ac1..359424151d2b 100644 --- a/keyboards/miuni32/readme.md +++ b/keyboards/miuni32/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make miuni32-default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/mxss/readme.md b/keyboards/mxss/readme.md index 54e07e27b0c7..181b6366a096 100644 --- a/keyboards/mxss/readme.md +++ b/keyboards/mxss/readme.md @@ -29,7 +29,7 @@ Make example for this keyboard (after setting up your build environment): make mxss:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. # Front LED Operation diff --git a/keyboards/niu_mini/readme.md b/keyboards/niu_mini/readme.md index 91f0cd4b6c64..af05d34fa517 100644 --- a/keyboards/niu_mini/readme.md +++ b/keyboards/niu_mini/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make niu_mini:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/novelpad/README.md b/keyboards/novelpad/README.md index 70bd6b6be72a..5c73644a289e 100644 --- a/keyboards/novelpad/README.md +++ b/keyboards/novelpad/README.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make novelpad:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/noxary/268/readme.md b/keyboards/noxary/268/readme.md index 68308a4752c0..adc1add18db4 100644 --- a/keyboards/noxary/268/readme.md +++ b/keyboards/noxary/268/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make noxary/268:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/nyquist/readme.md b/keyboards/nyquist/readme.md index 1b417a65884e..e3d75b448fef 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/nyquist/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: make nyquist/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Nyquist Build Guide](https://docs.keeb.io) diff --git a/keyboards/ok60/readme.md b/keyboards/ok60/readme.md index de67ab628f73..014c3042611e 100644 --- a/keyboards/ok60/readme.md +++ b/keyboards/ok60/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make ok60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/omnikey_blackheart/readme.md b/keyboards/omnikey_blackheart/readme.md index e375d53f90bb..04bb49818c1d 100644 --- a/keyboards/omnikey_blackheart/readme.md +++ b/keyboards/omnikey_blackheart/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make omnikey_blackheart:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/paladin64/readme.md b/keyboards/paladin64/readme.md index 41f66e2ac0be..8d62bb6b717b 100644 --- a/keyboards/paladin64/readme.md +++ b/keyboards/paladin64/readme.md @@ -16,4 +16,4 @@ Or to make and flash: make paladin64:default:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/phantom/readme.md b/keyboards/phantom/readme.md index c0cb3bc20dc7..b25630958bc4 100644 --- a/keyboards/phantom/readme.md +++ b/keyboards/phantom/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make phantom:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/planck/keymaps/phreed/readme.md b/keyboards/planck/keymaps/phreed/readme.md index c8fd9324387b..963740058b93 100644 --- a/keyboards/planck/keymaps/phreed/readme.md +++ b/keyboards/planck/keymaps/phreed/readme.md @@ -34,5 +34,5 @@ To flash the keyboard make planck/rev3:phreed:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the -[make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the +[make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/playkbtw/ca66/readme.md b/keyboards/playkbtw/ca66/readme.md index 9e1ff7397e2a..c415efd5f7a9 100644 --- a/keyboards/playkbtw/ca66/readme.md +++ b/keyboards/playkbtw/ca66/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make playkbtw/ca66:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/preonic/readme.md b/keyboards/preonic/readme.md index e116021fdd4e..5b3c0ec588b1 100644 --- a/keyboards/preonic/readme.md +++ b/keyboards/preonic/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make preonic:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/quefrency/readme.md b/keyboards/quefrency/readme.md index 8fb1c6bc1852..66d033b6b21c 100644 --- a/keyboards/quefrency/readme.md +++ b/keyboards/quefrency/readme.md @@ -17,6 +17,6 @@ Example of flashing this keyboard: Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Keebio Build Guides](https://docs.keeb.io) diff --git a/keyboards/qwertyydox/readme.md b/keyboards/qwertyydox/readme.md index 1fa984e03196..2314aac47e2f 100644 --- a/keyboards/qwertyydox/readme.md +++ b/keyboards/qwertyydox/readme.md @@ -23,5 +23,5 @@ Example of flashing this keyboard: make qwertyydox/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/rama/m10_b/readme.md b/keyboards/rama/m10_b/readme.md index 6fb04c6042a8..9facb5cd349b 100644 --- a/keyboards/rama/m10_b/readme.md +++ b/keyboards/rama/m10_b/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make rama/m10_b:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/rorschach/readme.md b/keyboards/rorschach/readme.md index 537553720b65..8858b72144c5 100644 --- a/keyboards/rorschach/readme.md +++ b/keyboards/rorschach/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: make rorschach/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Iris Build Guide](https://docs.keeb.io/iris-build-guide.html) diff --git a/keyboards/s60_x/readme.md b/keyboards/s60_x/readme.md index ddb0d4ba66f2..1e4b4cc3165d 100644 --- a/keyboards/s60_x/readme.md +++ b/keyboards/s60_x/readme.md @@ -16,4 +16,4 @@ Make example for rgb version of this keyboard: make s60_x/rgb:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/satan/readme.md b/keyboards/satan/readme.md index fddadcd478ec..a2552edf8db9 100644 --- a/keyboards/satan/readme.md +++ b/keyboards/satan/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make satan:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/scrabblepad/readme.md b/keyboards/scrabblepad/readme.md index e434eef950aa..0227b988fa8c 100644 --- a/keyboards/scrabblepad/readme.md +++ b/keyboards/scrabblepad/readme.md @@ -14,4 +14,4 @@ Make example for this keyboard (after setting up your build environment): make scrabblepad:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/singa/readme.md b/keyboards/singa/readme.md index 7a374db25c65..bdde361a8e7e 100644 --- a/keyboards/singa/readme.md +++ b/keyboards/singa/readme.md @@ -46,4 +46,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/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/sixkeyboard/readme.md b/keyboards/sixkeyboard/readme.md index 512b9a6af273..6979e1d48c1b 100644 --- a/keyboards/sixkeyboard/readme.md +++ b/keyboards/sixkeyboard/readme.md @@ -9,7 +9,7 @@ Make example for this keyboard (after setting up your build environment): make sixkeyboard:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Hardware Info diff --git a/keyboards/sixshooter/readme.md b/keyboards/sixshooter/readme.md index 18229bdbf6c2..1fcf26a51094 100644 --- a/keyboards/sixshooter/readme.md +++ b/keyboards/sixshooter/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make sixshooter:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/speedo/readme.md b/keyboards/speedo/readme.md index ee94623acd12..882c16583d8b 100644 --- a/keyboards/speedo/readme.md +++ b/keyboards/speedo/readme.md @@ -10,7 +10,7 @@ Make example for this keyboard (after setting up your build environment): make speedo:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Flashing the Firmware See the QMK docs for handwiring a keyboard; there is a section with instructions on how to flash the *.hex* file to the Teensy 2.0 controller. diff --git a/keyboards/staryu/readme.md b/keyboards/staryu/readme.md index bca7482bc2d6..1b2f9e8f531c 100644 --- a/keyboards/staryu/readme.md +++ b/keyboards/staryu/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make staryu:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/sx60/readme.md b/keyboards/sx60/readme.md index 4b7f9e74a479..e65363c5affc 100644 --- a/keyboards/sx60/readme.md +++ b/keyboards/sx60/readme.md @@ -17,4 +17,4 @@ Or to make and flash: make SX60:default:dfu -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/tanuki/readme.md b/keyboards/tanuki/readme.md index 331df5b2eacb..129e2a95117a 100644 --- a/keyboards/tanuki/readme.md +++ b/keyboards/tanuki/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make tanuki:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/telophase/readme.md b/keyboards/telophase/readme.md index 86b29d01d6e3..97bce57bb8e8 100644 --- a/keyboards/telophase/readme.md +++ b/keyboards/telophase/readme.md @@ -9,7 +9,7 @@ Make example for this keyboard (after setting up your build environment): make telophase:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. ## Mitosis Notes diff --git a/keyboards/tetris/readme.md b/keyboards/tetris/readme.md index b74740854afd..b2741caf1c03 100644 --- a/keyboards/tetris/readme.md +++ b/keyboards/tetris/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make tetris:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/the_ruler/readme.md b/keyboards/the_ruler/readme.md index 3573514b6848..63a6ffeee37a 100644 --- a/keyboards/the_ruler/readme.md +++ b/keyboards/the_ruler/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make the_ruler:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/tkc1800/README.md b/keyboards/tkc1800/README.md index 7a0528ce358e..4d1b8e0f24bc 100644 --- a/keyboards/tkc1800/README.md +++ b/keyboards/tkc1800/README.md @@ -15,4 +15,4 @@ Make example for this keyboard (after setting up your build environment): make tkc1800 -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. \ 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. \ No newline at end of file diff --git a/keyboards/tokyo60/readme.md b/keyboards/tokyo60/readme.md index 3f6b3b76b390..d0bc6e6ce8ca 100644 --- a/keyboards/tokyo60/readme.md +++ b/keyboards/tokyo60/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): ​ make tokyo60:default ​ -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/tragicforce68/README.md b/keyboards/tragicforce68/README.md index c7a6cc77daf9..7cca1b50551a 100644 --- a/keyboards/tragicforce68/README.md +++ b/keyboards/tragicforce68/README.md @@ -15,4 +15,4 @@ Example of flashing this keyboard: make tragicforce68:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/uk78/readme.md b/keyboards/uk78/readme.md index 8a1ba5e8a3ce..6592e38ec997 100644 --- a/keyboards/uk78/readme.md +++ b/keyboards/uk78/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make uk78:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/v60_type_r/readme.md b/keyboards/v60_type_r/readme.md index c7039c2e70cb..06ff749b8660 100644 --- a/keyboards/v60_type_r/readme.md +++ b/keyboards/v60_type_r/readme.md @@ -40,7 +40,7 @@ or make v60_type_r:vimouse -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/vinta/readme.md b/keyboards/vinta/readme.md index 193f3612160c..278c5e2c4b53 100644 --- a/keyboards/vinta/readme.md +++ b/keyboards/vinta/readme.md @@ -14,7 +14,7 @@ Make example for this keyboard (after setting up your build environment): make vinta:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. #### Developer's Note diff --git a/keyboards/vision_division/readme.md b/keyboards/vision_division/readme.md index 350ced3340cf..72fdb9542423 100644 --- a/keyboards/vision_division/readme.md +++ b/keyboards/vision_division/readme.md @@ -11,4 +11,4 @@ Make example for this keyboard (after setting up your build environment): make vision_division:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/viterbi/readme.md b/keyboards/viterbi/readme.md index 13f3e605662e..9aad7896b70c 100644 --- a/keyboards/viterbi/readme.md +++ b/keyboards/viterbi/readme.md @@ -16,6 +16,6 @@ Example of flashing this keyboard: make viterbi/rev1:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Viterbi Build Guide](https://docs.keeb.io) diff --git a/keyboards/wavelet/readme.md b/keyboards/wavelet/readme.md index bacd57037d2c..90c5ac808995 100644 --- a/keyboards/wavelet/readme.md +++ b/keyboards/wavelet/readme.md @@ -15,6 +15,6 @@ Example of flashing this keyboard: make wavelet:default:avrdude -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. A build guide for this keyboard can be found here: [Levinson Build Guide](https://docs.keeb.io) diff --git a/keyboards/whitefox/readme.md b/keyboards/whitefox/readme.md index 2de1d4c7d833..9b848a69d5dc 100644 --- a/keyboards/whitefox/readme.md +++ b/keyboards/whitefox/readme.md @@ -10,4 +10,4 @@ Make example for this keyboard (after setting up your build environment): make whitefox:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/xd60/readme.md b/keyboards/xd60/readme.md index 19c22dac6425..24f07c47bc73 100644 --- a/keyboards/xd60/readme.md +++ b/keyboards/xd60/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make xd60:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/ymd75/README.md b/keyboards/ymd75/README.md index 6b1bce6a5b35..eed6ce13eed7 100644 --- a/keyboards/ymd75/README.md +++ b/keyboards/ymd75/README.md @@ -25,7 +25,7 @@ $ make ymd75:default:program It should detect the keyboard and set it to bootloader mode automatically, prior to flashing firmware. I've found that I need to remove the previous build/file before making a new one as it doesn't overwrite it; but this might just be my personal experience. -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. 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 diff --git a/keyboards/zen/readme.md b/keyboards/zen/readme.md index beb5e13ac129..0fb0ffb3b6a5 100644 --- a/keyboards/zen/readme.md +++ b/keyboards/zen/readme.md @@ -17,4 +17,4 @@ Make example for this keyboard (after setting up your build environment): make zen/rev1:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/zlant/readme.md b/keyboards/zlant/readme.md index 8f50e6d4c7b3..eaec14074573 100644 --- a/keyboards/zlant/readme.md +++ b/keyboards/zlant/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make zlant:default -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. From 929065b1a97eb15a54a65c866d19d45998f775c6 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Mon, 14 Jan 2019 02:56:46 +0900 Subject: [PATCH 120/458] Change handling of CUSTOM_MATRIX in common_features.mk slightly. --- common_features.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/common_features.mk b/common_features.mk index c86e8bbfe397..572a6db548ba 100644 --- a/common_features.mk +++ b/common_features.mk @@ -254,15 +254,12 @@ QUANTUM_SRC:= \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c -ifneq ($(strip $(CUSTOM_MATRIX)), yes) - ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c - else - QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c - endif -endif - ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + ifneq ($(strip $(CUSTOM_MATRIX)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c + # Do not use $(QUANTUM_DIR)/matrix.c. + CUSTOM_MATRIX=yes + endif OPT_DEFS += -DSPLIT_KEYBOARD QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ $(QUANTUM_DIR)/split_common/split_util.c @@ -270,3 +267,7 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes) QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c COMMON_VPATH += $(QUANTUM_PATH)/split_common endif + +ifneq ($(strip $(CUSTOM_MATRIX)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c +endif From ee96b7a89dd2de78b9372d3b8ce899757e3190c4 Mon Sep 17 00:00:00 2001 From: Erovia Date: Mon, 14 Jan 2019 09:49:00 +0100 Subject: [PATCH 121/458] [Keyboard] Add support for THE50 (#4844) * Add support for THE50 A 50% custom keyboard designed and produced by LazyDesigners * THE50 code-improvement Implement the changes suggested by noroadsleft. --- keyboards/lazydesigners/the50/config.h | 49 ++++++++++++++ keyboards/lazydesigners/the50/info.json | 67 +++++++++++++++++++ .../the50/keymaps/default/keymap.c | 59 ++++++++++++++++ .../the50/keymaps/default/readme.md | 31 +++++++++ keyboards/lazydesigners/the50/readme.md | 17 +++++ keyboards/lazydesigners/the50/rules.mk | 52 ++++++++++++++ keyboards/lazydesigners/the50/the50.c | 9 +++ keyboards/lazydesigners/the50/the50.h | 32 +++++++++ 8 files changed, 316 insertions(+) create mode 100644 keyboards/lazydesigners/the50/config.h create mode 100644 keyboards/lazydesigners/the50/info.json create mode 100644 keyboards/lazydesigners/the50/keymaps/default/keymap.c create mode 100644 keyboards/lazydesigners/the50/keymaps/default/readme.md create mode 100644 keyboards/lazydesigners/the50/readme.md create mode 100644 keyboards/lazydesigners/the50/rules.mk create mode 100644 keyboards/lazydesigners/the50/the50.c create mode 100644 keyboards/lazydesigners/the50/the50.h diff --git a/keyboards/lazydesigners/the50/config.h b/keyboards/lazydesigners/the50/config.h new file mode 100644 index 000000000000..e4f91f5eef05 --- /dev/null +++ b/keyboards/lazydesigners/the50/config.h @@ -0,0 +1,49 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0050 +#define DEVICE_VER 0x0001 +#define MANUFACTURER LazyDesigners +#define PRODUCT THE50 +#define DESCRIPTION A 50% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN +#define RGBLED_NUM 1 +#define RGBLIGHT_SLEEP +#endif diff --git a/keyboards/lazydesigners/the50/info.json b/keyboards/lazydesigners/the50/info.json new file mode 100644 index 000000000000..16e751dac32a --- /dev/null +++ b/keyboards/lazydesigners/the50/info.json @@ -0,0 +1,67 @@ +{ + "keyboard_name": "THE50", + "url": "http://lazydesigners.cn", + "maintainer": "qmk", + "width": 15.25, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 54, + "layout": [ + {"label":"Esc", "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":"Back
Space", "x":11, "y":0}, + {"label":"7", "x":12.25, "y":0}, + {"label":"8", "x":13.25, "y":0}, + {"label":"9", "x":14.25, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":"Enter", "x":10.25, "y":1, "w":1.75}, + {"label":"4", "x":12.25, "y":1}, + {"label":"5", "x":13.25, "y":1}, + {"label":"6", "x":14.25, "y":1}, + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"Fn", "x":10.75, "y":2, "w":1.25}, + {"label":"1", "x":12.25, "y":2}, + {"label":"2", "x":13.25, "y":2}, + {"label":"3", "x":14.25, "y":2}, + {"label":"Hyper", "x":0, "y":3, "w":1.25}, + {"label":"Super", "x":1.25, "y":3}, + {"label":"Meta", "x":2.25, "y":3, "w":1.25}, + {"label":"Space", "x":3.5, "y":3, "w":2.25}, + {"label":"Space", "x":5.75, "y":3, "w":2.75}, + {"label":"Meta", "x":8.5, "y":3, "w":1.25}, + {"label":"Super", "x":9.75, "y":3}, + {"label":"Hyper", "x":10.75, "y":3, "w":1.25}, + {"label":"0", "x":12.25, "y":3}, + {"label":".", "x":13.25, "y":3}, + {"label":"Enter", "x":14.25, "y":3}] + } + } +} diff --git a/keyboards/lazydesigners/the50/keymaps/default/keymap.c b/keyboards/lazydesigners/the50/keymaps/default/keymap.c new file mode 100644 index 000000000000..cba582cab2d4 --- /dev/null +++ b/keyboards/lazydesigners/the50/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _FN +}; + +// 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 | , | . | FN | | 1 | 2 | 3 | + * |-----------------------------------------------------------| |--------------| + * | Ctrl |Gui | Alt | Space | Space | RAlt |RGui|RCtrl| | 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_7, KC_8, KC_9, +KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_4, KC_5, KC_6, +SFT_CPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(_FN), KC_1, KC_2, KC_3, +KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_0, KC_DOT, KC_ENT +), + +/* FN + * ,-----------------------------------------------------------. ,--------------. + * |RST | | | | | | | | | |Ins |Del | |Home|PgUp| | + * |-----------------------------------------------------------| |--------------| + * | |Prev|Play|Next| | | |VolD|Mute|VolU| | |End |PgDn| | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |--------------| + * |EEPRST| | | | | | | | | | | | + * `-----------------------------------------------------------' `--------------' + */ + +[_FN] = 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, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, +EEP_RST, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) +}; + +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(); + } +} diff --git a/keyboards/lazydesigners/the50/keymaps/default/readme.md b/keyboards/lazydesigners/the50/keymaps/default/readme.md new file mode 100644 index 000000000000..09b9351f99cb --- /dev/null +++ b/keyboards/lazydesigners/the50/keymaps/default/readme.md @@ -0,0 +1,31 @@ +# Default keymap for THE50 + +**Features** + +* Shift acts as CapsLock when tapped + +## QWERTY (Normal) Layer +``` + ,-----------------------------------------------------------. ,--------------. + |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 | , | . | FN | | 1 | 2 | 3 | + |-----------------------------------------------------------| |--------------| + | Ctrl |Gui | Alt | Space | Space | RAlt |RGui|RCtrl| | 0 | . |Entr| + `-----------------------------------------------------------' `--------------' +``` + +## FN Layer +``` + ,-----------------------------------------------------------. ,--------------. + |RST | | | | | | | | | |Ins |Del | |Home|PgUp| | + |-----------------------------------------------------------| |--------------| + | |Prev|Play|Next| | | |VolD|Mute|VolU| | |End |PgDn| | + |-----------------------------------------------------------| |--------------| + | | | | | | | | | | | | | | | | + |-----------------------------------------------------------| |--------------| + |EEPRST| | | | | | | | | | | | + `-----------------------------------------------------------' `--------------' +``` diff --git a/keyboards/lazydesigners/the50/readme.md b/keyboards/lazydesigners/the50/readme.md new file mode 100644 index 000000000000..d90dc59de6dd --- /dev/null +++ b/keyboards/lazydesigners/the50/readme.md @@ -0,0 +1,17 @@ +# THE50 + +![THE50](https://i.loli.net/2018/11/13/5beac9464d402.jpg) + +A 50% custom keyboard designed and produced by [LazyDesigners](http://lazydesigners.cn). + +Keyboard Maintainer: QMK Community +Hardware Supported: THE50 +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/the50:default:dfu + +To enter the bootloader, either short the pins on the PCB or the RESET button on the FN layer. + +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/the50/rules.mk b/keyboards/lazydesigners/the50/rules.mk new file mode 100644 index 000000000000..ae211ec66e8d --- /dev/null +++ b/keyboards/lazydesigners/the50/rules.mk @@ -0,0 +1,52 @@ +# 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 = 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 +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 +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality diff --git a/keyboards/lazydesigners/the50/the50.c b/keyboards/lazydesigners/the50/the50.c new file mode 100644 index 000000000000..4ceb3da6ab21 --- /dev/null +++ b/keyboards/lazydesigners/the50/the50.c @@ -0,0 +1,9 @@ +#include "the50.h" + +void the50_led_on() { + DDRB |= (1 << 7); PORTB &= ~(1 << 7); +} + +void the50_led_off() { + DDRB &= ~(1 << 7); PORTB &= ~(1 << 7); +} diff --git a/keyboards/lazydesigners/the50/the50.h b/keyboards/lazydesigners/the50/the50.h new file mode 100644 index 000000000000..1cf613aada94 --- /dev/null +++ b/keyboards/lazydesigners/the50/the50.h @@ -0,0 +1,32 @@ +#pragma once + +#include "quantum.h" + +#define XXXX KC_NO + +/* + * ,-----------------------------------------------------------. ,--------------. + * | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------' `--------------' + */ + +#define LAYOUT( \ +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, K111, K112, K113, K114, \ +K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ +K300, K301, K302, K304, K307, K309, K310, K311, K312, K313, K314 \ +) { \ +{ 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, XXXX, K111, K112, K113, K114 }, \ +{ K200, XXXX, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ +{ K300, K301, K302, XXXX, K304, XXXX, XXXX, K307, XXXX, K309, K310, K311, K312, K313, K314 } \ +} + +void the50_led_on(void); +void the50_led_off(void); From 9105bf2434c54c40362173e1734a24485cfbe702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 14 Jan 2019 18:09:47 +0100 Subject: [PATCH 122/458] Add personal userspace, update keymaps (#4845) * Add kbd6x:konstantin keymap * Prevent tap dance from sending LShift as a weak mod in KBD6X * Move config.h and rules.mk definitions into userspace * Add UC_WIN to UNICODE_SELECTED_MODES * Temporarily use Bootmagic until Command is fixed * Move common behavior from keyboards into userspace * Update kbd6x:konstantin keymap and userspace * Make a RCTRL layer in kbd6x:konstantin * Make KC_ESC turn off layers * KC_ESC turns L_FN off only if it was locked on * Add missing record->event.pressed checks * Move numpad toggling logic into function * Disable Bootmagic, enable KEYBOARD_SHARED_EP with Command --- keyboards/kbd6x/keymaps/konstantin/config.h | 3 + keyboards/kbd6x/keymaps/konstantin/keymap.c | 92 ++++++++++++ keyboards/kbd6x/keymaps/konstantin/rules.mk | 2 + .../whitefox/keymaps/konstantin/config.h | 24 +-- .../whitefox/keymaps/konstantin/keymap.c | 141 +----------------- .../whitefox/keymaps/konstantin/rules.mk | 11 -- users/konstantin/config.h | 24 +++ users/konstantin/konstantin.c | 77 ++++++++++ users/konstantin/konstantin.h | 50 +++++++ users/konstantin/rules.mk | 16 ++ users/konstantin/tap_dance.c | 93 ++++++++++++ users/konstantin/tap_dance.h | 25 ++++ users/konstantin/unicode.h | 11 ++ 13 files changed, 400 insertions(+), 169 deletions(-) create mode 100644 keyboards/kbd6x/keymaps/konstantin/config.h create mode 100644 keyboards/kbd6x/keymaps/konstantin/keymap.c create mode 100644 keyboards/kbd6x/keymaps/konstantin/rules.mk create mode 100644 users/konstantin/config.h create mode 100644 users/konstantin/konstantin.c create mode 100644 users/konstantin/konstantin.h create mode 100644 users/konstantin/rules.mk create mode 100644 users/konstantin/tap_dance.c create mode 100644 users/konstantin/tap_dance.h create mode 100644 users/konstantin/unicode.h diff --git a/keyboards/kbd6x/keymaps/konstantin/config.h b/keyboards/kbd6x/keymaps/konstantin/config.h new file mode 100644 index 000000000000..4b511eb8484f --- /dev/null +++ b/keyboards/kbd6x/keymaps/konstantin/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define LAYER_FN diff --git a/keyboards/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbd6x/keymaps/konstantin/keymap.c new file mode 100644 index 000000000000..b400b068107a --- /dev/null +++ b/keyboards/kbd6x/keymaps/konstantin/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H +#include "konstantin.h" + +enum keycodes_keymap { + RCTRL = RANGE_KEYMAP, +}; + +enum layers_keymap { + L_RCTRL = L_RANGE_KEYMAP, +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case RCTRL: + if (record->event.pressed) { + layer_on(L_RCTRL); + register_code(KC_RCTRL); + } else { + layer_off(L_RCTRL); + unregister_code(KC_RCTRL); + } + return false; + + default: + return true; + } +} + +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 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │LCtCps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │LShiftFn│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RShift│FnL│ + * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + * │LGu│LAlt │ Space │RAlGu│RCt│ + * └───┴─────┴───────────────────────────┴─────┴───┘ + */ + [L_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_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, + LCT_CPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + LSFT_FN, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN_FNLK, + XXXXXXX, KC_LGUI, KC_LALT, KC_SPC, RAL_RGU, RCTRL, XXXXXXX + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│PSc│Ins│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ │Hom│ ↑ │End│PgU│ │ │ │ │M1 │M↑ │M2 │M3 │ Del │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │ ← │ ↓ │ → │PgD│ │ │ │MW↑│M← │M↓ │M→ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ + * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + * │ │ │ MW↓ │ │ │ + * └───┴─────┴───────────────────────────┴─────┴───┘ + */ + [L_FN] = 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_PSCR, KC_INS, + _______, 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, _______, _______, XXXXXXX + ), + + /* RCtrl layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ │Top│Mv↑│Btm│PrT│ │ │ │ │ │ │ │ │Clear│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │Mv←│Mv↓│Mv→│NxT│ │ │ │ │ │ │ │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │ │ │ │ │ │ │ │ │ │ │ │ │ │ + * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ + * │Dst│Dstp←│ │Dstp→│ │ + * └───┴─────┴───────────────────────────┴─────┴───┘ + */ + [L_RCTRL] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, TOP, MV_UP, BOTTOM, PRV_TAB, _______, _______, _______, _______, _______, _______, _______, _______, CLEAR, + _______, MV_LEFT, MV_DOWN, MV_RGHT, NXT_TAB, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + XXXXXXX, DESKTOP, DSKTP_L, _______, DSKTP_R, _______, XXXXXXX + ), +}; diff --git a/keyboards/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbd6x/keymaps/konstantin/rules.mk new file mode 100644 index 000000000000..a45a631dc04a --- /dev/null +++ b/keyboards/kbd6x/keymaps/konstantin/rules.mk @@ -0,0 +1,2 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index ab920a50baf7..d7a072b06fa7 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -1,27 +1,7 @@ #pragma once -#define FORCE_NKRO +#define LAYER_FN +#define LAYER_NUMPAD #undef IS_COMMAND #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) - -#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 NO_ACTION_FUNCTION -#define NO_ACTION_MACRO - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 - -#define UNICODE_CYCLE_PERSIST false -#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX -#define UNICODE_WINC_KEY KC_RGUI diff --git a/keyboards/whitefox/keymaps/konstantin/keymap.c b/keyboards/whitefox/keymaps/konstantin/keymap.c index 54777cfe08b6..e37097361a2e 100644 --- a/keyboards/whitefox/keymaps/konstantin/keymap.c +++ b/keyboards/whitefox/keymaps/konstantin/keymap.c @@ -1,136 +1,5 @@ #include QMK_KEYBOARD_H - -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) -#define DSKTP_L LCTL(LGUI(KC_LEFT)) -#define DSKTP_R LCTL(LGUI(KC_RGHT)) - -#define FN MO(L_FN) -#define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_FNLK TT(L_FN) - -#define DESKTOP TD(TD_DESKTOP) -#define FN_RCTL TD(TD_FN_RCTL) -#define RAL_LAL TD(TD_RAL_LAL) -#define RAL_RGU TD(TD_RAL_RGU) -#define RCT_RSF TD(TD_RCT_RSF) - -#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) - -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) { - layer_on(L_FN); - } else if (state->count == 2) { - if (!td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - register_code(KC_RCTL); - } -} - -void td_fn_rctrl_reset(qk_tap_dance_state_t *state, void *user_data) { - if ((state->count == 1 || state->count > 2) && !td_fn_rctrl_data.fn_on) { - layer_off(L_FN); - } - if (state->count >= 2) { - unregister_code(KC_RCTL); - } - td_fn_rctrl_data.started = false; -} - -#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 > 2) { - unregister_code(mods->kc1); - } - if (state->count >= 2) { - unregister_code(mods->kc2); - } -} - -enum tap_dance { - TD_DESKTOP, - TD_FN_RCTL, - TD_RAL_LAL, - TD_RAL_RGU, - TD_RCT_RSF, -}; - -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_FN_RCTL] = ACTION_TAP_DANCE_FN_ADVANCED(td_fn_rctrl_each, NULL, td_fn_rctrl_reset), - [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), -}; +#include "konstantin.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base layer @@ -141,9 +10,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │PgU│ * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │CtlSft│ ↑ │PgD│ + * │ LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RCtRSf│ ↑ │PgD│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │LCtl│LGui│LAlt│ Space │AlGu│FnLk│ │ ← │ ↓ │ → │ + * │LCtl│LGui│LAlt│ Space │RAlG│FnLk│ │ ← │ ↓ │ → │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ @@ -177,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Numpad layer * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Num│ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ + * │ │ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ @@ -189,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, MINUS, EQUALS, 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, _______, _______, \ diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index 96722d1d5bce..1302f14ca84e 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,13 +1,2 @@ BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = yes -CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -SLEEP_LED_ENABLE = no -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes VISUALIZER_ENABLE = no - -EXTRAFLAGS += -flto diff --git a/users/konstantin/config.h b/users/konstantin/config.h new file mode 100644 index 000000000000..d03333f05d9c --- /dev/null +++ b/users/konstantin/config.h @@ -0,0 +1,24 @@ +#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 NO_ACTION_FUNCTION +#define NO_ACTION_MACRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 + +#define UNICODE_CYCLE_PERSIST false +#define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX +#define UNICODE_WINC_KEY KC_RGUI diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c new file mode 100644 index 000000000000..977111c1f9b4 --- /dev/null +++ b/users/konstantin/konstantin.c @@ -0,0 +1,77 @@ +#include "konstantin.h" + +#ifdef LAYER_NUMPAD +static void toggle_numpad(void) { + layer_invert(L_NUMPAD); + bool num_lock = host_keyboard_leds() & 1<event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + +#ifdef LAYER_FN + static bool fn_lock; + + 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 + } + return true; +#endif + +#ifdef LAYER_NUMPAD + case NUMPAD: + if (record->event.pressed) { + toggle_numpad(); + } + return false; +#endif + + case KC_ESC: + if (record->event.pressed) { +#ifdef LAYER_NUMPAD + if (IS_LAYER_ON(L_NUMPAD)) { + toggle_numpad(); + return false; + } +#endif +#ifdef LAYER_FN + if (IS_LAYER_ON(L_FN) && fn_lock) { + layer_off(L_FN); + return fn_lock = false; + } +#endif + } + return true; + + 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/konstantin/konstantin.h b/users/konstantin/konstantin.h new file mode 100644 index 000000000000..06081496b660 --- /dev/null +++ b/users/konstantin/konstantin.h @@ -0,0 +1,50 @@ +#pragma once + +#include "quantum.h" +#ifdef TAP_DANCE_ENABLE + #include "tap_dance.h" +#endif +#ifdef UNICODE_ENABLE + #include "unicode.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 MV_UP LCTL(KC_UP) +#define MV_DOWN LCTL(KC_DOWN) +#define MV_LEFT LCTL(KC_LEFT) +#define MV_RGHT LCTL(KC_RGHT) +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) +#define PRV_TAB LCTL(KC_PGUP) +#define NXT_TAB LCTL(KC_PGDN) + +#define LCT_CPS LCTL_T(KC_CAPS) + +enum keycodes_user { + CLEAR = SAFE_RANGE, +#ifdef LAYER_NUMPAD + NUMPAD, +#endif + + RANGE_KEYMAP, +}; + +enum layers_user { + L_BASE, +#ifdef LAYER_FN + L_FN, +#endif +#ifdef LAYER_NUMPAD + L_NUMPAD, +#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/konstantin/rules.mk b/users/konstantin/rules.mk new file mode 100644 index 000000000000..7f25a8107ac1 --- /dev/null +++ b/users/konstantin/rules.mk @@ -0,0 +1,16 @@ +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +KEYBOARD_SHARED_EP = yes # TODO: Disable once Command is fixed +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 +endif + +EXTRAFLAGS += -flto diff --git a/users/konstantin/tap_dance.c b/users/konstantin/tap_dance.c new file mode 100644 index 000000000000..b13f33c024f2 --- /dev/null +++ b/users/konstantin/tap_dance.c @@ -0,0 +1,93 @@ +#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 }, \ + } + +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); + } +} + +struct { + bool fn_on; // Layer state when tap dance started + bool started; +} td_fn_rctrl_data; + +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; + } + // Single tap → Fn, double tap → RCtrl, triple tap etc. → Fn+RCtrl + if (state->count == 1 || state->count == 3) { + layer_on(L_FN); + } else if (state->count == 2) { + if (!td_fn_rctrl_data.fn_on) { + layer_off(L_FN); + } + register_code(KC_RCTL); + } +} + +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); + } + if (state->count >= 2) { + unregister_code(KC_RCTL); + } + td_fn_rctrl_data.started = false; +} + +void td_lsft_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_lsft_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_DESKTOP] = ACTION_TAP_DANCE_DOUBLE(LCTL(LGUI(KC_D)), LCTL(LGUI(KC_F4))), // Add/close virtual desktop + + [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_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), +}; diff --git a/users/konstantin/tap_dance.h b/users/konstantin/tap_dance.h new file mode 100644 index 000000000000..922a63514166 --- /dev/null +++ b/users/konstantin/tap_dance.h @@ -0,0 +1,25 @@ +#pragma once + +#include "quantum.h" + +#define DESKTOP TD(TD_DESKTOP) +#define DSKTP_L LCTL(LGUI(KC_LEFT)) +#define DSKTP_R LCTL(LGUI(KC_RGHT)) + +#define RAL_LAL TD(TD_RAL_LAL) +#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) + +enum tap_dance { + TD_DESKTOP, + + TD_RAL_LAL, + TD_RAL_RGU, + TD_RCT_RSF, + + TD_FN_RCTL, + TD_LSFT_FN, +}; diff --git a/users/konstantin/unicode.h b/users/konstantin/unicode.h new file mode 100644 index 000000000000..09af7e1c7f6c --- /dev/null +++ b/users/konstantin/unicode.h @@ -0,0 +1,11 @@ +#pragma once + +#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) From 5287b94e6fc914f9db7a90df016c7d1af0939ee5 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Mon, 14 Jan 2019 11:10:57 -0600 Subject: [PATCH 123/458] Pointed LM Docs at expected keycodes (#4835) * Pointed LM Docs at expected keycodes * Update docs/feature_advanced_keycodes.md Co-Authored-By: germ --- 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 f116e478cc0d..98c7f8451790 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -25,7 +25,7 @@ These functions allow you to activate layers in various ways. Note that layers a * `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).) * `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. -* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers. +* `LM(layer, mod)` - Momentarily activates *layer* (like `MO`), but with modifier(s) *mod* active. Only supports layers 0-15 and the left modifiers: `MOD_LCTL`, `MOD_LSFT`, `MOD_LALT`, `MOD_LGUI` (note the use of `MOD_` constants instead of `KC_`). These modifiers can be combined using bitwise OR, e.g. `LM(_RAISE, MOD_LCTL | MOD_LALT)`. * `LT(layer, kc)` - momentarily activates *layer* when held, and sends *kc* when tapped. Only supports layers 0-15. * `OSL(layer)` - momentarily activates *layer* until the next key is pressed. See [One Shot Keys](#one-shot-keys) for details and additional functionality. * `TG(layer)` - toggles *layer*, activating it if it's inactive and vice versa From bc63da4fbf49865afb1a0845634307926d5de9ea Mon Sep 17 00:00:00 2001 From: Aaron Wood Date: Tue, 15 Jan 2019 09:45:49 -0600 Subject: [PATCH 124/458] [Keymap] Added resfury keymap (#4827) Colemak base with Qwerty/Dvorak support --- .../lets_split_eh/keymaps/resfury/config.h | 23 +++ .../lets_split_eh/keymaps/resfury/keymap.c | 189 ++++++++++++++++++ .../lets_split_eh/keymaps/resfury/readme.md | 7 + .../lets_split_eh/keymaps/resfury/rules.mk | 1 + 4 files changed, 220 insertions(+) create mode 100644 keyboards/lets_split_eh/keymaps/resfury/config.h create mode 100644 keyboards/lets_split_eh/keymaps/resfury/keymap.c create mode 100644 keyboards/lets_split_eh/keymaps/resfury/readme.md create mode 100644 keyboards/lets_split_eh/keymaps/resfury/rules.mk diff --git a/keyboards/lets_split_eh/keymaps/resfury/config.h b/keyboards/lets_split_eh/keymaps/resfury/config.h new file mode 100644 index 000000000000..0055bbf459dc --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/resfury/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 EE_HANDS \ No newline at end of file diff --git a/keyboards/lets_split_eh/keymaps/resfury/keymap.c b/keyboards/lets_split_eh/keymaps/resfury/keymap.c new file mode 100644 index 000000000000..17f790675bdd --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/resfury/keymap.c @@ -0,0 +1,189 @@ +#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 resfury_layers { + _COLEMAK, + _DVORAK, + _QWERTY +}; + +enum resfury_keycodes { + COLEMAK = SAFE_RANGE, + DVORAK, + QWERTY, +}; + +#define _LOWER 3 +#define _RAISE 4 +#define _FUNCTION 15 +#define _ADJUST 16 + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define FUNCTION MO(_FUNCTION) +#define ADJUST MO(_ADJUST) + + +// 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] = { +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | F | P | G | J | L | U | Y | ; | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |F/TAB | A | R | S | T | D | H | N | E | I | O | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Ent |Lower | Bksp | Spc | Raise| Left | Up | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT( \ + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, \ + LT(_FUNCTION,KC_TAB), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + + /* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Esc | ' | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |F/TAB | A | O | E | U | I | D | H | T | R | L | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Ent |Lower | Bksp | Spc | Raise| Left | Up | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT( \ + KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + LT(_FUNCTION,KC_TAB), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, OSM(MOD_RSFT), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |F/TAB | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Ent |Lower | Bksp | Spc | Raise| Left | Up | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_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_BSLS, \ + LT(_FUNCTION,KC_TAB), 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), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, OSM(MOD_RSFT), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | ~ | ` | Mute | Ctl/ | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | Bksp | Spc |Adjust| Play | Vol+ | Vol- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_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_DEL, \ + _______, 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, S(KC_GRV), KC_GRV, KC_MUTE, RCTL(KC_BSLS), KC_PIPE, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_SPC, ADJUST, KC_MPLY, KC_VOLU, KC_VOLD, KC_MNXT \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | - | + | - | = | [ | ] |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 7 | 8 | 9 | * | / | * | / | . | Mute | Ctl/ | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Adjust| Bksp | Spc |Raise | Play | Vol+ | Vol- | Next | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = 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_4, KC_5, KC_6, KC_PLUS, KC_MINS, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + _______, KC_7, KC_8, KC_9, KC_ASTR, KC_SLSH, KC_ASTR, KC_SLSH, KC_DOT, KC_MUTE, RCTL(KC_BSLS), KC_BSLS, \ + _______, KC_COMM, KC_0, KC_DOT, ADJUST, KC_BSPC, KC_SPC, _______, KC_MPLY, KC_VOLU, KC_VOLD, KC_MNXT \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * |Taskmg| | | | | | | |RGBVAI|RGBSAI|RGBHUI|caltde| + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |_COLEMAK| | | | | | | |RGBVAD|RGBSAD|RGBHUD|RGBTOG| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |_DVORAK| | | | | | | | | |RGBMOD|BLSTEP| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |_QWERTY| | | | | | | | | | | RESET| + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + TSKMGR, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, \ + DF(_COLEMAK), _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, \ + DF(_DVORAK), _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, BL_STEP, \ + DF(_QWERTY), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET \ +), + +/* Function + * ,-----------------------------------------------------------------------------------. + * | Caps | | | | | | S(Hm)| Home | Up | End |S(End)| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Ctrl | Shift| Alt | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNCTION] = LAYOUT( \ + KC_CAPS, _______, _______, _______, _______, _______, S(KC_HOME), KC_HOME, KC_UP, KC_END, S(KC_END), _______, \ + _______, KC_LCTL, KC_LSFT, KC_LALT, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + 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 QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + } + return true; +} diff --git a/keyboards/lets_split_eh/keymaps/resfury/readme.md b/keyboards/lets_split_eh/keymaps/resfury/readme.md new file mode 100644 index 000000000000..6a882307b7e1 --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/resfury/readme.md @@ -0,0 +1,7 @@ +![Let's Split Eh?](https://imgur.com/a/riUxwpl) + +# ResFury Let's Split, Eh Layout + +This layout specializes the Let's Split, Eh for Colevrak users that occasionally let others play with their toys. Adjust layer allows swapping to Colemak/Dvorak/Qwerty alphas. Heavily influenced by the default planck layout, but with up/down switched, a left hand 10-key, remapped backspace, and a few convenience keys. + +Master set by EE_HANDS method. \ No newline at end of file diff --git a/keyboards/lets_split_eh/keymaps/resfury/rules.mk b/keyboards/lets_split_eh/keymaps/resfury/rules.mk new file mode 100644 index 000000000000..7ad666d1a383 --- /dev/null +++ b/keyboards/lets_split_eh/keymaps/resfury/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes \ No newline at end of file From 2dcce4c35160066e32b827985a924c4f7ea5b4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomek=20W=C3=B3jcik?= Date: Tue, 15 Jan 2019 16:49:34 +0100 Subject: [PATCH 125/458] [Keyboard] Add bthlabs/geekpad (#4840) * Hello, GeekPad! * Fixed formatting in `README.md`. --- keyboards/bthlabs/geekpad/config.h | 227 ++++++++++++++++++ keyboards/bthlabs/geekpad/geekpad.c | 43 ++++ keyboards/bthlabs/geekpad/geekpad.h | 40 +++ keyboards/bthlabs/geekpad/info.json | 22 ++ .../bthlabs/geekpad/keymaps/default/config.h | 19 ++ .../bthlabs/geekpad/keymaps/default/keymap.c | 24 ++ keyboards/bthlabs/geekpad/readme.md | 15 ++ keyboards/bthlabs/geekpad/rules.mk | 81 +++++++ 8 files changed, 471 insertions(+) create mode 100644 keyboards/bthlabs/geekpad/config.h create mode 100644 keyboards/bthlabs/geekpad/geekpad.c create mode 100644 keyboards/bthlabs/geekpad/geekpad.h create mode 100644 keyboards/bthlabs/geekpad/info.json create mode 100644 keyboards/bthlabs/geekpad/keymaps/default/config.h create mode 100644 keyboards/bthlabs/geekpad/keymaps/default/keymap.c create mode 100644 keyboards/bthlabs/geekpad/readme.md create mode 100644 keyboards/bthlabs/geekpad/rules.mk diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h new file mode 100644 index 000000000000..2c33f359fdae --- /dev/null +++ b/keyboards/bthlabs/geekpad/config.h @@ -0,0 +1,227 @@ +/* +Copyright 2019-present Tomek Wójcik + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x4257 +#define DEVICE_VER 0x0001 +#define MANUFACTURER BTHLabs +#define PRODUCT GeekPad +#define DESCRIPTION 3x3 custom macro pad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#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 { F4, F5, F6 } +#define MATRIX_COL_PINS { D4, D0, D1 } +#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/bthlabs/geekpad/geekpad.c b/keyboards/bthlabs/geekpad/geekpad.c new file mode 100644 index 000000000000..e52507c93dc6 --- /dev/null +++ b/keyboards/bthlabs/geekpad/geekpad.c @@ -0,0 +1,43 @@ +/* Copyright 2019-present Tomek Wójcik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "geekpad.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/bthlabs/geekpad/geekpad.h b/keyboards/bthlabs/geekpad/geekpad.h new file mode 100644 index 000000000000..c9f1ac9d4f63 --- /dev/null +++ b/keyboards/bthlabs/geekpad/geekpad.h @@ -0,0 +1,40 @@ +/* Copyright 2019-present Tomek Wójcik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 GEEKPAD_H +#define GEEKPAD_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. + */ +#define LAYOUT( \ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 } \ +} + +#endif diff --git a/keyboards/bthlabs/geekpad/info.json b/keyboards/bthlabs/geekpad/info.json new file mode 100644 index 000000000000..c95497c5537d --- /dev/null +++ b/keyboards/bthlabs/geekpad/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "BTHLabs GeekPad", + "url": "https://git.bthlabs.pl/tomekwojcik/geekpad", + "maintainer": "Tomek Wójcik ", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "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} + ] + } + } +} diff --git a/keyboards/bthlabs/geekpad/keymaps/default/config.h b/keyboards/bthlabs/geekpad/keymaps/default/config.h new file mode 100644 index 000000000000..1cba162c7967 --- /dev/null +++ b/keyboards/bthlabs/geekpad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019-present Tomek Wójcik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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/bthlabs/geekpad/keymaps/default/keymap.c b/keyboards/bthlabs/geekpad/keymaps/default/keymap.c new file mode 100644 index 000000000000..a8791e70cabb --- /dev/null +++ b/keyboards/bthlabs/geekpad/keymaps/default/keymap.c @@ -0,0 +1,24 @@ +/* Copyright 2019-present Tomek Wójcik + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_F1, KC_F2, KC_F3, + KC_MEDIA_REWIND, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_FAST_FORWARD, + KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP + ), +}; diff --git a/keyboards/bthlabs/geekpad/readme.md b/keyboards/bthlabs/geekpad/readme.md new file mode 100644 index 000000000000..6558c32d979c --- /dev/null +++ b/keyboards/bthlabs/geekpad/readme.md @@ -0,0 +1,15 @@ +# BTHLabs GeekPad + +![GeekPad](https://i.imgur.com/FEzO81l.jpg) + +A 3x3 custom macro pad designed and developed by Tomek Wójcik. + +Keyboard Maintainer: [Tomek Wójcik](https://www.bthlabs.pl/) +Hardware Supported: GeekPad Custom PCB +Hardware Availability: [Project Repository](https://git.bthlabs.pl/tomekwojcik/geekpad) + +Make example for this keyboard (after setting up your build environment): + + make bthlabs/geekpad: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/bthlabs/geekpad/rules.mk b/keyboards/bthlabs/geekpad/rules.mk new file mode 100644 index 000000000000..d4785aabbea0 --- /dev/null +++ b/keyboards/bthlabs/geekpad/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 = 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 = 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 c768ffeb33e8635f1ef6fa46928a5b992ee8aae9 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 15 Jan 2019 17:04:56 -0500 Subject: [PATCH 126/458] [Keyboard] Iris via support, Rev 3 updates (#4849) * Add encoder support * Add VIA support to Iris Rev. 3 * Update pinout and disable mouse keys to free up space * Rollout VIA support to all Iris revisions * Update default keymap * Update vendor ID --- keyboards/iris/iris.h | 1 + keyboards/iris/keymaps/default/keymap.c | 71 ++++++------------------- keyboards/iris/rev1/config.h | 38 ++++++------- keyboards/iris/rev1/rev1.c | 14 ----- keyboards/iris/rev1_led/config.h | 38 ++++++------- keyboards/iris/rev1_led/rev1_led.c | 14 ----- keyboards/iris/rev2/config.h | 38 ++++++------- keyboards/iris/rev2/rev2.c | 14 ----- keyboards/iris/rev3/config.h | 47 +++++++++------- keyboards/iris/rev3/rev3.c | 15 ------ keyboards/iris/rev3/rev3.h | 2 - keyboards/iris/rev3/rules.mk | 1 + keyboards/iris/rules.mk | 40 +++----------- 13 files changed, 116 insertions(+), 217 deletions(-) diff --git a/keyboards/iris/iris.h b/keyboards/iris/iris.h index afad9a0d6db8..4212462c1584 100644 --- a/keyboards/iris/iris.h +++ b/keyboards/iris/iris.h @@ -11,6 +11,7 @@ #endif #include "quantum.h" +#include "../../zeal60/zeal60_keycodes.h" // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/iris/keymaps/default/keymap.c index 4644c3d9b55d..f67b71fc1ab3 100644 --- a/keyboards/iris/keymaps/default/keymap.c +++ b/keyboards/iris/keymaps/default/keymap.c @@ -2,21 +2,14 @@ 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, -}; +#define _MAIN 0 +#define _FN1 1 +#define _FN2 2 +#define _FN3 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT( + [_MAIN] = 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, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -26,11 +19,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ 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_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT + KC_LGUI, FN_MO13, KC_ENT, KC_SPC, FN_MO23, KC_LALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), - [_LOWER] = LAYOUT( + [_FN1] = 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, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -44,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), - [_RAISE] = LAYOUT( + [_FN2] = 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, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -58,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), - [_ADJUST] = LAYOUT( + [_FN3] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -73,42 +66,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -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; +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } } diff --git a/keyboards/iris/rev1/config.h b/keyboards/iris/rev1/config.h index 3b31ca0d7e06..1eddb54b4f8e 100644 --- a/keyboards/iris/rev1/config.h +++ b/keyboards/iris/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 0x1256 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -68,20 +68,22 @@ along with this program. If not, see . #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 +#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*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/iris/rev1/rev1.c index fe91fa3ead17..9694d122df17 100644 --- a/keyboards/iris/rev1/rev1.c +++ b/keyboards/iris/rev1/rev1.c @@ -7,20 +7,6 @@ void led_set_kb(uint8_t 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(); -}; - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap diff --git a/keyboards/iris/rev1_led/config.h b/keyboards/iris/rev1_led/config.h index e9739c00315b..4505c2229972 100644 --- a/keyboards/iris/rev1_led/config.h +++ b/keyboards/iris/rev1_led/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 0x1256 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -68,20 +68,22 @@ along with this program. If not, see . #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 +#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*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/iris/rev1_led/rev1_led.c index d08eaea6621c..af5fc9440bef 100644 --- a/keyboards/iris/rev1_led/rev1_led.c +++ b/keyboards/iris/rev1_led/rev1_led.c @@ -7,20 +7,6 @@ void led_set_kb(uint8_t 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(); -}; - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap diff --git a/keyboards/iris/rev2/config.h b/keyboards/iris/rev2/config.h index d43d4b1c6436..e0465ca8a41e 100644 --- a/keyboards/iris/rev2/config.h +++ b/keyboards/iris/rev2/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 0x1256 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio @@ -68,20 +68,22 @@ along with this program. If not, see . #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 +#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*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/iris/rev2/rev2.c index 133fce66ad02..8575243f0d24 100644 --- a/keyboards/iris/rev2/rev2.c +++ b/keyboards/iris/rev2/rev2.c @@ -7,20 +7,6 @@ void led_set_kb(uint8_t 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(); -}; - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap diff --git a/keyboards/iris/rev3/config.h b/keyboards/iris/rev3/config.h index 5642512f39dd..ad5937dc155e 100644 --- a/keyboards/iris/rev3/config.h +++ b/keyboards/iris/rev3/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 0x1256 #define DEVICE_VER 0x0300 #define MANUFACTURER Keebio @@ -35,6 +35,15 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D2, D3, D5, D7, D6 } #define MATRIX_COL_PINS { F1, F4, F5, F6, D4, B4 } +#define SPLIT_HAND_PIN F0 +#define QMK_ESC_OUTPUT D2 +#define QMK_ESC_INPUT F1 +#define QMK_LED B0 +#define QMK_SPEAKER C6 + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B5 } +#define ENCODERS_PAD_B { B7 } /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -68,20 +77,22 @@ along with this program. If not, see . #define RGB_DI_PIN F7 #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 +#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*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 515 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 509 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/iris/rev3/rev3.c b/keyboards/iris/rev3/rev3.c index d8272db0f595..7e49330c1da7 100644 --- a/keyboards/iris/rev3/rev3.c +++ b/keyboards/iris/rev3/rev3.c @@ -7,20 +7,6 @@ void led_set_kb(uint8_t 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(); -}; - - #ifdef SWAP_HANDS_ENABLE __attribute__ ((weak)) // swap-hands action needs a matrix to define the swap @@ -39,4 +25,3 @@ const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, }; #endif - diff --git a/keyboards/iris/rev3/rev3.h b/keyboards/iris/rev3/rev3.h index d44cef9a6bac..da9da8440305 100644 --- a/keyboards/iris/rev3/rev3.h +++ b/keyboards/iris/rev3/rev3.h @@ -12,8 +12,6 @@ #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, \ diff --git a/keyboards/iris/rev3/rules.mk b/keyboards/iris/rev3/rules.mk index d7463419b4fe..d7e0da93675d 100644 --- a/keyboards/iris/rev3/rules.mk +++ b/keyboards/iris/rev3/rules.mk @@ -1,2 +1,3 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/iris/rules.mk b/keyboards/iris/rules.mk index e93d7dae8027..69bc62f876c7 100644 --- a/keyboards/iris/rules.mk +++ b/keyboards/iris/rules.mk @@ -1,36 +1,6 @@ -# 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 @@ -50,8 +20,9 @@ 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) +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 @@ -61,10 +32,15 @@ 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 = iris/rev2 + +# VIA Support - Comment these 3 lines out to disable +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c From 57fbf072f145bcf560c812a7976ba0f4f702f946 Mon Sep 17 00:00:00 2001 From: Branden Byers Date: Tue, 15 Jan 2019 14:06:35 -0800 Subject: [PATCH 127/458] [Keyboard] Add cKeys Handwire 101 Keyboard (#4848) * Update general README * Add handwire_101 * Update keyboards/ckeys/handwire_101/keymaps/default/keymap.c Co-Authored-By: brandenbyers * Use Pragma once Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/config.h Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/config.h Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/handwire_101.h Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/handwire_101.h Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/keymaps/default/keymap.c Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/keymaps/default/keymap.c Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/keymaps/default/keymap.c Co-Authored-By: brandenbyers * Update keyboards/ckeys/handwire_101/keymaps/default/keymap.c Co-Authored-By: brandenbyers * Change KEYMAP to LAYOUT and remove endif * Apply suggestions from code review Co-Authored-By: brandenbyers * Move layers to enum and remove KC_TRNS --- keyboards/ckeys/handwire_101/config.h | 197 ++++++++++++++++++ keyboards/ckeys/handwire_101/handwire_101.c | 28 +++ keyboards/ckeys/handwire_101/handwire_101.h | 21 ++ keyboards/ckeys/handwire_101/info.json | 13 ++ .../handwire_101/keymaps/default/config.h | 3 + .../handwire_101/keymaps/default/keymap.c | 178 ++++++++++++++++ .../handwire_101/keymaps/default/readme.md | 1 + keyboards/ckeys/handwire_101/readme.md | 163 +++++++++++++++ keyboards/ckeys/handwire_101/rules.mk | 69 ++++++ keyboards/ckeys/readme.md | 11 +- 10 files changed, 679 insertions(+), 5 deletions(-) create mode 100755 keyboards/ckeys/handwire_101/config.h create mode 100755 keyboards/ckeys/handwire_101/handwire_101.c create mode 100755 keyboards/ckeys/handwire_101/handwire_101.h create mode 100644 keyboards/ckeys/handwire_101/info.json create mode 100755 keyboards/ckeys/handwire_101/keymaps/default/config.h create mode 100755 keyboards/ckeys/handwire_101/keymaps/default/keymap.c create mode 100755 keyboards/ckeys/handwire_101/keymaps/default/readme.md create mode 100755 keyboards/ckeys/handwire_101/readme.md create mode 100755 keyboards/ckeys/handwire_101/rules.mk diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h new file mode 100755 index 000000000000..7689c470387d --- /dev/null +++ b/keyboards/ckeys/handwire_101/config.h @@ -0,0 +1,197 @@ +/* +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 0x0001 +#define MANUFACTURER ckeys_handwire +#define PRODUCT ckeys_handwire +#define DESCRIPTION 4x4 handwire workshop board + +/* 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 { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +//#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 + +/* + * 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 + +/* + * 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 + +// Audio Click +#define AUDIO_CLICKY + +// Music Mode Polyphony +// NOTE: Must change polyphony_rate to a number higher than 0 in voices.c +#define AUDIO_VOICES +#define PITCH_STANDARD_A 880.0f + +// Mouse keys +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_TIME_TO_MAX 5 +#define MOUSEKEY_WHEEL_DELAY 0 + +/* + * 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/ckeys/handwire_101/handwire_101.c b/keyboards/ckeys/handwire_101/handwire_101.c new file mode 100755 index 000000000000..a6ff8f0e3d0f --- /dev/null +++ b/keyboards/ckeys/handwire_101/handwire_101.c @@ -0,0 +1,28 @@ +#include "handwire_101.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + // Turn status LED on + //DDRD |= (1<<6); + //PORTD |= (1<<6); + + 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/ckeys/handwire_101/handwire_101.h b/keyboards/ckeys/handwire_101/handwire_101.h new file mode 100755 index 000000000000..0f0309c3245c --- /dev/null +++ b/keyboards/ckeys/handwire_101/handwire_101.h @@ -0,0 +1,21 @@ +#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( \ + 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/ckeys/handwire_101/info.json b/keyboards/ckeys/handwire_101/info.json new file mode 100644 index 000000000000..dfe6c4830462 --- /dev/null +++ b/keyboards/ckeys/handwire_101/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "cKeys Handwire 101", + "url": "https://ckeys.org/slides/handwire/", + "maintainer": "brandenbyers", + "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}] + } + } +} diff --git a/keyboards/ckeys/handwire_101/keymaps/default/config.h b/keyboards/ckeys/handwire_101/keymaps/default/config.h new file mode 100755 index 000000000000..9935accb02dd --- /dev/null +++ b/keyboards/ckeys/handwire_101/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// Add overrides here diff --git a/keyboards/ckeys/handwire_101/keymaps/default/keymap.c b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c new file mode 100755 index 000000000000..383b3355decb --- /dev/null +++ b/keyboards/ckeys/handwire_101/keymaps/default/keymap.c @@ -0,0 +1,178 @@ +#include QMK_KEYBOARD_H + +enum layers { + _BASE, // base layer + _LAYERS, // layer of all layers + _MUSIC, // music mode + _MUSIC_4_LIFE, // music mode until unplugged + _MOUSE, // mousekeys + _TERMINAL, // terminal + _ADMIN // admin duties +}; + +enum custom_keycodes { + TERM_ABOUT = SAFE_RANGE, + TERM_PRINT, + TERM_FLUSH, + TERM_HELP, + CKEYS_ABOUT, +}; + +extern keymap_config_t keymap_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE (numpad) + * ,-----------------------. + * | 7 | 8 | 9 | / | <-- Hold for LAYERS + * |-----+-----+-----+-----| + * | 4 | 5 | 6 | * | + * |-----+-----+-----+-----| + * | 1 | 2 | 3 | - | + * |-----+-----+-----+-----| + * | 0 | . | = | + | + * `---------------------- ' + */ + [_BASE] = LAYOUT( + KC_KP_7, KC_KP_8, KC_KP_9, LT(MO(_LAYERS), KC_PSLS), \ + KC_KP_4, KC_KP_5, KC_KP_6, KC_PAST, \ + KC_KP_1, KC_KP_2, KC_KP_3, KC_PMNS, \ + KC_KP_0, KC_KP_DOT, KC_KP_EQUAL, KC_PPLS \ + ), + /* LAYERS + * ,---------------------------. + * | MUSIC | | | X | + * |---------+-----+-----+-----| + * | MOUSE | | | | + * |---------+-----+-----+-----| + * |TERMINAL | | | | + * |---------+-----+-----+-----| + * | ADMIN | | | | + * `---------------------------' + */ + [_LAYERS] = LAYOUT( + TG(_MUSIC), _______, _______, _______, \ + TG(_MOUSE), _______, _______, _______, \ + TG(_TERMINAL), _______, _______, _______, \ + TG(_ADMIN), _______, _______, _______\ + ), + /* MUSIC + * ,-----------------------. + * | X | | | X | + * |-----+-----+-----+-----| + * | | | |4EVER| + * |-----+-----+-----+-----| + * | OFF | | | | + * |-----+-----+-----+-----| + * | ON | | |MODES| + * `---------------------- ' + */ + // TODO: Make this music layer the one to jump to other music layers (different octaves) + [_MUSIC] = LAYOUT( + _______, _______, _______, _______, \ + _______, _______, _______, TG(_MUSIC_4_LIFE), \ + MU_OFF, _______, _______, _______, \ + MU_ON, _______, _______, MU_MOD \ + ), + /* MUSIC_4_LIFE + * ,-----------------------. + * | ♫ | ♫ | ♫ | ♫ | + * |-----+-----+-----+-----| + * | ♫ | ♫ | ♫ | ♫ | + * |-----+-----+-----+-----| + * | ♫ | ♫ | ♫ | ♫ | + * |-----+-----+-----+-----| + * | ♫ | ♫ | ♫ | ♫ | + * `---------------------- ' + */ + [_MUSIC_4_LIFE] = LAYOUT( + KC_M, KC_M, KC_M, KC_M, \ + KC_M, KC_M, KC_M, KC_M, \ + KC_M, KC_M, KC_M, KC_M, \ + KC_M, KC_M, KC_M, KC_M \ + ), + /* MOUSE + * ,-------------------------------------------------. + * | BUTTON 5 | | SCROLL UP | X | + * |-----------+-----------+------------+------------| + * | X |LEFT CLICK | UP |RIGHT CLICK | + * |-----------+-----------+------------+------------| + * | BUTTON 4 | LEFT | DOWN | RIGHT | + * |-----------+-----------+------------+------=-----| + * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| + * `-------------------------------------------------' + */ + [_MOUSE] = LAYOUT( + KC_MS_BTN5, _______, KC_MS_WH_UP, _______, \ + _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, \ + KC_MS_BTN4, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, \ + KC_MS_BTN3, KC_MS_WH_LEFT, KC_MS_WH_DOWN, KC_MS_WH_RIGHT \ + ), + /* TERMINAL + * ,---------------------------------------. + * | |ABOUT| | X | + * |------------+-----+----------+---------| + * |TERMINAL OFF|PRINT| | | + * |------------+-----+----------+---------| + * | X |FLUSH| | | + * |------------+-----+----------+---------| + * |TERMINAL ON |HELP | | | + * `--------=======------------------------' + */ + [_TERMINAL] = LAYOUT( + _______, TERM_ABOUT, _______, _______, \ + TERM_OFF, TERM_PRINT, _______, _______, \ + _______, TERM_FLUSH, _______, _______, \ + TERM_ON, TERM_HELP , _______, _______\ + ), + /* ADMIN + * ,-----------------------------------------. + * | RESET | | | X | + * |------------+-----+-----------+----------| + * |ABOUT CKEYS | | | | + * |------------+-----+-----------+----------| + * | | |CLICKY UP |CLICKY OFF| + * |------------+-----+-----------+----------| + * | X | |CLICKY DOWN|CLICKY ON | + * `-----------------------------------------' + */ + [_ADMIN] = LAYOUT( + RESET, _______, _______, _______, \ + CKEYS_ABOUT, _______, _______, _______, \ + _______, _______, _______, CK_OFF, \ + _______, _______, _______, CK_ON \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case TERM_ABOUT: + if (record->event.pressed) { + // when keycode TERM_ABOUT is pressed + SEND_STRING("about"SS_TAP(X_ENTER)); + } else { + // when keycode TERM_ABOUT is released + } + break; + case TERM_PRINT: + if (record->event.pressed) { + SEND_STRING("print"SS_TAP(X_ENTER)); + } else { } + break; + case TERM_FLUSH: + if (record->event.pressed) { + SEND_STRING("flush"SS_TAP(X_ENTER)); + } else { } + break; + case TERM_HELP: + if (record->event.pressed) { + SEND_STRING("help"SS_TAP(X_ENTER)); + } else { } + break; + case CKEYS_ABOUT: + if (record->event.pressed) { + SEND_STRING("https://cKeys.org"SS_TAP(X_ENTER)"Making people smile one keyboard at a time."SS_TAP(X_ENTER)"cKeys is a volunteer-run 501(c)(3) nonprofit organization."SS_TAP(X_ENTER)); + } else { } + break; + } + return true; +}; diff --git a/keyboards/ckeys/handwire_101/keymaps/default/readme.md b/keyboards/ckeys/handwire_101/keymaps/default/readme.md new file mode 100755 index 000000000000..4594bdfe317c --- /dev/null +++ b/keyboards/ckeys/handwire_101/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for the cKeys Handwire 101 4x4 keyboard. \ No newline at end of file diff --git a/keyboards/ckeys/handwire_101/readme.md b/keyboards/ckeys/handwire_101/readme.md new file mode 100755 index 000000000000..cf20dab60b75 --- /dev/null +++ b/keyboards/ckeys/handwire_101/readme.md @@ -0,0 +1,163 @@ +# cKeys Handwire 101 Workshop + +![](https://ckeys.org/images/proton-c-handwire-1.jpg) + +## Slides + +Slides can be found at: https://ckeys.org/slides/handwire/ + +## Case Design + +The laser cutting file is ideal for Ponoko's P1 board size. + +## Firmware + +If you want to reflash the pre-installed firmware, use the `.bin` file for Proton C and the `.hex` file for Pro Micro builds. Flash with the QMK Toolbox or via the command line. + +Building for Proton C: `make ckeys/handwire_101:default CTPC=yes` +Building for Pro Micro: `make ckeys/handwire_101:default` + +Pre-built firmware files (and laser cutting case files) can be found here: https://github.com/c-keys/handwire + +## Default Layout + +You can find the default layout in `qmk-handwire/keymaps/default/keymap.c` + +### Layers + +When you plug in your keyboard, it will function as a numpad. You will remain in the `Base` numpad layer unless you hold down the top right corner key and select one of the keys in the left most column. In QMK, this is called a momentary switch and looks like `MO(LAYERS)` in the default `keymap.c`. You can read more about layer switching in the [QMK Documentation](https://beta.docs.qmk.fm/features/feature_advanced_keycodes#switching-and-toggling-layers). + +#### Base +``` + /* BASE (numpad) + * ,-----------------------. + * | 7 | 8 | 9 | / | <-- Hold for LAYERS + * |-----+-----+-----+-----| + * | 4 | 5 | 6 | * | + * |-----+-----+-----+-----| + * | 1 | 2 | 3 | - | + * |-----+-----+-----+-----| + * | 0 | . | = | + | + * `---------------------- ' + */ +``` + +#### Layers + +``` + /* LAYERS + * ,---------------------------. + * | MUSIC | | | X | + * |---------+-----+-----+-----| + * | MOUSE | | | | + * |---------+-----+-----+-----| + * |TERMINAL | | | | + * |---------+-----+-----+-----| + * | ADMIN | | | | + * `---------------------------' + */ +``` + +This is the layers layer. This is how you toggle other layers on and off. If you toggle on a layer, it is important that you re-toggle that layer offbefore switching to a new layer. + +#### Music + +``` + /* MUSIC + * ,-----------------------. + * | X | | | X | + * |-----+-----+-----+-----| + * | | | |4EVER| + * |-----+-----+-----+-----| + * | OFF | | | | + * |-----+-----+-----+-----| + * | ON | | |MODES| + * `---------------------- ' + */ +``` + +You can toggle the music mode on and off. You can also change the mode of music modes. Lastly, you can switch to the Music 4 Life mode but tapping the key marked `4EVER` above (see below). For more information on music mode, see the [QMK Documentation](https://beta.docs.qmk.fm/features/feature_audio). + +_NOTE: This layer will only make sounds if you install a speaker. At the time of this writing, you can get the Proton C specific piezo speaker for [$2.61 with free overnight shipping](https://www.arrow.com/en/products/ast1109mltrq/mallory-sonalert-products). You can solder it on by desoldering the row wires where they contact the cathode end of the diodes. Then flip over the Proton C and solder the piezo speaker in. Then re-solder the row wires and you should hear beeps and boops the next time you plug in your keyboard._ + +#### Music 4 Life + +``` + /* MUSIC_4_LIFE + * ,-----------------------. + * | ♫ | ♫ | ♫ | ♫ | + * |-----+-----+-----+-----| + * | ♫ | ♫ | ♫ | ♫ | + * |-----+-----+-----+-----| + * | ♫ | ♫ | ♫ | ♫ | + * |-----+-----+-----+-----| + * | ♫ | ♫ | ♫ | ♫ | + * `---------------------- ' + */ +``` + +Music mode on every single key. However, you will need to unplug your keyboard in order to get out of this mode. The benefit of this is that you can use every single key as opposed to the few left over in the Music Mode layer. Try changing the chromatic mode before switching to this mode. + +#### Mouse + +``` + /* MOUSE + * ,-------------------------------------------------. + * | BUTTON 5 | | SCROLL UP | X | + * |-----------+-----------+------------+------------| + * | X |LEFT CLICK | UP |RIGHT CLICK | + * |-----------+-----------+------------+------------| + * | BUTTON 4 | LEFT | DOWN | RIGHT | + * |-----------+-----------+------------+------=-----| + * | BUTTON 3 |SCROLL LEFT|SCROLL DOWN |SCROLL RIGHT| + * `-------------------------------------------------' + */ +``` + +Switch to this mode, force yourself through the steep transitionary period, and then you can ditch mice and trackpads forever! + +#### Terminal + +``` + /* TERMINAL + * ,---------------------------------------. + * | |ABOUT| | X | + * |------------+-----+----------+---------| + * |TERMINAL OFF|PRINT| | | + * |------------+-----+----------+---------| + * | X |FLUSH| | | + * |------------+-----+----------+---------| + * |TERMINAL ON |HELP | | | + * `--------=======------------------------' + */ +``` + +This layer is not currently working but has been left as an example of how to write macros. + +#### Admin + +``` + /* ADMIN + * ,-----------------------------------------. + * | RESET | | | X | + * |------------+-----+-----------+----------| + * |ABOUT CKEYS | | | | + * |------------+-----+-----------+----------| + * | | |CLICKY UP |CLICKY OFF| + * |------------+-----+-----------+----------| + * | X | |CLICKY DOWN|CLICKY ON | + * `-----------------------------------------' + */ +``` + +The most important key in this layer is the `RESET` switch. Use it to flash new firmware. It does the same thing as the hardware button on the Proton C. But since you soldered the Proton C with the reset button facing towards the keys, the only way to reach it is to de-solder wires. The reset switch solves this. Program a reset switch into all of your future keyboards. + +The `ABOUT CKEYS` is another example of using a macro. It will type out a few sentences about cKeys. + +The clicky buttons will only make a difference if you install a piezo speaker. If you install a speaker, then you can make your keyboard extra clicky sounding even if you did not install clicky switches. + +![](https://ckeys.org/images/proton-c-handwire-2.jpg) +![](https://ckeys.org/images/proton-c-handwire-3.jpg) +![](https://ckeys.org/images/handwire-1.jpg) +![](https://ckeys.org/images/handwire-2.jpg) +![](https://ckeys.org/images/handwire-3.jpg) diff --git a/keyboards/ckeys/handwire_101/rules.mk b/keyboards/ckeys/handwire_101/rules.mk new file mode 100755 index 000000000000..957a6c8fba66 --- /dev/null +++ b/keyboards/ckeys/handwire_101/rules.mk @@ -0,0 +1,69 @@ +# 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 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 +TERMINAL_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 +# 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 = yes # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/ckeys/readme.md b/keyboards/ckeys/readme.md index 01991d9e3fe6..bdcf5b34d841 100644 --- a/keyboards/ckeys/readme.md +++ b/keyboards/ckeys/readme.md @@ -1,9 +1,10 @@ -# Ckeys.org +# cKeys.org -[ckeys](https://ckeys.org/) is a mechanical keyboard based non profit, located in Seattle, Washington. +[cKeys](https://ckeys.org/) is a mechanical keyboard-based nonprofit organization located in Seattle, Washington. -In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. +In addition, to hosting the [Seattle Mechanical Keyboard Meetups](https://ckeys.org/events/), they have [soldering workshops](https://ckeys.org/workshops/) featuring hardware hosted in this repository. * Supported Hardware - * The Obelus - 4x4 Macropad - * naKey - Through hole numpad \ No newline at end of file + * The Obelus - 4x4 Macropad + * naKey - Through hole numpad + * Handwire 101 - Handwired 4x4 (Proton C or Pro Micro) From 6630e4bb4156ec41f2a255dea4937f578cc62e06 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 16 Jan 2019 09:08:12 -0800 Subject: [PATCH 128/458] Crawlpad refactor (#4854) * Crawlpad: delete kbfirmware JSON file * Crawlpad: refactor - config.h and crawlpad.h updated to use #pragma once method - layout macro renamed from KEYMAP to LAYOUT_ortho_4x4 - default keymap now uses #include QMK_KEYBOARD_H - deleted deprecated action_get_macro function - cleanup rules.mk file - add LAYOUTS = ortho_4x4 to rules.mk * Crawlpad: Configurator support * Crawlpad: readme update - update image link to direct link - fully update Docs link line - delete reference to deleted kbfirmware JSON file --- keyboards/crawlpad/config.h | 4 +- keyboards/crawlpad/crawlpad.h | 6 +-- keyboards/crawlpad/crawlpad.json | 1 - keyboards/crawlpad/info.json | 29 +++++++++++++ keyboards/crawlpad/keymaps/default/keymap.c | 46 ++++++++++----------- keyboards/crawlpad/readme.md | 6 +-- keyboards/crawlpad/rules.mk | 22 +++++----- 7 files changed, 68 insertions(+), 46 deletions(-) delete mode 100644 keyboards/crawlpad/crawlpad.json create mode 100644 keyboards/crawlpad/info.json diff --git a/keyboards/crawlpad/config.h b/keyboards/crawlpad/config.h index c72be83f28d2..a6d7ac21472a 100755 --- a/keyboards/crawlpad/config.h +++ b/keyboards/crawlpad/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,4 +45,3 @@ #define RGBLED_NUM 3 #endif -#endif diff --git a/keyboards/crawlpad/crawlpad.h b/keyboards/crawlpad/crawlpad.h index 74416c6b1ab9..572907c25638 100755 --- a/keyboards/crawlpad/crawlpad.h +++ b/keyboards/crawlpad/crawlpad.h @@ -1,9 +1,8 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT_ortho_4x4( \ K00, K01, K02, K03, \ K10, K11, K12, K13, \ K20, K21, K22, K23, \ @@ -15,4 +14,3 @@ { K30, K31, K32, K33 } \ } -#endif \ No newline at end of file diff --git a/keyboards/crawlpad/crawlpad.json b/keyboards/crawlpad/crawlpad.json deleted file mode 100644 index 3a6eb553d2e2..000000000000 --- a/keyboards/crawlpad/crawlpad.json +++ /dev/null @@ -1 +0,0 @@ -{"version":1,"keyboard":{"keys":[{"id":0,"legend":"7\nHome\n\n\n\n\n\nNLCK","state":{"x":0,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,1,0,0,0,0,0,1]},"row":0,"col":0,"keycodes":[{"id":"KC_P7","fields":[]},{"id":"KC_NLCK","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":1,"legend":"8\n↑\n\n\n\n\n\nBL1","state":{"x":1,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1]},"row":0,"col":1,"keycodes":[{"id":"KC_P8","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":2,"legend":"9\nPgUp","state":{"x":2,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1]},"row":0,"col":2,"keycodes":[{"id":"KC_P9","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":3,"legend":"+\n\n\n\n\n\n\n/","state":{"x":3,"y":1,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n#020ad1\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1],"f":3},"row":0,"col":3,"keycodes":[{"id":"KC_PPLS","fields":[]},{"id":"KC_PSLS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":4,"legend":"4\n←","state":{"x":0,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":0,"keycodes":[{"id":"KC_P4","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":5,"legend":"5\n\n\n\n\n\n\nBL2","state":{"x":1,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":1,"keycodes":[{"id":"KC_P5","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":6,"legend":"6\n→","state":{"x":2,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":2,"keycodes":[{"id":"KC_P6","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":7,"legend":"-","state":{"x":3,"y":2,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":1,"col":3,"keycodes":[{"id":"KC_PMNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":8,"legend":"1\nEnd","state":{"x":0,"y":3,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":2,"col":0,"keycodes":[{"id":"KC_P1","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":9,"legend":"2\n↓\n\n\n\n\n\nBL3","state":{"x":1,"y":3,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1],"f":3},"row":2,"col":1,"keycodes":[{"id":"KC_P2","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":10,"legend":"3\nPgDn","state":{"x":2,"y":3,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":2,"col":2,"keycodes":[{"id":"KC_P3","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":11,"legend":"*","state":{"x":3,"y":3,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":2,"col":3,"keycodes":[{"id":"KC_PAST","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":12,"legend":"Fn","state":{"x":0,"y":4,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":3,"col":0,"keycodes":[{"id":"MO()","fields":[1]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":13,"legend":"0\nIns\n\n\n\n\n\nBL4","state":{"x":1,"y":4,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000\n\n\n\n\n\n\n#0015d4","fa":[0,0,0,0,0,0,0,1],"f":3},"row":3,"col":1,"keycodes":[{"id":"KC_P0","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":14,"legend":".\nDel","state":{"x":2,"y":4,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":3,"col":2,"keycodes":[{"id":"KC_PDOT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]},{"id":15,"legend":"Enter","state":{"x":3,"y":4,"r":0,"rx":0,"ry":0,"w":1,"h":1,"x2":0,"y2":0,"w2":0,"h2":0,"t":"#000000","fa":[0,0,0,0,0,0,0,1],"f":3},"row":3,"col":3,"keycodes":[{"id":"KC_PENT","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]},{"id":"KC_TRNS","fields":[]}]}],"controller":1,"bounds":{"min":{"x":0,"y":0},"max":{"x":4,"y":4}},"rows":4,"cols":4,"pins":{"row":["F0","F1","F4","F5"],"col":["D4","D5","D6","D7"],"num":null,"caps":null,"scroll":null,"compose":null,"kana":null,"led":null,"rgb":null},"macros":{},"quantum":"void matrix_init_user(void) {\n}\n\nvoid matrix_scan_user(void) {\n}\n\nbool process_record_user(uint16_t keycode, keyrecord_t *record) {\n\treturn true;\n}","settings":{"diodeDirection":1,"name":"Crawlpad","bootloaderSize":2,"rgbNum":0,"backlightLevels":3}}} \ No newline at end of file diff --git a/keyboards/crawlpad/info.json b/keyboards/crawlpad/info.json new file mode 100644 index 000000000000..b243ead304d8 --- /dev/null +++ b/keyboards/crawlpad/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "Crawlpad", + "url": "", + "maintainer": "colemarkham", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [ + {"label":"7", "x":0, "y":0}, + {"label":"8", "x":1, "y":0}, + {"label":"9", "x":2, "y":0}, + {"label":"+", "x":3, "y":0}, + {"label":"4", "x":0, "y":1}, + {"label":"5", "x":1, "y":1}, + {"label":"6", "x":2, "y":1}, + {"label":"-", "x":3, "y":1}, + {"label":"1", "x":0, "y":2}, + {"label":"2", "x":1, "y":2}, + {"label":"3", "x":2, "y":2}, + {"label":"*", "x":3, "y":2}, + {"label":"Fn", "x":0, "y":3}, + {"label":"0", "x":1, "y":3}, + {"label":".", "x":2, "y":3}, + {"label":"Enter", "x":3, "y":3} + ] + } + } +} diff --git a/keyboards/crawlpad/keymaps/default/keymap.c b/keyboards/crawlpad/keymaps/default/keymap.c index 49d8bfb1c9fe..ec985739f11a 100755 --- a/keyboards/crawlpad/keymaps/default/keymap.c +++ b/keyboards/crawlpad/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "../../crawlpad.h" +#include QMK_KEYBOARD_H enum custom_keycodes { BL1 = SAFE_RANGE, @@ -11,17 +11,19 @@ const uint8_t LED_PINS[] = LED_ROW_PINS; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -KEYMAP( - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_PMNS, - KC_P1, KC_P2, KC_P3, KC_PAST, - MO(1), KC_P0, KC_PDOT, KC_ENT), + [0] = LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PMNS, + KC_P1, KC_P2, KC_P3, KC_PAST, + MO(1), KC_P0, KC_PDOT, KC_ENT + ), -KEYMAP( - KC_NLCK, BL1, KC_TRNS, KC_PSLS, - RESET, BL2, KC_TRNS, KC_TRNS, - KC_TRNS, BL3, KC_TRNS, KC_TRNS, - KC_TRNS, BL4, KC_TRNS, KC_TRNS), + [1] = LAYOUT_ortho_4x4( + KC_NLCK, BL1, KC_TRNS, KC_PSLS, + RESET, BL2, KC_TRNS, KC_TRNS, + KC_TRNS, BL3, KC_TRNS, KC_TRNS, + KC_TRNS, BL4, KC_TRNS, KC_TRNS + ), }; @@ -35,19 +37,6 @@ void set_led(int idx, bool enable) { } } -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE ; -} - -void matrix_init_user(void) { - /* set LED row pins to output and low */ - DDRB |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7); - PORTB &= ~(1 << 4) & ~(1 << 5) & ~(1 << 6) & ~(1 << 7); -} - -void matrix_scan_user(void) { -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BL1: @@ -82,6 +71,15 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } +void matrix_init_user(void) { + /* set LED row pins to output and low */ + DDRB |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7); + PORTB &= ~(1 << 4) & ~(1 << 5) & ~(1 << 6) & ~(1 << 7); +} + +void matrix_scan_user(void) { +} + void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { diff --git a/keyboards/crawlpad/readme.md b/keyboards/crawlpad/readme.md index b2ea0e8c27ca..9eb01b7b616d 100644 --- a/keyboards/crawlpad/readme.md +++ b/keyboards/crawlpad/readme.md @@ -1,6 +1,6 @@ # Crawlpad -![Crawlpad](https://imgur.com/8BnztWo) +![Crawlpad](https://i.imgur.com/8BnztWo.jpg) A 4x4 macropad/numpad, exclusively availabe at Keycrawl events. @@ -12,6 +12,4 @@ Make example for this keyboard (after setting up your build environment): make crawlpad: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. - -For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com). \ 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/crawlpad/rules.mk b/keyboards/crawlpad/rules.mk index 63a6d616aeb4..2dda38e20138 100755 --- a/keyboards/crawlpad/rules.mk +++ b/keyboards/crawlpad/rules.mk @@ -44,13 +44,15 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # comment out to disable the options. # -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 -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 # [Crawlpad] Custom backlighting code is used, so this should not be enabled -AUDIO_ENABLE ?= no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below -RGBLIGHT_ENABLE ?= no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port. \ No newline at end of file +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 +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 # [Crawlpad] Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port. + +LAYOUTS = ortho_4x4 From 2fd86f4252de4d04c34e1f2ea2ba1da4b842cdd5 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Wed, 16 Jan 2019 13:57:48 -0500 Subject: [PATCH 129/458] Add some function comments in action_layer.c (#4858) --- tmk_core/common/action_layer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 120ce3f51b91..3147d61b3643 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -140,7 +140,7 @@ void layer_state_set(uint32_t state) /** \brief Layer clear * - * FIXME: Needs docs + * Turn off all layers. */ void layer_clear(void) { @@ -149,7 +149,7 @@ void layer_clear(void) /** \brief Layer state is * - * FIXME: Needs docs + * Return whether the given state is on (it might still be shadowed by a higher state, though). */ bool layer_state_is(uint8_t layer) { @@ -167,7 +167,7 @@ bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) { /** \brief Layer move * - * FIXME: Needs docs + * Turn on the given layer and turn off all other layers. */ void layer_move(uint8_t layer) { @@ -176,7 +176,7 @@ void layer_move(uint8_t layer) /** \brief Layer on * - * FIXME: Needs docs + * Turn on the given layer. */ void layer_on(uint8_t layer) { @@ -194,7 +194,7 @@ void layer_off(uint8_t layer) /** \brief Layer invert * - * FIXME: Needs docs + * Toggle the given layer (set it if it's unset, or unset it if it's set). */ void layer_invert(uint8_t layer) { @@ -228,7 +228,7 @@ void layer_xor(uint32_t state) /** \brief Layer debug printing * - * FIXME: Needs docs + * Print out the hex value of the 32-bit layer state, as well as the value of the highest bit. */ void layer_debug(void) { From e48cb34de675b6ed1f82d565c8f9b41d6a3245a1 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 16 Jan 2019 12:15:21 -0800 Subject: [PATCH 130/458] 40percent.club Luddite: Configurator update (#4859) - corrected value for keyboard_name - reformatted file --- keyboards/40percentclub/luddite/info.json | 80 ++++++++++++++++++++--- 1 file changed, 71 insertions(+), 9 deletions(-) diff --git a/keyboards/40percentclub/luddite/info.json b/keyboards/40percentclub/luddite/info.json index 51d71ec7724a..e3c5fa9f9dee 100644 --- a/keyboards/40percentclub/luddite/info.json +++ b/keyboards/40percentclub/luddite/info.json @@ -1,12 +1,74 @@ { - "keyboard_name": "foobar", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_60_ansi": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - } + "keyboard_name": "Luddite", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "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} + ] } + } } From f97894d8dba1d20693e71289d284a03335507bd2 Mon Sep 17 00:00:00 2001 From: bendk Date: Thu, 17 Jan 2019 02:16:18 -0500 Subject: [PATCH 131/458] [Keymap] Adding bdk keymap for ergobox_ez (#4850) * Adding bdk keymap * Updating keymap after review from drashna --- keyboards/ergodox_ez/keymaps/bdk/config.h | 5 + keyboards/ergodox_ez/keymaps/bdk/keymap.c | 176 +++++++++++++++++++++ keyboards/ergodox_ez/keymaps/bdk/readme.md | 36 +++++ keyboards/ergodox_ez/keymaps/bdk/rules.mk | 3 + 4 files changed, 220 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/bdk/config.h create mode 100644 keyboards/ergodox_ez/keymaps/bdk/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/bdk/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/bdk/rules.mk diff --git a/keyboards/ergodox_ez/keymaps/bdk/config.h b/keyboards/ergodox_ez/keymaps/bdk/config.h new file mode 100644 index 000000000000..e824b7310913 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/config.h @@ -0,0 +1,5 @@ +#pragma once + +#define ONESHOT_TAP_TOGGLE 2 +#define ONESHOT_TIMEOUT 167 +#define FORCE_NKRO diff --git a/keyboards/ergodox_ez/keymaps/bdk/keymap.c b/keyboards/ergodox_ez/keymaps/bdk/keymap.c new file mode 100644 index 000000000000..20af6c18ed40 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/keymap.c @@ -0,0 +1,176 @@ +#include QMK_KEYBOARD_H + +#define SHIFT_DOWN() (get_mods() & (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT))) +#define KC_FKEYS MO(FKEYS) + +// Layers +enum { + BASE=0, + SYMNUM, // Symbols and numbers (activated by holding enter) + FKEYS, // Function keys (activated by a thumb button) +}; + +// counter that increments on all key press events. This is needed for our LT +// handling +uint16_t press_counter = 0; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Keymap 0: Base layer + +[BASE] = LAYOUT_ergodox( + // left hand --------------------------------------------------------------------------------------------------- + KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, + KC_GRV, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LGUI, + KC_SLSH, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_HOME, + KC_LCTL, KC_LALT, KC_PGUP, KC_PGDN, KC_NO, + // left thumb -------------------------------------------------------------------------------------------------- + KC_NO, KC_NO, + KC_NO, + KC_SPC, KC_TAB, KC_FKEYS, + // right hand -------------------------------------------------------------------------------------------------- + KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, + KC_RGUI, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_END, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_RCTL, + // right thumb ------------------------------------------------------------------------------------------------- + KC_NO, KC_NO, + KC_NO, + KC_DEL, KC_BSPC, KC_ENT +), +// SYMNUM -- numpad and function keys +[SYMNUM] = LAYOUT_ergodox( + // left hand --------------------------------------------------------------------------------------------------- + KC_TRNS, LALT(KC_1), LALT(KC_2), LALT(KC_3), LALT(KC_4), LALT(KC_5), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AMPR, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LCBR, KC_LBRC, KC_LPRN, KC_0, KC_MINS, + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_SLSH, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // left thumb -------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand -------------------------------------------------------------------------------------------------- + KC_TRNS, LALT(KC_6), LALT(KC_7), LALT(KC_8), LALT(KC_9), LALT(KC_0), KC_TRNS, + KC_TRNS, KC_PERC, KC_EQL, KC_LT, KC_GT, KC_EXLM, KC_TRNS, + KC_PLUS, KC_1, KC_RPRN, KC_RBRC, KC_RCBR, KC_TRNS, + KC_TRNS, KC_ASTR, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // right thumb ------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +// FKEYS -- function keys +[FKEYS] = LAYOUT_ergodox( + // left hand --------------------------------------------------------------------------------------------------- + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // left thumb -------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand -------------------------------------------------------------------------------------------------- + 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, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // right thumb ------------------------------------------------------------------------------------------------- + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +// Code to handle layer tap. +// +// The default code doesn't work for me, so I rolled my own code. The main +// difference is that it always tries to send modifier+key combination, rather +// than two keys. One place where this is noticable is if you tap the key, +// then try hold it. + +struct tap_start_info { + uint16_t timer; + uint16_t initial_press_counter; +}; + +static struct tap_start_info tap_start_infos[5]; + +// Quick check to see if a key is down. Note that this requires NKRO enabled +static bool key_down(uint8_t code) { + return (keyboard_report->nkro.bits[code>>3] & 1<<(code&7)) != 0; +} + +static bool handle_lt(uint16_t keycode, keyrecord_t *record, uint8_t layer, uint8_t index) { + struct tap_start_info* tap_start = tap_start_infos + index; + + if(record->event.pressed) { + layer_on(layer); + tap_start->timer = timer_read(); + tap_start->initial_press_counter = press_counter; + } else { + layer_off(layer); + // Only click the key if: + // - No other keys are pressed between the press and release events + // - The release happens before the ONESHOT_TIMEOUT + if(press_counter == tap_start->initial_press_counter && timer_elapsed(tap_start->timer) < ONESHOT_TIMEOUT) { + register_code16(keycode); + unregister_code16(keycode); + } + } + return false; +} + +static bool handle_mt(uint16_t keycode, keyrecord_t *record, uint8_t mods, uint8_t index) { + struct tap_start_info* tap_start = tap_start_infos + index; + + if(record->event.pressed) { + register_mods(mods); + tap_start->timer = timer_read(); + tap_start->initial_press_counter = press_counter; + } else { + unregister_mods(mods); + // Only click the key if: + // - No other keys are pressed between the press and release events + // - The release happens before the ONESHOT_TIMEOUT + if(press_counter == tap_start->initial_press_counter && timer_elapsed(tap_start->timer) < ONESHOT_TIMEOUT) { + register_code16(keycode); + unregister_code16(keycode); + } + } + return false; +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if(record->event.pressed) { + press_counter++; + // The symbol layer allows sequences repeat the same "physical" key. + // For example "0)", which is like pressing the "0" key twice in a + // row. It's very easy to make a sequence of these where the ")" + // press comes before the "0" release. If that happens, force a + // release of the "0" key, otherwise nothing will happen. + uint8_t shortcode = keycode & 0xFF; + if(key_down(shortcode)) { + unregister_code(shortcode); + } + } + + switch(keycode) { + case KC_ENTER: + return handle_lt(keycode, record, SYMNUM, 0); + + case KC_TAB: + return handle_mt(keycode, record, MOD_BIT(KC_LCTL), 1); + + case KC_LSFT: + case KC_RSFT: + return handle_mt(KC_ESC, record, MOD_BIT(keycode), 2); + } + return true; +} diff --git a/keyboards/ergodox_ez/keymaps/bdk/readme.md b/keyboards/ergodox_ez/keymaps/bdk/readme.md new file mode 100644 index 000000000000..36a211d321fd --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/readme.md @@ -0,0 +1,36 @@ +# The BDK Ergodox Keyboard Layout + +## Dvorak-based + +This was the first alternative layout I switched to and I don't want to change +again. + +## Mod-tap / Layer-tap is great for thumb keys + +This means a key that activates a layer/modifier when you hold it down, but +results in a keyclick when you tap it. Thumb keys are great for this since +they are good for both high-usage keys as well as modifiers. + +The one thing to avoid is when you mean to tap a key, but hit the next key +before you release, which results in the modifier/layer instead of a tap. To +avoid this, I chose Enter/Tab as the tap keys, since they aren't chorded +together with other keys often. + +The other issue is I found several problems with using the standard MT,LT code, +so I rolled my own to handle it. + +## Don't have too many layers + +My first layouts had multiple layers that I could switch to, but that +overloaded my brain. This layout basically only uses 1 extra layer. +Technically there's also a function key layer, but I only use those keys for +a handlful of things: boot order, rename, reload page, that's basically it. + +## Brackets should be easy to use + +There's a lot of ways to lay out a symbol layer. I organized mine around +making the {[()]} chars easy to use since they're so frequent in programming. +I put them all on the symbol layer home row. + +I also arranged the numbers so 0/1 were also on the symbol layer home row. +This makes for fairly easy chording of "[0]" and "[1]". diff --git a/keyboards/ergodox_ez/keymaps/bdk/rules.mk b/keyboards/ergodox_ez/keymaps/bdk/rules.mk new file mode 100644 index 000000000000..6c5163623907 --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bdk/rules.mk @@ -0,0 +1,3 @@ +# CONSOLE_ENABLE = yes +# DEBUG_ENABLE = yes +COMMAND_ENABLE = no From 5fcca9a226b2ab0b1335396e25c37e4b2a261a06 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 17 Jan 2019 09:04:35 -0800 Subject: [PATCH 132/458] Add documentation and fix formating (#4860) --- tmk_core/common/action_layer.c | 301 ++++++++++++++++----------------- 1 file changed, 145 insertions(+), 156 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 3147d61b3643..6ff8c5549b5a 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -17,82 +17,76 @@ uint32_t default_layer_state = 0; /** \brief Default Layer State Set At user Level * - * FIXME: Needs docs + * Run user code on default layer state change */ __attribute__((weak)) uint32_t default_layer_state_set_user(uint32_t state) { - return state; + return state; } /** \brief Default Layer State Set At Keyboard Level * - * FIXME: Needs docs + * Run keyboard code on default layer state change */ __attribute__((weak)) uint32_t default_layer_state_set_kb(uint32_t state) { - return default_layer_state_set_user(state); + return default_layer_state_set_user(state); } /** \brief Default Layer State Set * - * FIXME: Needs docs + * Static function to set the default layer state, prints debug info and clears keys */ -static void default_layer_state_set(uint32_t state) -{ - state = default_layer_state_set_kb(state); - debug("default_layer_state: "); - default_layer_debug(); debug(" to "); - default_layer_state = state; - default_layer_debug(); debug("\n"); +static void default_layer_state_set(uint32_t state) { + state = default_layer_state_set_kb(state); + debug("default_layer_state: "); + default_layer_debug(); debug(" to "); + default_layer_state = state; + default_layer_debug(); debug("\n"); #ifdef STRICT_LAYER_RELEASE - clear_keyboard_but_mods(); // To avoid stuck keys + clear_keyboard_but_mods(); // To avoid stuck keys #else - clear_keyboard_but_mods_and_keys(); // Don't reset held keys + clear_keyboard_but_mods_and_keys(); // Don't reset held keys #endif } /** \brief Default Layer Print * - * FIXME: Needs docs + * Print out the hex value of the 32-bit default layer state, as well as the value of the highest bit. */ -void default_layer_debug(void) -{ - dprintf("%08lX(%u)", default_layer_state, biton32(default_layer_state)); +void default_layer_debug(void) { + dprintf("%08lX(%u)", default_layer_state, biton32(default_layer_state)); } /** \brief Default Layer Set * - * FIXME: Needs docs + * Sets the default layer state. */ -void default_layer_set(uint32_t state) -{ - default_layer_state_set(state); +void default_layer_set(uint32_t state) { + default_layer_state_set(state); } #ifndef NO_ACTION_LAYER /** \brief Default Layer Or * - * FIXME: Needs docs + * Turns on the default layer based on matching bits between specifed layer and existing layer state */ -void default_layer_or(uint32_t state) -{ - default_layer_state_set(default_layer_state | state); +void default_layer_or(uint32_t state) { + default_layer_state_set(default_layer_state | state); } /** \brief Default Layer And * - * FIXME: Needs docs + * Turns on default layer based on matching enabled bits between specifed layer and existing layer state */ -void default_layer_and(uint32_t state) -{ - default_layer_state_set(default_layer_state & state); +void default_layer_and(uint32_t state) { + default_layer_state_set(default_layer_state & state); } /** \brief Default Layer Xor * - * FIXME: Needs docs + * Turns on default layer based on non-matching bits between specifed layer and existing layer state */ -void default_layer_xor(uint32_t state) -{ - default_layer_state_set(default_layer_state ^ state); +void default_layer_xor(uint32_t state) { + default_layer_state_set(default_layer_state ^ state); } #endif @@ -104,170 +98,168 @@ uint32_t layer_state = 0; /** \brief Layer state set user * - * FIXME: Needs docs + * Runs user code on layer state change */ __attribute__((weak)) uint32_t layer_state_set_user(uint32_t state) { - return state; + return state; } /** \brief Layer state set keyboard * - * FIXME: Needs docs + * Runs keyboard code on layer state change */ __attribute__((weak)) uint32_t layer_state_set_kb(uint32_t state) { - return layer_state_set_user(state); + return layer_state_set_user(state); } /** \brief Layer state set * - * FIXME: Needs docs + * Sets the layer to match the specifed state (a bitmask) */ -void layer_state_set(uint32_t state) -{ - state = layer_state_set_kb(state); - dprint("layer_state: "); - layer_debug(); dprint(" to "); - layer_state = state; - layer_debug(); dprintln(); +void layer_state_set(uint32_t state) { + state = layer_state_set_kb(state); + dprint("layer_state: "); + layer_debug(); dprint(" to "); + layer_state = state; + layer_debug(); dprintln(); #ifdef STRICT_LAYER_RELEASE - clear_keyboard_but_mods(); // To avoid stuck keys + clear_keyboard_but_mods(); // To avoid stuck keys #else - clear_keyboard_but_mods_and_keys(); // Don't reset held keys + clear_keyboard_but_mods_and_keys(); // Don't reset held keys #endif } /** \brief Layer clear * - * Turn off all layers. + * Turn off all layers */ -void layer_clear(void) -{ - layer_state_set(0); +void layer_clear(void) { + layer_state_set(0); } /** \brief Layer state is * - * Return whether the given state is on (it might still be shadowed by a higher state, though). + * Return whether the given state is on (it might still be shadowed by a higher state, though) */ -bool layer_state_is(uint8_t layer) -{ - return layer_state_cmp(layer_state, layer); +bool layer_state_is(uint8_t layer) { + return layer_state_cmp(layer_state, layer); } /** \brief Layer state compare * - * FIXME: Needs docs + * Used for comparing layers {mostly used for unit testing} */ bool layer_state_cmp(uint32_t cmp_layer_state, uint8_t layer) { - if (!cmp_layer_state) { return layer == 0; } - return (cmp_layer_state & (1UL<= 0; i--) { - if (layers & (1UL<= 0; i--) { + if (layers & (1UL< Date: Fri, 18 Jan 2019 04:08:14 +1000 Subject: [PATCH 133/458] Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting. --- common_features.mk | 38 +- docs/config_options.md | 11 +- docs/getting_started_make_guide.md | 14 +- keyboards/handwired/xealous/debounce.c | 63 +++ keyboards/handwired/xealous/rules.mk | 10 +- keyboards/lets_split/sockets/config.h | 9 + keyboards/lets_split/sockets/rules.mk | 2 + keyboards/miniaxe/config.h | 5 +- keyboards/miniaxe/matrix.c | 641 ------------------------- keyboards/miniaxe/rules.mk | 3 +- quantum/config_common.h | 3 + quantum/debounce.c | 52 ++ quantum/debounce.h | 11 + quantum/matrix.c | 79 +-- quantum/split_common/i2c.h | 5 +- quantum/split_common/matrix.c | 639 ++++++++---------------- quantum/split_common/matrix.h | 30 +- quantum/split_common/serial.h | 5 +- quantum/split_common/split_flags.h | 9 +- quantum/split_common/split_util.c | 152 ++---- quantum/split_common/split_util.h | 15 +- quantum/split_common/transport.c | 224 +++++++++ quantum/split_common/transport.h | 10 + tmk_core/common/keyboard.h | 2 + 24 files changed, 711 insertions(+), 1321 deletions(-) create mode 100644 keyboards/handwired/xealous/debounce.c delete mode 100644 keyboards/miniaxe/matrix.c create mode 100644 quantum/debounce.c create mode 100644 quantum/debounce.h create mode 100644 quantum/split_common/transport.c create mode 100644 quantum/split_common/transport.h diff --git a/common_features.mk b/common_features.mk index 572a6db548ba..8c3361732cd0 100644 --- a/common_features.mk +++ b/common_features.mk @@ -254,20 +254,34 @@ QUANTUM_SRC:= \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c -ifeq ($(strip $(SPLIT_KEYBOARD)), yes) - ifneq ($(strip $(CUSTOM_MATRIX)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c - # Do not use $(QUANTUM_DIR)/matrix.c. - CUSTOM_MATRIX=yes +# Include the standard or split matrix code if needed +ifneq ($(strip $(CUSTOM_MATRIX)), yes) + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c + else + QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c endif +endif + +# Include the standard debounce code if needed +ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c +endif + +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_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c - QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c + $(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 + endif COMMON_VPATH += $(QUANTUM_PATH)/split_common endif - -ifneq ($(strip $(CUSTOM_MATRIX)), yes) - QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c -endif diff --git a/docs/config_options.md b/docs/config_options.md index 63bcc41d0af8..f5c2e76e7e92 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -143,7 +143,7 @@ If you define these options you will enable the associated feature, which may in * Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle) * `#define LEADER_TIMEOUT 300` * how long before the leader key times out - * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. + * If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped. * `#define LEADER_PER_KEY_TIMING` * sets the timer for leader key chords to run on each key press rather than overall * `#define LEADER_KEY_STRICT_KEY_PROCESSING` @@ -197,6 +197,9 @@ If you define these options you will enable the associated feature, which may in Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk +* `SPLIT_TRANSPORT = custom` + * Allows replacing the standard split communication routines with a custom one. ARM based split keyboards must use this at present. + ### Setting Handedness One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave. @@ -208,7 +211,7 @@ There are a few different ways to set handedness for split keyboards (listed in 3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default) 4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half -* `#define SPLIT_HAND_PIN B7` +* `#define SPLIT_HAND_PIN B7` * For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses. * `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined) @@ -302,6 +305,10 @@ Use these to enable or disable building certain features. The more you have enab * Current options are AdafruitEzKey, AdafruitBLE, RN42 * `SPLIT_KEYBOARD` * 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. * `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/getting_started_make_guide.md b/docs/getting_started_make_guide.md index adc1aed7512b..bb7e1e7e3b6f 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -97,7 +97,7 @@ This allows you to send Unicode characters using `UC()` in your keym `UNICODEMAP_ENABLE` -This allows you to send Unicode characters using `X()` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. +This allows you to send Unicode characters using `X()` in your keymap. You will need to maintain a mapping table in your keymap file. All possible code points (up to `0x10FFFF`) are supported. `UCIS_ENABLE` @@ -135,6 +135,18 @@ This enables [key lock](feature_key_lock.md). This consumes an additional 260 by This 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 +`SPLIT_TRANSPORT` + +As there is no standard split communication driver for ARM-based split keyboards yet, `SPLIT_TRANSPORT = custom` must be used for these. It will prevent the standard split keyboard communication code (which is AVR-specific) from being included, allowing a custom implementation to be used. + +`CUSTOM_MATRIX` + +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` + +Lets you replace the default key debouncing routine with your own code. You will need to provide your own implementation of debounce(). + ## Customizing Makefile Options on a Per-Keymap Basis If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard. diff --git a/keyboards/handwired/xealous/debounce.c b/keyboards/handwired/xealous/debounce.c new file mode 100644 index 000000000000..65a99f27f261 --- /dev/null +++ b/keyboards/handwired/xealous/debounce.c @@ -0,0 +1,63 @@ +#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<. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION + +#ifdef USE_Link_Time_Optimization + // LTO has issues with macros (action_get_macro) and "functions" (fn_actions), + // so just disable them + #define NO_ACTION_MACRO + #define NO_ACTION_FUNCTION + + #define DISABLE_LEADER +#endif // USE_Link_Time_Optimization \ No newline at end of file diff --git a/keyboards/lets_split/sockets/rules.mk b/keyboards/lets_split/sockets/rules.mk index e14d18d8de40..da04decf4031 100644 --- a/keyboards/lets_split/sockets/rules.mk +++ b/keyboards/lets_split/sockets/rules.mk @@ -1,3 +1,5 @@ BACKLIGHT_ENABLE = no AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes #Don't enable this along with I2C + +EXTRAFLAGS += -flto -DUSE_Link_Time_Optimization diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index 2b732ca16f96..7a68476a549a 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -44,8 +44,7 @@ along with this program. If not, see . */ // #define MATRIX_ROW_PINS { D0, D5 } // #define MATRIX_COL_PINS { F1, F0, B0 } -#define NO_PIN 0xFF -#define MATRIX_ROW_COL_PINS { \ +#define DIRECT_PINS { \ { F1, E6, B0, B2, B3 }, \ { F5, F0, B1, B7, D2 }, \ { F6, F7, C7, D5, D3 }, \ @@ -54,7 +53,7 @@ along with this program. If not, see . #define UNUSED_PINS /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ -#define DIODE_DIRECTION CUSTOM_MATRIX +//#define DIODE_DIRECTION CUSTOM_MATRIX // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/miniaxe/matrix.c b/keyboards/miniaxe/matrix.c deleted file mode 100644 index 5fec1281dfc6..000000000000 --- a/keyboards/miniaxe/matrix.c +++ /dev/null @@ -1,641 +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" -#include "split_flags.h" - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" - extern backlight_config_t backlight_config; -#endif - -#if defined(USE_I2C) || defined(EH) -# 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 defined(USE_I2C) || defined(EH) - -#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 - -#else // USE_SERIAL - -#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 - -#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; - -#if ((DIODE_DIRECTION == COL2ROW) || (DIODE_DIRECTION == ROW2COL)) -static uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; -#elif (DIODE_DIRECTION == CUSTOM_MATRIX) -static uint8_t row_col_pins[MATRIX_ROWS][MATRIX_COLS] = MATRIX_ROW_COL_PINS; -#endif - -/* 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); -#elif (DIODE_DIRECTION == CUSTOM_MATRIX) - static void init_cols_rows(void); - static bool read_cols(matrix_row_t current_matrix[], uint8_t current_row); -#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 - - } - -#elif (DIODE_DIRECTION == CUSTOM_MATRIX) - // 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(matrix_debouncing+offset, current_row); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_cols(matrix+offset, current_row); -# 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; -} - -#if defined(USE_I2C) || defined(EH) - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - 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[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; - } - - #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 0; -} - -#else // USE_SERIAL - - -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; - -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 - } -}; - -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)); } - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (soft_serial_transaction()) { - return 1; - } - - // TODO: if MATRIX_COLS > 8 change to unpack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_s2m_buffer.smatrix[i]; - } - - #ifdef RGBLIGHT_ENABLE - // 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 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#if defined(USE_I2C) || defined(EH) - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - - 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 { - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#if defined(USE_I2C) || defined(EH) - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i]; - } -#else // USE_SERIAL - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_s2m_buffer.smatrix[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 - } -} - -#elif (DIODE_DIRECTION == CUSTOM_MATRIX) - -static void init_cols_rows(void) -{ - for(int row = 0; row < MATRIX_ROWS; row++) { - for(int col = 0; col < MATRIX_COLS; col++) { - uint8_t pin = row_col_pins[row][col]; - if(pin == NO_PIN) { - continue; - } - // DDxn set 0 for input - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); - // PORTxn set 1 for input/pullup - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); - } - } -} - -static bool read_cols(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++) { - uint8_t pin = row_col_pins[current_row][col_index]; - if(pin == NO_PIN) { - current_matrix[current_row] |= 0; - } - else { - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - } - - return (last_row_value != current_matrix[current_row]); -} - -#endif diff --git a/keyboards/miniaxe/rules.mk b/keyboards/miniaxe/rules.mk index 96e27686b8d8..2f56a907ba6a 100644 --- a/keyboards/miniaxe/rules.mk +++ b/keyboards/miniaxe/rules.mk @@ -1,4 +1,3 @@ -SRC += matrix.c # MCU name #MCU = at90usb1286 @@ -83,6 +82,6 @@ FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) DEBUG_ENABLE = no -CUSTOM_MATRIX = yes # Use custom matrix code +CUSTOM_MATRIX = no # Use custom matrix code SPLIT_KEYBOARD = yes # Use shared split_common code diff --git a/quantum/config_common.h b/quantum/config_common.h index 606cd9381ae0..0b2e408a43f2 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -21,6 +21,9 @@ #define ROW2COL 1 #define CUSTOM_MATRIX 2 /* Disables built-in matrix scanning code */ +// useful for direct pin mapping +#define NO_PIN (~0) + #ifdef __AVR__ #ifndef __ASSEMBLER__ #include diff --git a/quantum/debounce.c b/quantum/debounce.c new file mode 100644 index 000000000000..929023ab2df3 --- /dev/null +++ b/quantum/debounce.c @@ -0,0 +1,52 @@ + +#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 new file mode 100644 index 000000000000..360af77e7818 --- /dev/null +++ b/quantum/debounce.h @@ -0,0 +1,11 @@ +#pragma once + +// raw is the current 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); \ No newline at end of file diff --git a/quantum/matrix.c b/quantum/matrix.c index 9b5ce33d2395..49a184569612 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -21,21 +21,9 @@ along with this program. If not, see . #include "debug.h" #include "util.h" #include "matrix.h" -#include "timer.h" +#include "debounce.h" #include "quantum.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)) @@ -63,9 +51,9 @@ static const 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[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +static matrix_row_t matrix[MATRIX_ROWS]; #if (DIODE_DIRECTION == COL2ROW) @@ -157,70 +145,39 @@ void matrix_init(void) { // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; matrix[i] = 0; - matrix_debouncing[i] = 0; } + debounce_init(MATRIX_ROWS); matrix_init_quantum(); } uint8_t matrix_scan(void) { + bool changed = false; #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 - - } - + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; 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++) { -# 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 - - } - + // 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 -# 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 + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); - matrix_scan_quantum(); - return 1; + matrix_scan_quantum(); + return 1; } bool matrix_is_modified(void) { -#if (DEBOUNCING_DELAY > 0) - if (debouncing) return false; -#endif + if (debounce_active()) return false; return true; } diff --git a/quantum/split_common/i2c.h b/quantum/split_common/i2c.h index b3cbe8c826ab..91e8e96f4734 100644 --- a/quantum/split_common/i2c.h +++ b/quantum/split_common/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -58,5 +57,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/quantum/split_common/matrix.c b/quantum/split_common/matrix.c index 2c37053f883f..c3d2857ed50b 100644 --- a/quantum/split_common/matrix.c +++ b/quantum/split_common/matrix.c @@ -25,529 +25,304 @@ along with this program. If not, see . #include "matrix.h" #include "split_util.h" #include "config.h" -#include "timer.h" #include "split_flags.h" #include "quantum.h" - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" - extern backlight_config_t backlight_config; -#endif - -#if defined(USE_I2C) || defined(EH) -# 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 defined(USE_I2C) || defined(EH) - -#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 - -#else // USE_SERIAL +#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) +# 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) +# 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 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 -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; +#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 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 +static matrix_row_t raw_matrix[ROWS_PER_HAND]; -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} +// row offsets for each hand +uint8_t thisHand, thatHand; -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} +// user-defined overridable functions -__attribute__ ((weak)) -void matrix_init_user(void) { -} +__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); } -__attribute__ ((weak)) -void matrix_scan_user(void) { -} +__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); } -__attribute__ ((weak)) -void matrix_slave_scan_user(void) { -} +__attribute__((weak)) void matrix_init_user(void) {} -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} +__attribute__((weak)) void matrix_scan_user(void) {} -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} +__attribute__((weak)) void matrix_slave_scan_user(void) {} -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; +// helper functions - // 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 - } +inline uint8_t matrix_rows(void) { return MATRIX_ROWS; } - // initialize row and col -#if (DIODE_DIRECTION == COL2ROW) - unselect_rows(); - init_cols(); -#elif (DIODE_DIRECTION == ROW2COL) - unselect_cols(); - init_rows(); -#endif +inline uint8_t matrix_cols(void) { return MATRIX_COLS; } - // 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(); - +bool matrix_is_modified(void) { + if (debounce_active()) return false; + return true; } -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 - - } +inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); } -#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 +inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } - } -#endif +void matrix_print(void) { + print_matrix_header(); -# 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 + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + print_matrix_row(row); + print("\n"); + } +} - return 1; +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; } -#if defined(USE_I2C) || defined(EH) - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - 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 +// matrix code - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; +#ifdef DIRECT_PINS - // start of matrix stored at I2C_KEYMAP_START - err = i2c_master_write(I2C_KEYMAP_START); - if (err) goto i2c_error; +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); + } + } + } +} - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; +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; - 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; + 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); } - - #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 0; + return (last_row_value != current_matrix[current_row]); } -#else // USE_SERIAL - +#elif (DIODE_DIRECTION == COL2ROW) -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; +static void select_row(uint8_t row) { + writePinLow(row_pins[row]); + setPinOutput(row_pins[row]); +} -volatile Serial_s2m_buffer_t serial_s2m_buffer = {}; -volatile Serial_m2s_buffer_t serial_m2s_buffer = {}; -uint8_t volatile status0 = 0; +static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); } -SSTD_t transactions[] = { - { (uint8_t *)&status0, - sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer, - sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer +static void unselect_rows(void) { + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + setPinInputHigh(row_pins[x]); } -}; +} -void serial_master_init(void) -{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); } +static void init_pins(void) { + unselect_rows(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} -void serial_slave_init(void) -{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } +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]; -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; + // Clear data in matrix row + current_matrix[current_row] = 0; - if (soft_serial_transaction()) { - return 1; - } + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); - // TODO: if MATRIX_COLS > 8 change to unpack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+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 0; -} -#endif + // 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); + } -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); + // Unselect row + unselect_row(current_row); -#if defined(USE_I2C) || defined(EH) - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif + return (last_row_value != current_matrix[current_row]); +} - error_count++; +#elif (DIODE_DIRECTION == ROW2COL) - 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 { - error_count = 0; - } - matrix_scan_quantum(); - return ret; +static void select_col(uint8_t col) { + writePinLow(col_pins[col]); + setPinOutput(col_pins[col]); } -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; +static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); } -#if defined(USE_I2C) || defined(EH) - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[I2C_KEYMAP_START+i] = matrix[offset+i]; - } -#else // USE_SERIAL - // TODO: if MATRIX_COLS > 8 change to pack() - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_s2m_buffer.smatrix[i] = matrix[offset+i]; - } -#endif - matrix_slave_scan_user(); +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } } -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < ROWS_PER_HAND; x++) { + setPinInputHigh(row_pins[x]); + } } -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1< 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; } - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - writePinLow(col_pins[col]); - setPinOutput(col_pins[col]); -} - -static void unselect_col(uint8_t col) -{ - setPinInputHigh(col_pins[col]); -} + matrix_scan_quantum(); + } else { + transport_slave(matrix + thisHand); + matrix_slave_scan_user(); + } -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - setPinInputHigh(col_pins[x]); - } + return ret; } - -#endif diff --git a/quantum/split_common/matrix.h b/quantum/split_common/matrix.h index b5cb45baed87..c2bdd3098c1d 100644 --- a/quantum/split_common/matrix.h +++ b/quantum/split_common/matrix.h @@ -1,31 +1,3 @@ -#ifndef SPLIT_COMMON_MATRIX_H -#define SPLIT_COMMON_MATRIX_H +#pragma once #include - -#ifdef RGBLIGHT_ENABLE -# include "rgblight.h" -#endif - -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 -} Serial_m2s_buffer_t; - -extern volatile Serial_m2s_buffer_t serial_m2s_buffer; - -void serial_master_init(void); -void serial_slave_init(void); - -#endif diff --git a/quantum/split_common/serial.h b/quantum/split_common/serial.h index b6638b3bdee9..1c1e640069c9 100644 --- a/quantum/split_common/serial.h +++ b/quantum/split_common/serial.h @@ -1,5 +1,4 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H +#pragma once #include @@ -61,5 +60,3 @@ int soft_serial_transaction(int sstd_index); #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif - -#endif /* SOFT_SERIAL_H */ diff --git a/quantum/split_common/split_flags.h b/quantum/split_common/split_flags.h index f101fff5b5a2..aaac474a7dbf 100644 --- a/quantum/split_common/split_flags.h +++ b/quantum/split_common/split_flags.h @@ -1,10 +1,9 @@ -#ifndef SPLIT_FLAGS_H -#define SPLIT_FLAGS_H +#pragma once #include #include -/** +/** * Global Flags **/ @@ -14,7 +13,3 @@ extern volatile bool RGB_DIRTY; //Backlight Stuff extern volatile bool BACKLIT_DIRTY; - - - -#endif \ No newline at end of file diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c index e41b6f6386e9..5095cb8fdce1 100644 --- a/quantum/split_common/split_util.c +++ b/quantum/split_common/split_util.c @@ -4,142 +4,84 @@ #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" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#if defined(USE_I2C) || defined(EH) -# include "i2c.h" +# include "eeconfig.h" #endif volatile bool isLeftHand = true; -volatile uint8_t setTries = 0; - -static void setup_handedness(void) { +__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); - isLeftHand = readPin(SPLIT_HAND_PIN); + return readPin(SPLIT_HAND_PIN); #else #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); + return eeprom_read_byte(EECONFIG_HANDEDNESS); #else #ifdef MASTER_RIGHT - isLeftHand = !has_usb(); + return !is_keyboard_master(); #else - isLeftHand = has_usb(); + return is_keyboard_master(); #endif #endif #endif } -static void keyboard_master_setup(void) { -#if defined(USE_I2C) || defined(EH) - i2c_master_init(); - #ifdef SSD1306OLED - matrix_master_OLED_init (); - #endif -#else - serial_master_init(); -#endif +bool is_keyboard_master(void) +{ +#ifdef __AVR__ + static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN; - // 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; -} + // only check once, as this is called often + if (usbstate == UNKNOWN) + { + USBCON |= (1 << OTGPADE); // enables VBUS pad + wait_us(5); -static void keyboard_slave_setup(void) { - timer_init(); -#if defined(USE_I2C) || defined(EH) - i2c_slave_init(SLAVE_I2C_ADDRESS); + usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS + } + + return (usbstate == MASTER); #else - serial_slave_init(); + return true; #endif } -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1< #include #include #include -#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/quantum/split_common/transport.c b/quantum/split_common/transport.c new file mode 100644 index 000000000000..95738530ecf4 --- /dev/null +++ b/quantum/split_common/transport.c @@ -0,0 +1,224 @@ + +#include "config.h" +#include "matrix.h" +#include "quantum.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" + +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 +} 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; + +SSTD_t transactions[] = { + { (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_slave_init(void) +{ soft_serial_target_init(transactions, TID_LIMIT(transactions)); } + +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 + +} + +#endif diff --git a/quantum/split_common/transport.h b/quantum/split_common/transport.h new file mode 100644 index 000000000000..ccce57e444d5 --- /dev/null +++ b/quantum/split_common/transport.h @@ -0,0 +1,10 @@ +#pragma once + +#include + +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[]); diff --git a/tmk_core/common/keyboard.h b/tmk_core/common/keyboard.h index 71e594a8909c..ea2f336e9dc5 100644 --- a/tmk_core/common/keyboard.h +++ b/tmk_core/common/keyboard.h @@ -67,6 +67,8 @@ void keyboard_init(void); void keyboard_task(void); /* it runs when host LED status is updated */ void keyboard_set_leds(uint8_t leds); +/* it runs whenever code has to behave differently on a slave */ +bool is_keyboard_master(void); #ifdef __cplusplus } From d53432393bc409db0f01a1b668bf3f5fc6bebb4f Mon Sep 17 00:00:00 2001 From: Valen Cheung Date: Fri, 18 Jan 2019 08:57:31 +0800 Subject: [PATCH 134/458] [Keymap] added custom led effect keymap.c (#4856) --- .../ctrl/keymaps/responsive_pattern/keymap.c | 939 ++++++++++++++++++ 1 file changed, 939 insertions(+) create mode 100644 keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c new file mode 100644 index 000000000000..eabd8d23a920 --- /dev/null +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -0,0 +1,939 @@ +#include QMK_KEYBOARD_H + +// uint8_t keyboard_leds(void) +#include + + +#if ISSI3733_LED_COUNT == 119 +# define KEY_LED_COUNT 87 +#elif ISSI3733_LED_COUNT == 105 +# define KEY_LED_COUNT 67 +#endif + +#define min(x, y) (x < y ? x : y) + + +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 + 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 + + L_SP_PR, //LED Splash Pattern Select Previous + L_SP_NE, //LED Splash Pattern Select Next + + L_SP_WD, //LED Splash Widen Wavefront width + L_SP_NW, //LED Splash Narrow Wavefront width + + L_SP_FA, //LED Splash wave travel speed faster (shorter period) + L_SP_SL, //LED Splash wave travel speed slower (longer period) + + L_CP_PR, //LED Color Pattern Select Previous + L_CP_NX, //LEB Color Pattern Select Next +}; + +#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode +#define ______ KC_TRNS + +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_AUTO,U_T_AGCR,_______, MO(2), _______, _______, _______, 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, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + L_CP_NX, L_SP_SL, L_SP_WD, L_SP_FA, _______, _______, L_CP_NX, L_SP_SL, L_SP_WD, L_SP_FA, _______, _______, _______, _______, _______, _______, _______, \ + L_CP_PR, L_SP_PR, L_SP_NW, L_SP_NE, _______, _______, L_CP_PR, L_SP_PR, L_SP_NW, L_SP_NE, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + /* + [X] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + */ +}; + +// see: /tmk_core/common/keycode.h +uint8_t KEYCODE_TO_LED_ID[256]; +uint8_t DISTANCE_MAP[KEY_LED_COUNT+1][KEY_LED_COUNT+1]; +struct user_led_t { + uint8_t state; + uint8_t r; + uint8_t g; + uint8_t b; +} USER_LED[KEY_LED_COUNT] = { + +}; + +struct { + uint8_t PATTERN_INDEX; + uint8_t WAVE_FRONT_WIDTH; + uint16_t WAVE_PERIOD; + uint8_t COLOR_PATTERN_INDEX; + uint8_t TRAVEL_DISTANCE; +} USER_CONFIG = { + .PATTERN_INDEX = 1, + .WAVE_FRONT_WIDTH = 3, + .WAVE_PERIOD = 50, + .COLOR_PATTERN_INDEX = 0, + .TRAVEL_DISTANCE = 25, +}; + +uint8_t ktli(uint16_t keycode){ + if(keycode < 256){ + // the array is initialized in `matrix_init_user()` + return KEYCODE_TO_LED_ID[keycode]; + } + switch(keycode){ + // definition of MO(layer): quantum/quantum_keycodes.h: line 614 + case MO(1): return 82; + } + return 0; +}; + +// Runs just one time when the keyboard initializes. +static void init_keycode_to_led_map(void){ + uint16_t LED_MAP[MATRIX_ROWS][MATRIX_COLS] = LAYOUT( + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, + 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35, + 36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51, + 52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67, +#if KEY_LED_COUNT >= 87 + 68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87 +#endif + ); + + uint16_t key = 0; + for(uint8_t y = 0; y < MATRIX_ROWS; ++y){ + for(uint8_t x = 0; x < MATRIX_COLS; ++x){ + key = keymaps[0][y][x]; + if(key < 256){ + KEYCODE_TO_LED_ID[key] = LED_MAP[y][x]; + } + } + } +} +// https://docs.qmk.fm/#/feature_terminal +#define KEY_POSITION_MAP_ROWS 6 +#define KEY_POSITION_MAP_COLUMNS 20 +static void init_distance_map(void){ + uint16_t KEY_POSITION_MAP[KEY_POSITION_MAP_ROWS][KEY_POSITION_MAP_COLUMNS] = { + { KC_NO, KC_ESC, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_NO, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, }, + // { 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_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_NO, KC_INS, KC_HOME, KC_PGUP, }, + { KC_NO, 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_BSLS, KC_NO, KC_DEL, KC_END, KC_PGDN, }, + { 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_ENT, KC_ENT, KC_NO, KC_NO, KC_NO, KC_NO, }, + { 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, KC_RSFT, KC_RSFT, KC_RSFT, KC_NO, KC_NO, KC_UP, KC_NO, }, + { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_NO, MO(1), KC_APP, KC_RCTL, KC_RCTL, KC_RCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, }, + }; + uint8_t columns = KEY_POSITION_MAP_COLUMNS; + uint8_t rows = KEY_POSITION_MAP_ROWS; + + for(uint8_t y = 0; y < rows; ++y){ + for(uint8_t x = 0; x < columns; ++x){ + uint8_t id1 = ktli(KEY_POSITION_MAP[y][x]); + + for(uint8_t j = y; j < rows; ++j){ + for(uint8_t i = 0; i < columns; ++i){ + uint8_t id2 = ktli(KEY_POSITION_MAP[j][i]); + + if(id1 == id2) continue; + + uint8_t dx = abs(i - x); + uint8_t dy = abs(j - y); + uint8_t dis = dx + dy; + if(i < x && j > y){ + dis -= min(dx, dy); + } + + uint8_t _dis = DISTANCE_MAP[id1][id2]; + if(_dis && _dis <= dis) continue; + DISTANCE_MAP[id1][id2] = dis; + DISTANCE_MAP[id2][id1] = dis; + } + } + } + } +} +void matrix_init_user(void) { + init_keycode_to_led_map(); + init_distance_map(); +}; + +// /tmk_core/protocol/arm_atsam/led_matrix.c: line 244 +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; +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; +float breathe_mult; + +// overrided /tmk_core/protocol/arm_atsam/led_matrix.c: line 484 +void rgb_matrix_init_user(void){ + led_animation_speed = ANIMATION_SPEED_STEP * 15; + led_per_run = 15; +} + +// overrided /tmk_core/protocol/arm_atsam/led_matrix.c: line 262 +void led_matrix_run(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; + + disp.frame += 1; + + breathe_mult = 1; + + if (led_animation_breathing) + { + 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; + } + } + + uint8_t fcur = 0; + uint8_t fmax = 0; + + //Frames setup + while (f[fcur].end != 1) + { + fcur++; //Count frames + } + + fmax = fcur; //Store total frames count + + struct user_led_t user_led_cur; + while (led_cur < lede && led_this_run < led_per_run) + { + ro = 0; + go = 0; + bo = 0; + + uint8_t led_index = led_cur - led_map; // only this part differs from the original function. + if(led_index < KEY_LED_COUNT){ // + user_led_cur = USER_LED[led_index]; // `struct user_led_t USER_LED[]` is stored globally. + } // + // + if(led_index < KEY_LED_COUNT && user_led_cur.state){ // `user_led_cur` is just for convenience + ro = user_led_cur.r; // + go = user_led_cur.g; // + bo = user_led_cur.b; // + } // + else 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_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; + } + + //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 + + //Calculate the po within the start-stop percentage for color blending + po = (po - f[fcur].hs) / (f[fcur].he - f[fcur].hs); + + //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; + } + } + } + + //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; + + if (led_animation_breathing) + { + ro *= breathe_mult; + go *= breathe_mult; + bo *= breathe_mult; + } + + *led_cur->rgb.r = (uint8_t)ro; + *led_cur->rgb.g = (uint8_t)go; + *led_cur->rgb.b = (uint8_t)bo; + +#ifdef USB_LED_INDICATOR_ENABLE + if (keyboard_leds()) + { + 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; + } + } +#endif //USB_LED_INDICATOR_ENABLE + + led_cur++; + led_this_run++; + } +} + +#define KEY_STROKES_LENGTH 20 +struct { + bool alive; + uint8_t led_id; + uint32_t time; +} KEY_STROKES[KEY_STROKES_LENGTH] = {{}}; + + + + +void set_led_rgb(uint8_t led_id, uint8_t r, uint8_t g, uint8_t b){ + issi3733_led_t *target_led = (led_map + led_id); + *target_led->rgb.r = r; + *target_led->rgb.g = g; + *target_led->rgb.b = b; +} + + +uint8_t DISTANCE_FROM_LAST_KEYSTROKE[KEY_LED_COUNT+1]; +void calculate_keystroke_distance(void){ + bool alive; + uint8_t led_id, period_passed; + uint32_t t; + + + for(uint8_t i = 0; i <= KEY_LED_COUNT; ++i){ + DISTANCE_FROM_LAST_KEYSTROKE[i] = 0; + } + + for(uint8_t i = 0; i < KEY_STROKES_LENGTH; ++i){ + if(KEY_STROKES[i].alive){ + t = timer_elapsed32(KEY_STROKES[i].time); + alive = 0; + led_id = KEY_STROKES[i].led_id; + period_passed = t / USER_CONFIG.WAVE_PERIOD; + + uint8_t delta_period; + for(uint8_t j = 1; j <= KEY_LED_COUNT; ++j){ + delta_period = period_passed - DISTANCE_MAP[led_id][j]; + if(( delta_period < USER_CONFIG.WAVE_FRONT_WIDTH) && ( + DISTANCE_MAP[led_id][j] <= USER_CONFIG.TRAVEL_DISTANCE + )){ + switch(USER_CONFIG.PATTERN_INDEX){ + case 3: + case 4: + case 5: + case 6: + DISTANCE_FROM_LAST_KEYSTROKE[j] += delta_period; + break; + default: + DISTANCE_FROM_LAST_KEYSTROKE[j] = 1; + break; + } + alive = 1; + } + } + KEY_STROKES[i].alive = alive; + } + } +} + +#define COLOR_PATTERN_RGB_COUNT 18 +static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { + { // default rainbow color + {255, 0, 0}, {255, 0, 0}, {255, 127, 0}, + {255, 127, 0}, {255, 255, 0}, {255, 255, 0}, + {120, 255, 0}, {120, 255, 0}, { 0, 255, 0}, + { 0, 255, 0}, { 0, 255, 120}, { 0, 255, 120}, + { 0, 0, 255}, { 0, 0, 255}, { 75, 0, 130}, + { 75, 0, 130}, { 43, 0, 130}, { 43, 0, 130}, + }, { // light rainbow color + {248, 12, 18}, {238, 17, 0}, {255, 51, 17}, + {255, 68, 32}, {255, 102, 68}, {255, 153, 51}, + {254, 174, 45}, {204, 187, 51}, {208, 195, 16}, + {170, 204, 34}, {105, 208, 37}, { 34, 204, 170}, + { 18, 189, 185}, { 17, 170, 187}, { 68, 68, 221}, + { 51, 17, 187}, { 59, 12, 189}, { 68, 34, 153}, + }, { // white flat + {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, + {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, + {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, + {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, + {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, + {255, 255, 255}, {255, 255, 255}, {255, 255, 255}, + }, { // white fade, cos curve + {255, 255, 255}, {255, 255, 255}, {252, 252, 252}, + {247, 247, 247}, {240, 240, 240}, {232, 232, 232}, + {221, 221, 221}, {209, 209, 209}, {196, 196, 196}, + {181, 181, 181}, {164, 164, 164}, {147, 147, 147}, + {128, 128, 128}, {108, 108, 108}, { 88, 88, 88}, + { 66, 66, 66}, { 45, 45, 45}, { 23, 23, 23}, + }, +}; +static const uint8_t COLOR_PATTERNS_COUNT = ( + sizeof(COLOR_PATTERNS) / sizeof(COLOR_PATTERNS[0])); + +void set_user_led_rgb(uint8_t i, uint8_t r, uint8_t g, uint8_t b){ + USER_LED[i-1].state = 1; + USER_LED[i-1].r = r; + USER_LED[i-1].g = g; + USER_LED[i-1].b = b; +} +void unset_user_led_rgb(uint8_t i){ + USER_LED[i-1].state = 0; +} +void set_indicator_led_rgb(uint8_t i, + uint8_t layer, uint8_t r, uint8_t g, uint8_t b){ + USER_LED[i-1].state |= 1 << layer; + USER_LED[i-1].r = r; + USER_LED[i-1].g = g; + USER_LED[i-1].b = b; +} +void unset_indicator_led_rgb(uint8_t i, uint8_t layer){ + USER_LED[i-1].state &= ~(1 << layer); +} + +void refresh_pattern_indicators(void){ + static uint8_t GRV_123456[] = { + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + }; + + if(layer_state >= 0x04){ + for(uint8_t i = 0; i < 7; ++i){ + if(i == USER_CONFIG.PATTERN_INDEX){ + set_indicator_led_rgb(ktli(GRV_123456[i]), 2, 0, 0, 255); + } else{ + set_indicator_led_rgb(ktli(GRV_123456[i]), 2, 0, 255, 0); + } + } + } else{ + for(uint8_t i = 0; i < 7; ++i){ + unset_indicator_led_rgb(ktli(GRV_123456[i]), 2); + } + } +} +void refresh_color_pattern_indicators(void){ + static uint8_t ZXCVBNM_COMM_DOT[] = { + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, + }; + + if(layer_state >= 0x04){ + uint8_t (*c)[3] = &COLOR_PATTERNS[USER_CONFIG.COLOR_PATTERN_INDEX][0]; + for(uint8_t i = 0; i < 9; ++i){ + set_indicator_led_rgb(ktli(ZXCVBNM_COMM_DOT[i]), + 2, c[i][0], c[i][1], c[i][2]); + } + } else{ + for(uint8_t i = 0; i < 9; ++i){ + unset_indicator_led_rgb(ktli(ZXCVBNM_COMM_DOT[i]), 2); + } + } +} + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + static uint32_t scan_timer = 0; + static uint8_t last_layer = 0; + + uint8_t layer = 0; + if(layer_state >= 0x04){ + layer = 2; + } else if(layer_state >= 0x02){ + layer = 1; + } + + calculate_keystroke_distance(); + + + #define USE_PATTERN 0 + #define BLACK_RGB 1 + #define COLOR_RGB 2 + uint8_t ci; // color index + uint8_t *rgb; + uint8_t handle_type; + uint8_t distance; + for(uint8_t i = 1; i <= KEY_LED_COUNT; ++i){ + if(USER_LED[i-1].state >= 2) continue; + + handle_type = USE_PATTERN; + distance = DISTANCE_FROM_LAST_KEYSTROKE[i]; + + switch(USER_CONFIG.PATTERN_INDEX){ + case 0: handle_type = USE_PATTERN; break; + case 1: handle_type = distance ? USE_PATTERN : BLACK_RGB; break; + case 2: handle_type = distance ? BLACK_RGB : USE_PATTERN; break; + case 3: handle_type = distance ? COLOR_RGB : BLACK_RGB; break; + case 4: handle_type = distance ? COLOR_RGB : USE_PATTERN; break; + case 5: + case 6: handle_type = distance ? COLOR_RGB : USE_PATTERN; break; + } + switch(handle_type){ + case USE_PATTERN: unset_user_led_rgb(i); break; + case BLACK_RGB: set_user_led_rgb(i, 0, 0, 0); break; + case COLOR_RGB: + ci = (DISTANCE_FROM_LAST_KEYSTROKE[i] * COLOR_PATTERN_RGB_COUNT / + USER_CONFIG.WAVE_FRONT_WIDTH) % COLOR_PATTERN_RGB_COUNT; + rgb = &COLOR_PATTERNS[USER_CONFIG.COLOR_PATTERN_INDEX][ci][0]; + + set_user_led_rgb(i, rgb[0], rgb[1], rgb[2]); + break; + } + } + + + // could be moved to process_record_user() + if(layer != last_layer){ + + static uint8_t QWEASDP[] = { + KC_Q, KC_W, KC_E, KC_A, KC_S, KC_D, KC_P, + }; + static uint8_t YUIOHJKL[] = { + KC_Y, KC_U, KC_I, KC_O, KC_H, KC_J, KC_K, KC_L, + }; + + switch(last_layer){ + case 1: + for(uint8_t i = 0; i < 7; ++i){ + unset_indicator_led_rgb(ktli(QWEASDP[i]), 1); + } + break; + case 2: + for(uint8_t i = 0; i < 6; ++i){ + unset_indicator_led_rgb(ktli(QWEASDP[i]), 2); + } + for(uint8_t i = 0; i < 8; ++i){ + unset_indicator_led_rgb(ktli(YUIOHJKL[i]), 2); + } + unset_indicator_led_rgb(ktli(KC_TAB), 2); + unset_indicator_led_rgb(ktli(KC_CAPS), 2); + break; + } + + + switch(layer){ + case 1: + for(uint8_t i = 0; i < 7; ++i){ + set_indicator_led_rgb(ktli(QWEASDP[i]), 1, 255, 0, 0); + } + break; + case 2: + for(uint8_t i = 0; i < 6; ++i){ + set_indicator_led_rgb(ktli(QWEASDP[i]), 2, 0, 255, 0); + } + for(uint8_t i = 0; i < 8; ++i){ + set_indicator_led_rgb(ktli(YUIOHJKL[i]), 2, 0, 255, 0); + } + set_indicator_led_rgb(ktli(KC_TAB), 2, 0, 255, 0); + set_indicator_led_rgb(ktli(KC_CAPS), 2, 0, 255, 0); + break; + } + + refresh_pattern_indicators(); + refresh_color_pattern_indicators(); + last_layer = layer; + } + + + switch(layer){ + case 0: + if(timer_elapsed32(scan_timer) > 2000){ + scan_timer = timer_read32(); + } else if(timer_elapsed32(scan_timer) > 1000){ + // set_user_led_rgb(ktli(KC_F5), 255, 255, 255); + } + break; + case 1: + break; + case 2: + break; + } + +}; + +#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->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_AUTO: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode"); + } + 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; + + + + + + + + + + + + + + + + + + case L_SP_PR: // previous dripple pattern + case L_SP_NE: // next dripple pattern + if (record->event.pressed) { +#define PATTERN_COUNT 7 + uint8_t incre = keycode == L_SP_PR ? PATTERN_COUNT-1 : 1; + USER_CONFIG.PATTERN_INDEX += incre; + USER_CONFIG.PATTERN_INDEX %= PATTERN_COUNT; + + if(USER_CONFIG.PATTERN_INDEX <= 4){ + USER_CONFIG.TRAVEL_DISTANCE = 25; + USER_CONFIG.COLOR_PATTERN_INDEX = 0; + USER_CONFIG.WAVE_PERIOD = 50; + } + + switch(USER_CONFIG.PATTERN_INDEX){ + case 0: // None + break; + case 1: // background off, wave on + USER_CONFIG.WAVE_FRONT_WIDTH = 2; + break; + case 2: // background on, wave off + USER_CONFIG.WAVE_FRONT_WIDTH = 5; + break; + case 3: // background off, rainbow wave + USER_CONFIG.WAVE_FRONT_WIDTH = 10; + break; + case 4: // background on, rainbow wave + USER_CONFIG.WAVE_FRONT_WIDTH = 10; + break; + case 5: + USER_CONFIG.WAVE_FRONT_WIDTH = 10; + + USER_CONFIG.COLOR_PATTERN_INDEX = 2; + USER_CONFIG.TRAVEL_DISTANCE = 0; + USER_CONFIG.WAVE_PERIOD = 100; + break; + case 6: + USER_CONFIG.WAVE_FRONT_WIDTH = 25; + + USER_CONFIG.COLOR_PATTERN_INDEX = 3; + USER_CONFIG.TRAVEL_DISTANCE = 2; + USER_CONFIG.WAVE_PERIOD = 10; + break; + } + + // remove effect after changing pattern + for(int i = 0; i < KEY_STROKES_LENGTH; ++i){ + KEY_STROKES[i].alive = 0; + } + refresh_pattern_indicators(); + refresh_color_pattern_indicators(); + } + return false; + case L_SP_WD: + case L_SP_NW: + if(record->event.pressed){ + short incre = keycode == L_SP_WD ? 1 : -1; + USER_CONFIG.WAVE_FRONT_WIDTH += incre; + if(USER_CONFIG.WAVE_FRONT_WIDTH < 1){ + USER_CONFIG.WAVE_FRONT_WIDTH = 1; + } + } + return false; + case L_SP_FA: + case L_SP_SL: + if(record->event.pressed){ + short incre = keycode == L_SP_FA ? -1 : 1; + + USER_CONFIG.WAVE_PERIOD += 10 * incre; + if(USER_CONFIG.WAVE_PERIOD < 10){ + USER_CONFIG.WAVE_PERIOD = 10; + } + } + return false; + // these are the keys not in range 0x04 - 0x52 + case L_CP_PR: + case L_CP_NX: + if(record->event.pressed){ + uint8_t incre = keycode == L_CP_PR ? COLOR_PATTERNS_COUNT - 1 : 1; + USER_CONFIG.COLOR_PATTERN_INDEX += incre; + USER_CONFIG.COLOR_PATTERN_INDEX %= COLOR_PATTERNS_COUNT; + refresh_color_pattern_indicators(); + } + return false; + default: + if (record->event.pressed){ + uint8_t led_id = ktli(keycode); + if(led_id){ + for(int i = 0; i < KEY_STROKES_LENGTH; ++i){ + if(!KEY_STROKES[i].alive){ + KEY_STROKES[i].alive = 1; + KEY_STROKES[i].led_id = led_id; + KEY_STROKES[i].time = timer_read32(); + break; + } + } + } + } + return true; //Process all other keycodes normally + } +} From 77399bfe515f4dde5cb6c08dbc466ac1aa77cda3 Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Thu, 17 Jan 2019 19:23:01 -0600 Subject: [PATCH 135/458] MacOS Brightness Alias (#4836) * Added aliases for OSX brightness * Updated docs for alises * Moved aliases, added docs to Brightness section * Update docs/keycodes.md Co-Authored-By: germ * Update docs/keycodes.md Co-Authored-By: germ * Update keycode.h * Update keycode.h * Update keycodes.md * Update docs/keycodes.md Co-Authored-By: germ --- docs/keycodes.md | 8 ++++---- tmk_core/common/keycode.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 6f28bbb97aaa..a98d1096be6e 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -77,8 +77,8 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_F11` | |F11 | |`KC_F12` | |F12 | |`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK` |Pause | +|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS) | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | |`KC_INSERT` |`KC_INS` |Insert | |`KC_HOME` | |Home | |`KC_PGUP` | |Page Up | @@ -203,8 +203,8 @@ This is a reference only. Each group of keys links to the page documenting their |`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites (Windows) | |`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) | |`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) | -|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up | -|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down | +|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up (macOS: use `KC_BRMU`) | +|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down (macOS: use `KC_BRMD`) | ## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes) diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index ac3edbd21526..3e312b82921a 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -174,6 +174,10 @@ along with this program. If not, see . #define KC_BRIU KC_BRIGHTNESS_UP #define KC_BRID KC_BRIGHTNESS_DOWN +/* System Specific */ +#define KC_BRMU KC_SCROLLLOCK +#define KC_BRMD KC_PAUSE + /* Mouse Keys */ #define KC_MS_U KC_MS_UP #define KC_MS_D KC_MS_DOWN From 94ba2e5a9f9c01b015b447554bfee99f5bcee032 Mon Sep 17 00:00:00 2001 From: DidierLoiseau Date: Fri, 18 Jan 2019 02:28:33 +0100 Subject: [PATCH 136/458] Defined IS_(HOST_)LED_ON/OFF() and improved LED documentation (#4853) * Defined IS_(HOST_)LED_ON/OFF() and improved LED documentation * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau * Integrated @drashna and @fauxpark's PR comments - changed all plurals of "LED" to "LEDs" in the file - rewording of the note about host_keyboard_leds() vs. led_set_user() * Update docs/custom_quantum_functions.md Co-Authored-By: DidierLoiseau --- docs/custom_quantum_functions.md | 54 +++++++++++++++++++++++++++----- tmk_core/common/host.h | 6 ++++ 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 5b95450f2670..3397bf2d4feb 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -90,7 +90,7 @@ keyrecord_t record { # LED Control -This allows you to control the 5 LED's defined as part of the USB Keyboard spec. It will be called when the state of one of those 5 LEDs changes. +QMK provides methods to read the 5 LEDs defined as part of the HID spec: * `USB_LED_NUM_LOCK` * `USB_LED_CAPS_LOCK` @@ -98,31 +98,46 @@ This allows you to control the 5 LED's defined as part of the USB Keyboard spec. * `USB_LED_COMPOSE` * `USB_LED_KANA` +These five constants correspond to the positional bits of the host LED state. +There are two ways to get the host LED state: + +* by implementing `led_set_user()` +* by calling `host_keyboard_leds()` + +## `led_set_user()` + +This function will be called when the state of one of those 5 LEDs changes. +It receives the LED state as parameter. +Use the `IS_LED_ON(USB_LED, LED_NAME)` and `IS_LED_OFF(USB_LED, LED_NAME)` +macros to check the LED status. + +!> `host_keyboard_leds()` may already reflect a new value before `led_set_user()` is called. + ### Example `led_set_user()` Implementation ```c void led_set_user(uint8_t usb_led) { - if (usb_led & (1< Date: Fri, 18 Jan 2019 02:51:04 +0100 Subject: [PATCH 137/458] Allows Terminal to use ModTap/LayerTap keys (#4586) * fixes #4583 * #4583 - terminal also handles layer tap now --- quantum/process_keycode/process_terminal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c index 6998639f206c..e791deffc10b 100644 --- a/quantum/process_keycode/process_terminal.c +++ b/quantum/process_keycode/process_terminal.c @@ -273,11 +273,17 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { disable_terminal(); return false; } + + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + keycode = keycode & 0xFF; + } + if (keycode < 256) { uint8_t str_len; char char_to_add; switch (keycode) { case KC_ENTER: + case KC_KP_ENTER: push_to_cmd_buffer(); current_cmd_buffer_pos = 0; process_terminal_command(); From db8d68acdcdb009fc2a9d773a7d2c07992a46933 Mon Sep 17 00:00:00 2001 From: Jordi Pakey-Rodriguez Date: Sat, 15 Dec 2018 21:15:56 -0600 Subject: [PATCH 138/458] Add Planck rev1 and rev2, clean up rev3-5 config.h --- keyboards/planck/rev1/config.h | 3 +++ keyboards/planck/rev1/rules.mk | 1 + keyboards/planck/rev2/config.h | 3 +++ keyboards/planck/rev2/rules.mk | 1 + keyboards/planck/rev3/config.h | 7 +------ keyboards/planck/rev4/config.h | 7 +------ keyboards/planck/rev5/config.h | 7 +------ 7 files changed, 11 insertions(+), 18 deletions(-) create mode 100644 keyboards/planck/rev1/config.h create mode 100644 keyboards/planck/rev1/rules.mk create mode 100644 keyboards/planck/rev2/config.h create mode 100644 keyboards/planck/rev2/rules.mk diff --git a/keyboards/planck/rev1/config.h b/keyboards/planck/rev1/config.h new file mode 100644 index 000000000000..397887a73f39 --- /dev/null +++ b/keyboards/planck/rev1/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DEVICE_VER 0x0001 diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk new file mode 100644 index 000000000000..e51af55c6686 --- /dev/null +++ b/keyboards/planck/rev1/rules.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/planck/rev2/config.h b/keyboards/planck/rev2/config.h new file mode 100644 index 000000000000..bed78bca3f0a --- /dev/null +++ b/keyboards/planck/rev2/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define DEVICE_VER 0x0002 diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk new file mode 100644 index 000000000000..e51af55c6686 --- /dev/null +++ b/keyboards/planck/rev2/rules.mk @@ -0,0 +1 @@ +AUDIO_ENABLE = no # Audio output on port C6 diff --git a/keyboards/planck/rev3/config.h b/keyboards/planck/rev3/config.h index 45e60962ba5e..fd6f0460e56d 100644 --- a/keyboards/planck/rev3/config.h +++ b/keyboards/planck/rev3/config.h @@ -1,8 +1,3 @@ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H - -#include "config_common.h" +#pragma once #define DEVICE_VER 0x0003 - -#endif diff --git a/keyboards/planck/rev4/config.h b/keyboards/planck/rev4/config.h index 4ff7649fb585..572852bbf0cf 100644 --- a/keyboards/planck/rev4/config.h +++ b/keyboards/planck/rev4/config.h @@ -1,8 +1,3 @@ -#ifndef REV4_CONFIG_H -#define REV4_CONFIG_H - -#include "config_common.h" +#pragma once #define DEVICE_VER 0x0004 - -#endif \ No newline at end of file diff --git a/keyboards/planck/rev5/config.h b/keyboards/planck/rev5/config.h index 696eda73bce6..93692207805a 100644 --- a/keyboards/planck/rev5/config.h +++ b/keyboards/planck/rev5/config.h @@ -1,8 +1,3 @@ -#ifndef REV5_CONFIG_H -#define REV5_CONFIG_H - -#include "config_common.h" +#pragma once #define DEVICE_VER 0x0005 - -#endif \ No newline at end of file From ade6f8e71a065efe8f30bb5fa42ac398b9aa6e78 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 17 Jan 2019 18:19:09 -0800 Subject: [PATCH 139/458] [Keyboard] update VENDOR_ID, PRODUCT_ID, and DEVICE_VER for Duck boards (#4612) * change VENDOR_ID, PRODUCT_ID, and DEVICE_VER as step one in getting VIA support * fix v1 product id * VIA doesn't use the version, so we need to encode it into PRODUCT_ID --- keyboards/duck/eagle_viper/v2/config.h | 6 +++--- keyboards/duck/jetfire/config.h | 6 +++--- keyboards/duck/lightsaver/config.h | 4 ++-- keyboards/duck/octagon/v1/config.h | 6 +++--- keyboards/duck/octagon/v2/config.h | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h index f04b4a0fd30e..9c49344ff9f2 100644 --- a/keyboards/duck/eagle_viper/v2/config.h +++ b/keyboards/duck/eagle_viper/v2/config.h @@ -21,9 +21,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4556 // Eagle/Viper ("EV") +#define DEVICE_VER 0x0002 #define MANUFACTURER Duck #define PRODUCT Eagle/Viper V2 #define DESCRIPTION 60% Korean custom keyboard diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index 80b531fd527d..54c5321c6bdc 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -20,9 +20,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4A46 // Jetfire ("JF") +#define DEVICE_VER 0x0001 #define MANUFACTURER Duck #define PRODUCT Jetfire #define DESCRIPTION A custom keyboard diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h index bc984c7e56f5..745af4330d29 100644 --- a/keyboards/duck/lightsaver/config.h +++ b/keyboards/duck/lightsaver/config.h @@ -21,8 +21,8 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1337 +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4C53 // Lightsaver ("LS") #define DEVICE_VER 0x0003 #define MANUFACTURER Duck #define PRODUCT Lightsaver V3 diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h index fbbc8999bb71..a2b3d641305d 100644 --- a/keyboards/duck/octagon/v1/config.h +++ b/keyboards/duck/octagon/v1/config.h @@ -21,9 +21,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4F31 // Octagon V1 ("O1") +#define DEVICE_VER 0x0001 #define MANUFACTURER Duck #define PRODUCT Octagon V1 #define DESCRIPTION Duck Octagon V1 diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h index c916a30a1e96..7adcb2760a81 100644 --- a/keyboards/duck/octagon/v2/config.h +++ b/keyboards/duck/octagon/v2/config.h @@ -21,9 +21,9 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 +#define VENDOR_ID 0x444B // Duck ("DK") +#define PRODUCT_ID 0x4F32 // Octagon V2 ("O2") +#define DEVICE_VER 0x0002 #define MANUFACTURER Duck #define PRODUCT Octagon V2 #define DESCRIPTION Duck Octagon V2 From ba05f9667b9e33c49249fd456f11e652cbde574b Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 18 Jan 2019 12:54:39 +1100 Subject: [PATCH 140/458] Add new brightness aliases to keycodes_basic.md --- docs/keycodes.md | 402 ++++++++++++++++++++--------------------- docs/keycodes_basic.md | 100 +++++----- 2 files changed, 249 insertions(+), 253 deletions(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index a98d1096be6e..165c3c4d169c 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -6,205 +6,205 @@ This is a reference only. Each group of keys links to the page documenting their ## [Basic Keycodes](keycodes_basic.md) -|Key |Aliases |Description | -|-----------------------|--------------------|-----------------------------------------------| -|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) | -|`KC_TRANSPARENT` |`KC_TRNS`, `_______`|Use the next lowest non-transparent key | -|`KC_A` | |`a` and `A` | -|`KC_B` | |`b` and `B` | -|`KC_C` | |`c` and `C` | -|`KC_D` | |`d` and `D` | -|`KC_E` | |`e` and `E` | -|`KC_F` | |`f` and `F` | -|`KC_G` | |`g` and `G` | -|`KC_H` | |`h` and `H` | -|`KC_I` | |`i` and `I` | -|`KC_J` | |`j` and `J` | -|`KC_K` | |`k` and `K` | -|`KC_L` | |`l` and `L` | -|`KC_M` | |`m` and `M` | -|`KC_N` | |`n` and `N` | -|`KC_O` | |`o` and `O` | -|`KC_P` | |`p` and `P` | -|`KC_Q` | |`q` and `Q` | -|`KC_R` | |`r` and `R` | -|`KC_S` | |`s` and `S` | -|`KC_T` | |`t` and `T` | -|`KC_U` | |`u` and `U` | -|`KC_V` | |`v` and `V` | -|`KC_W` | |`w` and `W` | -|`KC_X` | |`x` and `X` | -|`KC_Y` | |`y` and `Y` | -|`KC_Z` | |`z` and `Z` | -|`KC_1` | |`1` and `!` | -|`KC_2` | |`2` and `@` | -|`KC_3` | |`3` and `#` | -|`KC_4` | |`4` and `$` | -|`KC_5` | |`5` and `%` | -|`KC_6` | |`6` and `^` | -|`KC_7` | |`7` and `&` | -|`KC_8` | |`8` and `*` | -|`KC_9` | |`9` and `(` | -|`KC_0` | |`0` and `)` | -|`KC_ENTER` |`KC_ENT` |Return (Enter) | -|`KC_ESCAPE` |`KC_ESC` |Escape | -|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | -|`KC_TAB` | |Tab | -|`KC_SPACE` |`KC_SPC` |Spacebar | -|`KC_MINUS` |`KC_MINS` |`-` and `_` | -|`KC_EQUAL` |`KC_EQL` |`=` and `+` | -|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | -|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and | | -|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | -|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |` and `~`, JIS Zenkaku/Hankaku| -|`KC_COMMA` |`KC_COMM` |`,` and `<` | -|`KC_DOT` | |`.` and `>` | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | -|`KC_F1` | |F1 | -|`KC_F2` | |F2 | -|`KC_F3` | |F3 | -|`KC_F4` | |F4 | -|`KC_F5` | |F5 | -|`KC_F6` | |F6 | -|`KC_F7` | |F7 | -|`KC_F8` | |F8 | -|`KC_F9` | |F9 | -|`KC_F10` | |F10 | -|`KC_F11` | |F11 | -|`KC_F12` | |F12 | -|`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS) | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | -|`KC_INSERT` |`KC_INS` |Insert | -|`KC_HOME` | |Home | -|`KC_PGUP` | |Page Up | -|`KC_DELETE` |`KC_DEL` |Forward Delete | -|`KC_END` | |End | -|`KC_PGDOWN` |`KC_PGDN` |Page Down | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow | -|`KC_LEFT` | |Left Arrow | -|`KC_DOWN` | |Down Arrow | -|`KC_UP` | |Up Arrow | -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | -|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` | -|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` | -|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` | -|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` | -|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter | -|`KC_KP_1` |`KC_P1` |Keypad `1` and End | -|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow | -|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down | -|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow | -|`KC_KP_5` |`KC_P5` |Keypad `5` | -|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow | -|`KC_KP_7` |`KC_P7` |Keypad `7` and Home | -|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow | -|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up | -|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert | -|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete | -|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and | | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | -|`KC_POWER` | |System Power (macOS) | -|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` | -|`KC_F13` | |F13 | -|`KC_F14` | |F14 | -|`KC_F15` | |F15 | -|`KC_F16` | |F16 | -|`KC_F17` | |F17 | -|`KC_F18` | |F18 | -|`KC_F19` | |F19 | -|`KC_F20` | |F20 | -|`KC_F21` | |F21 | -|`KC_F22` | |F22 | -|`KC_F23` | |F23 | -|`KC_F24` | |F24 | -|`KC_EXECUTE` |`KC_EXEC` |Execute | -|`KC_HELP` | |Help | -|`KC_MENU` | |Menu | -|`KC_SELECT` |`KC_SLCT` |Select | -|`KC_STOP` | |Stop | -|`KC_AGAIN` |`KC_AGIN` |Again | -|`KC_UNDO` | |Undo | -|`KC_CUT` | |Cut | -|`KC_COPY` | |Copy | -|`KC_PASTE` |`KC_PSTE` |Paste | -|`KC_FIND` | |Find | -|`KC__MUTE` | |Mute (macOS) | -|`KC__VOLUP` | |Volume Up (macOS) | -|`KC__VOLDOWN` | |Volume Down (macOS) | -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | -|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock | -|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | -|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | -|`KC_INT1` |`KC_RO` |JIS `\` and `_` | -|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana | -|`KC_INT3` |`KC_JYEN` |JIS `¥` and | | -|`KC_INT4` |`KC_HENK` |JIS Henkan | -|`KC_INT5` |`KC_MHEN` |JIS Muhenkan | -|`KC_INT6` | |JIS Numpad `,` | -|`KC_INT7` | |International 7 | -|`KC_INT8` | |International 8 | -|`KC_INT9` | |International 9 | -|`KC_LANG1` |`KC_HAEN` |Hangul/English | -|`KC_LANG2` |`KC_HANJ` |Hanja | -|`KC_LANG3` | |JIS Katakana | -|`KC_LANG4` | |JIS Hiragana | -|`KC_LANG5` | |JIS Zenkaku/Hankaku | -|`KC_LANG6` | |Language 6 | -|`KC_LANG7` | |Language 7 | -|`KC_LANG8` | |Language 8 | -|`KC_LANG9` | |Language 9 | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | -|`KC_SYSREQ` | |SysReq/Attention | -|`KC_CANCEL` | |Cancel | -|`KC_CLEAR` |`KC_CLR` |Clear | -|`KC_PRIOR` | |Prior | -|`KC_RETURN` | |Return | -|`KC_SEPARATOR` | |Separator | -|`KC_OUT` | |Out | -|`KC_OPER` | |Oper | -|`KC_CLEAR_AGAIN` | |Clear/Again | -|`KC_CRSEL` | |CrSel/Props | -|`KC_EXSEL` | |ExSel | -|`KC_LCTRL` |`KC_LCTL` |Left Control | -|`KC_LSHIFT` |`KC_LSFT` |Left Shift | -|`KC_LALT` | |Left Alt | -|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | -|`KC_RCTRL` |`KC_RCTL` |Right Control | -|`KC_RSHIFT` |`KC_RSFT` |Right Shift | -|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) | -|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) | -|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down | -|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep | -|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | -|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute | -|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up | -|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) | -|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track (Windows) | -|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | -|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player (Windows) | -|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject (macOS) | -|`KC_MAIL` | |Launch Mail (Windows) | -|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator (Windows) | -|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer (Windows) | -|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search (Windows) | -|`KC_WWW_HOME` |`KC_WHOM` |Browser Home (Windows) | -|`KC_WWW_BACK` |`KC_WBAK` |Browser Back (Windows) | -|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward (Windows) | -|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop (Windows) | -|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh (Windows) | -|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites (Windows) | -|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) | -|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) | -|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up (macOS: use `KC_BRMU`) | -|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down (macOS: use `KC_BRMD`) | +|Key |Aliases |Description | +|-----------------------|------------------------------|-----------------------------------------------| +|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) | +|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key | +|`KC_A` | |`a` and `A` | +|`KC_B` | |`b` and `B` | +|`KC_C` | |`c` and `C` | +|`KC_D` | |`d` and `D` | +|`KC_E` | |`e` and `E` | +|`KC_F` | |`f` and `F` | +|`KC_G` | |`g` and `G` | +|`KC_H` | |`h` and `H` | +|`KC_I` | |`i` and `I` | +|`KC_J` | |`j` and `J` | +|`KC_K` | |`k` and `K` | +|`KC_L` | |`l` and `L` | +|`KC_M` | |`m` and `M` | +|`KC_N` | |`n` and `N` | +|`KC_O` | |`o` and `O` | +|`KC_P` | |`p` and `P` | +|`KC_Q` | |`q` and `Q` | +|`KC_R` | |`r` and `R` | +|`KC_S` | |`s` and `S` | +|`KC_T` | |`t` and `T` | +|`KC_U` | |`u` and `U` | +|`KC_V` | |`v` and `V` | +|`KC_W` | |`w` and `W` | +|`KC_X` | |`x` and `X` | +|`KC_Y` | |`y` and `Y` | +|`KC_Z` | |`z` and `Z` | +|`KC_1` | |`1` and `!` | +|`KC_2` | |`2` and `@` | +|`KC_3` | |`3` and `#` | +|`KC_4` | |`4` and `$` | +|`KC_5` | |`5` and `%` | +|`KC_6` | |`6` and `^` | +|`KC_7` | |`7` and `&` | +|`KC_8` | |`8` and `*` | +|`KC_9` | |`9` and `(` | +|`KC_0` | |`0` and `)` | +|`KC_ENTER` |`KC_ENT` |Return (Enter) | +|`KC_ESCAPE` |`KC_ESC` |Escape | +|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | +|`KC_TAB` | |Tab | +|`KC_SPACE` |`KC_SPC` |Spacebar | +|`KC_MINUS` |`KC_MINS` |`-` and `_` | +|`KC_EQUAL` |`KC_EQL` |`=` and `+` | +|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | +|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | +|`KC_BSLASH` |`KC_BSLS` |`\` and | | +|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | +|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | +|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | +|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |` and `~`, JIS Zenkaku/Hankaku| +|`KC_COMMA` |`KC_COMM` |`,` and `<` | +|`KC_DOT` | |`.` and `>` | +|`KC_SLASH` |`KC_SLSH` |`/` and `?` | +|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock | +|`KC_F1` | |F1 | +|`KC_F2` | |F2 | +|`KC_F3` | |F3 | +|`KC_F4` | |F4 | +|`KC_F5` | |F5 | +|`KC_F6` | |F6 | +|`KC_F7` | |F7 | +|`KC_F8` | |F8 | +|`KC_F9` | |F9 | +|`KC_F10` | |F10 | +|`KC_F11` | |F11 | +|`KC_F12` | |F12 | +|`KC_PSCREEN` |`KC_PSCR` |Print Screen | +|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | +|`KC_INSERT` |`KC_INS` |Insert | +|`KC_HOME` | |Home | +|`KC_PGUP` | |Page Up | +|`KC_DELETE` |`KC_DEL` |Forward Delete | +|`KC_END` | |End | +|`KC_PGDOWN` |`KC_PGDN` |Page Down | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow | +|`KC_LEFT` | |Left Arrow | +|`KC_DOWN` | |Down Arrow | +|`KC_UP` | |Up Arrow | +|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | +|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` | +|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` | +|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` | +|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` | +|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter | +|`KC_KP_1` |`KC_P1` |Keypad `1` and End | +|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow | +|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down | +|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow | +|`KC_KP_5` |`KC_P5` |Keypad `5` | +|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow | +|`KC_KP_7` |`KC_P7` |Keypad `7` and Home | +|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow | +|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up | +|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert | +|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete | +|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and | | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key) | +|`KC_POWER` | |System Power (macOS) | +|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` | +|`KC_F13` | |F13 | +|`KC_F14` | |F14 | +|`KC_F15` | |F15 | +|`KC_F16` | |F16 | +|`KC_F17` | |F17 | +|`KC_F18` | |F18 | +|`KC_F19` | |F19 | +|`KC_F20` | |F20 | +|`KC_F21` | |F21 | +|`KC_F22` | |F22 | +|`KC_F23` | |F23 | +|`KC_F24` | |F24 | +|`KC_EXECUTE` |`KC_EXEC` |Execute | +|`KC_HELP` | |Help | +|`KC_MENU` | |Menu | +|`KC_SELECT` |`KC_SLCT` |Select | +|`KC_STOP` | |Stop | +|`KC_AGAIN` |`KC_AGIN` |Again | +|`KC_UNDO` | |Undo | +|`KC_CUT` | |Cut | +|`KC_COPY` | |Copy | +|`KC_PASTE` |`KC_PSTE` |Paste | +|`KC_FIND` | |Find | +|`KC__MUTE` | |Mute (macOS) | +|`KC__VOLUP` | |Volume Up (macOS) | +|`KC__VOLDOWN` | |Volume Down (macOS) | +|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | +|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | +|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock | +|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | +|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | +|`KC_INT1` |`KC_RO` |JIS `\` and `_` | +|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana | +|`KC_INT3` |`KC_JYEN` |JIS `¥` and | | +|`KC_INT4` |`KC_HENK` |JIS Henkan | +|`KC_INT5` |`KC_MHEN` |JIS Muhenkan | +|`KC_INT6` | |JIS Numpad `,` | +|`KC_INT7` | |International 7 | +|`KC_INT8` | |International 8 | +|`KC_INT9` | |International 9 | +|`KC_LANG1` |`KC_HAEN` |Hangul/English | +|`KC_LANG2` |`KC_HANJ` |Hanja | +|`KC_LANG3` | |JIS Katakana | +|`KC_LANG4` | |JIS Hiragana | +|`KC_LANG5` | |JIS Zenkaku/Hankaku | +|`KC_LANG6` | |Language 6 | +|`KC_LANG7` | |Language 7 | +|`KC_LANG8` | |Language 8 | +|`KC_LANG9` | |Language 9 | +|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | +|`KC_SYSREQ` | |SysReq/Attention | +|`KC_CANCEL` | |Cancel | +|`KC_CLEAR` |`KC_CLR` |Clear | +|`KC_PRIOR` | |Prior | +|`KC_RETURN` | |Return | +|`KC_SEPARATOR` | |Separator | +|`KC_OUT` | |Out | +|`KC_OPER` | |Oper | +|`KC_CLEAR_AGAIN` | |Clear/Again | +|`KC_CRSEL` | |CrSel/Props | +|`KC_EXSEL` | |ExSel | +|`KC_LCTRL` |`KC_LCTL` |Left Control | +|`KC_LSHIFT` |`KC_LSFT` |Left Shift | +|`KC_LALT` | |Left Alt | +|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) | +|`KC_RCTRL` |`KC_RCTL` |Right Control | +|`KC_RSHIFT` |`KC_RSFT` |Right Shift | +|`KC_RALT` |`KC_ALGR` |Right Alt (AltGr) | +|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) | +|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down | +|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep | +|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | +|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute | +|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up | +|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track (Windows) | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track (Windows) | +|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track (Windows) | +|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track | +|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player (Windows) | +|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject (macOS) | +|`KC_MAIL` | |Launch Mail (Windows) | +|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator (Windows) | +|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer (Windows) | +|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search (Windows) | +|`KC_WWW_HOME` |`KC_WHOM` |Browser Home (Windows) | +|`KC_WWW_BACK` |`KC_WBAK` |Browser Back (Windows) | +|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward (Windows) | +|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop (Windows) | +|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh (Windows) | +|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites (Windows) | +|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track (macOS) | +|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track (macOS) | +|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up | +|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down | ## [Quantum Keycodes](quantum_keycodes.md#qmk-keycodes) @@ -238,8 +238,6 @@ This is a reference only. Each group of keys links to the page documenting their |`MU_TOG` | |Toggles Music Mode | |`MU_MOD` | |Cycles through the music modes | - - ## [Backlighting](feature_backlight.md) |Key |Description | @@ -285,7 +283,6 @@ This is a reference only. Each group of keys links to the page documenting their |`OUT_USB` |USB only | |`OUT_BT` |Bluetooth only | - ## [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) |Key |Description | @@ -439,7 +436,6 @@ This is a reference only. Each group of keys links to the page documenting their |`OSM(mod)` |Hold `mod` for one keypress | |`OSL(layer)`|Switch to `layer` for one keypress| - ## [Swap Hands](feature_swap_hands.md) |Key |Description | diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index cba876d346a9..6f21cabd2a64 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -97,14 +97,14 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 ## Lock Keys -|Key |Aliases |Description | -|-------------------|--------------------|-------------------------| -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | -|`KC_SCROLLLOCK` |`KC_SLCK` |Scroll Lock | -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear| -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | -|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock | +|Key |Aliases |Description | +|-------------------|--------------------|------------------------------------| +|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | +|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| +|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | +|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | +|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | +|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock | ## Modifiers @@ -144,48 +144,48 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 ## Commands -|Key |Aliases |Description | -|------------------|-------------------|------------------------------| -|`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`|Pause | -|`KC_INSERT` |`KC_INS` |Insert | -|`KC_HOME` | |Home | -|`KC_PGUP` | |Page Up | -|`KC_DELETE` |`KC_DEL` |Forward Delete | -|`KC_END` | |End | -|`KC_PGDOWN` |`KC_PGDN` |Page Down | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow | -|`KC_LEFT` | |Left Arrow | -|`KC_DOWN` | |Down Arrow | -|`KC_UP` | |Up Arrow | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key)| -|`KC_POWER` | |System Power (macOS/Linux) | -|`KC_EXECUTE` |`KC_EXEC` |Execute | -|`KC_HELP` | |Help | -|`KC_MENU` | |Menu | -|`KC_SELECT` |`KC_SLCT` |Select | -|`KC_STOP` | |Stop | -|`KC_AGAIN` |`KC_AGIN` |Again | -|`KC_UNDO` | |Undo | -|`KC_CUT` | |Cut | -|`KC_COPY` | |Copy | -|`KC_PASTE` |`KC_PSTE` |Paste | -|`KC_FIND` | |Find | -|`KC__MUTE` | |Mute (macOS) | -|`KC__VOLUP` | |Volume Up (macOS) | -|`KC__VOLDOWN` | |Volume Down (macOS) | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | -|`KC_SYSREQ` | |SysReq/Attention | -|`KC_CANCEL` | |Cancel | -|`KC_CLEAR` |`KC_CLR` |Clear | -|`KC_PRIOR` | |Prior | -|`KC_RETURN` | |Return | -|`KC_SEPARATOR` | |Separator | -|`KC_OUT` | |Out | -|`KC_OPER` | |Oper | -|`KC_CLEAR_AGAIN` | |Clear/Again | -|`KC_CRSEL` | |CrSel/Props | -|`KC_EXSEL` | |ExSel | +|Key |Aliases |Description | +|------------------|------------------------------|------------------------------| +|`KC_PSCREEN` |`KC_PSCR` |Print Screen | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | +|`KC_INSERT` |`KC_INS` |Insert | +|`KC_HOME` | |Home | +|`KC_PGUP` | |Page Up | +|`KC_DELETE` |`KC_DEL` |Forward Delete | +|`KC_END` | |End | +|`KC_PGDOWN` |`KC_PGDN` |Page Down | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow | +|`KC_LEFT` | |Left Arrow | +|`KC_DOWN` | |Down Arrow | +|`KC_UP` | |Up Arrow | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key)| +|`KC_POWER` | |System Power (macOS/Linux) | +|`KC_EXECUTE` |`KC_EXEC` |Execute | +|`KC_HELP` | |Help | +|`KC_MENU` | |Menu | +|`KC_SELECT` |`KC_SLCT` |Select | +|`KC_STOP` | |Stop | +|`KC_AGAIN` |`KC_AGIN` |Again | +|`KC_UNDO` | |Undo | +|`KC_CUT` | |Cut | +|`KC_COPY` | |Copy | +|`KC_PASTE` |`KC_PSTE` |Paste | +|`KC_FIND` | |Find | +|`KC__MUTE` | |Mute (macOS) | +|`KC__VOLUP` | |Volume Up (macOS) | +|`KC__VOLDOWN` | |Volume Down (macOS) | +|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | +|`KC_SYSREQ` | |SysReq/Attention | +|`KC_CANCEL` | |Cancel | +|`KC_CLEAR` |`KC_CLR` |Clear | +|`KC_PRIOR` | |Prior | +|`KC_RETURN` | |Return | +|`KC_SEPARATOR` | |Separator | +|`KC_OUT` | |Out | +|`KC_OPER` | |Oper | +|`KC_CLEAR_AGAIN` | |Clear/Again | +|`KC_CRSEL` | |CrSel/Props | +|`KC_EXSEL` | |ExSel | ## Media Keys From 0ebec1e41124b04d36e32461947539ffd0eb54ac Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Thu, 17 Jan 2019 21:07:54 -0800 Subject: [PATCH 141/458] handwired/ortho5x13: layout macro refactor Discovered the LAYOUT_compact macro didn't compile in QMK Configurator. Realized the reason for that was that it automatically prepends `KC_` to every keycode received. Renamed the macro to LAYOUT_kc so Configurator will ignore it. Also changed the file to use the #pragma once include guard because I was in here anyway. --- keyboards/handwired/ortho5x13/ortho5x13.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/ortho5x13/ortho5x13.h b/keyboards/handwired/ortho5x13/ortho5x13.h index 93551bd70b2d..a43fc76ae6ec 100644 --- a/keyboards/handwired/ortho5x13/ortho5x13.h +++ b/keyboards/handwired/ortho5x13/ortho5x13.h @@ -1,5 +1,4 @@ -#ifndef ORTHO5X13_H -#define ORTHO5X13_H +#pragma once #include "quantum.h" @@ -18,7 +17,7 @@ { k40, k41, k42, k43, k44, k45, KC_NO, k47, k48, k49, k4a, k4b, k4c } \ } -#define LAYOUT_compact( \ +#define LAYOUT_kc( \ 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, \ @@ -32,5 +31,3 @@ { KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k35, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b, KC_##k3c }, \ { KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_NO, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c } \ } - -#endif \ No newline at end of file From 3c26f07f5a0452f5a43fc8797dba1c9dc01152f7 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 17 Jan 2019 22:13:09 -0800 Subject: [PATCH 142/458] Grammatical fixes for GPIO Control doc (#4869) * Grammatical fixes for GPIO Control doc I found the Advanced Settings section to be poorly written. * Commit suggestions from fauxpark * Change first instance of "microcontroller" to match suggestion --- docs/internals_gpio_control.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/internals_gpio_control.md b/docs/internals_gpio_control.md index 083e696648f6..51a549f1c9b8 100644 --- a/docs/internals_gpio_control.md +++ b/docs/internals_gpio_control.md @@ -1,6 +1,6 @@ # GPIO Control -QMK has a GPIO control abstraction layer which is micro-controller agnostic. This is done to allow easy access to pin control across different platforms. +QMK has a GPIO control abstraction layer which is microcontroller agnostic. This is done to allow easy access to pin control across different platforms. ## Functions @@ -17,7 +17,7 @@ The following functions can provide basic control of GPIOs and are found in `qua |`writePin(pin, level)`|Set pin level, assuming it is an output | |`readPin(pin)` |Returns the level of the pin | -## Advance settings +## Advanced Settings -Each micro-controller can have multiple advance settings regarding its GPIO. This abstraction layer does not limit the use of architecture specific functions. Advance users should consult the datasheet of there desired device and include any needed libraries. For AVR the standard avr/io.h library is used and for STM32 the Chibios [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used. +Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used. From 1d0bc5b7bad2c692cb0d7359d2b5506893e7eeca Mon Sep 17 00:00:00 2001 From: Junya Ogura Date: Fri, 18 Jan 2019 12:54:40 +0900 Subject: [PATCH 143/458] Flip definitions of macOS brightness alias Before: KC_BRMU - Brightness Down KC_BRMD - Brightness Up After: KC_BRMU - Brightness Up KC_BRMD - Brightness Down --- tmk_core/common/keycode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index 3e312b82921a..fd975dd6ad10 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -175,8 +175,8 @@ along with this program. If not, see . #define KC_BRID KC_BRIGHTNESS_DOWN /* System Specific */ -#define KC_BRMU KC_SCROLLLOCK -#define KC_BRMD KC_PAUSE +#define KC_BRMU KC_PAUSE +#define KC_BRMD KC_SCROLLLOCK /* Mouse Keys */ #define KC_MS_U KC_MS_UP From 81c1bad7c0b8364eccf21a7247a5338447fd5c03 Mon Sep 17 00:00:00 2001 From: WillyPillow Date: Fri, 18 Jan 2019 14:46:11 +0800 Subject: [PATCH 144/458] [Keyboard] Fix bootloader size for v60_type_r (#4873) --- keyboards/v60_type_r/rules.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index 30038d5624f4..7a1340a1aca7 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -39,13 +39,14 @@ F_USB = $(F_CPU) 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 +# 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 From fa583e9c6045003790701067b719417d77d76935 Mon Sep 17 00:00:00 2001 From: Kenny Hung Date: Fri, 18 Jan 2019 15:30:41 +0000 Subject: [PATCH 145/458] Add cursor keys to top layer (#4876) --- keyboards/xd75/keymaps/skewwhiffy/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/xd75/keymaps/skewwhiffy/keymap.c b/keyboards/xd75/keymaps/skewwhiffy/keymap.c index 33f3868084f7..ab0213862c97 100644 --- a/keyboards/xd75/keymaps/skewwhiffy/keymap.c +++ b/keyboards/xd75/keymaps/skewwhiffy/keymap.c @@ -76,18 +76,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------------------------------------------------------------------------------------------------------------------------------------| * | A | R | S | T | D | | | | | | H | N | E | I | O | * |--------------------------------------------------------------------------------------------------------------------------------------| - * | Z | X | C | V | B | | | | | | K | M | , | . | / | + * | Z | X | C | V | B | | | UP | | | K | M | , | . | / | * | SHIFT | NUMBER | SYMBOL | NAV | | | | | | | | NAV | SYMBOL | FUNC | SHIFT | * |--------------------------------------------------------------------------------------------------------------------------------------| - * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | | | | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | + * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | LEFT | DOWN | RIGHT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | * .--------------------------------------------------------------------------------------------------------------------------------------. */ [cm] = LAYOUT_ortho_5x15( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, _______, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \ UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, _______, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O , \ - _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, _______, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \ - UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, _______, _______, _______, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_UP, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH , \ + UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_LEFT, UK_DOWN, UK_RGHT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \ ), /* Dvorak From e2f7c3d5a59933519e8cf7b4d9176587334d7b70 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sat, 19 Jan 2019 00:31:35 +0900 Subject: [PATCH 146/458] Fixed the build break of helix/rev1:OLED_sample caused by PR #4462. (#4874) --- .../helix/rev1/keymaps/OLED_sample/rules.mk | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 keyboards/helix/rev1/keymaps/OLED_sample/rules.mk diff --git a/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk new file mode 100644 index 000000000000..1347d3a7daf0 --- /dev/null +++ b/keyboards/helix/rev1/keymaps/OLED_sample/rules.mk @@ -0,0 +1,20 @@ +# 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 = 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 From 12406c646f917b7451ec265d767f07a34ecf906a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 18 Jan 2019 07:32:21 -0800 Subject: [PATCH 147/458] TKC1800 refactor and Configurator visual fixes (#4870) * TKC1800: refactor - tkc1800.h - updated to use #pragma once - visual alignment - update config.h files to use #pragma once - update all keymaps to use #include QMK_KEYBOARD_H - delete redundant mod mask, KC_TRNS, and KC_NO definitions - reformat keymap layers for readability - add block comment for Function layer in default keymap - delete commented action_get_macro code blocks (deprecated function) - update files to better conform with QMK coding conventions - update smt keymap to use set_single_persistent_default_layer (instead of persistent_default_layer_set) - replace instances of `?=` with `=` in rules.mk * TKC1800: Configurator visual fixes - correct key sizes and positioning - reformat file so each physical key object has its own line for readability - update and add `label` keys for readability * TKC1800: readme update - fix image gallery link - update Hardware Supported and Hardware Availability lines - update make example (add :default suffix) - update QMK Docs links (Newbs Guide; grammar) * Add missing semicolons to smt keymap --- keyboards/tkc1800/README.md | 11 +- keyboards/tkc1800/config.h | 5 +- keyboards/tkc1800/info.json | 648 ++++----------------- keyboards/tkc1800/keymaps/default/config.h | 7 +- keyboards/tkc1800/keymaps/default/keymap.c | 118 ++-- keyboards/tkc1800/keymaps/smt/config.h | 7 +- keyboards/tkc1800/keymaps/smt/keymap.c | 135 ++--- keyboards/tkc1800/keymaps/wkl/config.h | 7 +- keyboards/tkc1800/keymaps/wkl/keymap.c | 101 ++-- keyboards/tkc1800/keymaps/yanfali/config.h | 7 +- keyboards/tkc1800/keymaps/yanfali/keymap.c | 75 ++- keyboards/tkc1800/rules.mk | 26 +- keyboards/tkc1800/tkc1800.h | 23 +- 13 files changed, 344 insertions(+), 826 deletions(-) diff --git a/keyboards/tkc1800/README.md b/keyboards/tkc1800/README.md index 4d1b8e0f24bc..e154770d72f3 100644 --- a/keyboards/tkc1800/README.md +++ b/keyboards/tkc1800/README.md @@ -1,18 +1,17 @@ The Key Company TKC1800 -=== -![TKC1800](https://imgur.com/a/Xlttp) +[TKC1800 Image Gallery](https://imgur.com/a/Xlttp) The Key Company TKC1800 is a Cherry 1800 form factor replacement PCB utilizing the AT90USB1286 microcontroller. Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) -Hardware Supported: AT90USB1286 -Hardware Availability: Via GB +Hardware Supported: TKC1800 PCB +Hardware Availability: [TheKey.Company](https://thekey.company/collections/tkc-1800) Make example for this keyboard (after setting up your build environment): - make tkc1800 + make tkc1800: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/tkc1800/config.h b/keyboards/tkc1800/config.h index b13620de3b15..92a5f1b38bd0 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/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,5 +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/tkc1800/info.json b/keyboards/tkc1800/info.json index f06a16c157a0..3e3ab1484d80 100644 --- a/keyboards/tkc1800/info.json +++ b/keyboards/tkc1800/info.json @@ -3,550 +3,118 @@ "url": "", "maintainer": "qmk", "width": 19.5, - "height": 7, + "height": 7.25, "layouts": { "LAYOUT": { "key_count": 107, "layout": [ - { - "label": "Esc", - "x": 0, - "y": 0 - }, - { - "label": "F1", - "x": 1.25, - "y": 0 - }, - { - "label": "F2", - "x": 2.25, - "y": 0 - }, - { - "label": "F3", - "x": 3.25, - "y": 0 - }, - { - "label": "F4", - "x": 4.25, - "y": 0 - }, - { - "label": "F5", - "x": 5.5, - "y": 0 - }, - { - "label": "F6", - "x": 6.5, - "y": 0 - }, - { - "label": "F7", - "x": 7.5, - "y": 0 - }, - { - "label": "F8", - "x": 8.5, - "y": 0 - }, - { - "label": "F9", - "x": 9.75, - "y": 0 - }, - { - "label": "F10", - "x": 10.75, - "y": 0 - }, - { - "label": "F11", - "x": 11.75, - "y": 0 - }, - { - "label": "F12", - "x": 12.75, - "y": 0 - }, - { - "label": "Insert", - "x": 15.5, - "y": 0 - }, - { - "label": "Home", - "x": 16.5, - "y": 0 - }, - { - "label": "Pg Up", - "x": 17.5, - "y": 0 - }, - { - "label": "Prt Sc", - "x": 18.5, - "y": 0 - }, - { - "label": "Delete", - "x": 15.5, - "y": 1 - }, - { - "label": "End", - "x": 16.5, - "y": 1 - }, - { - "label": "Pg Dn", - "x": 17.5, - "y": 1 - }, - { - "label": "Scroll Lock", - "x": 18.5, - "y": 1 - }, - { - "label": "~", - "x": 0, - "y": 2 - }, - { - "label": "!", - "x": 1, - "y": 2 - }, - { - "label": "@", - "x": 2, - "y": 2 - }, - { - "label": "#", - "x": 3, - "y": 2 - }, - { - "label": "$", - "x": 4, - "y": 2 - }, - { - "label": "%", - "x": 5, - "y": 2 - }, - { - "label": "^", - "x": 6, - "y": 2 - }, - { - "label": "&", - "x": 7, - "y": 2 - }, - { - "label": "*", - "x": 8, - "y": 2 - }, - { - "label": "(", - "x": 9, - "y": 2 - }, - { - "label": ")", - "x": 10, - "y": 2 - }, - { - "label": "_", - "x": 11, - "y": 2 - }, - { - "label": "+", - "x": 12, - "y": 2 - }, - { - "label": "Backspace", - "x": 13, - "y": 2 - }, - { - "x": 14, - "y": 2 - }, - { - "label": "Num Lock", - "x": 15.5, - "y": 2 - }, - { - "label": "/", - "x": 16.5, - "y": 2 - }, - { - "label": "*", - "x": 17.5, - "y": 2 - }, - { - "label": "-", - "x": 18.5, - "y": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 3, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 3 - }, - { - "label": "W", - "x": 2.5, - "y": 3 - }, - { - "label": "E", - "x": 3.5, - "y": 3 - }, - { - "label": "R", - "x": 4.5, - "y": 3 - }, - { - "label": "T", - "x": 5.5, - "y": 3 - }, - { - "label": "Y", - "x": 6.5, - "y": 3 - }, - { - "label": "U", - "x": 7.5, - "y": 3 - }, - { - "label": "I", - "x": 8.5, - "y": 3 - }, - { - "label": "O", - "x": 9.5, - "y": 3 - }, - { - "label": "P", - "x": 10.5, - "y": 3 - }, - { - "label": "{", - "x": 11.5, - "y": 3 - }, - { - "label": "}", - "x": 12.5, - "y": 3 - }, - { - "label": "|", - "x": 13.5, - "y": 3, - "w": 1.5 - }, - { - "label": "7", - "x": 15.5, - "y": 3 - }, - { - "label": "8", - "x": 16.5, - "y": 3 - }, - { - "label": "9", - "x": 17.5, - "y": 3 - }, - { - "label": "+", - "x": 18.5, - "y": 3 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 4, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 4 - }, - { - "label": "S", - "x": 2.75, - "y": 4 - }, - { - "label": "D", - "x": 3.75, - "y": 4 - }, - { - "label": "F", - "x": 4.75, - "y": 4 - }, - { - "label": "G", - "x": 5.75, - "y": 4 - }, - { - "label": "H", - "x": 6.75, - "y": 4 - }, - { - "label": "J", - "x": 7.75, - "y": 4 - }, - { - "label": "K", - "x": 8.75, - "y": 4 - }, - { - "label": "L", - "x": 9.75, - "y": 4 - }, - { - "label": ":", - "x": 10.75, - "y": 4 - }, - { - "label": "\"", - "x": 11.75, - "y": 4 - }, - { - "x": 12.75, - "y": 4 - }, - { - "label": "Enter", - "x": 13.75, - "y": 4, - "w": 1.25 - }, - { - "label": "4", - "x": 15.5, - "y": 4 - }, - { - "label": "5", - "x": 16.5, - "y": 4 - }, - { - "label": "6", - "x": 17.5, - "y": 4 - }, - { - "x": 18.5, - "y": 4 - }, - { - "x": 0, - "y": 5 - }, - { - "label": "Shift", - "x": 1, - "y": 5, - "w": 1.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 5 - }, - { - "label": "X", - "x": 3.25, - "y": 5 - }, - { - "label": "C", - "x": 4.25, - "y": 5 - }, - { - "label": "V", - "x": 5.25, - "y": 5 - }, - { - "label": "B", - "x": 6.25, - "y": 5 - }, - { - "label": "N", - "x": 7.25, - "y": 5 - }, - { - "label": "M", - "x": 8.25, - "y": 5 - }, - { - "label": "<", - "x": 9.25, - "y": 5 - }, - { - "label": ">", - "x": 10.25, - "y": 5 - }, - { - "label": "?", - "x": 11.25, - "y": 5 - }, - { - "label": "Shift", - "x": 12.25, - "y": 5, - "w": 1.75 - }, - { - "label": "\\u2191", - "x": 14.25, - "y": 5 - }, - { - "label": "1", - "x": 15.5, - "y": 5 - }, - { - "label": "2", - "x": 16.5, - "y": 5 - }, - { - "label": "3", - "x": 17.5, - "y": 5 - }, - { - "label": "Enter", - "x": 18.5, - "y": 5 - }, - { - "label": "Ctrl", - "x": 0, - "y": 6, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 6, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 6, - "w": 1.25 - }, - { - "x": 3.75, - "y": 6, - "w": 6.25 - }, - { - "label": "Alt", - "x": 10, - "y": 6 - }, - { - "label": "Win", - "x": 11, - "y": 6 - }, - { - "label": "Fn", - "x": 12, - "y": 6 - }, - { - "label": "\\u2190", - "x": 13.25, - "y": 6 - }, - { - "label": "\\u2193", - "x": 14.25, - "y": 6 - }, - { - "label": "\\u2192", - "x": 15.25, - "y": 6 - }, - { - "label": "0", - "x": 16.5, - "y": 6 - }, - { - "label": ".", - "x": 17.5, - "y": 6 - }, - { - "x": 18.5, - "y": 6 - } + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 1.25, "y": 0 }, + { "label": "F2", "x": 2.25, "y": 0 }, + { "label": "F3", "x": 3.25, "y": 0 }, + { "label": "F4", "x": 4.25, "y": 0 }, + { "label": "F5", "x": 5.5, "y": 0 }, + { "label": "F6", "x": 6.5, "y": 0 }, + { "label": "F7", "x": 7.5, "y": 0 }, + { "label": "F8", "x": 8.5, "y": 0 }, + { "label": "F9", "x": 9.75, "y": 0 }, + { "label": "F10", "x": 10.75, "y": 0 }, + { "label": "F11", "x": 11.75, "y": 0 }, + { "label": "F12", "x": 12.75, "y": 0 }, + { "label": "Insert", "x": 15.5, "y": 0 }, + { "label": "Home", "x": 16.5, "y": 0 }, + { "label": "Page Up", "x": 17.5, "y": 0 }, + { "label": "Print Screen", "x": 18.5, "y": 0 }, + { "label": "Delete", "x": 15.5, "y": 1 }, + { "label": "End", "x": 16.5, "y": 1 }, + { "label": "Page Down", "x": 17.5, "y": 1 }, + { "label": "Scroll Lock", "x": 18.5, "y": 1 }, + { "label": "`", "x": 0, "y": 2 }, + { "label": "1", "x": 1, "y": 2 }, + { "label": "2", "x": 2, "y": 2 }, + { "label": "3", "x": 3, "y": 2 }, + { "label": "4", "x": 4, "y": 2 }, + { "label": "5", "x": 5, "y": 2 }, + { "label": "6", "x": 6, "y": 2 }, + { "label": "7", "x": 7, "y": 2 }, + { "label": "8", "x": 8, "y": 2 }, + { "label": "9", "x": 9, "y": 2 }, + { "label": "0", "x": 10, "y": 2 }, + { "label": "-", "x": 11, "y": 2 }, + { "label": "=", "x": 12, "y": 2 }, + { "label": "Backspace", "x": 13, "y": 2 }, + { "label": "Backspace_Right", "x": 14, "y": 2 }, + { "label": "Num Lock", "x": 15.5, "y": 2 }, + { "label": "/", "x": 16.5, "y": 2 }, + { "label": "*", "x": 17.5, "y": 2 }, + { "label": "Pause", "x": 18.5, "y": 2 }, + { "label": "Tab", "x": 0, "y": 3, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 3 }, + { "label": "W", "x": 2.5, "y": 3 }, + { "label": "E", "x": 3.5, "y": 3 }, + { "label": "R", "x": 4.5, "y": 3 }, + { "label": "T", "x": 5.5, "y": 3 }, + { "label": "Y", "x": 6.5, "y": 3 }, + { "label": "U", "x": 7.5, "y": 3 }, + { "label": "I", "x": 8.5, "y": 3 }, + { "label": "O", "x": 9.5, "y": 3 }, + { "label": "P", "x": 10.5, "y": 3 }, + { "label": "[", "x": 11.5, "y": 3 }, + { "label": "]", "x": 12.5, "y": 3 }, + { "label": "\\", "x": 13.5, "y": 3, "w": 1.5 }, + { "label": "7", "x": 15.5, "y": 3 }, + { "label": "8", "x": 16.5, "y": 3 }, + { "label": "9", "x": 17.5, "y": 3 }, + { "label": "-", "x": 18.5, "y": 3 }, + { "label": "Caps Lock", "x": 0, "y": 4, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 4 }, + { "label": "S", "x": 2.75, "y": 4 }, + { "label": "D", "x": 3.75, "y": 4 }, + { "label": "F", "x": 4.75, "y": 4 }, + { "label": "G", "x": 5.75, "y": 4 }, + { "label": "H", "x": 6.75, "y": 4 }, + { "label": "J", "x": 7.75, "y": 4 }, + { "label": "K", "x": 8.75, "y": 4 }, + { "label": "L", "x": 9.75, "y": 4 }, + { "label": ";", "x": 10.75, "y": 4 }, + { "label": "'", "x": 11.75, "y": 4 }, + { "label": "ISO Hash", "x": 12.75, "y": 4 }, + { "label": "Enter", "x": 13.75, "y": 4, "w": 1.25 }, + { "label": "4", "x": 15.5, "y": 4 }, + { "label": "5", "x": 16.5, "y": 4 }, + { "label": "6", "x": 17.5, "y": 4 }, + { "label": "+", "x": 18.5, "y": 4 }, + { "label": "Shift", "x": 0, "y": 5, "w": 1.25 }, + { "label": "ISO Backslash", "x": 1.25, "y": 5 }, + { "label": "Z", "x": 2.25, "y": 5 }, + { "label": "X", "x": 3.25, "y": 5 }, + { "label": "C", "x": 4.25, "y": 5 }, + { "label": "V", "x": 5.25, "y": 5 }, + { "label": "B", "x": 6.25, "y": 5 }, + { "label": "N", "x": 7.25, "y": 5 }, + { "label": "M", "x": 8.25, "y": 5 }, + { "label": ",", "x": 9.25, "y": 5 }, + { "label": ".", "x": 10.25, "y": 5 }, + { "label": "/", "x": 11.25, "y": 5 }, + { "label": "Shift", "x": 12.25, "y": 5, "w": 1.75 }, + { "label": "Up", "x": 14.25, "y": 5.25 }, + { "label": "1", "x": 15.5, "y": 5 }, + { "label": "2", "x": 16.5, "y": 5 }, + { "label": "3", "x": 17.5, "y": 5 }, + { "label": "Enter_Top", "x": 18.5, "y": 5 }, + { "label": "Ctrl", "x": 0, "y": 6, "w": 1.25 }, + { "label": "GUI", "x": 1.25, "y": 6, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 6, "w": 1.25 }, + { "label": "Space", "x": 3.75, "y": 6, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 6 }, + { "label": "Fn", "x": 11, "y": 6 }, + { "label": "Ctrl", "x": 12, "y": 6 }, + { "label": "Left", "x": 13.25, "y": 6.25 }, + { "label": "Down", "x": 14.25, "y": 6.25 }, + { "label": "Right", "x": 15.25, "y": 6.25 }, + { "label": "0", "x": 16.5, "y": 6 }, + { "label": ".", "x": 17.5, "y": 6 }, + { "label": "Enter", "x": 18.5, "y": 6 } ] } } diff --git a/keyboards/tkc1800/keymaps/default/config.h b/keyboards/tkc1800/keymaps/default/config.h index 30973348aeec..ee142927f3ad 100644 --- a/keyboards/tkc1800/keymaps/default/config.h +++ b/keyboards/tkc1800/keymaps/default/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 #define USE_I2C #define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#endif diff --git a/keyboards/tkc1800/keymaps/default/keymap.c b/keyboards/tkc1800/keymaps/default/keymap.c index cc19de3bda97..5455934a3069 100644 --- a/keyboards/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc1800/keymaps/default/keymap.c @@ -13,25 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_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 XXXXXX KC_NO - //Layers enum { - BASE = 0, - FUNCTION, + BASE = 0, + FUNCTION, }; bool screenWorks = 0; @@ -56,61 +48,77 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------' |-------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| * |--------------------------------------------------------'----`--------------| | - * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | + * |Ctrl|Gui |Alt | Space |Alt |Fn |Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - 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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, 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, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), - [FUNCTION] = 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_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, RESET, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - 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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, BL_STEP,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + 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, 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, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), + /* Keymap FUNCTION: (Function Layer) + * ,-------------------------------------------------------. ,-------------------. + * | | | | | | | | | | | | | | | | | | | | | + * `-------------------------------------------------------' |-------------------| + * | | | | | + * ,-----------------------------------------------------------. |-------------------| + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------' |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |--------------------------------------------------------'----`--------------| | + * | | | | | | | | | | | | . | | + * `---------------------------------------------------------------------------------' + */ + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + 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; - } + #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 - #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 + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -122,17 +130,17 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; matrix_clear(&matrix); matrix_write_P(&matrix, PSTR("TKC1800")); - + uint8_t layer = biton32(layer_state); char buf[40]; @@ -148,4 +156,4 @@ void iota_gfx_task_user(void) { (host_keyboard_leds() & (1<. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define USE_I2C #define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#endif diff --git a/keyboards/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc1800/keymaps/smt/keymap.c index 6683416e3614..9f506b443b81 100644 --- a/keyboards/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc1800/keymaps/smt/keymap.c @@ -13,30 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_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)) - // 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) #define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift -// Helpful defines -#define ______ KC_TRNS -#define XXXXXX KC_NO - //Layers enum { - QWERTY = 0, - COLEMAK, - DVORAK, - FUNCTION, + QWERTY = 0, + COLEMAK, + DVORAK, + FUNCTION, }; //13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() @@ -62,15 +55,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [QWERTY] = 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_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ - CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [QWERTY] = 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_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ + CTL_ESC, 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, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), /* Keymap COLEMAK: (Colemak Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| @@ -88,15 +81,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [COLEMAK] = 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_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ - CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT,KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [COLEMAK] = 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_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ + CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, 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_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), /* Keymap DVORAK: (Dvorak Layer) Default Layer * ,-------------------------------------------------------. ,-------------------. * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| @@ -114,50 +107,43 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [DVORAK] = 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_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ - CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), - [FUNCTION] = LAYOUT( - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - ______, ______, ______, ______, ______, ______, ______, QWERTY, COLEMAK,DVORAK, ______, ______, ______, ______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, XXXXXX, ______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - ______, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, BL_STEP,______, ______, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [DVORAK] = 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_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, KC_P7, KC_P8, KC_P9, KC_PMNS, \ + CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PMNS, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, _______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - -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<event.pressed) { - persistent_default_layer_set(1UL<event.pressed) { - persistent_default_layer_set(1UL<. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define USE_I2C #define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#endif diff --git a/keyboards/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc1800/keymaps/wkl/keymap.c index e04c4d5c1772..6f331c61ccbd 100644 --- a/keyboards/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc1800/keymaps/wkl/keymap.c @@ -13,25 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_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 XXXXXX KC_NO - //Layers enum { - BASE = 0, - FUNCTION, + BASE = 0, + FUNCTION, }; bool screenWorks = 0; @@ -56,61 +48,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------' |-------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up | 1 | 2 | 3 | Ent| * |--------------------------------------------------------'----`--------------| | - * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | + * |Ctrl | Alt | Space | Fn |Ctrl |Left |Down|Rght| 0 | . | | * `---------------------------------------------------------------------------------' */ - [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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - 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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, 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, XXXXXX, \ - KC_LCTL, KC_LALT, XXXXXX, KC_SPC, XXXXXX, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), - [FUNCTION] = 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_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, RESET, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - 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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, BL_STEP,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXX, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT - ), + [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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + 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, 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, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ + ), + [FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, XXXXXXX, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + 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; - } + #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 - #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 + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -122,17 +113,17 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; matrix_clear(&matrix); matrix_write_P(&matrix, PSTR("TKC1800")); - + uint8_t layer = biton32(layer_state); char buf[40]; @@ -148,4 +139,4 @@ void iota_gfx_task_user(void) { (host_keyboard_leds() & (1<. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once //#define USE_I2C //#define SSD1306OLED @@ -25,5 +22,3 @@ #define SSD1306_ADDRESS 0x3C // place overrides here - -#endif diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc1800/keymaps/yanfali/keymap.c index 292bdb0bbaaa..8dad3446def9 100644 --- a/keyboards/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc1800/keymaps/yanfali/keymap.c @@ -13,20 +13,12 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "tkc1800.h" +#include QMK_KEYBOARD_H #include "LUFA/Drivers/Peripheral/TWI.h" #include "i2c.h" #include "ssd1306.h" -#define MODS_SHFT_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 XXXXXX KC_NO - //Layers enum { @@ -58,53 +50,52 @@ 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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - 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, \ - 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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, 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, XXXXXX, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + 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, \ + 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, 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, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT \ ), [FUNCTION] = 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_HOME, KC_PGUP, KC_PSCR, \ - KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, RESET, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ - 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, \ - 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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ - KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; -// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + 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)); - iota_gfx_init(); // turns on the display + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(); // turns on the display + #endif #endif + #ifdef AUDIO_ENABLE + startup_user(); #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif } void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif } void matrix_update(struct CharacterMatrix *dest, @@ -116,11 +107,11 @@ void matrix_update(struct CharacterMatrix *dest, } void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif struct CharacterMatrix matrix; diff --git a/keyboards/tkc1800/rules.mk b/keyboards/tkc1800/rules.mk index 56c2d4b747db..35da90d07617 100644 --- a/keyboards/tkc1800/rules.mk +++ b/keyboards/tkc1800/rules.mk @@ -51,21 +51,21 @@ OPT_DEFS += -DBOOTLOADER_SIZE=8192 # 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 +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 +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 +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 diff --git a/keyboards/tkc1800/tkc1800.h b/keyboards/tkc1800/tkc1800.h index 0a872ef88368..4d1686cf16e0 100644 --- a/keyboards/tkc1800/tkc1800.h +++ b/keyboards/tkc1800/tkc1800.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 TKC1800_H -#define TKC1800_H +#pragma once #include "quantum.h" @@ -24,16 +23,14 @@ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, 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, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4F, K4G, K4H, K4I, \ - K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ - K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ + K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5F, K5G, K5H, K5I, \ + K60, K61, K62, K65, K69, K6A, K6B, K6C, K6D, K6E, K6G, K6H, K6I \ ) { \ - { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ - { 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, K1F, K1G, K1H, K1I }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, 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, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ - { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ - { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, K6B, K6C, K6D, K6E, KC_NO, K6G, K6H, K6I } \ + { K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO, K0F, K0G, K0H, K0I }, \ + { 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, K1F, K1G, K1H, K1I }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, 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, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I }, \ + { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, KC_NO, K5F, K5G, K5H, K5I }, \ + { K60, K61, K62, KC_NO, KC_NO, K65, KC_NO, KC_NO, KC_NO, K69, K6A, K6B, K6C, K6D, K6E, KC_NO, K6G, K6H, K6I } \ } - -#endif From 52f1206712348a97b8de5700b5fc3eabe424096b Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 18 Jan 2019 07:33:43 -0800 Subject: [PATCH 148/458] Fix Encoder documentation (#4861) --- docs/feature_encoders.md | 20 ++++++++++++-------- docs/features.md | 1 + 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 208d6db13cdd..6eab402ef94f 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -32,15 +32,19 @@ The callback functions can be inserted into your `.c`: or `keymap.c`: void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - if (clockwise) { - register_code(KC_PGDN); - unregister_code(KC_PGDN); - } else { - register_code(KC_PGUP); - unregister_code(KC_PGUP); - } + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); } + } else if (index == 2) { + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } } ## Hardware diff --git a/docs/features.md b/docs/features.md index 85f4cf6e0081..9030500a2bb1 100644 --- a/docs/features.md +++ b/docs/features.md @@ -11,6 +11,7 @@ QMK has a staggering number of features for building your keyboard. It can take * [Combos](feature_combo.md) - Custom actions for multiple key holds. * [Command](feature_command.md) - Runtime version of bootmagic (Formerly known as "Magic"). * [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself. +* [Encoders](feature_encoders.md) - Rotary encoders! * [Grave Escape](feature_grave_esc.md) - Lets you use a single key for Esc and Grave. * [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard. * [Key Lock](feature_key_lock.md) - Lock a key in the "down" state. From 76afdd097abdbdfd522e9f5654d354e67b5e1218 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 18 Jan 2019 10:46:16 -0800 Subject: [PATCH 149/458] [Keyboard] handwired/ortho60 Configurator update, readme update, and rules tidy (#4877) * handwired/ortho60: Configurator update - correct labels for Up and Right keys - add layout data for LAYOUT_1x2uC * handwired/ortho60: readme update - update readme file to use QMK template * handwired/ortho60: deleted DEFAULT_FOLDER rule Not needed as the keyboard currently has no revisions. --- keyboards/handwired/ortho60/info.json | 67 ++++++++++++++++++++++++++- keyboards/handwired/ortho60/readme.md | 11 ++++- keyboards/handwired/ortho60/rules.mk | 2 - 3 files changed, 75 insertions(+), 5 deletions(-) diff --git a/keyboards/handwired/ortho60/info.json b/keyboards/handwired/ortho60/info.json index b6e485441001..b94bfc7b538a 100644 --- a/keyboards/handwired/ortho60/info.json +++ b/keyboards/handwired/ortho60/info.json @@ -65,8 +65,71 @@ {"label":"Raise", "x":7, "y":4}, {"label":"Left", "x":8, "y":4}, {"label":"Down", "x":9, "y":4}, - {"label":"Right", "x":10, "y":4}, - {"label":"up", "x":11, "y":4} + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4} + ] + }, + "LAYOUT_1x2uC": { + "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":"Backspace", "x":11, "y":0}, + {"label":"Tab", "x":0, "y":1}, + {"label":"Q", "x":1, "y":1}, + {"label":"W", "x":2, "y":1}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1}, + {"label":"T", "x":5, "y":1}, + {"label":"Y", "x":6, "y":1}, + {"label":"U", "x":7, "y":1}, + {"label":"I", "x":8, "y":1}, + {"label":"O", "x":9, "y":1}, + {"label":"P", "x":10, "y":1}, + {"label":"Delete", "x":11, "y":1}, + {"label":"Esc", "x":0, "y":2}, + {"label":"A", "x":1, "y":2}, + {"label":"S", "x":2, "y":2}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2}, + {"label":"G", "x":5, "y":2}, + {"label":"H", "x":6, "y":2}, + {"label":"J", "x":7, "y":2}, + {"label":"K", "x":8, "y":2}, + {"label":"L", "x":9, "y":2}, + {"label":";", "x":10, "y":2}, + {"label":"'", "x":11, "y":2}, + {"label":"Shift", "x":0, "y":3}, + {"label":"Z", "x":1, "y":3}, + {"label":"X", "x":2, "y":3}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3}, + {"label":"B", "x":5, "y":3}, + {"label":"N", "x":6, "y":3}, + {"label":"M", "x":7, "y":3}, + {"label":",", "x":8, "y":3}, + {"label":".", "x":9, "y":3}, + {"label":"/", "x":10, "y":3}, + {"label":"Enter", "x":11, "y":3}, + {"label":"Fn", "x":0, "y":4}, + {"label":"Ctrl", "x":1, "y":4}, + {"label":"Alt", "x":2, "y":4}, + {"label":"Meta", "x":3, "y":4}, + {"label":"Lower", "x":4, "y":4}, + {"label":"Space", "x":5, "y":4, "w":2}, + {"label":"Raise", "x":7, "y":4}, + {"label":"Left", "x":8, "y":4}, + {"label":"Down", "x":9, "y":4}, + {"label":"Up", "x":10, "y":4}, + {"label":"Right", "x":11, "y":4} ] } } diff --git a/keyboards/handwired/ortho60/readme.md b/keyboards/handwired/ortho60/readme.md index 8db1b7df7d11..be2a027c4f30 100644 --- a/keyboards/handwired/ortho60/readme.md +++ b/keyboards/handwired/ortho60/readme.md @@ -1,3 +1,12 @@ # Ortho 60 -Blue Pill STM32F103C8T6 based 12x5 Ortholinear Board +A Blue Pill STM32F103C8T6-based 12x5 ortholinear keyboard. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make handwired/ortho60: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/ortho60/rules.mk b/keyboards/handwired/ortho60/rules.mk index 3f4574473c18..91acb3c5c655 100644 --- a/keyboards/handwired/ortho60/rules.mk +++ b/keyboards/handwired/ortho60/rules.mk @@ -52,5 +52,3 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes LAYOUTS = ortho_5x12 - -DEFAULT_FOLDER = handwired/ortho60 From c4680a6460bcc0a3695f3e9232089374c40fc29c Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 18 Jan 2019 21:43:24 -0800 Subject: [PATCH 150/458] handwired/qc60: refactor, Configurator update, and readme update (#4878) * handwired/qc60: refactor and Configurator update - correct layout macro name (LAYOUT_ANSI_DEFAULT to LAYOUT_ansi_default) - add layout data for remaining layout macros - correct ISO layout macros (neither had a split left Shift) - refactor LAYOUT_iso_alt (place KC_NUHS key on home row; consistent with LAYOUT_iso_default) - proto.h refactored to use #pragma once include guard * handwired/qc60: keymap refactor - delete redundant KC_TRNS and KC_NO aliases * handwired/qc60: readme update - update header (made consistent with QMK template) - update Docs links (Newbs Guide; grammar) --- keyboards/handwired/qc60/README.md | 5 +- keyboards/handwired/qc60/info.json | 634 ++++++++++++++++-- .../handwired/qc60/keymaps/default/keymap.c | 3 - .../handwired/qc60/keymaps/wntrmln/keymap.c | 3 - keyboards/handwired/qc60/proto/proto.h | 26 +- 5 files changed, 606 insertions(+), 65 deletions(-) diff --git a/keyboards/handwired/qc60/README.md b/keyboards/handwired/qc60/README.md index 8477bb04ded3..4fdd9ba6ef54 100644 --- a/keyboards/handwired/qc60/README.md +++ b/keyboards/handwired/qc60/README.md @@ -1,5 +1,4 @@ -QC60 -======== +# QC60 ![qc60 layout](https://i.imgur.com/BAW1VGc.png) @@ -19,4 +18,4 @@ Example of flashing this keyboard: make handwired/qc60/proto: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. +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/qc60/info.json b/keyboards/handwired/qc60/info.json index b39ec587bc5d..c047d5030719 100644 --- a/keyboards/handwired/qc60/info.json +++ b/keyboards/handwired/qc60/info.json @@ -1,11 +1,93 @@ { - "keyboard_name": "QC60", - "url": "", - "maintainer": "coarse", - "width": 15, - "height": 5, + "keyboard_name": "QC60", + "url": "", + "maintainer": "coarse", + "width": 16, + "height": 5, "layouts": { - "LAYOUT_ANSI_DEFAULT": { + "LAYOUT": { + "key_count": 67, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R06", "x":14, "y":0}, + {"label":"R07", "x":15, "y":0}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"R17", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R27", "x":13.75, "y":2, "w":2.25}, + + {"label":"L30", "x":0, "y":3, "w":1.25}, + {"label":"L31", "x":1.25, "y":3}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":1.75}, + {"label":"R37", "x":15, "y":3}, + + {"label":"L40", "x":0, "y":4, "w":1.25}, + {"label":"L41", "x":1.25, "y":4, "w":1.25}, + {"label":"L42", "x":2.5, "y":4, "w":1.25}, + {"label":"L43", "x":3.75, "y":4, "w":2.75}, + {"label":"L44", "x":6.5, "y":4, "w":1.25}, + + {"label":"R43", "x":8.75, "y":4, "w":1.25}, + {"label":"R44", "x":10, "y":4, "w":2}, + {"label":"R42", "x":12, "y":4}, + {"label":"R45", "x":13, "y":4}, + {"label":"R46", "x":14, "y":4}, + {"label":"R47", "x":15, "y":4} + ] + }, + + "LAYOUT_ansi_default": { "key_count": 64, "layout": [ {"label":"Esc", "x":0, "y":0}, @@ -16,13 +98,13 @@ {"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.0}, + {"label":"7", "x":8, "y":0}, + {"label":"8", "x":9, "y":0}, + {"label":"9", "x":10, "y":0}, + {"label":"0", "x":11, "y":0}, + {"label":"-", "x":12, "y":0}, + {"label":"=", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0, "w":2.0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, @@ -31,14 +113,14 @@ {"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":"Y", "x":7.5, "y":1}, + {"label":"U", "x":8.5, "y":1}, + {"label":"I", "x":9.5, "y":1}, + {"label":"O", "x":10.5, "y":1}, + {"label":"P", "x":11.5, "y":1}, + {"label":"[", "x":12.5, "y":1}, + {"label":"]", "x":13.5, "y":1}, + {"label":"\\", "x":14.5, "y":1, "w":1.5}, {"label":"CapsLock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, @@ -47,13 +129,13 @@ {"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":"H", "x":7.75, "y":2}, + {"label":"J", "x":8.75, "y":2}, + {"label":"K", "x":9.75, "y":2}, + {"label":"L", "x":10.75, "y":2}, + {"label":";", "x":11.75, "y":2}, + {"label":"'", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, @@ -62,12 +144,12 @@ {"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":"N", "x":8.25, "y":3}, + {"label":"M", "x":9.25, "y":3}, + {"label":",", "x":10.25, "y":3}, + {"label":".", "x":11.25, "y":3}, + {"label":"/", "x":12.25, "y":3}, + {"label":"Shift", "x":13.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, @@ -75,13 +157,483 @@ {"x":3.75, "y":4, "w":2.75}, {"x":6.5, "y":4, "w":1.25}, - {"x":7.75, "y":4, "w":1.25}, - {"x":9, "y":4, "w":2.0}, - {"label":"Alt", "x":11, "y":4}, - {"label":"Win", "x":12, "y":4}, - {"label":"Menu", "x":13, "y":4}, - {"label":"Ctrl", "x":14, "y":4} + {"x":8.75, "y":4, "w":1.25}, + {"x":10, "y":4, "w":2.0}, + {"label":"Alt", "x":12, "y":4}, + {"label":"Win", "x":13, "y":4}, + {"label":"Menu", "x":14, "y":4}, + {"label":"Ctrl", "x":15, "y":4} + ] + }, + + "LAYOUT_ansi_alt": { + "key_count": 63, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R07", "x":14, "y":0, "w":2}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"R17", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R27", "x":13.75, "y":2, "w":2.25}, + + {"label":"L31", "x":0, "y":3, "w":2.25}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":2.75}, + + {"label":"L40", "x":0, "y":4, "w":1.5}, + {"label":"L41", "x":1.5, "y":4}, + {"label":"L42", "x":2.5, "y":4, "w":1.5}, + {"label":"L43", "x":4, "y":4, "w":2.75}, + {"label":"L44", "x":6.75, "y":4}, + + {"label":"R43", "x":8.75, "y":4}, + {"label":"R44", "x":9.75, "y":4, "w":2.25}, + {"label":"R45", "x":12, "y":4, "w":1.5}, + {"label":"R46", "x":13.5, "y":4}, + {"label":"R47", "x":14.5, "y":4, "w":1.5} + ] + }, + + "LAYOUT_iso_default": { + "key_count": 65, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R07", "x":14, "y":0, "w":2}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R17", "x":13.75, "y":2}, + {"label":"R27", "x":14.75, "y":1, "w":1.25, "h":2}, + + {"label":"L30", "x":0, "y":3, "w":1.25}, + {"label":"L31", "x":1.25, "y":3}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":2.75}, + + {"label":"L40", "x":0, "y":4, "w":1.25}, + {"label":"L41", "x":1.25, "y":4, "w":1.25}, + {"label":"L42", "x":2.5, "y":4, "w":1.25}, + {"label":"L43", "x":3.75, "y":4, "w":2.75}, + {"label":"L44", "x":6.5, "y":4, "w":1.25}, + + {"label":"R43", "x":8.75, "y":4, "w":1.25}, + {"label":"R44", "x":10, "y":4, "w":2}, + {"label":"R42", "x":12, "y":4}, + {"label":"R45", "x":13, "y":4}, + {"label":"R46", "x":14, "y":4}, + {"label":"R47", "x":15, "y":4} + ] + }, + + "LAYOUT_iso_alt": { + "key_count": 64, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R07", "x":14, "y":0, "w":2}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R17", "x":13.75, "y":2}, + {"label":"R27", "x":14.75, "y":1, "w":1.25, "h":2}, + + {"label":"L30", "x":0, "y":3, "w":1.25}, + {"label":"L31", "x":1.25, "y":3}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":2.75}, + + {"label":"L40", "x":0, "y":4, "w":1.5}, + {"label":"L41", "x":1.5, "y":4}, + {"label":"L42", "x":2.5, "y":4, "w":1.5}, + {"label":"L43", "x":4, "y":4, "w":2.75}, + {"label":"L44", "x":6.75, "y":4}, + + {"label":"R43", "x":8.75, "y":4}, + {"label":"R44", "x":9.75, "y":4, "w":2.25}, + {"label":"R45", "x":12, "y":4, "w":1.5}, + {"label":"R46", "x":13.5, "y":4}, + {"label":"R47", "x":14.5, "y":4, "w":1.5} + ] + }, + + "LAYOUT_hhkb_default": { + "key_count": 63, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R06", "x":14, "y":0}, + {"label":"R07", "x":15, "y":0}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"R17", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R27", "x":13.75, "y":2, "w":2.25}, + + {"label":"L31", "x":0, "y":3, "w":2.25}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":1.75}, + {"label":"R37", "x":15, "y":3}, + + {"label":"L41", "x":1.5, "y":4}, + {"label":"L42", "x":2.5, "y":4, "w":1.5}, + {"label":"L43", "x":4, "y":4, "w":2.75}, + {"label":"L44", "x":6.75, "y":4}, + + {"label":"R43", "x":8.75, "y":4}, + {"label":"R44", "x":9.75, "y":4, "w":2.25}, + {"label":"R45", "x":12, "y":4, "w":1.5}, + {"label":"R46", "x":13.5, "y":4} + ] + }, + + "LAYOUT_hhkb_split_lshift": { + "key_count": 64, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R06", "x":14, "y":0}, + {"label":"R07", "x":15, "y":0}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"R17", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R27", "x":13.75, "y":2, "w":2.25}, + + {"label":"L30", "x":0, "y":3, "w":1.25}, + {"label":"L31", "x":1.25, "y":3}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":1.75}, + {"label":"R37", "x":15, "y":3}, + + {"label":"L41", "x":1.5, "y":4}, + {"label":"L42", "x":2.5, "y":4, "w":1.5}, + {"label":"L43", "x":4, "y":4, "w":2.75}, + {"label":"L44", "x":6.75, "y":4}, + + {"label":"R43", "x":8.75, "y":4}, + {"label":"R44", "x":9.75, "y":4, "w":2.25}, + {"label":"R45", "x":12, "y":4, "w":1.5}, + {"label":"R46", "x":13.5, "y":4} + ] + }, + + "LAYOUT_wkl_default": { + "key_count": 61, + "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":8, "y":0}, + {"label":"R01", "x":9, "y":0}, + {"label":"R02", "x":10, "y":0}, + {"label":"R03", "x":11, "y":0}, + {"label":"R04", "x":12, "y":0}, + {"label":"R05", "x":13, "y":0}, + {"label":"R07", "x":14, "y":0, "w":2}, + + {"label":"L10", "x":0, "y":1, "w":1.5}, + {"label":"L11", "x":1.5, "y":1}, + {"label":"L12", "x":2.5, "y":1}, + {"label":"L13", "x":3.5, "y":1}, + {"label":"L14", "x":4.5, "y":1}, + {"label":"L15", "x":5.5, "y":1}, + + {"label":"R10", "x":7.5, "y":1}, + {"label":"R11", "x":8.5, "y":1}, + {"label":"R12", "x":9.5, "y":1}, + {"label":"R13", "x":10.5, "y":1}, + {"label":"R14", "x":11.5, "y":1}, + {"label":"R15", "x":12.5, "y":1}, + {"label":"R16", "x":13.5, "y":1}, + {"label":"R17", "x":14.5, "y":1, "w":1.5}, + + {"label":"L20", "x":0, "y":2, "w":1.75}, + {"label":"L21", "x":1.75, "y":2}, + {"label":"L22", "x":2.75, "y":2}, + {"label":"L23", "x":3.75, "y":2}, + {"label":"L24", "x":4.75, "y":2}, + {"label":"L25", "x":5.75, "y":2}, + + {"label":"R21", "x":7.75, "y":2}, + {"label":"R22", "x":8.75, "y":2}, + {"label":"R23", "x":9.75, "y":2}, + {"label":"R24", "x":10.75, "y":2}, + {"label":"R25", "x":11.75, "y":2}, + {"label":"R26", "x":12.75, "y":2}, + {"label":"R27", "x":13.75, "y":2, "w":2.25}, + + {"label":"L31", "x":0, "y":3, "w":2.25}, + {"label":"L32", "x":2.25, "y":3}, + {"label":"L33", "x":3.25, "y":3}, + {"label":"L34", "x":4.25, "y":3}, + {"label":"L35", "x":5.25, "y":3}, + {"label":"L36", "x":6.25, "y":3}, + + {"label":"R31", "x":8.25, "y":3}, + {"label":"R32", "x":9.25, "y":3}, + {"label":"R33", "x":10.25, "y":3}, + {"label":"R34", "x":11.25, "y":3}, + {"label":"R35", "x":12.25, "y":3}, + {"label":"R36", "x":13.25, "y":3, "w":2.75}, + + {"label":"L40", "x":0, "y":4, "w":1.5}, + {"label":"L42", "x":2.5, "y":4, "w":1.5}, + {"label":"L43", "x":4, "y":4, "w":2.75}, + {"label":"L44", "x":6.75, "y":4}, + + {"label":"R43", "x":8.75, "y":4}, + {"label":"R44", "x":9.75, "y":4, "w":2.25}, + {"label":"R45", "x":12, "y":4, "w":1.5}, + {"label":"R47", "x":14.5, "y":4, "w":1.5} ] } } -} \ No newline at end of file +} diff --git a/keyboards/handwired/qc60/keymaps/default/keymap.c b/keyboards/handwired/qc60/keymaps/default/keymap.c index bafaf5058e3e..88062d4ed491 100644 --- a/keyboards/handwired/qc60/keymaps/default/keymap.c +++ b/keyboards/handwired/qc60/keymaps/default/keymap.c @@ -24,9 +24,6 @@ extern keymap_config_t keymap_config; // entirely and just use numbers. #define _BASE 0 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_ansi_default( 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, \ diff --git a/keyboards/handwired/qc60/keymaps/wntrmln/keymap.c b/keyboards/handwired/qc60/keymaps/wntrmln/keymap.c index f99635d5316a..f024ddb4b955 100644 --- a/keyboards/handwired/qc60/keymaps/wntrmln/keymap.c +++ b/keyboards/handwired/qc60/keymaps/wntrmln/keymap.c @@ -25,9 +25,6 @@ extern keymap_config_t keymap_config; #define _BASE 0 #define _FN 1 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define FN MO(_FN) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/handwired/qc60/proto/proto.h b/keyboards/handwired/qc60/proto/proto.h index 191e8150a767..7e7755d0e2d8 100644 --- a/keyboards/handwired/qc60/proto/proto.h +++ b/keyboards/handwired/qc60/proto/proto.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef PROTO_H -#define PROTO_H +#pragma once #include "qc60.h" @@ -26,10 +25,10 @@ /* Split Backspace * {R07, XXX, R05, R04, R03, R02, R01, R00} - * + * * Split Right Shift * {R37, R36, R35, R34, R33, R32, R31, XXX} - * + * * Split Left Shift * {L30, L31, L32, L33, L34, L35, L36, XXX} * @@ -101,14 +100,14 @@ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R07, \ L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, R17, R27, \ - L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, \ + L30, L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, \ L40, L41, L42, L43, L44, R43, R44, R42, R45, R46, R47 \ ) \ { \ {L00, L01, L02, L03, L04, L05, L06, XXX}, \ {L10, L11, L12, L13, L14, L15, XXX, XXX}, \ {L20, L21, L22, L23, L24, L25, XXX, XXX}, \ - {XXX, L31, L32, L33, L34, L35, L36, XXX}, \ + {L30, L31, L32, L33, L34, L35, L36, XXX}, \ {L40, L41, L42, L43, L44, XXX, XXX, XXX}, \ {R07, XXX, R05, R04, R03, R02, R01, R00}, \ {R17, R16, R15, R14, R13, R12, R11, R10}, \ @@ -118,17 +117,17 @@ } #define LAYOUT_iso_alt( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R07, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, \ - L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, R27, \ - L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, R43, R44, R45, R46, R47 \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R07, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, R17, R27, \ + L30, L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, R43, R44, R45, R46, R47 \ ) \ { \ {L00, L01, L02, L03, L04, L05, L06, XXX}, \ {L10, L11, L12, L13, L14, L15, XXX, XXX}, \ {L20, L21, L22, L23, L24, L25, XXX, XXX}, \ - {XXX, L31, L32, L33, L34, L35, L36, XXX}, \ + {L30, L31, L32, L33, L34, L35, L36, XXX}, \ {L40, L41, L42, L43, L44, XXX, XXX, XXX}, \ {R07, XXX, R05, R04, R03, R02, R01, R00}, \ {R17, R16, R15, R14, R13, R12, R11, R10}, \ @@ -196,6 +195,3 @@ {XXX, R36, R35, R34, R33, R32, R31, XXX}, \ {R47, XXX, R45, R44, R43, XXX, XXX, XXX}, \ } - - -#endif From ebec12fbe8bff9b657f3fe6abee67e37ef0a1ba6 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sat, 19 Jan 2019 01:19:14 -0500 Subject: [PATCH 151/458] [Keyboard] Initial support for TKC Candybar (#4881) * Initial support for TKC Candybar * Correct FN layer issue Both shift keys were overloaded. Moved Caps Lock to FN + C. * Update keyboard description in config.h. * Info.json * Update project information * Update keyboards/candybar/readme.md Co-Authored-By: TerryMathews --- .../boards/ST_STM32F072B_DISCOVERY/board.c | 111 +++ .../boards/ST_STM32F072B_DISCOVERY/board.h | 923 ++++++++++++++++++ .../boards/ST_STM32F072B_DISCOVERY/board.mk | 5 + keyboards/candybar/bootloader_defs.h | 7 + keyboards/candybar/candybar.c | 21 + keyboards/candybar/candybar.h | 30 + keyboards/candybar/chconf.h | 524 ++++++++++ keyboards/candybar/config.h | 121 +++ keyboards/candybar/halconf.h | 353 +++++++ keyboards/candybar/info.json | 207 ++++ keyboards/candybar/keymaps/default/keymap.c | 38 + keyboards/candybar/mcuconf.h | 171 ++++ keyboards/candybar/readme.md | 18 + keyboards/candybar/rules.mk | 50 + 14 files changed, 2579 insertions(+) create mode 100644 keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c create mode 100644 keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.h create mode 100644 keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.mk create mode 100644 keyboards/candybar/bootloader_defs.h create mode 100644 keyboards/candybar/candybar.c create mode 100644 keyboards/candybar/candybar.h create mode 100644 keyboards/candybar/chconf.h create mode 100644 keyboards/candybar/config.h create mode 100644 keyboards/candybar/halconf.h create mode 100644 keyboards/candybar/info.json create mode 100644 keyboards/candybar/keymaps/default/keymap.c create mode 100644 keyboards/candybar/mcuconf.h create mode 100644 keyboards/candybar/readme.md create mode 100644 keyboards/candybar/rules.mk diff --git a/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000000..7e9f90853e3e --- /dev/null +++ b/keyboards/candybar/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) { +} diff --git a/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000000..173f7b60542b --- /dev/null +++ b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,923 @@ +/* + 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: LSE not fitted. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#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/candybar/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/candybar/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000000..b98dcdd26c6a --- /dev/null +++ b/keyboards/candybar/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/candybar/bootloader_defs.h b/keyboards/candybar/bootloader_defs.h new file mode 100644 index 000000000000..43eb7b2f6282 --- /dev/null +++ b/keyboards/candybar/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 0x1FFFC800 diff --git a/keyboards/candybar/candybar.c b/keyboards/candybar/candybar.c new file mode 100644 index 000000000000..c79e536ccc3a --- /dev/null +++ b/keyboards/candybar/candybar.c @@ -0,0 +1,21 @@ +/* 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 "candybar.h" + +void matrix_init_kb(void) { + matrix_init_user(); +} diff --git a/keyboards/candybar/candybar.h b/keyboards/candybar/candybar.h new file mode 100644 index 000000000000..262edf3bbb4d --- /dev/null +++ b/keyboards/candybar/candybar.h @@ -0,0 +1,30 @@ +/* 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 . + */ + +#pragma once +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, k1d, k1e, k1f, k1g, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ + k30, k31, k32, k35, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, KC_NO, k1c, k1d, k1e, k1f, k1g }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, KC_NO, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g } \ +} diff --git a/keyboards/candybar/chconf.h b/keyboards/candybar/chconf.h new file mode 100644 index 000000000000..99fa8ce39822 --- /dev/null +++ b/keyboards/candybar/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/candybar/config.h b/keyboards/candybar/config.h new file mode 100644 index 000000000000..113e917175ae --- /dev/null +++ b/keyboards/candybar/config.h @@ -0,0 +1,121 @@ +/* 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0006 +#define MANUFACTURER The Key Company +#define PRODUCT Candybar +#define DESCRIPTION A compact staggered 40% keyboard with attached numpad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 17 +#define DIODE_DIRECTION COL2ROW +#define MATRIX_ROW_PINS { A8, A9, A10, A13 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, B2, B10, B11, B12, B13, B14, B15 } + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +/* + * 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 + +/* 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. + */ + +/* 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 WS2812_LED_N 2 +// #define RGBLED_NUM WS2812_LED_N +// #define WS2812_TIM_N 2 +// #define WS2812_TIM_CH 2 +// #define PORT_WS2812 GPIOA +// #define PIN_WS2812 1 +// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) +//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP +//#define WS2812_EXTERNAL_PULLUP + diff --git a/keyboards/candybar/halconf.h b/keyboards/candybar/halconf.h new file mode 100644 index 000000000000..8b9724b1a30e --- /dev/null +++ b/keyboards/candybar/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/candybar/info.json b/keyboards/candybar/info.json new file mode 100644 index 000000000000..9e4dfadc8f3a --- /dev/null +++ b/keyboards/candybar/info.json @@ -0,0 +1,207 @@ +{ + "keyboard_name": "TKC Candybar", + "url": "", + "maintainer": "terrymathews", + "width": 17, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", + "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":"BkSp", + "x":12, + "y":0}, + {"label":"7", + "x":13, + "y":0}, + {"label":"8", + "x":14, + "y":0}, + {"label":"9", + "x":15, + "y":0}, + {"label":"*", + "x":16, + "y":0}, + {"label":"Tab", + "x":0, + "y":1, + "w":1.25}, + {"label":"A", + "x":1.25, + "y":1}, + {"label":"S", + "x":2.25, + "y":1}, + {"label":"D", + "x":3.25, + "y":1}, + {"label":"F", + "x":4.25, + "y":1}, + {"label":"G", + "x":5.25, + "y":1}, + {"label":"H", + "x":6.25, + "y":1}, + {"label":"J", + "x":7.25, + "y":1}, + {"label":"K", + "x":8.25, + "y":1}, + {"label":"L", + "x":9.25, + "y":1}, + {"label":":", + "x":10.25, + "y":1}, + {"label":"Enter", + "x":11.25, + "y":1, + "w":1.75}, + {"label":"4", + "x":13, + "y":1}, + {"label":"5", + "x":14, + "y":1}, + {"label":"6", + "x":15, + "y":1}, + {"label":"-", + "x":16, + "y":1}, + {"label":"Shift", + "x":0, + "y":2, + "w":1.75}, + {"label":"Z", + "x":1.75, + "y":2}, + {"label":"X", + "x":2.75, + "y":2}, + {"label":"C", + "x":3.75, + "y":2}, + {"label":"V", + "x":4.75, + "y":2}, + {"label":"B", + "x":5.75, + "y":2}, + {"label":"N", + "x":6.75, + "y":2}, + {"label":"M", + "x":7.75, + "y":2}, + {"label":"<", + "x":8.75, + "y":2}, + {"label":">", + "x":9.75, + "y":2}, + {"label":"Shift", + "x":10.75, + "y":2, + "w":1.25}, + {"label":"↑", + "x":12, + "y":2}, + {"label":"1", + "x":13, + "y":2}, + {"label":"2", + "x":14, + "y":2}, + {"label":"3", + "x":15, + "y":2}, + {"label":"+", + "x":16, + "y":2}, + {"label":"Ctrl", + "x":0, + "y":3, + "w":1.25}, + {"label":"GUI", + "x":1.25, + "y":3, + "w":1.25}, + {"label":"Alt", + "x":2.5, + "y":3, + "w":1.25}, + {"x":3.75, + "y":3, + "w":2.75}, + {"label":"Backspace", + "x":6.5, + "y":3, + "w":2.25}, + {"label":"Menu", + "x":8.75, + "y":3, + "w":1.25}, + {"label":"Fn", + "x":10, + "y":3}, + {"label":"←", + "x":11, + "y":3}, + {"label":"↓", + "x":12, + "y":3}, + {"label":"→", + "x":13, + "y":3}, + {"label":"0", + "x":14, + "y":3}, + {"label":".", + "x":15, + "y":3}, + {"label":"Enter", + "x":16, + "y":3}] + } + } +} \ No newline at end of file diff --git a/keyboards/candybar/keymaps/default/keymap.c b/keyboards/candybar/keymaps/default/keymap.c new file mode 100644 index 000000000000..bf589289a3cb --- /dev/null +++ b/keyboards/candybar/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* 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 "candybar.h" + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = 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_P7,KC_P8,KC_P9,KC_PAST, \ + 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_P4,KC_P5,KC_P6,KC_PMNS, \ + 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_P1,KC_P2,KC_P3,KC_PPLS, \ + KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_LEFT,KC_DOWN,KC_RGHT,KC_P0,KC_PDOT,KC_PENT), + + /* Keymap _FL: Function Layer + */ +[_FL] = LAYOUT( + RESET,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_LBRC,KC_RBRC,KC_INS,KC_BSPC,KC_P7,KC_P8,KC_P9,KC_VOLU, \ + 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/candybar/mcuconf.h b/keyboards/candybar/mcuconf.h new file mode 100644 index 000000000000..faca3defdf0e --- /dev/null +++ b/keyboards/candybar/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/candybar/readme.md b/keyboards/candybar/readme.md new file mode 100644 index 000000000000..6e0fa0285715 --- /dev/null +++ b/keyboards/candybar/readme.md @@ -0,0 +1,18 @@ +The Key Company Candybar +=== + +![Candybar](https://cdn.shopify.com/s/files/1/1679/2319/articles/CandyBar_Promo_400x225_1000x.jpg?v=1538150501) + + +The Key Company Candybar is a staggered 40% board with a numpad utilizing the STM32F072 microcontroller. + +Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) +Hardware Supported: TKC Candybar +Hardware Availability: Via GB + + +Make example for this keyboard (after setting up your build environment): + + make candybar:default:dfu-util + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk new file mode 100644 index 000000000000..d27bbe102a7b --- /dev/null +++ b/keyboards/candybar/rules.mk @@ -0,0 +1,50 @@ +## 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 +# - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx + +# Board: it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY + +# Cortex version +MCU = cortex-m0 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 + +# 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 + +# Build Options +# comment out to disable the options. +# +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 +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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no +SERIAL_LINK_ENABLE = no From 59c846975d8bb856e543ef24a91b988737b9779d Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sat, 19 Jan 2019 12:04:46 -0500 Subject: [PATCH 152/458] [Keyboard] TKC Candybar: Correct info.json (#4882) Inadvertently left a key position out of info.json, keeping it from rendering properly. --- keyboards/candybar/info.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboards/candybar/info.json b/keyboards/candybar/info.json index 9e4dfadc8f3a..442324ece27f 100644 --- a/keyboards/candybar/info.json +++ b/keyboards/candybar/info.json @@ -172,7 +172,10 @@ "w":1.25}, {"x":3.75, "y":3, - "w":2.75}, + "w":1.75}, + {"x":5.5, + "y":3, + "w":1}, {"label":"Backspace", "x":6.5, "y":3, From 215375f37c2bd81f4a5f26c4c2d3b5fb32782168 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sat, 19 Jan 2019 10:54:25 -0800 Subject: [PATCH 153/458] [Keyboard] DC60 layout_all not really layout_all (#4884) * add k3c and change layout to LAYOUT_all * fix up info.json for the new layout * forgot to add k3c into the physical layout matrix * fix keymaps --- keyboards/alf/dc60/dc60.h | 14 +++++++------- keyboards/alf/dc60/info.json | 5 +++-- keyboards/alf/dc60/keymaps/default/keymap.c | 10 +++++----- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/keyboards/alf/dc60/dc60.h b/keyboards/alf/dc60/dc60.h index 30e05b31f0c9..db5154a28cf3 100644 --- a/keyboards/alf/dc60/dc60.h +++ b/keyboards/alf/dc60/dc60.h @@ -24,19 +24,19 @@ // 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( \ +#define LAYOUT_all( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE, \ 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, K3D, K3E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ K40, K42, K43, K45, K47, K48, K4A, K4B, K4C, K4D, K4E \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE }, \ - { 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, KC_NO, K3D, K3E }, \ - { K40, KC_NO, K42, K43, KC_NO, K45, KC_NO, K47, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE }, \ + { 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, KC_NO, K45, KC_NO, K47, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ } #endif diff --git a/keyboards/alf/dc60/info.json b/keyboards/alf/dc60/info.json index 39295452055b..1c3ebf4f0ab6 100644 --- a/keyboards/alf/dc60/info.json +++ b/keyboards/alf/dc60/info.json @@ -2,11 +2,12 @@ "keyboard_name": "dc60", "url": "", "maintainer": "qmk", + "bootloader": "", "width": 15, "height": 5, "layouts": { - "LAYOUT": { - "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + "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}, {"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}, {"x":12, "y":3}, {"x":13, "y":3}, {"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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}] } } } \ No newline at end of file diff --git a/keyboards/alf/dc60/keymaps/default/keymap.c b/keyboards/alf/dc60/keymaps/default/keymap.c index f67a11b93a9c..a4385bcc0b21 100644 --- a/keyboards/alf/dc60/keymaps/default/keymap.c +++ b/keyboards/alf/dc60/keymaps/default/keymap.c @@ -16,19 +16,19 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( + [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_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, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, MO(1), KC_RGUI, KC_RGUI, KC_RCTL + 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, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_SPACE, KC_SPACE, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), - [1] = LAYOUT( + [1] = 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, + KC_TRNS, KC_LSFT, KC_TRNS, KC_TRNS, BL_DEC, BL_TOGG, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; From 9d2b10d07725580d89e9352c444756c1c2339459 Mon Sep 17 00:00:00 2001 From: Stefan Peterson Date: Sat, 19 Jan 2019 11:30:11 -0800 Subject: [PATCH 154/458] [Keyboard] Enable RGB Underglow for Idobo Boards (#4885) * Update rules.mk * Update rules.mk * Update rules.mk * Update rules.mk * Update rules.mk --- keyboards/idobo/rules.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboards/idobo/rules.mk b/keyboards/idobo/rules.mk index 246d152c9706..721a2ef9bfbf 100644 --- a/keyboards/idobo/rules.mk +++ b/keyboards/idobo/rules.mk @@ -66,18 +66,19 @@ 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 +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 +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 # Use link time optimization -LAYOUTS = ortho_5x15 +LAYOUTS = ortho_5x15 From 09ee7da6deb50a3ff5f808cc47daebe94f5a3f3a Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Sat, 19 Jan 2019 23:29:15 +0100 Subject: [PATCH 155/458] Add Plain60 support (#4887) * Add Plain60 support * Delete info.json * Remove definition of KC_TRNS in keymap * Add spaces for proper markdown to readme.md --- keyboards/plain60/config.h | 75 ++++++++++++++++++++++ keyboards/plain60/keymaps/default/keymap.c | 17 +++++ keyboards/plain60/plain60.c | 1 + keyboards/plain60/plain60.h | 29 +++++++++ keyboards/plain60/readme.md | 12 ++++ keyboards/plain60/rules.mk | 66 +++++++++++++++++++ 6 files changed, 200 insertions(+) create mode 100644 keyboards/plain60/config.h create mode 100644 keyboards/plain60/keymaps/default/keymap.c create mode 100644 keyboards/plain60/plain60.c create mode 100644 keyboards/plain60/plain60.h create mode 100644 keyboards/plain60/readme.md create mode 100644 keyboards/plain60/rules.mk diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h new file mode 100644 index 000000000000..9e838616bf5d --- /dev/null +++ b/keyboards/plain60/config.h @@ -0,0 +1,75 @@ +/* +Copyright 2019 Maarten Dekkers + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4705 +#define PRODUCT_ID 0x0160 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Maartenwut +#define PRODUCT Plain60 +#define DESCRIPTION A plain 60% PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B4,D7,D6,D4,E6} +#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,B5,F0,B6,C6,C7,F1,F4,F5,F6,F7} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define QMK_ESC_OUTPUT D2 // usually COL +#define QMK_ESC_INPUT B4 // usually ROW + +//VIA +#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*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/plain60/keymaps/default/keymap.c b/keyboards/plain60/keymaps/default/keymap.c new file mode 100644 index 000000000000..7e8cfff3541c --- /dev/null +++ b/keyboards/plain60/keymaps/default/keymap.c @@ -0,0 +1,17 @@ +#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 _MA 0 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_MA] = 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_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_BSLS, 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_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL) +}; diff --git a/keyboards/plain60/plain60.c b/keyboards/plain60/plain60.c new file mode 100644 index 000000000000..d81606410426 --- /dev/null +++ b/keyboards/plain60/plain60.c @@ -0,0 +1 @@ +#include "plain60.h" diff --git a/keyboards/plain60/plain60.h b/keyboards/plain60/plain60.h new file mode 100644 index 000000000000..01a6216a749a --- /dev/null +++ b/keyboards/plain60/plain60.h @@ -0,0 +1,29 @@ +#pragma once + +#ifndef PLAIN60_H +#define PLAIN60_H + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#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, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k46, 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, XXX}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, XXX}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, XXX}, \ + {k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4a, k4b, k4c, k4d, XXX} \ +} + +void matrix_init_user(void); +void matrix_scan_user(void); + +#endif diff --git a/keyboards/plain60/readme.md b/keyboards/plain60/readme.md new file mode 100644 index 000000000000..58be67ac058a --- /dev/null +++ b/keyboards/plain60/readme.md @@ -0,0 +1,12 @@ +Plain60-C and Plain60-B +====== + +A plain 60% PCB with USB-C. + +Keyboard Maintainer: Maartenwut +Hardware Supported: Plain60-C and Plain60-B +Hardware Availability: https://github.com/Maartenwut/plain60-c + +Make example for this keyboard (after setting up your build environment): + + make plain60:default \ No newline at end of file diff --git a/keyboards/plain60/rules.mk b/keyboards/plain60/rules.mk new file mode 100644 index 000000000000..a1a0e9ca1c83 --- /dev/null +++ b/keyboards/plain60/rules.mk @@ -0,0 +1,66 @@ +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 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 +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes From c6fd44cf26580b1a65ad0fdd35b43d770769e0de Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 19 Jan 2019 16:53:41 -0800 Subject: [PATCH 156/458] handwired/reddot refactor, Configurator support and readme update (#4886) * handwired/reddot: refactor - reddot.h - updated to use #pragma once include guard - renamed layout macro KEYMAP to LAYOUT - refactored arguments to more closely resemble physical layout - aligned for readability - keymaps/default/keymap.c - now uses #include QMK_KEYBOARD_H - updated include path for keymap_french.h - refactored to use short keycodes - aligned for readability * handwired/reddot: Configurator support * handwired/reddot: readme update - update readme to current QMK template - add KLE permalink to my best guess at the layout --- keyboards/handwired/reddot/info.json | 108 ++++++++++++++++++ .../handwired/reddot/keymaps/default/keymap.c | 39 +++---- keyboards/handwired/reddot/readme.md | 26 ++--- keyboards/handwired/reddot/reddot.h | 27 ++--- 4 files changed, 144 insertions(+), 56 deletions(-) create mode 100644 keyboards/handwired/reddot/info.json mode change 100755 => 100644 keyboards/handwired/reddot/keymaps/default/keymap.c diff --git a/keyboards/handwired/reddot/info.json b/keyboards/handwired/reddot/info.json new file mode 100644 index 000000000000..1fcc8677e86a --- /dev/null +++ b/keyboards/handwired/reddot/info.json @@ -0,0 +1,108 @@ +{ + "keyboard_name": "handwired/reddot", + "url": "", + "maintainer": "qmk", + "width": 20.5, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00 (Esc)", "x":0, "y":0}, + {"label":"k01 (F1)", "x":1, "y":0}, + {"label":"k02 (F2)", "x":2, "y":0}, + {"label":"k03 (F3)", "x":3, "y":0}, + {"label":"k04 (F4)", "x":4, "y":0}, + {"label":"k05 (F5)", "x":5, "y":0}, + {"label":"k06 (Tab)", "x":6, "y":0, "w":2}, + {"label":"k07 (Caps Lock)", "x":8, "y":0}, + {"label":"k08 (F6)", "x":9, "y":0}, + {"label":"k09 (F7)", "x":10, "y":0}, + {"label":"k0A (F8)", "x":11, "y":0}, + {"label":"k0B (F9)", "x":12, "y":0}, + {"label":"k0C (F10)", "x":13, "y":0}, + {"label":"k0D (F11)", "x":14, "y":0}, + {"label":"k0E (F12)", "x":15, "y":0}, + {"label":"k10 (Function)", "x":16.5, "y":0}, + {"label":"k11 (Keypad /)", "x":17.5, "y":0}, + {"label":"k12 (Keypad *)", "x":18.5, "y":0}, + {"label":"k13 (Keypad -)", "x":19.5, "y":0}, + + {"label":"k20 (Left Alt)", "x":0, "y":1}, + {"label":"k21 (1 / FR Ampersand)", "x":1, "y":1}, + {"label":"k22 (2 / FR É)", "x":2, "y":1}, + {"label":"k23 (3 / FR Quote)", "x":3, "y":1}, + {"label":"k24 (4 / FR Apostrophe)", "x":4, "y":1}, + {"label":"k25 (5 / FR Left Parenthesis)", "x":5, "y":1}, + {"label":"k26 (Backspace)", "x":6, "y":1, "w":2}, + {"label":"k27 (Delete)", "x":8, "y":1}, + {"label":"k28 (6 / FR Minus)", "x":9, "y":1}, + {"label":"k29 (7 / FR È)", "x":10, "y":1}, + {"label":"k2A (8 / FR Underscore)", "x":11, "y":1}, + {"label":"k2B (9 / FR Ç)", "x":12, "y":1}, + {"label":"k2C (0 / FR À)", "x":13, "y":1}, + {"label":"k2D (Minus / FR Right Parenthesis)", "x":14, "y":1}, + {"label":"k2E (Equals / FR Equals)", "x":15, "y":1}, + {"label":"k30 (Insert)", "x":16.5, "y":1}, + {"label":"k31 (Home)", "x":17.5, "y":1}, + {"label":"k32 (Page Up)", "x":18.5, "y":1}, + + {"label":"k40 (GUI)", "x":0, "y":2}, + {"label":"k41 (Q / FR A)", "x":1, "y":2}, + {"label":"k42 (W / FR Z)", "x":2, "y":2}, + {"label":"k43 (E)", "x":3, "y":2}, + {"label":"k44 (R)", "x":4, "y":2}, + {"label":"k45 (T)", "x":5, "y":2}, + {"label":"k46 (Shift)", "x":6, "y":2, "h":2}, + {"label":"k66 (Enter)", "x":7, "y":2, "h":2}, + {"label":"k47 (Enter)", "x":8, "y":2, "h":2}, + {"label":"k48 (Y)", "x":9, "y":2}, + {"label":"k49 (U)", "x":10, "y":2}, + {"label":"k4A (I)", "x":11, "y":2}, + {"label":"k4B (O)", "x":12, "y":2}, + {"label":"k4C (P)", "x":13, "y":2}, + {"label":"k4D (Left Bracket / FR Circumflex)", "x":14, "y":2}, + {"label":"k4E (Right Bracket / FR Dollar)", "x":15, "y":2}, + {"label":"k50 (Delete)", "x":16.5, "y":2}, + {"label":"k51 (End)", "x":17.5, "y":2}, + {"label":"k52 (Page Down)", "x":18.5, "y":2}, + {"label":"k53 (Keypad +)", "x":19.5, "y":1, "h":2}, + + {"label":"k60 (Ctrl)", "x":0, "y":3}, + {"label":"k61 (A / FR Q)", "x":1, "y":3}, + {"label":"k62 (S)", "x":2, "y":3}, + {"label":"k63 (D)", "x":3, "y":3}, + {"label":"k64 (F)", "x":4, "y":3}, + {"label":"k65 (G)", "x":5, "y":3}, + {"label":"k68 (H)", "x":9, "y":3}, + {"label":"k69 (J)", "x":10, "y":3}, + {"label":"k6A (K)", "x":11, "y":3}, + {"label":"k6B (L)", "x":12, "y":3}, + {"label":"k6C (Semicolon / FR M)", "x":13, "y":3}, + {"label":"k6D (Quote / FR Ù)", "x":14, "y":3}, + {"label":"k6E (ISO Hash / FR Asterisk)", "x":15, "y":3}, + {"label":"k70 (Keypad 1)", "x":16.5, "y":3}, + {"label":"k71 (Up)", "x":17.5, "y":3}, + {"label":"k72 (Keypad 3)", "x":18.5, "y":3}, + + {"label":"k80 (ISO Backslash / FR Less Than)", "x":0, "y":4}, + {"label":"k81 (Z / FR W)", "x":1, "y":4}, + {"label":"k82 (X)", "x":2, "y":4}, + {"label":"k83 (C)", "x":3, "y":4}, + {"label":"k84 (V)", "x":4, "y":4}, + {"label":"k85 (B)", "x":5, "y":4}, + {"label":"k86 (Space)", "x":6, "y":4, "w":2}, + {"label":"k88 (Space)", "x":8, "y":4, "w":2}, + {"label":"k89 (N)", "x":10, "y":4}, + {"label":"k8A (M / FR Comma)", "x":11, "y":4}, + {"label":"k8B (Comma / FR Semicolon)", "x":12, "y":4}, + {"label":"k8C (Period / Colon)", "x":13, "y":4}, + {"label":"k8D (Slash / FR Exclaim)", "x":14, "y":4}, + {"label":"k8E (Right Alt / FR AltGr)", "x":15, "y":4}, + {"label":"k90 (Left)", "x":16.5, "y":4}, + {"label":"k91 (Down)", "x":17.5, "y":4}, + {"label":"k92 (Right)", "x":18.5, "y":4}, + {"label":"k93 (Keypad Enter)", "x":19.5, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/handwired/reddot/keymaps/default/keymap.c b/keyboards/handwired/reddot/keymaps/default/keymap.c old mode 100755 new mode 100644 index 73aeff225228..246a03b4d79b --- a/keyboards/handwired/reddot/keymaps/default/keymap.c +++ b/keyboards/handwired/reddot/keymaps/default/keymap.c @@ -1,29 +1,22 @@ -#include "reddot.h" -#include "../../../../../quantum/keymap_extras/keymap_french.h" +#include QMK_KEYBOARD_H +#include "keymap_french.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ - KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INSERT, KC_HOME, KC_PGUP,\ - KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DELETE, KC_END, KC_PGDOWN, KC_KP_PLUS,\ - KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_KP_1, KC_UP, KC_KP_3,\ - FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), - - [1] = KEYMAP( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_FN0, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,\ - KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPACE, KC_DELETE, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9,\ - KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_KP_PLUS,\ - KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_ENT, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3,\ - FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPACE, KC_SPACE, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_ENTER), -}; + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, TG(1), KC_PSLS, KC_PAST, KC_PMNS, \ + KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPC, KC_DEL, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_INS, KC_HOME, KC_PGUP, \ + KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_DEL, KC_END, KC_PGDN, KC_PPLS, \ + KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_P1, KC_UP, KC_P3, \ + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT \ + ), + [1] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TAB, KC_CAPS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_LALT, FR_AMP, FR_EACU, FR_QUOT, FR_APOS, FR_LPRN, KC_BSPC, KC_DEL, FR_MINS, FR_EGRV, FR_UNDS, FR_CCED, FR_AGRV, FR_RPRN, FR_EQL, KC_7, KC_8, KC_9, \ + KC_LGUI, FR_A, FR_Z, KC_E, KC_R, KC_T, KC_LSFT, KC_ENT, KC_ENT, KC_Y, KC_U, KC_I, KC_O, KC_P, FR_CIRC, FR_DLR, KC_4, KC_5, KC_6, KC_PPLS, \ + KC_LCTL, FR_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, FR_M, FR_UGRV, FR_ASTR, KC_1, KC_2, KC_3, \ + FR_LESS, FR_W, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, FR_COMM, FR_SCLN, FR_COLN, FR_EXLM, KC_ALGR, KC_LEFT, KC_DOWN, KC_RGHT, KC_PENT \ + ), -const uint16_t PROGMEM fn_actions[] = { - ACTION_LAYER_TOGGLE(1), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; - diff --git a/keyboards/handwired/reddot/readme.md b/keyboards/handwired/reddot/readme.md index 8cdbb47d6631..27c8b54d6051 100755 --- a/keyboards/handwired/reddot/readme.md +++ b/keyboards/handwired/reddot/readme.md @@ -1,24 +1,14 @@ -## RedDot Specific Info ## +# RedDot +An ortholinear compact fullsize keyboard configured for French AZERTY layout. -## Quantum MK Firmware +- [Layout](http://www.keyboard-layout-editor.com/##@_plate:true%3B&@_sm=cherry&sb=cherry&st=MX1A-L1xx%3B&=Esc&=F1&=F2&=F3&=F4&=F5&_w:2%3B&=Tab&=Caps%20Lock&=F6&=F7&=F8&=F9&=F10&=F11&=F12&_x:0.5%3B&=Fn&=%2F%2F&=*&=-%3B&@=Alt&=1%0A%2F&&=2%0A%C3%A9%0A%0A~&=3%0A%22%0A%0A%23&=4%0A'%0A%0A%7B&=5%0A(%0A%0A%5B&_w:2%3B&=Back&=Del&=6%0A-%0A%0A%7C&=7%0A%C3%A8%0A%0A%60&=8%0A%2F_%0A%0A%5C&=9%0A%C3%A7%0A%0A%5E&=0%0A%C3%A0%0A%0A%2F@&=%C2%B0%0A)%0A%0A%5D&=+%0A%2F=%0A%0A%7D&_x:0.5%3B&=Insert&=Home&=Page%20Up&_h:2%3B&=+%3B&@=Win&=A&=Z&=E&=R&=T&_h:2%3B&=Shift&_h:2%3B&=Enter&_h:2%3B&=Enter&=Y&=U&=I&=O&=P&=%C2%A8%0A%5E&=%C2%A3%0A$&_x:0.5%3B&=Delete&=End&=Page%20Down%3B&@=Ctrl&=Q&=S&=D&=F&=G&_x:3%3B&=H&=J&=K&=L&=M&=%25%0A%C3%B9&=%C2%B5%0A*&_x:0.5%3B&=1%0AEnd&=Up&=3%0APgDn&_h:2%3B&=Enter%3B&@=%3E%0A%3C&=W&=X&=C&=V&=B&_w:2%3B&=Space&_w:2%3B&=Space&=N&=%3F%0A,&=.%0A%2F%3B&=%2F%2F%0A%2F:&=%C2%A7%0A!&=Alt%20Gr&_x:0.5%3B&=Left&=Down&=Right) -For the full Quantum feature list, see [the parent README.md](/readme.md). +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: RedDot handwired -## Building +Make example for this keyboard (after setting up your build environment): -Download or clone the whole firmware and navigate to the keyboard/reddot 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 program your .hex file. + make handwired/reddot:default -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make`. - -### 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. - -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: -``` -$ make KEYMAP=[default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +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/reddot/reddot.h b/keyboards/handwired/reddot/reddot.h index f0c4be55718b..a763f2ddc36f 100755 --- a/keyboards/handwired/reddot/reddot.h +++ b/keyboards/handwired/reddot/reddot.h @@ -1,20 +1,17 @@ -#ifndef REDDOT_H -#define REDDOT_H +#pragma once #include "quantum.h" -#define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \ - k60, k61, k62, k63, k64, k65, k66, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \ - k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93\ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, \ + k40, k41, k42, k43, k44, k45, k46, k66, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53, \ + k60, k61, k62, k63, k64, k65, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, \ + k80, k81, k82, k83, k84, k85, k86, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \ - { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \ - { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k10, k11, k12, k13 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k30, k31, k32, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k50, k51, k52, k53 }, \ + { k60, k61, k62, k63, k64, k65, k66, KC_NO, k68, k69, k6A, k6B, k6C, k6D, k6E, k70, k71, k72, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, k86, KC_NO, k88, k89, k8A, k8B, k8C, k8D, k8E, k90, k91, k92, k93 } \ } - -#endif From 8df044b86828a374fc2c872c2bedc2f4b567f5bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=A4fer?= Date: Sun, 20 Jan 2019 02:34:29 +0100 Subject: [PATCH 157/458] schaeferdev layout for hhkb implementing movement layer (VIM style + Mouse) (#4883) * new hhkb keymap implementing movement layer + comfort features * Apply suggestions from code review Co-Authored-By: schaefer-dev * removed deprecated function action_get_macro and mousewheel configs that are no longer used --- keyboards/hhkb/keymaps/schaeferdev/README.md | 36 ++++++++++ keyboards/hhkb/keymaps/schaeferdev/config.h | 9 +++ keyboards/hhkb/keymaps/schaeferdev/keymap.c | 76 ++++++++++++++++++++ keyboards/hhkb/keymaps/schaeferdev/rules.mk | 1 + 4 files changed, 122 insertions(+) create mode 100644 keyboards/hhkb/keymaps/schaeferdev/README.md create mode 100644 keyboards/hhkb/keymaps/schaeferdev/config.h create mode 100644 keyboards/hhkb/keymaps/schaeferdev/keymap.c create mode 100644 keyboards/hhkb/keymaps/schaeferdev/rules.mk diff --git a/keyboards/hhkb/keymaps/schaeferdev/README.md b/keyboards/hhkb/keymaps/schaeferdev/README.md new file mode 100644 index 000000000000..15b87c498d32 --- /dev/null +++ b/keyboards/hhkb/keymaps/schaeferdev/README.md @@ -0,0 +1,36 @@ + # QMK HHKB Keymap: schaeferdev + +This is my QMK keymap for the Happy Hacking Keyboard Pro 2 alternate controller made by Hasu. + + +## Movement Layer + +The main difference from the Default layer is the introduction of a Movement layer than can be used by holding the right command button. This layer enables to move the mouse and scroll using Page up and Page down. Additionally it allows to use Arrow-keys in VIM-like fashion on hjkl. + +I prefer this movement to the default HHKB FN layer as it allows all my fingers to remain on the home row. + +## Minor Changes + +- swapped Y and Z (as I am German and used to the different order). +- changed position of Delete Key +- both ` and ~ + + +## Setup (for macOS) +```bash +brew tap osx-cross/avr +brew install avr-gcc +brew install dfu-programmer +``` + + +## Flashing + +```bash +make clean +make hhkb:schaeferdev:dfu +``` + + +## Troubleshooting +For some reason I ran into the issue that my CMD key no longer recognized. I am not entirely sure what caused this but the problem occured regardless of the layout I flashed (was also broken for the default hhkb layout). I was able to fix this issue by resetting EEPROM of the keyboard. The easiest way to do this is probably to use the QMK Toolbox. diff --git a/keyboards/hhkb/keymaps/schaeferdev/config.h b/keyboards/hhkb/keymaps/schaeferdev/config.h new file mode 100644 index 000000000000..b3c799bb82a7 --- /dev/null +++ b/keyboards/hhkb/keymaps/schaeferdev/config.h @@ -0,0 +1,9 @@ +// Based off of this section: +// https://github.com/qmk/qmk_firmware/blob/master/doc/BUILD_GUIDE.md#the-configh-file +#pragma once + +// Define mousekey settings +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_INTERVAL 4 +#define MOUSEKEY_MAX_SPEED 1 +#define MOUSEKEY_TIME_TO_MAX 70 \ No newline at end of file diff --git a/keyboards/hhkb/keymaps/schaeferdev/keymap.c b/keyboards/hhkb/keymaps/schaeferdev/keymap.c new file mode 100644 index 000000000000..ea6da450cfaf --- /dev/null +++ b/keyboards/hhkb/keymaps/schaeferdev/keymap.c @@ -0,0 +1,76 @@ +/* -*- eval: (turn-on-orgtbl); -*- + * default HHKB Layout + */ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define HHKB 1 +#define MOVEMENT 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* BASE Level: Default Layer + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Backs |Backs| + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + |Ctrl/ESC| A | S | D | F | G | H | J | K | L | ; | ' | Ent | | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 | | | + |--------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+-----| + |------+------+-----------------------+------+------| + | LAlt | LGUI | ******* Space ******* | MOUSE| RAlt | + |------+------+-----------------------+------+------| + */ + + [BASE] = LAYOUT( // default layer + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Z, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + 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, KC_ENT, + KC_LSFT, KC_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB), + KC_LALT, KC_LCMD, /* */ KC_SPC, /* */ MO(MOVEMENT), KC_RALT), + + /* Layer HHKB: HHKB mode (HHKB Fn) + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Pwr | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL | DEL | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | Caps | | | | | | | | Psc | Slk | Pus | Up | | Backs | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | VoD | VoU | Mut | | | * | / | Hom | PgU | Lef | Rig | Enter | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + | | | | | | | + | - | End | PgD | Dow | | | | | + |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----| + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [HHKB] = LAYOUT( + 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_DEL, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layer MOUSE: MOUSE mode (MOUSE Fn) + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | `~ |ACC1 |ACC2 |ACC3 | | | | | | | | | | DEL | DEL | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | |MBTN2| | up | | PgU| | | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | |MBTN1|right|down |left| PgD| <- | down arrow | up arrow | -> | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + | |MBTN3| | | | | | ~ (N) | | | | | | | | + |------+-----+-----+-----+----+----+--------+----------------+--------------+-----------+-------------+-----+-------+-------+-----| + |------+------+----------------------+------+------+ + | **** | **** | ******************** | **** | **** | + |------+------+----------------------+------+------+ + */ + + [MOVEMENT] = LAYOUT( + KC_GRV, KC_ACL0, KC_ACL1, KC_ACL2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN2, KC_TRNS, KC_MS_U, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_R, KC_PGDN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TILD, 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 diff --git a/keyboards/hhkb/keymaps/schaeferdev/rules.mk b/keyboards/hhkb/keymaps/schaeferdev/rules.mk new file mode 100644 index 000000000000..35591533cc6c --- /dev/null +++ b/keyboards/hhkb/keymaps/schaeferdev/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes \ No newline at end of file From 6393135afaa8b99832f547bcb5e8aafd077a1c9e Mon Sep 17 00:00:00 2001 From: Wilba Date: Mon, 21 Jan 2019 06:01:12 +1100 Subject: [PATCH 158/458] Added VIA Configurator support to Snagpad (#4890) --- keyboards/snagpad/config.h | 26 ++++++++- keyboards/snagpad/keymaps/via/keymap.c | 76 ++++++++++++++++++++++++++ keyboards/snagpad/keymaps/via/rules.mk | 76 ++++++++++++++++++++++++++ 3 files changed, 176 insertions(+), 2 deletions(-) create mode 100644 keyboards/snagpad/keymaps/via/keymap.c create mode 100644 keyboards/snagpad/keymaps/via/rules.mk diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index a14ead67fb1c..03906f33f585 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -3,8 +3,8 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 +#define VENDOR_ID 0x4443 // "DC" = Don Chiou +#define PRODUCT_ID 0x5350 // "SP" = Snagpad #define DEVICE_VER 0x0001 #define MANUFACTURER Flehrad #define PRODUCT Snagpad @@ -54,3 +54,25 @@ #define RGBLIGHT_VAL_STEP 8 #endif +// Does not use WT_MONO_BACKLIGHT +// #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*4*2)) = (35+160) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 195 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 829 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file diff --git a/keyboards/snagpad/keymaps/via/keymap.c b/keyboards/snagpad/keymaps/via/keymap.c new file mode 100644 index 000000000000..7fa226de7773 --- /dev/null +++ b/keyboards/snagpad/keymaps/via/keymap.c @@ -0,0 +1,76 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_ortho_5x4( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT_ortho_5x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) +}; + + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/snagpad/keymaps/via/rules.mk b/keyboards/snagpad/keymaps/via/rules.mk new file mode 100644 index 000000000000..032d68c5e96d --- /dev/null +++ b/keyboards/snagpad/keymaps/via/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 + +# Boot Section Size in *bytes* +# 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 = 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 + +# This is the VIA magic +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c + +LAYOUTS = ortho_5x4 numpad_5x4 From a0d5e270eb53c3511f756359d10158a7c6d4a6fe Mon Sep 17 00:00:00 2001 From: Jason Thigpen Date: Sun, 20 Jan 2019 11:01:44 -0800 Subject: [PATCH 159/458] Add crd's do60 (#4889) --- keyboards/do60/keymaps/crd/keymap.c | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 keyboards/do60/keymaps/crd/keymap.c diff --git a/keyboards/do60/keymaps/crd/keymap.c b/keyboards/do60/keymaps/crd/keymap.c new file mode 100644 index 000000000000..2c83df867f90 --- /dev/null +++ b/keyboards/do60/keymaps/crd/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +enum keyboard_layers { + _BL = 0, // Base Layer + _FL, // Function Layer + _CL // Control Layer +}; + +// Custom #defined keycodes (shorter macros for readability) +#define KC_CTES CTL_T(KC_ESC) +#define KC_RSUP RSFT_T(KC_UP) +#define KC_RGLT RCMD_T(KC_LEFT) +#define KC_RADN RALT_T(KC_DOWN) +#define KC_RCRT RCTL_T(KC_RIGHT) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_60_ansi_split_bs_rshift( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, 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_CTES, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSUP, MO(_FL), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, XXXXXXX, KC_RGLT, KC_RADN, KC_RCRT + ), + [_FL] = LAYOUT_60_ansi_split_bs_rshift( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, + _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, _______, KC_MUTE, _______, _______, KC_PGDN, KC_PGUP, RESET, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_SLCK, KC_VOLD, KC_VOLU, KC_PAUS, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; + From 17fbfcb898c8f765b94ef34cf3f6c9181c7a5c56 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 20 Jan 2019 18:19:10 -0800 Subject: [PATCH 160/458] Plain60 Configurator support and cleanup (#4888) * Plain60: remove redundant include guard from plain60.h Superseded by #pragma once. * Plain60: add Docs links to readme file * Plain60: Configurator support --- keyboards/plain60/info.json | 79 +++++++++++++++++++++++++++++++++++++ keyboards/plain60/plain60.h | 5 --- keyboards/plain60/readme.md | 4 +- 3 files changed, 82 insertions(+), 6 deletions(-) create mode 100644 keyboards/plain60/info.json diff --git a/keyboards/plain60/info.json b/keyboards/plain60/info.json new file mode 100644 index 000000000000..dca4b3cdc2e4 --- /dev/null +++ b/keyboards/plain60/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "Plain60", + "url": "", + "maintainer": "maartenwut", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 65, + "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":"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":"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":"k2c", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":2, "w":1.25}, + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"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":"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":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4c", "x":12.5, "y":4, "w":1.25}, + {"label":"k4d", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/plain60/plain60.h b/keyboards/plain60/plain60.h index 01a6216a749a..f7b497bab71f 100644 --- a/keyboards/plain60/plain60.h +++ b/keyboards/plain60/plain60.h @@ -1,8 +1,5 @@ #pragma once -#ifndef PLAIN60_H -#define PLAIN60_H - #include "quantum.h" // readability @@ -25,5 +22,3 @@ void matrix_init_user(void); void matrix_scan_user(void); - -#endif diff --git a/keyboards/plain60/readme.md b/keyboards/plain60/readme.md index 58be67ac058a..5e8b17a965d9 100644 --- a/keyboards/plain60/readme.md +++ b/keyboards/plain60/readme.md @@ -9,4 +9,6 @@ Hardware Availability: https://github.com/Maartenwut/plain60-c Make example for this keyboard (after setting up your build environment): - make plain60:default \ No newline at end of file + make plain60: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 b0d308eea1a66f9daaee523882c6d050cd88f1c5 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 20 Jan 2019 18:41:57 -0800 Subject: [PATCH 161/458] Update Templates (stop living in the past, its 2019) (#4897) --- quantum/template/avr/config.h | 2 +- quantum/template/avr/template.c | 2 +- quantum/template/avr/template.h | 2 +- quantum/template/base/keymaps/default/config.h | 2 +- quantum/template/base/keymaps/default/keymap.c | 2 +- quantum/template/ps2avrgb/rules.mk | 2 +- quantum/template/ps2avrgb/template.c | 2 +- quantum/template/ps2avrgb/template.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index eed50e5c04ea..d05b2cb98dee 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -1,5 +1,5 @@ /* -Copyright 2018 REPLACE_WITH_YOUR_NAME +Copyright 2019 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 diff --git a/quantum/template/avr/template.c b/quantum/template/avr/template.c index b6366fd9a345..3deeae88ba7a 100644 --- a/quantum/template/avr/template.c +++ b/quantum/template/avr/template.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 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 diff --git a/quantum/template/avr/template.h b/quantum/template/avr/template.h index 0d626ed50b86..aaa971504c60 100644 --- a/quantum/template/avr/template.h +++ b/quantum/template/avr/template.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 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 diff --git a/quantum/template/base/keymaps/default/config.h b/quantum/template/base/keymaps/default/config.h index 4496c5910061..c8e4334124ef 100644 --- a/quantum/template/base/keymaps/default/config.h +++ b/quantum/template/base/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 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 diff --git a/quantum/template/base/keymaps/default/keymap.c b/quantum/template/base/keymaps/default/keymap.c index 5f0730c8a91d..11cd134a065b 100644 --- a/quantum/template/base/keymaps/default/keymap.c +++ b/quantum/template/base/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 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 diff --git a/quantum/template/ps2avrgb/rules.mk b/quantum/template/ps2avrgb/rules.mk index 85603f955cbd..bcd7dff99919 100644 --- a/quantum/template/ps2avrgb/rules.mk +++ b/quantum/template/ps2avrgb/rules.mk @@ -1,4 +1,4 @@ -# Copyright 2017 Luiz Ribeiro +# Copyright 2019 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 diff --git a/quantum/template/ps2avrgb/template.c b/quantum/template/ps2avrgb/template.c index 8bbf9ebda5fa..4e35a2c129e6 100644 --- a/quantum/template/ps2avrgb/template.c +++ b/quantum/template/ps2avrgb/template.c @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 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 diff --git a/quantum/template/ps2avrgb/template.h b/quantum/template/ps2avrgb/template.h index b4d6f46624e7..1958f48a02cc 100644 --- a/quantum/template/ps2avrgb/template.h +++ b/quantum/template/ps2avrgb/template.h @@ -1,4 +1,4 @@ -/* Copyright 2018 REPLACE_WITH_YOUR_NAME +/* Copyright 2019 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 From 58993d3cde0d52addb4a503daf1ded36b26b8abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C4=ABls=20Delle?= Date: Mon, 21 Jan 2019 06:15:46 +0200 Subject: [PATCH 162/458] [Keyboard] Tmo50 initial commit (#4891) * Create ISO HHKB keymapping for GH60 * Add media controls to Fn layer * Use M(x) instead of F(x), add Copyright text * Create initial firmware for TMO50 * Correct year and author * Fix repos README * Remove unnecessary code * Change include guard in tmo50.h --- keyboards/tmo50/config.h | 208 +++++++++++++++++++++++ keyboards/tmo50/info.json | 13 ++ keyboards/tmo50/keymaps/default/keymap.c | 51 ++++++ keyboards/tmo50/readme.md | 15 ++ keyboards/tmo50/rules.mk | 63 +++++++ keyboards/tmo50/tmo50.c | 43 +++++ keyboards/tmo50/tmo50.h | 40 +++++ 7 files changed, 433 insertions(+) create mode 100644 keyboards/tmo50/config.h create mode 100644 keyboards/tmo50/info.json create mode 100644 keyboards/tmo50/keymaps/default/keymap.c create mode 100644 keyboards/tmo50/readme.md create mode 100644 keyboards/tmo50/rules.mk create mode 100644 keyboards/tmo50/tmo50.c create mode 100644 keyboards/tmo50/tmo50.h diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h new file mode 100644 index 000000000000..cf6a3fbf37ee --- /dev/null +++ b/keyboards/tmo50/config.h @@ -0,0 +1,208 @@ +/* +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER funderburker +#define PRODUCT TMO50 +#define DESCRIPTION 50% mechanical keyboard with macro column + +/* key matrix size */ +#define MATRIX_ROWS 4 +#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 { D5, D3, D2, D0 } +#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 */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN C7 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 10 + #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 + +/* 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 + diff --git a/keyboards/tmo50/info.json b/keyboards/tmo50/info.json new file mode 100644 index 000000000000..e96fa4ceac03 --- /dev/null +++ b/keyboards/tmo50/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "TMO50", + "url": "", + "maintainer": "funderburker", + "bootloader": "atmel-dfu", + "width": 15.25, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"label":"", "x":0, "y":0}, {"label":"", "x":1.25, "y":0}, {"label":"", "x":2.25, "y":0}, {"label":"", "x":3.25, "y":0}, {"label":"", "x":4.25, "y":0}, {"label":"", "x":5.25, "y":0}, {"label":"", "x":6.25, "y":0}, {"label":"", "x":7.25, "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}, {"x":0, "y":1}, {"label":"Ctrl", "x":1.25, "y":1, "w":1.25}, {"label":"", "x":2.5, "y":1}, {"label":"", "x":3.5, "y":1}, {"label":"", "x":4.5, "y":1}, {"label":"", "x":5.5, "y":1}, {"label":"", "x":6.5, "y":1}, {"label":"", "x":7.5, "y":1}, {"label":"", "x":8.5, "y":1}, {"label":"", "x":9.5, "y":1}, {"label":"", "x":10.5, "y":1}, {"label":"", "x":11.5, "y":1}, {"label":"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":1.75}, {"label":"", "x":3, "y":2}, {"label":"", "x":4, "y":2}, {"label":"", "x":5, "y":2}, {"label":"", "x":6, "y":2}, {"label":"b", "x":7, "y":2}, {"label":"", "x":8, "y":2}, {"label":"m", "x":9, "y":2}, {"label":"", "x":10, "y":2}, {"label":"", "x":11, "y":2}, {"label":"", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"", "x":14.25, "y":2}, {"x":0, "y":3}, {"label":"Alt", "x":2.75, "y":3}, {"label":"Win", "x":3.75, "y":3, "w":1.5}, {"label":"", "x":5.25, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"AltGr", "x":10.25, "y":3, "w":1.5}, {"label":"L3", "x":11.75, "y":3}] + } + } +} diff --git a/keyboards/tmo50/keymaps/default/keymap.c b/keyboards/tmo50/keymaps/default/keymap.c new file mode 100644 index 000000000000..419893f1a684 --- /dev/null +++ b/keyboards/tmo50/keymaps/default/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_TAB, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3) + ), + + // Fn1 layer + [1] = LAYOUT( + 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_BSPC, + 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, 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_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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 + ), +}; + diff --git a/keyboards/tmo50/readme.md b/keyboards/tmo50/readme.md new file mode 100644 index 000000000000..2af282d15070 --- /dev/null +++ b/keyboards/tmo50/readme.md @@ -0,0 +1,15 @@ +# tmo50 + +![tmo50](https://imgur.com/BhRYzl6.jpg) + +TMO50 is a 50% mechanical keyboard with macro column on the left side. Sub60% board without compromises. + +Keyboard Maintainer: [funderburker](https://github.com/emiilsd) +Hardware Supported: TMO50 mechanical keyboard +Hardware Availability: Group buys + +Make example for this keyboard (after setting up your build environment): + + make tmo50: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/tmo50/rules.mk b/keyboards/tmo50/rules.mk new file mode 100644 index 000000000000..b773031d54ed --- /dev/null +++ b/keyboards/tmo50/rules.mk @@ -0,0 +1,63 @@ +# 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 +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 = 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) diff --git a/keyboards/tmo50/tmo50.c b/keyboards/tmo50/tmo50.c new file mode 100644 index 000000000000..a42ab4720af2 --- /dev/null +++ b/keyboards/tmo50/tmo50.c @@ -0,0 +1,43 @@ +/* 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 "tmo50.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/tmo50/tmo50.h b/keyboards/tmo50/tmo50.h new file mode 100644 index 000000000000..5723b00aeae1 --- /dev/null +++ b/keyboards/tmo50/tmo50.h @@ -0,0 +1,40 @@ +/* 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 . + */ +#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( \ + 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, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K301, K302, K303, K305, K307, K309, K310 \ +) \ +{ \ + { 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 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ + { K300, K301, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO } \ +} + From 0f8431a57f4b1ce50528e4c1689e810ba9554e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 21 Jan 2019 05:16:36 +0100 Subject: [PATCH 163/458] Tidy up IS_{,HOST_}LED_{ON,OFF} macros (#4894) * Tidy up IS_{,HOST_}LED_{ON,OFF} macros * Tweak LED control docs --- docs/custom_quantum_functions.md | 27 +++++++++------------------ tmk_core/common/host.h | 17 ++++++----------- 2 files changed, 15 insertions(+), 29 deletions(-) diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 3397bf2d4feb..d44786e2d512 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -106,10 +106,8 @@ There are two ways to get the host LED state: ## `led_set_user()` -This function will be called when the state of one of those 5 LEDs changes. -It receives the LED state as parameter. -Use the `IS_LED_ON(USB_LED, LED_NAME)` and `IS_LED_OFF(USB_LED, LED_NAME)` -macros to check the LED status. +This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a parameter. +Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macros to check the LED status. !> `host_keyboard_leds()` may already reflect a new value before `led_set_user()` is called. @@ -152,27 +150,20 @@ void led_set_user(uint8_t usb_led) { ## `host_keyboard_leds()` -Call this function to get the last received LED state. -This is useful for reading the LED state outside `led_set_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). +Call this function to get the last received LED state. This is useful for reading the LED state outside `led_set_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code). +For convenience, you can use the `IS_HOST_LED_ON(led_name)` and `IS_HOST_LED_OFF(led_name)` macros instead of calling and checking `host_keyboard_leds()` directly. -For convenience, you can use the `IS_HOST_LED_ON(LED_NAME)` and `IS_HOST_LED_OFF(LED_NAME)` macros instead of calling `host_keyboard_leds()` directly. - -## Setting physical LED state +## Setting Physical LED State Some keyboard implementations provide convenience methods for setting the state of the physical LEDs. -### Ergodox and Ergodox EZ +### Ergodox Boards -The Ergodox EZ implementation provides `ergodox_right_led_``1`/`2`/`3_on`/`off()` -to turn individual LEDs on and off, as well as -`ergodox_right_led_on`/`off(uint8_t led)` -to turn them on and off by their number. +The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index. -In addition, it is possible to specify the brightness level with `ergodox_led_all_set(uint8_t n)`, -for individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)` -or by their number using `ergodox_right_led_set(uint8_t led, uint8_t n)`. +In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`. -It defines `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness, which is also the default. +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 diff --git a/tmk_core/common/host.h b/tmk_core/common/host.h index e70bb68533d7..3d172eed66d2 100644 --- a/tmk_core/common/host.h +++ b/tmk_core/common/host.h @@ -15,14 +15,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef HOST_H -#define HOST_H +#pragma once #include #include #include "report.h" #include "host_driver.h" +#define IS_LED_ON(leds, led_name) ( (leds) & (1 << (led_name))) +#define IS_LED_OFF(leds, led_name) (~(leds) & (1 << (led_name))) + +#define IS_HOST_LED_ON(led_name) IS_LED_ON(host_keyboard_leds(), led_name) +#define IS_HOST_LED_OFF(led_name) IS_LED_OFF(host_keyboard_leds(), led_name) #ifdef __cplusplus extern "C" { @@ -31,7 +35,6 @@ extern "C" { extern uint8_t keyboard_idle; extern uint8_t keyboard_protocol; - /* host driver */ void host_set_driver(host_driver_t *driver); host_driver_t *host_get_driver(void); @@ -46,14 +49,6 @@ void host_consumer_send(uint16_t data); uint16_t host_last_system_report(void); uint16_t host_last_consumer_report(void); -#define IS_LED_ON(USB_LED, LED_NAME) ((USB_LED) & (1 << (LED_NAME))) -#define IS_LED_OFF(USB_LED, LED_NAME) (~(USB_LED) & (1 << (LED_NAME))) - -#define IS_HOST_LED_ON(LED_NAME) IS_LED_ON(host_keyboard_leds(), (LED_NAME)) -#define IS_HOST_LED_OFF(LED_NAME) IS_LED_OFF(host_keyboard_leds(), (LED_NAME)) - #ifdef __cplusplus } #endif - -#endif From 37b042a594d5f268ed04ad3d484ab81715862403 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 21 Jan 2019 18:24:43 +0000 Subject: [PATCH 164/458] Initial fixes for vagrant (#4900) --- Vagrantfile | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 9c414b2bcb9b..5aa56bf2a723 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -2,8 +2,11 @@ # vi: set ft=ruby : Vagrant.configure(2) do |config| - # VMware/Virtualbox 64 bit - config.vm.box = "phusion/ubuntu-14.04-amd64" + # define a name instead of just 'default' + config.vm.define "qmk_firmware" + + # VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit + config.vm.box = "bento/ubuntu-16.04" # This section allows you to customize the Virtualbox VM # settings, ie showing the GUI or upping the memory @@ -15,13 +18,16 @@ Vagrant.configure(2) do |config| # your Teensy via the VM rather than your host OS #vb.customize ['modifyvm', :id, '--usb', 'on'] #vb.customize ['usbfilter', 'add', '0', - # '--target', :id, - # '--name', 'teensy', - # '--vendorid', '0x16c0', - # '--productid','0x0478' - # ] + # '--target', :id, + # '--name', 'teensy', + # '--vendorid', '0x16c0', + # '--productid','0x0478' + # ] # Customize the amount of memory on the VM: vb.memory = "512" + # Uncomment the below lines if you have time sync + # issues with make and incremental builds + #vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ] end # This section allows you to customize the VMware VM @@ -56,19 +62,18 @@ Vagrant.configure(2) do |config| # This script ensures the required packages for AVR programming are installed # It also ensures the system always gets the latest updates when powered on # If this causes issues you can run a 'vagrant destroy' and then - # add a # before ,args: and run 'vagrant up' to get a working + # add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working # non-updated box and then attempt to troubleshoot or open a Github issue - - config.vm.provision "shell", run: "always", path: "./util/qmk_install.sh", args: "-update" + config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always" config.vm.post_up_message = <<-EOT Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is located at /vagrant - To compile the .hex files use make command inside this directory. + To compile the .hex files use make command inside this directory, e.g. + cd /vagrant + make :default - QMK's make format recently changed to use folder locations and colons: - make project_folder:keymap[:target] Examples: make planck/rev4:default:dfu make planck:default From 4822ad6be194f416f6c95c468e26197dd442ac52 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 21 Jan 2019 11:22:21 -0800 Subject: [PATCH 165/458] handwired/retro_refit: refactor, Configurator support and readme update (#4899) * handwired/retro_refit: refactor - retro_refit.h - updated to use #pragma once include guard - refactored layout macro to not auto-prepend KC_ to keycodes - renamed to LAYOUT (from KEYMAP) - aligned for readability - default keymap.c - now uses #include QMK_KEYBOARD_H - removed unused fn_actions and action_get_macro blocks * handwired/retro_refit: Configurator support * handwired/retro_refit: readme update Updated readme to format of current QMK template. --- keyboards/handwired/retro_refit/info.json | 95 +++++++++++++++++++ .../retro_refit/keymaps/default/keymap.c | 33 ++----- keyboards/handwired/retro_refit/readme.md | 72 ++++++-------- keyboards/handwired/retro_refit/retro_refit.h | 51 +++++----- 4 files changed, 155 insertions(+), 96 deletions(-) create mode 100644 keyboards/handwired/retro_refit/info.json diff --git a/keyboards/handwired/retro_refit/info.json b/keyboards/handwired/retro_refit/info.json new file mode 100644 index 000000000000..44ae97cd125c --- /dev/null +++ b/keyboards/handwired/retro_refit/info.json @@ -0,0 +1,95 @@ +{ + "keyboard_name": "handwired/retro_refit", + "url": "", + "maintainer": "qmk", + "width": 15.5, + "height": 6.5, + "layouts": { + "LAYOUT": { + "key_count": 81, + "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":"Num Lock", "x":11.5, "y":0}, + {"label":"Scroll Lock", "x":12.5, "y":0}, + {"label":"Print Screen", "x":13.5, "y":0}, + {"label":"Pause", "x":14.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":1.5}, + {"label":"Home", "x":14.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":"Page Up", "x":14.5, "y":2.5}, + {"label":"Ctrl", "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":1.75}, + {"label":"Page Down", "x":14.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.25}, + {"label":"Up", "x":13.5, "y":4.5}, + {"label":"End", "x":14.5, "y":4.5}, + {"label":"Alt", "x":0, "y":5.5, "w":1.25}, + {"label":"Caps Lock", "x":1.25, "y":5.5, "w":1.25}, + {"label":"\\", "x":2.5, "y":5.5}, + {"label":"Space", "x":3.5, "y":5.5, "w":7}, + {"label":"Insert", "x":10.5, "y":5.5}, + {"label":"Delete", "x":11.5, "y":5.5}, + {"label":"Left", "x":12.5, "y":5.5}, + {"label":"Down", "x":13.5, "y":5.5}, + {"label":"Right", "x":14.5, "y":5.5} + ] + } + } +} diff --git a/keyboards/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c index a850bd508044..2f9f28478ec1 100644 --- a/keyboards/handwired/retro_refit/keymaps/default/keymap.c +++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c @@ -1,27 +1,12 @@ - -#include "retro_refit.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = - KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ - BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ - LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), -}; - -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; + [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_NLCK, KC_SLCK, KC_PSCR, 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_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_BSLS, 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_INS, KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), }; diff --git a/keyboards/handwired/retro_refit/readme.md b/keyboards/handwired/retro_refit/readme.md index 9f10edf9fc37..8dfca7b10b33 100644 --- a/keyboards/handwired/retro_refit/readme.md +++ b/keyboards/handwired/retro_refit/readme.md @@ -1,60 +1,42 @@ -retro_refit keyboard firmware -====================== - -## Keyboard Info +# retro_refit The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop". -http://imgur.com/a/08Fyj +[Image Gallery](https://imgur.com/a/08Fyj) -This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow". +This keyboard uses a LAYOUT macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow". -The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y. +The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corresponds to a key in row x column y. ``` -#define KEYMAP( \ - K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ - K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ - K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ - K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ - K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ - K10, K06, K25, K07, K86, K85, K95, K90, K93 \ +#define LAYOUT( \ + K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ + K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ + K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ + K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ + K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ + K10, K06, K25, K07, K86, K85, K95, K90, K93 \ ) { \ -{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ -{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ -{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ -{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ -{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ -{ 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_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ -{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ -{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ -{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ + { 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, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K85, K86, K87 }, \ + { K90, K91, KC_NO, K93, K94, K95, KC_NO, K97 }, \ + { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7 } \ } ``` -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/retro_refit 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 program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. +Keyboard Maintainer: [The QMK Community](https://github.com/qmk) +Hardware Supported: Leading Edge D3 386 keyboard, Teensy -### Default -To build with the default keymap, simply run `make default`. +Make example for this keyboard (after setting up your build environment): -### 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. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` + make handwired/retro_refit:default -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ 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/retro_refit/retro_refit.h b/keyboards/handwired/retro_refit/retro_refit.h index 109acdc399eb..ad1c567a8436 100644 --- a/keyboards/handwired/retro_refit/retro_refit.h +++ b/keyboards/handwired/retro_refit/retro_refit.h @@ -1,38 +1,35 @@ -#ifndef RETRO_REFIT_H -#define RETRO_REFIT_H +#pragma once #include "quantum.h" -// This macro is an example of using a non-standard row-column matrix. The -// keyboard in question had 11 rows and 8 columns, but the rows were not all -// horizontal, and the columns were not all vertical. For example, row 2 +// This macro is an example of using a non-standard row-column matrix. The +// keyboard in question had 11 rows and 8 columns, but the rows were not all +// horizontal, and the columns were not all vertical. For example, row 2 // contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and -// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", +// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", // "Left Alt", "Up Arrow", and "Down Arrow". // // The macro makes programming the keys easier and in a more straight-forward -// manner because it realigns the keys into a 6x15 sensible keyboard layout +// manner because it realigns the keys into a 6x15 sensible keyboard layout // instead of the obtuse 11x8 matrix. -#define KEYMAP( \ - K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ - K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ - K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ - K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ - K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ - K10, K06, K25, K07, K86, K85, K95, K90, K93 \ +#define LAYOUT( \ + K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ + K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ + K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ + K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ + K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ + K10, K06, K25, K07, K86, K85, K95, K90, K93 \ ) { \ -{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ -{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ -{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ -{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ -{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ -{ 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_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ -{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ -{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ -{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ + { 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, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K85, K86, K87 }, \ + { K90, K91, KC_NO, K93, K94, K95, KC_NO, K97 }, \ + { KA0, KA1, KA2, KA3, KA4, KA5, KA6, KA7 } \ } - -#endif \ No newline at end of file From 2cc674c24daec5e7a775bba16a007faa7d440f9a Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Mon, 21 Jan 2019 17:44:41 -0200 Subject: [PATCH 166/458] [Keyboard] Added TGR Alice keyboard support (#4896) * Added TGR Alice keyboard support This keyboard uses ps2avrGB firmware, so I used the same matrix Bootmapper Client was using and was able to flash it appropriately. * Refactor alice to use QMK core * Fixed markdown line breaks on TGR Alice readme --- keyboards/alice/alice.c | 55 ++++ keyboards/alice/alice.h | 38 +++ keyboards/alice/config.h | 42 +++ keyboards/alice/keymaps/default/keymap.c | 37 +++ keyboards/alice/keymaps/mrkeebs/keymap.c | 37 +++ keyboards/alice/program | 106 ++++++ keyboards/alice/readme.md | 60 ++++ keyboards/alice/rules.mk | 48 +++ keyboards/alice/usbconfig.h | 396 +++++++++++++++++++++++ 9 files changed, 819 insertions(+) create mode 100644 keyboards/alice/alice.c create mode 100644 keyboards/alice/alice.h create mode 100644 keyboards/alice/config.h create mode 100644 keyboards/alice/keymaps/default/keymap.c create mode 100644 keyboards/alice/keymaps/mrkeebs/keymap.c create mode 100755 keyboards/alice/program create mode 100644 keyboards/alice/readme.md create mode 100644 keyboards/alice/rules.mk create mode 100644 keyboards/alice/usbconfig.h diff --git a/keyboards/alice/alice.c b/keyboards/alice/alice.c new file mode 100644 index 000000000000..adb88fef0a88 --- /dev/null +++ b/keyboards/alice/alice.c @@ -0,0 +1,55 @@ +/* +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_master.h" +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +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 diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h new file mode 100644 index 000000000000..a92618593a3e --- /dev/null +++ b/keyboards/alice/alice.h @@ -0,0 +1,38 @@ +/* +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( \ + 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, K64, K65 \ +) \ +{ \ + { 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 } \ +} + diff --git a/keyboards/alice/config.h b/keyboards/alice/config.h new file mode 100644 index 000000000000..7a8cbb52f1eb --- /dev/null +++ b/keyboards/alice/config.h @@ -0,0 +1,42 @@ +/* +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 0x422E +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER TGR +#define PRODUCT TGR Alice + +/* matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define DIODE_DIRECTION COL2ROW + +#define RGBLED_NUM 20 +#define RGBLIGHT_ANIMATIONS + +#define NO_UART 1 +#define BOOTLOADHID_BOOTLOADER 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/alice/keymaps/default/keymap.c b/keyboards/alice/keymaps/default/keymap.c new file mode 100644 index 000000000000..a0b6d467d4e9 --- /dev/null +++ b/keyboards/alice/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, \ + KC_ESC, KC_PGUP, KC_PGDN \ + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______ \ + ), +}; diff --git a/keyboards/alice/keymaps/mrkeebs/keymap.c b/keyboards/alice/keymaps/mrkeebs/keymap.c new file mode 100644 index 000000000000..6b0133870093 --- /dev/null +++ b/keyboards/alice/keymaps/mrkeebs/keymap.c @@ -0,0 +1,37 @@ +/* +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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, \ + KC_ESC, KC_PGUP, KC_PGDN \ + ), + [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_DEL, KC_INS, \ + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_UP , _______, _______, \ + _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, \ + RESET, _______, _______ \ + ), +}; diff --git a/keyboards/alice/program b/keyboards/alice/program new file mode 100755 index 000000000000..3779bad040aa --- /dev/null +++ b/keyboards/alice/program @@ -0,0 +1,106 @@ +#!/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/readme.md b/keyboards/alice/readme.md new file mode 100644 index 000000000000..8e901ae7e44a --- /dev/null +++ b/keyboards/alice/readme.md @@ -0,0 +1,60 @@ +# TGR Alice + +![TGR Alice](https://i.imgur.com/cJohEqS.jpg) + +An ergonomic 60% keyboard. + +Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) +Hardware Supported: TGR Alice +Hardware Availability: Group buy finished + +Make example for this keyboard (after setting up your build environment): + + make alice: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 alice +$ bootloadHID -r alice_default.hex +``` + +## Setting the board to bootloader mode + +Hold the ESC key (the one before the 1! key, in case you remaped it). + +## 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/alice/rules.mk b/keyboards/alice/rules.mk new file mode 100644 index 000000000000..bb57cbeae304 --- /dev/null +++ b/keyboards/alice/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_master.c + +# programming options +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/alice/usbconfig.h b/keyboards/alice/usbconfig.h new file mode 100644 index 000000000000..df7a88e3abd0 --- /dev/null +++ b/keyboards/alice/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 'T', 'G', 'R' +#define USB_CFG_VENDOR_NAME_LEN 3 +/* 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 'T', 'G', 'R', ' ', 'A', 'l', 'i', 'c', 'e' +#define USB_CFG_DEVICE_NAME_LEN 9 +/* 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 127ec5f1e38e9472990f956a4b76192c07508feb Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Mon, 21 Jan 2019 22:52:39 +0000 Subject: [PATCH 167/458] Fix for ISO layout in tada68:rys (#4906) --- keyboards/tada68/keymaps/rys/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/tada68/keymaps/rys/keymap.c b/keyboards/tada68/keymaps/rys/keymap.c index 6f32b092d499..d1301d40bc0b 100644 --- a/keyboards/tada68/keymaps/rys/keymap.c +++ b/keyboards/tada68/keymaps/rys/keymap.c @@ -21,8 +21,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_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_NUHS, 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_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 ), From 8cf7265f8fae6f94b17c5d78ed41e52b22e2b218 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Wed, 23 Jan 2019 02:57:13 +1000 Subject: [PATCH 168/458] Rename i2c_slave functions so it can coexist with i2c_master (#4875) Also merges tx/rx buffers, as only one is necessary. --- drivers/avr/i2c_slave.c | 25 ++++++++++++++----------- drivers/avr/i2c_slave.h | 13 ++++--------- keyboards/dc01/arrow/matrix.c | 12 ++++++------ keyboards/dc01/numpad/matrix.c | 12 ++++++------ keyboards/dc01/right/matrix.c | 12 ++++++------ 5 files changed, 36 insertions(+), 38 deletions(-) diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c index 27696ca01ab5..18a29a45a5a4 100755 --- a/drivers/avr/i2c_slave.c +++ b/drivers/avr/i2c_slave.c @@ -9,23 +9,26 @@ #include "i2c_slave.h" -void i2c_init(uint8_t address){ +volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; + +static volatile uint8_t buffer_address; +static volatile bool slave_has_register_set = false; + +void i2c_slave_init(uint8_t address){ // load address into TWI address register TWAR = (address << 1); // set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN); } -void i2c_stop(void){ +void i2c_slave_stop(void){ // clear acknowledge and enable bits TWCR &= ~((1 << TWEA) | (1 << TWEN)); } ISR(TWI_vect){ uint8_t ack = 1; - // temporary stores the received data - //uint8_t data; - + switch(TW_STATUS){ case TW_SR_SLA_ACK: // The device is now a slave receiver @@ -38,13 +41,13 @@ ISR(TWI_vect){ if(!slave_has_register_set){ buffer_address = TWDR; - if (buffer_address >= RX_BUFFER_SIZE){ // address out of bounds dont ack - ack = 0; - buffer_address = 0; + if (buffer_address >= I2C_SLAVE_REG_COUNT) { // address out of bounds dont ack + ack = 0; + buffer_address = 0; } slave_has_register_set = true; // address has been receaved now fill in buffer } else { - rxbuffer[buffer_address] = TWDR; + i2c_slave_reg[buffer_address] = TWDR; buffer_address++; } break; @@ -52,7 +55,7 @@ ISR(TWI_vect){ case TW_ST_SLA_ACK: case TW_ST_DATA_ACK: // This device is a slave transmitter and master has requested data - TWDR = txbuffer[buffer_address]; + TWDR = i2c_slave_reg[buffer_address]; buffer_address++; break; @@ -63,6 +66,6 @@ ISR(TWI_vect){ break; } - // Reset i2c state mahcine to be ready for next interrupt + // Reset i2c state machine to be ready for next interrupt TWCR |= (1 << TWIE) | (1 << TWINT) | (ack << TWEA) | (1 << TWEN); } \ No newline at end of file diff --git a/drivers/avr/i2c_slave.h b/drivers/avr/i2c_slave.h index 1c3b9ecc0033..7b5dcbdc3eb2 100755 --- a/drivers/avr/i2c_slave.h +++ b/drivers/avr/i2c_slave.h @@ -8,16 +8,11 @@ #ifndef I2C_SLAVE_H #define I2C_SLAVE_H -#define TX_BUFFER_SIZE 30 -#define RX_BUFFER_SIZE 30 +#define I2C_SLAVE_REG_COUNT 30 -volatile uint8_t buffer_address; -static volatile bool slave_has_register_set = false; -volatile uint8_t txbuffer[TX_BUFFER_SIZE]; -volatile uint8_t rxbuffer[RX_BUFFER_SIZE]; +extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT]; -void i2c_init(uint8_t address); -void i2c_stop(void); -ISR(TWI_vect); +void i2c_slave_init(uint8_t address); +void i2c_slave_stop(void); #endif // I2C_SLAVE_H \ No newline at end of file diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c index 68abb6791a73..85591f6026ab 100644 --- a/keyboards/dc01/arrow/matrix.c +++ b/keyboards/dc01/arrow/matrix.c @@ -195,14 +195,14 @@ uint8_t matrix_scan(void) debouncing = false; } # endif - + if (USB_DeviceState != DEVICE_STATE_Configured){ - txbuffer[1] = 0x55; + i2c_slave_reg[1] = 0x55; for (uint8_t i = 0; i < MATRIX_ROWS; i++){ - txbuffer[i+2] = matrix[i]; //send matrix over i2c + i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c } } - + matrix_scan_quantum(); return 1; } @@ -396,9 +396,9 @@ static void unselect_cols(void) //this replases tmk code void matrix_setup(void){ - + if (USB_DeviceState != DEVICE_STATE_Configured){ - i2c_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c + i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c sei(); //enable interupts } } \ No newline at end of file diff --git a/keyboards/dc01/numpad/matrix.c b/keyboards/dc01/numpad/matrix.c index f9a9a7f63d71..39637241d7e3 100644 --- a/keyboards/dc01/numpad/matrix.c +++ b/keyboards/dc01/numpad/matrix.c @@ -195,14 +195,14 @@ uint8_t matrix_scan(void) debouncing = false; } # endif - + if (USB_DeviceState != DEVICE_STATE_Configured){ - txbuffer[1] = 0x55; + i2c_slave_reg[1] = 0x55; for (uint8_t i = 0; i < MATRIX_ROWS; i++){ - txbuffer[i+2] = matrix[i]; //send matrix over i2c + i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c } } - + matrix_scan_quantum(); return 1; } @@ -396,9 +396,9 @@ static void unselect_cols(void) //this replases tmk code void matrix_setup(void){ - + if (USB_DeviceState != DEVICE_STATE_Configured){ - i2c_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c + i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c sei(); //enable interupts } } \ No newline at end of file diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c index aa2e880d01ef..50fe19b8d1a6 100644 --- a/keyboards/dc01/right/matrix.c +++ b/keyboards/dc01/right/matrix.c @@ -195,14 +195,14 @@ uint8_t matrix_scan(void) debouncing = false; } # endif - + if (USB_DeviceState != DEVICE_STATE_Configured){ - txbuffer[1] = 0x55; + i2c_slave_reg[1] = 0x55; for (uint8_t i = 0; i < MATRIX_ROWS; i++){ - txbuffer[i+2] = matrix[i]; //send matrix over i2c + i2c_slave_reg[i+2] = matrix[i]; //send matrix over i2c } } - + matrix_scan_quantum(); return 1; } @@ -396,9 +396,9 @@ static void unselect_cols(void) //this replases tmk code void matrix_setup(void){ - + if (USB_DeviceState != DEVICE_STATE_Configured){ - i2c_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c + i2c_slave_init(SLAVE_I2C_ADDRESS); //setup address of slave i2c sei(); //enable interupts } } \ No newline at end of file From ae79b60e6bfc03c7fa84076e508f0f2241f087c2 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 22 Jan 2019 21:43:17 +1100 Subject: [PATCH 169/458] Always read two bytes from the endpoint if we have two bytes to read When this if statement is false, it will cause the report ID to be read as the LED state. We already know there are two bytes in the endpoint, which is a reasonably good indicator that it contains a report ID, so we should always read both. --- tmk_core/protocol/lufa/lufa.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index cdabaf16e61d..f2ecf2465156 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -519,11 +519,7 @@ void EVENT_USB_Device_ControlRequest(void) } if (Endpoint_BytesInEndpoint() == 2) { - uint8_t report_id = REPORT_ID_KEYBOARD; - - if (keyboard_protocol) { - report_id = Endpoint_Read_8(); - } + uint8_t report_id = Endpoint_Read_8(); if (report_id == REPORT_ID_KEYBOARD || report_id == REPORT_ID_NKRO) { keyboard_led_stats = Endpoint_Read_8(); From 5be7d09b36a1a15e80978746cf256a5b62db7355 Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Mon, 21 Jan 2019 22:15:46 -0200 Subject: [PATCH 170/458] Added info.json for TGR Alice --- keyboards/alice/info.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/alice/info.json diff --git a/keyboards/alice/info.json b/keyboards/alice/info.json new file mode 100644 index 000000000000..5ea1f6756e15 --- /dev/null +++ b/keyboards/alice/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "TGR Alice", + "url": "", + "maintainer": "Felipe Coury", + "width": 17.75, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"_", "x":13.75, "y":0}, {"label":"+", "x":14.75, "y":0}, {"label":"|", "x":15.75, "y":0}, {"label":"~", "x":16.75, "y":0}, {"label":"Insert", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.25, "y":1}, {"label":"U", "x":10.25, "y":1}, {"label":"I", "x":11.25, "y":1}, {"label":"O", "x":12.25, "y":1}, {"label":"P", "x":13.25, "y":1}, {"label":"{", "x":14.25, "y":1}, {"label":"}", "x":15.25, "y":1}, {"label":"Backspace", "x":16.25, "y":1, "w":1.5}, {"label":"Delete", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":9, "y":3}, {"label":"N", "x":10, "y":3}, {"label":"M", "x":11, "y":3}, {"label":"<", "x":12, "y":3}, {"label":">", "x":13, "y":3}, {"label":"?", "x":14, "y":3}, {"label":"Shift", "x":15, "y":3, "w":1.75}, {"label":"Fn", "x":16.75, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Win", "x":7.25, "y":4, "w":1.25}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] + } + } +} From 2a33d2c4243e6fdca9849ff1caadbaea941e8c85 Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Tue, 22 Jan 2019 20:39:53 +0000 Subject: [PATCH 171/458] [Keymap] Add a compile-time provided macro and assign to _FL (#4908) * Update make command with correct variant * Add a custom keycode for a compile-time defined macro and add to _FL --- keyboards/tada68/keymaps/rys/keymap.c | 31 +++++++++++++++++++------- keyboards/tada68/keymaps/rys/readme.md | 2 +- keyboards/tada68/keymaps/rys/rules.mk | 3 +++ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/keyboards/tada68/keymaps/rys/keymap.c b/keyboards/tada68/keymaps/rys/keymap.c index d1301d40bc0b..a729e4be8973 100644 --- a/keyboards/tada68/keymaps/rys/keymap.c +++ b/keyboards/tada68/keymaps/rys/keymap.c @@ -5,6 +5,21 @@ #define _______ KC_TRNS +enum rys_keycodes { + PSTOKEN = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case PSTOKEN: + if (record->event.pressed) { + SEND_STRING(RYS_PSTOKEN); + } + break; + } + return true; +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,----------------------------------------------------------------. @@ -16,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |----------------------------------------------------------------| * |Shift| \ | Z| X| C| V| B| N| M| ,| .| /|Rshift|Up|PgDn| * |----------------------------------------------------------------| - * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * |Ctrl|Alt |LGUI| Space |Alt| FN|Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' */ [_BL] = LAYOUT_iso( @@ -29,22 +44,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _FL1: Function Layer 1 * ,----------------------------------------------------------------. - * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Delete| Ins| + * | | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | :D | * |----------------------------------------------------------------| - * | | | ↑ | | | | | | | | | | | |Home| + * | |LMB| Up|RMB| | | | | | | | | | | | * |------------------------------------------------------- -----| - * | | ← | ↓ | → | | | | | | | | | | | End| + * | |Lef|Dow|Rig| | | | | | | | | | |Home| * |----------------------------------------------------------------| - * | | | | | L+|LED| L-| | V+| V-|Mut| | MsBtn|Up|MsBn| + * | | | | | L+|LED| L-| | V+| V-|Mut| | MsBtn|↑ | End| * |----------------------------------------------------------------| - * | | | | | | | | Lt| Dn| Rt | + * | | | | 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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, PSTOKEN, \ _______, 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 + _______, _______, _______, RESET, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R ), }; diff --git a/keyboards/tada68/keymaps/rys/readme.md b/keyboards/tada68/keymaps/rys/readme.md index a9425bf0673f..bf6a643d3365 100644 --- a/keyboards/tada68/keymaps/rys/readme.md +++ b/keyboards/tada68/keymaps/rys/readme.md @@ -11,5 +11,5 @@ Please see the [Tada68 readme](../../readme.md). Make the firmware wih the following command: ``` -make tada68:rys:bin +make tada68:rys:flashbin ``` diff --git a/keyboards/tada68/keymaps/rys/rules.mk b/keyboards/tada68/keymaps/rys/rules.mk index b2789a78a7da..db6efeb8f16b 100644 --- a/keyboards/tada68/keymaps/rys/rules.mk +++ b/keyboards/tada68/keymaps/rys/rules.mk @@ -15,3 +15,6 @@ 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 + +RYS_PSTOKEN = $(shell security find-generic-password -a qmk -s tada68 -w) +CFLAGS += -DRYS_PSTOKEN=\"$(RYS_PSTOKEN)\" From 6b1009b7a876db1f0cc5674cfa64739139ea4098 Mon Sep 17 00:00:00 2001 From: Nikolaus Wittenstein Date: Tue, 22 Jan 2019 18:17:41 -0500 Subject: [PATCH 172/458] [Keyboard] Add DataHand keyboard support (#4847) --- keyboards/handwired/datahand/config.h | 87 +++++ keyboards/handwired/datahand/datahand.h | 133 ++++++++ .../datahand/keymaps/default/keymap.c | 313 ++++++++++++++++++ keyboards/handwired/datahand/matrix.c | 125 +++++++ keyboards/handwired/datahand/readme.md | 15 + keyboards/handwired/datahand/rules.mk | 59 ++++ keyboards/readme.md | 1 + 7 files changed, 733 insertions(+) create mode 100644 keyboards/handwired/datahand/config.h create mode 100644 keyboards/handwired/datahand/datahand.h create mode 100644 keyboards/handwired/datahand/keymaps/default/keymap.c create mode 100644 keyboards/handwired/datahand/matrix.c create mode 100644 keyboards/handwired/datahand/readme.md create mode 100644 keyboards/handwired/datahand/rules.mk diff --git a/keyboards/handwired/datahand/config.h b/keyboards/handwired/datahand/config.h new file mode 100644 index 000000000000..1ba8479f0a1c --- /dev/null +++ b/keyboards/handwired/datahand/config.h @@ -0,0 +1,87 @@ +/* Copyright 2017-2019 Nikolaus Wittenstein + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +/* Taken from the DataHand PS/2-USB adaptor. */ +#define VENDOR_ID 0x13BA +#define PRODUCT_ID 0x0017 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DataHand +#define PRODUCT DataHand +#define DESCRIPTION DataHand Teensy++ 2.0 conversion + +/* key matrix size */ +#define MATRIX_ROWS 13 +#define MATRIX_COLS 4 + +#define DIODE_DIRECTION CUSTOM_MATRIX + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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 + +/* + * 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)) \ +) + +/* + * Command/Windows key option + * + * If you define this, the thumb enter key becomes the Command/Windows key. There's still an enter key on the right + * ring finger, so this key is much better utilized as the otherwise nonexistent Command key. I think some newer + * DataHands let you remap right ring east as Command, but having it on the thumb is nicer. Comment out this define + * to use the original layout. + */ +#define DATAHAND_THUMB_RETURN_COMMAND diff --git a/keyboards/handwired/datahand/datahand.h b/keyboards/handwired/datahand/datahand.h new file mode 100644 index 000000000000..cb9a4d3e3b62 --- /dev/null +++ b/keyboards/handwired/datahand/datahand.h @@ -0,0 +1,133 @@ +/* Copyright 2017-2019 Nikolaus Wittenstein + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * The first section contains all of the arguements; the second converts the arguments into a two-dimensional array. + */ + +/* Each code is three letters + * l or r - left or right hand + * p, r, m, i, t - pinky, ring finger, middle finger, index finger, thumb + * fingers: n, s, e, w, c - north, south, east, west, and center (manual calls this "well" but we already have "west") + * thumb: p, n, c, l, u, k - pad, nail, center, lock (harder center), up, knuckle + */ +#define LAYOUT( \ + lpn, lrn, lmn, lin, rin, rmn, rrn, rpn, \ +lpw, lpc, lpe, lrw, lrc, lre, lmw, lmc, lme, liw, lic, lie, riw, ric, rie, rmw, rmc, rme, rrw, rrc, rre, rpw, rpc, rpe, \ + lps, lrs, lms, lis, ris, rms, rrs, rps, \ + ltp, ltn, rtn, rtp, \ + ltc, rtc, \ + ltl, rtl, \ + ltu, ltk, rtk, rtu) \ +{ \ + {riw, rin, lpw, lpn},\ + {ric, rie, lpc, lpe},\ + {ris, rms, lps, lrs},\ + {rmw, rmn, lrw, lrn},\ + {rmc, rme, lrc, lre},\ + {rrw, rrn, lmw, lmn},\ + {rrc, rre, lmc, lme},\ + {rrs, rps, lms, lis},\ + {rpw, rpn, liw, lin},\ + {rpc, rpe, lic, lie},\ + {rtk, rtn, ltk, ltn},\ + {rtc, rtl, ltc, ltl},\ + {rtp, rtu, ltp, ltu},\ +} + +/* Mode LEDs are active-low on Port B on the Teensy. */ +#define LED_MODE_PORT PORTB +#define LED_TENKEY (1<<3) +#define LED_FN (1<<4) +#define LED_NORMAL (1<<5) +#define LED_NAS (1<<6) + +/* Lock LEDs are active-low on Port F on the Teensy. */ +#define LED_LOCK_PORT PORTF +#define LED_CAPS_LOCK (1<<4) +#define LED_MOUSE_LOCK (1<<5) +#define LED_NUM_LOCK (1<<6) +#define LED_SCROLL_LOCK (1<<7) + + +/* Appendix: + * Table based on https://geekhack.org/index.php?topic=12212.msg2059319#msg2059319 + * Some pin assignments (e.g. for PS/2 I/O) have been fixed. + * + * Teensy Datahand 8051 pin pin 8051 Datahand Teensy + * ------ -------- ---- --- --- ---- -------- ------ + * GND Mtrx send A P1.0 1 40 VCC VCC VCC + * PB7 Mtrx send B P1.1 2 39 P0.0 LED RH NAS PB6 + * PD0 Mtrx send C P1.2 3 38 P0.1 LED RH NORM PB5 + * PD1 Mtrx send D P1.3 4 37 P0.2 LED RH FCTN PB4 + * PD2 RH rcv 0 P1.4 5 36 P0.3 LED RH 10K PB3 + * PD3 RH rcv 1 P1.5 6 35 P0.4 LED RH unused PB2 + * PD4 LH rcv 0 P1.6 7 34 P0.5 LED RH unused PE1 + * PD5 LH rcv 1 P1.7 8 33 P0.6 LED RH unused PE0 + * PD6 Reset button RST 9 32 P0.7 ? PE7 + * PD7 ? P3.0 10 31 VPP - PE6 + * PE0 ? P3.1 11 30 ALE - GND + * PE1 kbd data P3.2 12 29 PSEN - AREF + * PC0 ? P3.3 13 28 P2.7 ? PF0 + * PC1 kbd clk P3.4 14 27 P2.6 ? PF1 + * PC2 ? P3.5 15 26 P2.5 ? PF2 + * PC3 RAM P3.6 16 25 P2.4 ? PF3 + * PC4 RAM P3.7 17 24 P2.3 LED D15 LH (CAPLK) PF4 + * PC5 XTAL2 XTAL2 18 23 P2.2 LED D13 LH (MSELK) PF5 + * PC6 XTAL1 XTAL1 19 22 P2.1 LED D6 LH (NUMLK) PF6 + * PC7 GND GND 20 21 P2.0 LED D14 LH (SCRLK) PF7 + * + * JP3 Pinout + * 2 - keyboard data + * 3 - keyboard clock + * + * In order to get the Teensy to work, we need to move pin 1 to a different pin. This is + * because on the Teensy pin 1 is ground, but we need to write to pin 1 in order to read + * the keyboard matrix. An ideal pin to move it to is VPP (pin 31), because this pin tells + * the 8051 whether it should read from external or internal memory. The Teensy doesn't + * care about that. + * + * The easiest way to reassign the pin is to use standoffs. You can check out this thread: + * https://geekhack.org/index.php?topic=12212.msg235382#msg235382 for a picture of what + * this looks like. Note that in the picture the pin has been reassigned to pin 12. We + * don't want to do that because we're going to use that pin to send data over PS/2. + * + * We could if we wanted also reassign the PS/2 pins to Teensy hardware UART pins, but + * that's more work. Instead we'll just bit-bang PS/2 because it's an old, slow protocol + * (and because there's already a bit-banged PS/2 host implementation in QMK - we just + * need to add the device side). + * + * So overall, we want the following inputs and outputs: + * Outputs: + * Matrix: + * PB7 + * PD0 + * PD1 + * PE6 (moved from pin1, GND) + * LEDs: + * PB3-6 + * PF4-7 + * Inputs: + * Matrix: + * PD2-5 + * I/Os (start up as inputs): + * PS/2: + * PC1 + * PE1 + */ diff --git a/keyboards/handwired/datahand/keymaps/default/keymap.c b/keyboards/handwired/datahand/keymaps/default/keymap.c new file mode 100644 index 000000000000..8f44535594e5 --- /dev/null +++ b/keyboards/handwired/datahand/keymaps/default/keymap.c @@ -0,0 +1,313 @@ +/* Copyright 2017-2019 Nikolaus Wittenstein + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include QMK_KEYBOARD_H + +#include + +/* Datahand features not supported: + * * All online reprogramming (user settings using the reset button). + * * Program Selection features. + * * Macros. + * * Direct substitutions. + * * L/R Modf. + * * Mouse Click Lock (Function Direct Access + Mouse Button key). + * * Different mouse movement speeds with the two pointer fingers, and using both pointer fingers to move even faster. + * + * As far as I know, everything else works. + */ + +enum layer { + NORMAL, +#ifdef DATAHAND_THUMB_RETURN_COMMAND + NORMAL_THUMB_RETURN_COMMAND, +#endif + FUNCTION_MOUSE, + FUNCTION_ARROWS, + NAS, + NAS_NUMLOCK, + NAS_TENKEY, + NAS_TENKEY_NUMLOCK, + + NUM_LAYERS +}; + +enum custom_keycodes { + N = SAFE_RANGE, /* Normal */ + NS, /* NAS */ + NSL, /* NAS Lock */ + NLK, /* Numlock */ + FN, /* Function mode - needs to be able to switch to mouse or arrow layer */ + TK0, /* Ten-key off button */ + TK1, /* Ten-key on button */ + AR, /* FN arrow mode */ + MS, /* FN mouse mode */ + DZ, /* Double zero button */ +}; + +static bool mouse_enabled = true; +static bool tenkey_enabled = false; +static bool numlock_enabled = false; +static bool nas_locked = false; + +/* Declared weak so that it can easily be overridden. */ +__attribute__((weak)) const uint16_t PROGMEM keymaps[NUM_LAYERS][MATRIX_ROWS][MATRIX_COLS] = { +[NORMAL] = LAYOUT( + KC_Q, KC_W, KC_E, KC_R, KC_U, KC_I, KC_O, KC_P, +KC_DEL, KC_A, KC_LBRC, KC_ESC, KC_S, KC_B, KC_GRV, KC_D, KC_T, KC_DQT, KC_F, KC_G, KC_H, KC_J, KC_QUOT, KC_Y, KC_K, KC_COLN, KC_N, KC_L, KC_ENT, KC_RBRC, KC_SCLN, KC_BSLS, + KC_Z, KC_X, KC_C, KC_V, KC_M, KC_COMM, KC_DOT, KC_SLSH, + KC_ENT, KC_TAB, KC_BSPC, KC_SPC, + KC_LSFT, NS, + KC_CAPS, NSL, + N, KC_LCTL, KC_LALT, FN), + +#ifdef DATAHAND_THUMB_RETURN_COMMAND +[NORMAL_THUMB_RETURN_COMMAND] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCMD, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +#endif + +[FUNCTION_MOUSE] = LAYOUT( + KC_F2, KC_F4, KC_F6, KC_MS_U, KC_MS_U, KC_F8, KC_F10, KC_PGUP, +_______, KC_NO, KC_SLCK, _______, KC_BTN3, NLK, KC_BTN1, MS, KC_BTN2, KC_MS_L, KC_BTN1, KC_MS_R, KC_MS_L, KC_BTN2, KC_MS_R, KC_END, AR, KC_LSFT, KC_INS, KC_9, KC_ENT, KC_F11, KC_0, KC_F12, + KC_F1, KC_F3, KC_F5, KC_MS_D, KC_MS_D, KC_F7, KC_F9, KC_PGDN, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +[FUNCTION_ARROWS] = LAYOUT( + _______, _______, _______, KC_UP, KC_UP, _______, _______, _______, +_______, _______, _______, _______, KC_LCTL, _______, _______, _______, _______, KC_LEFT, KC_HOME, KC_RGHT, KC_LEFT, KC_HOME, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_DOWN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +[NAS] = LAYOUT( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, +_______, KC_1, KC_TILD, _______, KC_2, NLK, KC_LABK, KC_3, KC_RABK, KC_SLSH, KC_4, KC_5, KC_6, KC_7, KC_UNDS, KC_CIRC, KC_8, KC_ENT, KC_SCLN, KC_9, KC_BSLS, TK0, KC_0, TK1, + KC_EQL, KC_X, KC_PERC, KC_MINS, KC_PLUS, KC_DOT, KC_SLSH, KC_QUES, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +[NAS_NUMLOCK] = LAYOUT( + _______, _______, _______, _______, _______, KC_PAST, _______, _______, +_______, KC_KP_1, _______, _______, KC_KP_2, _______, _______, KC_KP_3, _______, KC_PSLS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_7, _______, _______, KC_KP_8, _______, _______, KC_KP_9, KC_PENT, _______, KC_KP_0, _______, + KC_PEQL, _______, _______, KC_PMNS, KC_PPLS, _______, KC_PDOT, _______, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +[NAS_TENKEY] = LAYOUT( + _______, _______, _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, +_______, KC_QUOT, _______, _______, KC_DLR, _______, _______, KC_AMPR, _______, KC_LEFT, KC_HOME, KC_RGHT, KC_0, KC_4, DZ, KC_PLUS, KC_5, KC_MINS, KC_EQL, KC_6, KC_ENT, _______, KC_DOT, _______, + KC_LPRN, KC_RPRN, _______, KC_DOWN, KC_1, KC_2, KC_3, KC_SLSH, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +[NAS_TENKEY_NUMLOCK] = LAYOUT( + _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_PAST, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_4, _______, KC_PPLS, KC_KP_5, KC_PMNS, KC_PEQL, KC_KP_6, KC_PENT, _______, KC_PDOT, _______, + _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PSLS, + _______, _______, _______, _______, + _______, _______, + _______, _______, + _______, _______, _______, _______), +}; + +static void lock_led_set(bool on, uint8_t led) { + if (on) { + LED_LOCK_PORT &= ~led; + } else { + LED_LOCK_PORT |= led; + } +} + +static void mode_led_set(uint8_t led) { + static const uint8_t ALL_MODE_LEDS = LED_FN | LED_NORMAL | LED_NAS | LED_TENKEY; + LED_MODE_PORT |= ALL_MODE_LEDS; + LED_MODE_PORT &= ~led; +} + +static void layer_set(bool on, uint8_t layer) { + if (on) { + layer_on(layer); + } else { + layer_off(layer); + } + + if (layer_state_is(NAS) || layer_state_is(NAS_NUMLOCK) || layer_state_is(NAS_TENKEY) || layer_state_is(NAS_TENKEY_NUMLOCK)) { + if (tenkey_enabled) { + mode_led_set(LED_NAS | LED_TENKEY); + } else { + mode_led_set(LED_NAS); + } + } else if (layer_state_is(FUNCTION_MOUSE) || layer_state_is(FUNCTION_ARROWS)) { + mode_led_set(LED_FN); + } else if (layer_state_is(NORMAL)) { + mode_led_set(LED_NORMAL); + } +} + +static void set_normal(void) { + layer_move(NORMAL); + +#ifdef DATAHAND_THUMB_RETURN_COMMAND + layer_set(true, NORMAL_THUMB_RETURN_COMMAND); +#endif + + /* Then call layer_set to update LEDs. */ + layer_set(true, NORMAL); +} + +static void set_nas(bool on) { + /* Always turn on the base NAS layer so other layers can fall through. */ + layer_set(on, NAS); + + layer_set(on && numlock_enabled, NAS_NUMLOCK); + layer_set(on && tenkey_enabled, NAS_TENKEY); + layer_set(on && tenkey_enabled && numlock_enabled, NAS_TENKEY_NUMLOCK); +} + +static void set_tenkey(bool on) { + tenkey_enabled = on; + + /* We have to be on the NAS layer in order to be able to toggle TK. + * Re-toggle it on so that we move to the right layer (and set the right LED). + */ + set_nas(true); +} + +static void toggle_numlock(void) { + numlock_enabled = !numlock_enabled; + lock_led_set(numlock_enabled, LED_NUM_LOCK); + + if (layer_state_is(NAS)) { + /* If we're already in NAS, re-set it so that we activate the numlock layer. */ + set_nas(true); + } +} + +static void set_function(void) { + /* Make sure to turn off NAS if we're entering function */ + set_nas(false); + + /* Always turn on the mouse layer so the arrow layer can fall through. */ + layer_set(true, FUNCTION_MOUSE); + layer_set(!mouse_enabled, FUNCTION_ARROWS); +} + +static void set_mouse_enabled(bool on) { + mouse_enabled = on; + + /* Re-run set_function to set our layers correctly. */ + set_function(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool pressed = record->event.pressed; + + switch(keycode) { + case N: + if (pressed) { + set_normal(); + } + break; + + case NS: + if (pressed) { + nas_locked = false; + } + set_nas(pressed); + break; + + case NSL: + if (pressed) { + nas_locked = true; + set_nas(true); + } + break; + + case NLK: + if (pressed) { + toggle_numlock(); + SEND_STRING(SS_DOWN(X_NUMLOCK)); + } else { + SEND_STRING(SS_UP(X_NUMLOCK)); + } + break; + + case FN: + if (pressed) { + set_function(); + } + break; + + case TK0: + if (pressed) { + set_tenkey(false); + } + break; + + case TK1: + if (pressed) { + set_tenkey(true); + } + break; + + case MS: + if (pressed) { + set_mouse_enabled(true); + } + break; + + case AR: + if (pressed) { + set_mouse_enabled(false); + } + break; + + case DZ: + if (pressed) { + SEND_STRING(SS_TAP(X_KP_0) SS_TAP(X_KP_0)); + } + break; + } + + return true; +}; + +void matrix_init_user(void) { +#ifdef DATAHAND_THUMB_RETURN_COMMAND + set_normal(); +#endif +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + lock_led_set(usb_led & (1< + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include "datahand.h" + +#include "matrix.h" +#include "action.h" + +#include +#include +#include + +static matrix_row_t matrix[MATRIX_ROWS]; + +static matrix_row_t read_cols(void); +static void select_row(uint8_t row); + +void matrix_init(void) { + /* See datahand.h for more detail on pins. */ + + /* 7 - matrix scan; 6-3 - mode LEDs */ + DDRB = 0b11111000; + + /* 1-0 - matrix scan */ + DDRD = 0b00000011; + + /* 6 - matrix scan */ + DDRE = 0b01000000; + + /* 7-4 - lock LEDs */ + DDRF = 0b11110000; + + /* Turn off the non-Normal LEDs (they're active low). */ + PORTB |= LED_TENKEY | LED_FN | LED_NAS; + + /* Turn off the lock LEDs. */ + PORTF |= LED_CAPS_LOCK | LED_NUM_LOCK | LED_SCROLL_LOCK | LED_MOUSE_LOCK; + + matrix_init_user(); +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + select_row(row); + /* The default hardware works down to at least 100us, but I have a replacement + * photodiode that responds a little more slowly. Cranking it up to 1000us fixes + * shadowing issues. + */ + _delay_us(1000); + matrix[row] = read_cols(); + } + + matrix_scan_user(); + + return 1; +} + +matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { + print("\nr/c 01234567\n"); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); + print(": "); + print_bin_reverse8(matrix_get_row(row)); + print("\n"); + } +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +static void select_row(uint8_t row) { + /* Original 8051: P1 bits 0-3 (pins 1-4) + * Teensy++: PE0, PB7, PD0, PD1 + */ + + if (row & (1<<0)) { + PORTE |= (1<<6); + } else { + PORTE &= ~(1<<6); + } + + if (row & (1<<1)) { + PORTB |= (1<<7); + } else { + PORTB &= ~(1<<7); + } + + if (row & (1<<2)) { + PORTD |= (1<<0); + } else { + PORTD &= ~(1<<0); + } + + if (row & (1<<3)) { + PORTD |= (1<<1); + } else { + PORTD &= ~(1<<1); + } +} + +static matrix_row_t read_cols(void) { + /* Original 8051: P1 bits 4-7 (pins 5-8) + * Teensy++: PD bits 2-5 + */ + + return (PIND & 0b00111100) >> 2; +} diff --git a/keyboards/handwired/datahand/readme.md b/keyboards/handwired/datahand/readme.md new file mode 100644 index 000000000000..923cebb00e7b --- /dev/null +++ b/keyboards/handwired/datahand/readme.md @@ -0,0 +1,15 @@ +# DataHand + +A keyboard designed to prevent RSI. See [Wikipedia](https://en.wikipedia.org/wiki/DataHand) and [this website](http://octopup.org/computer/datahand) for more info. + +To use this firmware, you have to replace the stock microcontroller with a Teensy++ 2.0. This is relatively easy and also reversible. See the notes at the bottom of datahand.h for more info. + +Keyboard Maintainer: [Nikolaus Wittenstein](https://github.com/adzenith) +Hardware Supported: DataHand Personal or Pro II +Hardware Availability: No longer in production + +Make example for this keyboard (after setting up your build environment): + + make handwired/datahand: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/datahand/rules.mk b/keyboards/handwired/datahand/rules.mk new file mode 100644 index 000000000000..59f14e17a401 --- /dev/null +++ b/keyboards/handwired/datahand/rules.mk @@ -0,0 +1,59 @@ +# Project-specific includes +SRC = matrix.c + +# 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 = halfkay + +# Build Options +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 +NKRO_ENABLE = yes # 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 +CUSTOM_MATRIX = yes # We definitely have a nonstandard matrix + +# 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/readme.md b/keyboards/readme.md index 5ba98c6c452d..8b0c10ab4826 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -38,6 +38,7 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [Arrow Pad](/keyboards/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. * [Ergodox Infinity](/keyboards/ergodox_infinity) - Ergonomic Split Keyboard by Input Club. * [GH60](/keyboards/gh60) — A 60% Geekhack community-driven project. * [GON NerD](/keyboards/gonnerd) — Korean custom 60% PCB From 2dd031d4f0cd4af7a7f9dad3ce385ca3c9494200 Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Mon, 21 Jan 2019 11:32:40 -0800 Subject: [PATCH 173/458] Fix layouts/default/66_iso keymap Keymap had a comma after the last keycode. Aligned for readability. --- layouts/default/66_iso/default_60_iso/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/layouts/default/66_iso/default_60_iso/keymap.c b/layouts/default/66_iso/default_60_iso/keymap.c index ea0c10a9ce6c..4f97acf41fc4 100644 --- a/layouts/default/66_iso/default_60_iso/keymap.c +++ b/layouts/default/66_iso/default_60_iso/keymap.c @@ -1,11 +1,11 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_66_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_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGDN, - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTRL, KC_LALT, KC_LGUI, KC_SPACE, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, + [0] = LAYOUT_66_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_PGUP, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; From 9667c10477fb9bc91b9355dc4969ba8a5769871e Mon Sep 17 00:00:00 2001 From: noroadsleft Date: Mon, 21 Jan 2019 11:50:43 -0800 Subject: [PATCH 174/458] Give the keymap folder the proper name It was named default_60_iso for some reason. *shrug* --- .../default/66_iso/{default_60_iso => default_66_iso}/keymap.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename layouts/default/66_iso/{default_60_iso => default_66_iso}/keymap.c (100%) diff --git a/layouts/default/66_iso/default_60_iso/keymap.c b/layouts/default/66_iso/default_66_iso/keymap.c similarity index 100% rename from layouts/default/66_iso/default_60_iso/keymap.c rename to layouts/default/66_iso/default_66_iso/keymap.c From d1f735b6d2739295faf932dbb61e3c8b4c0b2898 Mon Sep 17 00:00:00 2001 From: skullydazed Date: Wed, 23 Jan 2019 09:25:32 -0800 Subject: [PATCH 175/458] Clueboard refresh (#4902) * Cluecard: refactor - renamed layout macro KEYMAP to LAYOUT - reformatted layout macro to more closely resemble physical device layout - keymaps now use #include QMK_KEYBOARD_H - config.h files updated to use #pragma once method - deleted outdated QUANTUM_DIR code blocks from rules.mk files - white space changes on rules.mk files (alignment/readability) * Cluecard: Configurator support * Cluecard: readme update - added image - updated Docs links * Clueboard 66% HotSwap: corrected matrix and Configurator data - removed k31 and k84 from LAYOUT - both appear to be unsupported for this PCB according to images on clueboard.co - updated block comment mock-ups to match changes - rebuilt info.json file - delete removed keys from default keymap.c * Clueboard 66% HotSwap: readme update - fix make example - updated Docs links * Clueboard 66% HotSwap: 66_ansi keymap update Updated to use #include QMK_KEYBOARD_H * Clueboard 60% refactor - renamed layout macro KEYMAP to LAYOUT_all - renamed layout macro KEYMAP_AEK to LAYOUT_aek - removed redundant KC_TRNS definitions from keymaps - all keymaps now use #include QMK_KEYBOARD_H * Clueboard 17%: refactor * Clueboard 17%: Configurator support * Clueboard 17%: update Docs links in readme * Cleanup the 2x1800 files * Update Clueboard 60% to standard matrix * Update the clueboard default keymaps * Refresh and update clueboard 17 * Add the 66% hotswap to Clueboard's readme * Clarify the 66% hotswap's readme * change the image to imgur * Update the clueboard 66 to follow modern standards * update clueboard 66_hotswap to follow modern practices * Move the logo to imgur * update clueboard/card to follow modern practices * remove clueboard/66 as a valid make target * Address comments in #4902 * fix user keymaps after the changes --- keyboards/clueboard/17/17.c | 9 +- keyboards/clueboard/17/17.h | 23 +- keyboards/clueboard/17/info.json | 31 + .../clueboard/17/keymaps/default/keymap.c | 31 +- keyboards/clueboard/17/readme.md | 4 +- keyboards/clueboard/17/rules.mk | 25 +- keyboards/clueboard/2x1800/2x1800.c | 15 +- keyboards/clueboard/2x1800/2x1800.h | 4 +- keyboards/clueboard/2x1800/config.h | 1 + keyboards/clueboard/2x1800/info.json | 392 +--- .../clueboard/2x1800/keymaps/default/config.h | 5 +- .../2x1800/keymaps/default_4u/config.h | 5 +- .../2x1800/keymaps/default_7u/config.h | 5 +- .../2x1800/keymaps/macroboard/config.h | 5 +- .../2x1800/keymaps/mouseboard_left/config.h | 5 +- .../2x1800/keymaps/mouseboard_left/rules.mk | 1 - .../2x1800/keymaps/mouseboard_right/config.h | 5 +- .../2x1800/keymaps/mouseboard_right/rules.mk | 1 - keyboards/clueboard/2x1800/readme.md | 8 +- keyboards/clueboard/2x1800/rules.mk | 60 +- keyboards/clueboard/60/60.h | 13 +- .../60/boards/GENERIC_STM32_F303XC/board.c | 126 -- .../60/boards/GENERIC_STM32_F303XC/board.h | 1187 ------------ .../60/boards/GENERIC_STM32_F303XC/board.mk | 5 - keyboards/clueboard/60/bootloader_defs.h | 7 - keyboards/clueboard/60/config.h | 27 +- keyboards/clueboard/60/info.json | 1653 +---------------- .../clueboard/60/keymaps/default/keymap.c | 8 +- .../clueboard/60/keymaps/default_aek/keymap.c | 8 +- .../clueboard/60/keymaps/yanfali/keymap.c | 10 +- keyboards/clueboard/60/matrix.c | 175 -- keyboards/clueboard/60/rules.mk | 21 +- keyboards/clueboard/66/66.c | 1 - keyboards/clueboard/66/66.h | 16 - keyboards/clueboard/66/config.h | 63 - keyboards/clueboard/66/info.json | 29 +- .../clueboard/66/keymaps/66_ansi/keymap.c | 2 +- .../clueboard/66/keymaps/66_ansi/readme.md | 4 +- .../clueboard/66/keymaps/66_iso/keymap.c | 2 +- .../clueboard/66/keymaps/66_iso/readme.md | 4 +- .../clueboard/66/keymaps/bloodlvst/config.h | 6 +- .../clueboard/66/keymaps/bloodlvst/keymap.c | 2 +- .../clueboard/66/keymaps/caps_fn/keymap.c | 2 +- .../clueboard/66/keymaps/caps_fn/readme.md | 2 - .../clueboard/66/keymaps/colemak/keymap.c | 2 +- .../clueboard/66/keymaps/default/keymap.c | 2 +- .../clueboard/66/keymaps/default/readme.md | 4 +- .../clueboard/66/keymaps/jokrik/keymap.c | 2 +- .../66/keymaps/mac_optimized/keymap.c | 2 +- .../66/keymaps/mac_optimized/readme.md | 2 - .../clueboard/66/keymaps/magicmonty/config.h | 7 +- .../clueboard/66/keymaps/magicmonty/keymap.c | 2 +- .../clueboard/66/keymaps/magicmonty/rules.mk | 1 + .../66/keymaps/manofinterests/keymap.c | 2 +- .../clueboard/66/keymaps/maximised/keymap.c | 2 +- .../clueboard/66/keymaps/maximised/readme.md | 2 - .../clueboard/66/keymaps/mouse_keys/keymap.c | 2 +- .../clueboard/66/keymaps/mouse_keys/readme.md | 2 - .../clueboard/66/keymaps/mrscooty/keymap.c | 2 +- .../clueboard/66/keymaps/serubin/keymap.c | 2 +- .../clueboard/66/keymaps/shift_fn/keymap.c | 2 +- .../clueboard/66/keymaps/shift_fn/readme.md | 2 +- keyboards/clueboard/66/keymaps/smt/keymap.c | 2 +- .../clueboard/66/keymaps/tetris/keymap.c | 2 +- .../66/keymaps/unix_optimized/keymap.c | 2 +- .../66/keymaps/unix_optimized/readme.md | 4 +- .../66/keymaps/win_optimized/keymap.c | 2 +- .../66/keymaps/win_optimized/readme.md | 4 +- .../clueboard/66/keymaps/xyverz/config.h | 4 +- .../clueboard/66/keymaps/xyverz/keymap.c | 2 +- keyboards/clueboard/66/readme.md | 4 +- keyboards/clueboard/66/rev1/config.h | 59 +- keyboards/clueboard/66/rev1/rev1.h | 8 +- keyboards/clueboard/66/rev1/rules.mk | 24 +- keyboards/clueboard/66/rev2/config.h | 53 +- keyboards/clueboard/66/rev2/rev2.h | 8 +- keyboards/clueboard/66/rev2/rules.mk | 23 +- keyboards/clueboard/66/rev3/config.h | 53 +- keyboards/clueboard/66/rev3/rev3.c | 4 - keyboards/clueboard/66/rev3/rev3.h | 8 +- keyboards/clueboard/66/rev3/rules.mk | 24 +- keyboards/clueboard/66/rules.mk | 25 - keyboards/clueboard/66_hotswap/config.h | 1 + keyboards/clueboard/66_hotswap/gen1/config.h | 11 +- keyboards/clueboard/66_hotswap/gen1/gen1.h | 80 +- keyboards/clueboard/66_hotswap/info.json | 17 +- .../66_hotswap/keymaps/66_ansi/keymap.c | 2 +- .../66_hotswap/keymaps/default/keymap.c | 8 +- keyboards/clueboard/66_hotswap/readme.md | 8 +- keyboards/clueboard/card/card.h | 17 +- keyboards/clueboard/card/config.h | 15 +- keyboards/clueboard/card/info.json | 20 + .../clueboard/card/keymaps/default/config.h | 7 +- .../clueboard/card/keymaps/default/keymap.c | 7 +- .../clueboard/card/keymaps/default/rules.mk | 13 +- .../card/keymaps/rgb_effects/config.h | 7 +- .../card/keymaps/rgb_effects/keymap.c | 6 +- .../card/keymaps/rgb_effects/rules.mk | 11 +- keyboards/clueboard/card/readme.md | 4 +- keyboards/clueboard/card/rules.mk | 71 +- keyboards/clueboard/readme.md | 7 +- 101 files changed, 583 insertions(+), 4094 deletions(-) create mode 100644 keyboards/clueboard/17/info.json delete mode 100644 keyboards/clueboard/2x1800/keymaps/mouseboard_left/rules.mk delete mode 100644 keyboards/clueboard/2x1800/keymaps/mouseboard_right/rules.mk delete mode 100644 keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c delete mode 100644 keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h delete mode 100644 keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk delete mode 100644 keyboards/clueboard/60/bootloader_defs.h delete mode 100644 keyboards/clueboard/60/matrix.c delete mode 100644 keyboards/clueboard/66/66.c delete mode 100644 keyboards/clueboard/66/66.h delete mode 100644 keyboards/clueboard/66/config.h delete mode 100644 keyboards/clueboard/66/rules.mk create mode 100644 keyboards/clueboard/card/info.json diff --git a/keyboards/clueboard/17/17.c b/keyboards/clueboard/17/17.c index f84e3253e9c6..627aa236ddb2 100644 --- a/keyboards/clueboard/17/17.c +++ b/keyboards/clueboard/17/17.c @@ -12,13 +12,11 @@ void matrix_init_kb(void) { MCUCR |= (1<. /* audio support */ #define B7_AUDIO #define C4_AUDIO +#define AUDIO_CLICKY /* number of backlight levels */ // #define BACKLIGHT_PIN B7 diff --git a/keyboards/clueboard/2x1800/info.json b/keyboards/clueboard/2x1800/info.json index 86fd37ffa583..0e3bb36a9d88 100644 --- a/keyboards/clueboard/2x1800/info.json +++ b/keyboards/clueboard/2x1800/info.json @@ -1,5 +1,5 @@ { - "keyboard_name": "CB 2x1800", + "keyboard_name": "Clueboard 2x1800", "url": "", "maintainer": "skullydazed", "width": 24, @@ -8,388 +8,34 @@ "LAYOUT": { "key_count": 127, "layout": [ - {"label":"Home", "x":0, "y":0}, - {"label":"End", "x":1, "y":0}, - {"label":"PgUp", "x":2, "y":0}, - {"label":"PgDn", "x":3, "y":0}, - {"label":"Esc", "x":4.75, "y":0}, - {"label":"F1", "x":6.25, "y":0}, - {"label":"F2", "x":7.25, "y":0}, - {"label":"F3", "x":8.25, "y":0}, - {"label":"F4", "x":9.25, "y":0}, - {"label":"F5", "x":10.75, "y":0}, - {"label":"F6", "x":11.75, "y":0}, - {"label":"F7", "x":12.75, "y":0}, - {"label":"F8", "x":13.75, "y":0}, - {"label":"F9", "x":15.25, "y":0}, - {"label":"F10", "x":16.25, "y":0}, - {"label":"F11", "x":17.25, "y":0}, - {"label":"F12", "x":18.25, "y":0}, - {"label":"PrtSc", "x":20, "y":0}, - {"label":"Scroll Lock", "x":21, "y":0}, - {"label":"Pause", "x":22, "y":0}, - {"label":"Insert", "x":23, "y":0}, - {"label":"-", "x":0, "y":1.25}, - {"label":"Num Lock", "x":1, "y":1.25}, - {"label":"/", "x":2, "y":1.25}, - {"label":"*", "x":3, "y":1.25}, - {"label":"~", "x":4.5, "y":1.25}, - {"label":"!", "x":5.5, "y":1.25}, - {"label":"@", "x":6.5, "y":1.25}, - {"label":"#", "x":7.5, "y":1.25}, - {"label":"$", "x":8.5, "y":1.25}, - {"label":"%", "x":9.5, "y":1.25}, - {"label":"^", "x":10.5, "y":1.25}, - {"label":"&", "x":11.5, "y":1.25}, - {"label":"*", "x":12.5, "y":1.25}, - {"label":"(", "x":13.5, "y":1.25}, - {"label":")", "x":14.5, "y":1.25}, - {"label":"_", "x":15.5, "y":1.25}, - {"label":"+", "x":16.5, "y":1.25}, - {"label":"Backspace", "x":17.5, "y":1.25, "w":2}, - {"label":"Num Lock", "x":20, "y":1.25}, - {"label":"/", "x":21, "y":1.25}, - {"label":"*", "x":22, "y":1.25}, - {"label":"-", "x":23, "y":1.25}, - {"label":"+", "x":0, "y":2.25, "h":2}, - {"label":"7", "x":1, "y":2.25}, - {"label":"8", "x":2, "y":2.25}, - {"label":"9", "x":3, "y":2.25}, - {"label":"Tab", "x":4.5, "y":2.25, "w":1.5}, - {"label":"Q", "x":6, "y":2.25}, - {"label":"W", "x":7, "y":2.25}, - {"label":"E", "x":8, "y":2.25}, - {"label":"R", "x":9, "y":2.25}, - {"label":"T", "x":10, "y":2.25}, - {"label":"Y", "x":11, "y":2.25}, - {"label":"U", "x":12, "y":2.25}, - {"label":"I", "x":13, "y":2.25}, - {"label":"O", "x":14, "y":2.25}, - {"label":"P", "x":15, "y":2.25}, - {"label":"{", "x":16, "y":2.25}, - {"label":"}", "x":17, "y":2.25}, - {"label":"|", "x":18, "y":2.25, "w":1.5}, - {"label":"7", "x":20, "y":2.25}, - {"label":"8", "x":21, "y":2.25}, - {"label":"9", "x":22, "y":2.25}, - {"label":"+", "x":23, "y":2.25, "h":2}, - {"label":"4", "x":1, "y":3.25}, - {"label":"5", "x":2, "y":3.25}, - {"label":"6", "x":3, "y":3.25}, - {"label":"Caps Lock", "x":4.5, "y":3.25, "w":1.75}, - {"label":"A", "x":6.25, "y":3.25}, - {"label":"S", "x":7.25, "y":3.25}, - {"label":"D", "x":8.25, "y":3.25}, - {"label":"F", "x":9.25, "y":3.25}, - {"label":"G", "x":10.25, "y":3.25}, - {"label":"H", "x":11.25, "y":3.25}, - {"label":"J", "x":12.25, "y":3.25}, - {"label":"K", "x":13.25, "y":3.25}, - {"label":"L", "x":14.25, "y":3.25}, - {"label":":", "x":15.25, "y":3.25}, - {"label":"\"", "x":16.25, "y":3.25}, - {"label":"Enter", "x":17.25, "y":3.25, "w":2.25}, - {"label":"4", "x":20, "y":3.25}, - {"label":"5", "x":21, "y":3.25}, - {"label":"6", "x":22, "y":3.25}, - {"label":"Enter", "x":0, "y":4.25, "h":2}, - {"label":"1", "x":1, "y":4.25}, - {"label":"2", "x":2, "y":4.25}, - {"label":"3", "x":3, "y":4.25}, - {"label":"\\u2191", "x":4.25, "y":4.5}, - {"label":"Shift", "x":5.5, "y":4.25, "w":1.25}, - {"label":"Z", "x":6.75, "y":4.25}, - {"label":"X", "x":7.75, "y":4.25}, - {"label":"C", "x":8.75, "y":4.25}, - {"label":"V", "x":9.75, "y":4.25}, - {"label":"B", "x":10.75, "y":4.25}, - {"label":"N", "x":11.75, "y":4.25}, - {"label":"M", "x":12.75, "y":4.25}, - {"label":"<", "x":13.75, "y":4.25}, - {"label":">", "x":14.75, "y":4.25}, - {"label":"?", "x":15.75, "y":4.25}, - {"label":"Shift", "x":16.75, "y":4.25, "w":1.75}, - {"label":"\\u2191", "x":18.75, "y":4.5}, - {"label":"1", "x":20, "y":4.25}, - {"label":"2", "x":21, "y":4.25}, - {"label":"3", "x":22, "y":4.25}, - {"label":"Enter", "x":23, "y":4.25, "h":2}, - {"label":"0", "x":1, "y":5.25}, - {"label":".", "x":2, "y":5.25}, - {"label":"\\u2190", "x":3.25, "y":5.5}, - {"label":"\\u2193", "x":4.25, "y":5.5}, - {"label":"\\u2192", "x":5.25, "y":5.5}, - {"label":"Ctrl", "x":6.5, "y":5.25}, - {"label":"Win", "x":7.5, "y":5.25}, - {"label":"Alt", "x":8.5, "y":5.25}, - {"label":"1u", "x":9.5, "y":5.25}, - {"label":"1u", "x":10.5, "y":5.25}, - {"label":"1u", "x":11.5, "y":5.25}, - {"label":"1u", "x":12.5, "y":5.25}, - {"label":"Alt", "x":13.5, "y":5.25}, - {"label":"Win", "x":14.5, "y":5.25}, - {"label":"Menu", "x":15.5, "y":5.25}, - {"label":"Ctrl", "x":16.5, "y":5.25}, - {"label":"\\u2190", "x":17.75, "y":5.5}, - {"label":"\\u2193", "x":18.75, "y":5.5}, - {"label":"\\u2192", "x":19.75, "y":5.5}, - {"label":"0", "x":21, "y":5.25}, - {"label":".", "x":22, "y":5.25} + {"label":"Home", "x":0, "y":0}, {"label":"End", "x":1, "y":0}, {"label":"PgUp", "x":2, "y":0}, {"label":"PgDn", "x":3, "y":0}, {"label":"Esc", "x":4.75, "y":0}, {"label":"F1", "x":6.25, "y":0}, {"label":"F2", "x":7.25, "y":0}, {"label":"F3", "x":8.25, "y":0}, {"label":"F4", "x":9.25, "y":0}, {"label":"F5", "x":10.75, "y":0}, {"label":"F6", "x":11.75, "y":0}, {"label":"F7", "x":12.75, "y":0}, {"label":"F8", "x":13.75, "y":0}, {"label":"F9", "x":15.25, "y":0}, {"label":"F10", "x":16.25, "y":0}, {"label":"F11", "x":17.25, "y":0}, {"label":"F12", "x":18.25, "y":0}, {"label":"PrtSc", "x":20, "y":0}, {"label":"Scroll Lock", "x":21, "y":0}, {"label":"Pause", "x":22, "y":0}, {"label":"Insert", "x":23, "y":0}, + {"label":"-", "x":0, "y":1.25}, {"label":"Num Lock", "x":1, "y":1.25}, {"label":"/", "x":2, "y":1.25}, {"label":"*", "x":3, "y":1.25}, {"label":"~", "x":4.5, "y":1.25}, {"label":"!", "x":5.5, "y":1.25}, {"label":"@", "x":6.5, "y":1.25}, {"label":"#", "x":7.5, "y":1.25}, {"label":"$", "x":8.5, "y":1.25}, {"label":"%", "x":9.5, "y":1.25}, {"label":"^", "x":10.5, "y":1.25}, {"label":"&", "x":11.5, "y":1.25}, {"label":"*", "x":12.5, "y":1.25}, {"label":"(", "x":13.5, "y":1.25}, {"label":")", "x":14.5, "y":1.25}, {"label":"_", "x":15.5, "y":1.25}, {"label":"+", "x":16.5, "y":1.25}, {"label":"Backspace", "x":17.5, "y":1.25, "w":2}, {"label":"Num Lock", "x":20, "y":1.25}, {"label":"/", "x":21, "y":1.25}, {"label":"*", "x":22, "y":1.25}, {"label":"-", "x":23, "y":1.25}, + {"label":"+", "x":0, "y":2.25, "h":2}, {"label":"7", "x":1, "y":2.25}, {"label":"8", "x":2, "y":2.25}, {"label":"9", "x":3, "y":2.25}, {"label":"Tab", "x":4.5, "y":2.25, "w":1.5}, {"label":"Q", "x":6, "y":2.25}, {"label":"W", "x":7, "y":2.25}, {"label":"E", "x":8, "y":2.25}, {"label":"R", "x":9, "y":2.25}, {"label":"T", "x":10, "y":2.25}, {"label":"Y", "x":11, "y":2.25}, {"label":"U", "x":12, "y":2.25}, {"label":"I", "x":13, "y":2.25}, {"label":"O", "x":14, "y":2.25}, {"label":"P", "x":15, "y":2.25}, {"label":"{", "x":16, "y":2.25}, {"label":"}", "x":17, "y":2.25}, {"label":"|", "x":18, "y":2.25, "w":1.5}, {"label":"7", "x":20, "y":2.25}, {"label":"8", "x":21, "y":2.25}, {"label":"9", "x":22, "y":2.25}, {"label":"+", "x":23, "y":2.25, "h":2}, + {"label":"4", "x":1, "y":3.25}, {"label":"5", "x":2, "y":3.25}, {"label":"6", "x":3, "y":3.25}, {"label":"Caps Lock", "x":4.5, "y":3.25, "w":1.75}, {"label":"A", "x":6.25, "y":3.25}, {"label":"S", "x":7.25, "y":3.25}, {"label":"D", "x":8.25, "y":3.25}, {"label":"F", "x":9.25, "y":3.25}, {"label":"G", "x":10.25, "y":3.25}, {"label":"H", "x":11.25, "y":3.25}, {"label":"J", "x":12.25, "y":3.25}, {"label":"K", "x":13.25, "y":3.25}, {"label":"L", "x":14.25, "y":3.25}, {"label":":", "x":15.25, "y":3.25}, {"label":"\"", "x":16.25, "y":3.25}, {"label":"Enter", "x":17.25, "y":3.25, "w":2.25}, {"label":"4", "x":20, "y":3.25}, {"label":"5", "x":21, "y":3.25}, {"label":"6", "x":22, "y":3.25}, + {"label":"Enter", "x":0, "y":4.25, "h":2}, {"label":"1", "x":1, "y":4.25}, {"label":"2", "x":2, "y":4.25}, {"label":"3", "x":3, "y":4.25}, {"label":"\\u2191", "x":4.25, "y":4.5}, {"label":"Shift", "x":5.5, "y":4.25, "w":1.25}, {"label":"Z", "x":6.75, "y":4.25}, {"label":"X", "x":7.75, "y":4.25}, {"label":"C", "x":8.75, "y":4.25}, {"label":"V", "x":9.75, "y":4.25}, {"label":"B", "x":10.75, "y":4.25}, {"label":"N", "x":11.75, "y":4.25}, {"label":"M", "x":12.75, "y":4.25}, {"label":"<", "x":13.75, "y":4.25}, {"label":">", "x":14.75, "y":4.25}, {"label":"?", "x":15.75, "y":4.25}, {"label":"Shift", "x":16.75, "y":4.25, "w":1.75}, {"label":"\\u2191", "x":18.75, "y":4.5}, {"label":"1", "x":20, "y":4.25}, {"label":"2", "x":21, "y":4.25}, {"label":"3", "x":22, "y":4.25}, {"label":"Enter", "x":23, "y":4.25, "h":2}, + {"label":"0", "x":1, "y":5.25}, {"label":".", "x":2, "y":5.25}, {"label":"\\u2190", "x":3.25, "y":5.5}, {"label":"\\u2193", "x":4.25, "y":5.5}, {"label":"\\u2192", "x":5.25, "y":5.5}, {"label":"Ctrl", "x":6.5, "y":5.25}, {"label":"Win", "x":7.5, "y":5.25}, {"label":"Alt", "x":8.5, "y":5.25}, {"label":"1u", "x":9.5, "y":5.25}, {"label":"1u", "x":10.5, "y":5.25}, {"label":"1u", "x":11.5, "y":5.25}, {"label":"1u", "x":12.5, "y":5.25}, {"label":"Alt", "x":13.5, "y":5.25}, {"label":"Win", "x":14.5, "y":5.25}, {"label":"Menu", "x":15.5, "y":5.25}, {"label":"Ctrl", "x":16.5, "y":5.25}, {"label":"\\u2190", "x":17.75, "y":5.5}, {"label":"\\u2193", "x":18.75, "y":5.5}, {"label":"\\u2192", "x":19.75, "y":5.5}, {"label":"0", "x":21, "y":5.25}, {"label":".", "x":22, "y":5.25} ] }, "LAYOUT_7u_space": { "key_count": 121, "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.75, "y":0}, - {"label":"k06", "x":6.25, "y":0}, - {"label":"k07", "x":7.25, "y":0}, - {"label":"k08", "x":8.25, "y":0}, - {"label":"k09", "x":9.25, "y":0}, - {"label":"k0a", "x":10.75, "y":0}, - {"label":"k60", "x":11.75, "y":0}, - {"label":"k61", "x":12.75, "y":0}, - {"label":"k62", "x":13.75, "y":0}, - {"label":"k63", "x":15.25, "y":0}, - {"label":"k64", "x":16.25, "y":0}, - {"label":"k65", "x":17.25, "y":0}, - {"label":"k66", "x":18.25, "y":0}, - {"label":"k67", "x":20, "y":0}, - {"label":"k68", "x":21, "y":0}, - {"label":"k69", "x":22, "y":0}, - {"label":"k6a", "x":23, "y":0}, - {"label":"k10", "x":0, "y":1.25}, - {"label":"k11", "x":1, "y":1.25}, - {"label":"k12", "x":2, "y":1.25}, - {"label":"k13", "x":3, "y":1.25}, - {"label":"k14", "x":4.5, "y":1.25}, - {"label":"k15", "x":5.5, "y":1.25}, - {"label":"k16", "x":6.5, "y":1.25}, - {"label":"k17", "x":7.5, "y":1.25}, - {"label":"k18", "x":8.5, "y":1.25}, - {"label":"k19", "x":9.5, "y":1.25}, - {"label":"k0a", "x":10.5, "y":1.25}, - {"label":"k70", "x":11.5, "y":1.25}, - {"label":"k71", "x":12.5, "y":1.25}, - {"label":"k72", "x":13.5, "y":1.25}, - {"label":"k73", "x":14.5, "y":1.25}, - {"label":"k74", "x":15.5, "y":1.25}, - {"label":"k75", "x":16.5, "y":1.25}, - {"label":"k76", "x":17.5, "y":1.25, "w":2}, - {"label":"k77", "x":20, "y":1.25}, - {"label":"k78", "x":21, "y":1.25}, - {"label":"k79", "x":22, "y":1.25}, - {"label":"k7a", "x":23, "y":1.25}, - {"label":"k20", "x":0, "y":2.25, "h":2}, - {"label":"k21", "x":1, "y":2.25}, - {"label":"k22", "x":2, "y":2.25}, - {"label":"k23", "x":3, "y":2.25}, - {"label":"k24", "x":4.5, "y":2.25, "w":1.5}, - {"label":"k25", "x":6, "y":2.25}, - {"label":"k26", "x":7, "y":2.25}, - {"label":"k27", "x":8, "y":2.25}, - {"label":"k28", "x":9, "y":2.25}, - {"label":"k29", "x":10, "y":2.25}, - {"label":"k2a", "x":11, "y":2.25}, - {"label":"k80", "x":12, "y":2.25}, - {"label":"k81", "x":13, "y":2.25}, - {"label":"k82", "x":14, "y":2.25}, - {"label":"k83", "x":15, "y":2.25}, - {"label":"k84", "x":16, "y":2.25}, - {"label":"k85", "x":17, "y":2.25}, - {"label":"k86", "x":18, "y":2.25, "w":1.5}, - {"label":"k87", "x":20, "y":2.25}, - {"label":"k88", "x":21, "y":2.25}, - {"label":"k89", "x":22, "y":2.25}, - {"label":"k8a", "x":23, "y":2.25, "h":2}, - {"label":"k31", "x":1, "y":3.25}, - {"label":"k32", "x":2, "y":3.25}, - {"label":"k33", "x":3, "y":3.25}, - {"label":"k34", "x":4.5, "y":3.25, "w":1.75}, - {"label":"k35", "x":6.25, "y":3.25}, - {"label":"k36", "x":7.25, "y":3.25}, - {"label":"k37", "x":8.25, "y":3.25}, - {"label":"k38", "x":9.25, "y":3.25}, - {"label":"k39", "x":10.25, "y":3.25}, - {"label":"k3a", "x":11.25, "y":3.25}, - {"label":"k90", "x":12.25, "y":3.25}, - {"label":"k91", "x":13.25, "y":3.25}, - {"label":"k92", "x":14.25, "y":3.25}, - {"label":"k93", "x":15.25, "y":3.25}, - {"label":"k94", "x":16.25, "y":3.25}, - {"label":"k95", "x":17.25, "y":3.25, "w":2.25}, - {"label":"k97", "x":20, "y":3.25}, - {"label":"k98", "x":21, "y":3.25}, - {"label":"k99", "x":22, "y":3.25}, - {"label":"k40", "x":0, "y":4.25, "h":2}, - {"label":"k41", "x":1, "y":4.25}, - {"label":"k42", "x":2, "y":4.25}, - {"label":"k43", "x":3, "y":4.25}, - {"label":"k45", "x":5.5, "y":4.25, "w":1.25}, - {"label":"k46", "x":6.75, "y":4.25}, - {"label":"k47", "x":7.75, "y":4.25}, - {"label":"k48", "x":8.75, "y":4.25}, - {"label":"k49", "x":9.75, "y":4.25}, - {"label":"k4a", "x":10.75, "y":4.25}, - {"label":"ka0", "x":11.75, "y":4.25}, - {"label":"ka1", "x":12.75, "y":4.25}, - {"label":"ka2", "x":13.75, "y":4.25}, - {"label":"ka3", "x":14.75, "y":4.25}, - {"label":"ka4", "x":15.75, "y":4.25}, - {"label":"ka5", "x":16.75, "y":4.25, "w":1.75}, - {"label":"ka7", "x":20, "y":4.25}, - {"label":"ka8", "x":21, "y":4.25}, - {"label":"ka9", "x":22, "y":4.25}, - {"label":"kaa", "x":23, "y":4.25, "h":2}, - {"label":"k44", "x":4.25, "y":4.5}, - {"label":"k96", "x":18.75, "y":4.5}, - {"label":"k51", "x":1, "y":5.25}, - {"label":"k52", "x":2, "y":5.25}, - {"label":"k56", "x":6.5, "y":5.25}, - {"label":"k57", "x":7.5, "y":5.25}, - {"label":"kb0", "x":8.5, "y":5.25, "w":7}, - {"label":"kb4", "x":15.5, "y":5.25}, - {"label":"kb5", "x":16.5, "y":5.25}, - {"label":"kb8", "x":21, "y":5.25}, - {"label":"kb9", "x":22, "y":5.25}, - {"label":"k53", "x":3.25, "y":5.5}, - {"label":"k54", "x":4.25, "y":5.5}, - {"label":"k55", "x":5.25, "y":5.5}, - {"label":"ka6", "x":17.75, "y":5.5}, - {"label":"kb6", "x":18.75, "y":5.5}, - {"label":"kb7", "x":19.75, "y":5.5} + {"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.75, "y":0}, {"label":"k06", "x":6.25, "y":0}, {"label":"k07", "x":7.25, "y":0}, {"label":"k08", "x":8.25, "y":0}, {"label":"k09", "x":9.25, "y":0}, {"label":"k0a", "x":10.75, "y":0}, {"label":"k60", "x":11.75, "y":0}, {"label":"k61", "x":12.75, "y":0}, {"label":"k62", "x":13.75, "y":0}, {"label":"k63", "x":15.25, "y":0}, {"label":"k64", "x":16.25, "y":0}, {"label":"k65", "x":17.25, "y":0}, {"label":"k66", "x":18.25, "y":0}, {"label":"k67", "x":20, "y":0}, {"label":"k68", "x":21, "y":0}, {"label":"k69", "x":22, "y":0}, {"label":"k6a", "x":23, "y":0}, + {"label":"k10", "x":0, "y":1.25}, {"label":"k11", "x":1, "y":1.25}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1.25}, {"label":"k14", "x":4.5, "y":1.25}, {"label":"k15", "x":5.5, "y":1.25}, {"label":"k16", "x":6.5, "y":1.25}, {"label":"k17", "x":7.5, "y":1.25}, {"label":"k18", "x":8.5, "y":1.25}, {"label":"k19", "x":9.5, "y":1.25}, {"label":"k0a", "x":10.5, "y":1.25}, {"label":"k70", "x":11.5, "y":1.25}, {"label":"k71", "x":12.5, "y":1.25}, {"label":"k72", "x":13.5, "y":1.25}, {"label":"k73", "x":14.5, "y":1.25}, {"label":"k74", "x":15.5, "y":1.25}, {"label":"k75", "x":16.5, "y":1.25}, {"label":"k76", "x":17.5, "y":1.25, "w":2}, {"label":"k77", "x":20, "y":1.25}, {"label":"k78", "x":21, "y":1.25}, {"label":"k79", "x":22, "y":1.25}, {"label":"k7a", "x":23, "y":1.25}, + {"label":"k20", "x":0, "y":2.25, "h":2}, {"label":"k21", "x":1, "y":2.25}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2.25}, {"label":"k24", "x":4.5, "y":2.25, "w":1.5}, {"label":"k25", "x":6, "y":2.25}, {"label":"k26", "x":7, "y":2.25}, {"label":"k27", "x":8, "y":2.25}, {"label":"k28", "x":9, "y":2.25}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2a", "x":11, "y":2.25}, {"label":"k80", "x":12, "y":2.25}, {"label":"k81", "x":13, "y":2.25}, {"label":"k82", "x":14, "y":2.25}, {"label":"k83", "x":15, "y":2.25}, {"label":"k84", "x":16, "y":2.25}, {"label":"k85", "x":17, "y":2.25}, {"label":"k86", "x":18, "y":2.25, "w":1.5}, {"label":"k87", "x":20, "y":2.25}, {"label":"k88", "x":21, "y":2.25}, {"label":"k89", "x":22, "y":2.25}, {"label":"k8a", "x":23, "y":2.25, "h":2}, + {"label":"k31", "x":1, "y":3.25}, {"label":"k32", "x":2, "y":3.25}, {"label":"k33", "x":3, "y":3.25}, {"label":"k34", "x":4.5, "y":3.25, "w":1.75}, {"label":"k35", "x":6.25, "y":3.25}, {"label":"k36", "x":7.25, "y":3.25}, {"label":"k37", "x":8.25, "y":3.25}, {"label":"k38", "x":9.25, "y":3.25}, {"label":"k39", "x":10.25, "y":3.25}, {"label":"k3a", "x":11.25, "y":3.25}, {"label":"k90", "x":12.25, "y":3.25}, {"label":"k91", "x":13.25, "y":3.25}, {"label":"k92", "x":14.25, "y":3.25}, {"label":"k93", "x":15.25, "y":3.25}, {"label":"k94", "x":16.25, "y":3.25}, {"label":"k95", "x":17.25, "y":3.25, "w":2.25}, {"label":"k97", "x":20, "y":3.25}, {"label":"k98", "x":21, "y":3.25}, {"label":"k99", "x":22, "y":3.25}, + {"label":"k40", "x":0, "y":4.25, "h":2}, {"label":"k41", "x":1, "y":4.25}, {"label":"k42", "x":2, "y":4.25}, {"label":"k43", "x":3, "y":4.25}, {"label":"k45", "x":5.5, "y":4.25, "w":1.25}, {"label":"k46", "x":6.75, "y":4.25}, {"label":"k47", "x":7.75, "y":4.25}, {"label":"k48", "x":8.75, "y":4.25}, {"label":"k49", "x":9.75, "y":4.25}, {"label":"k4a", "x":10.75, "y":4.25}, {"label":"ka0", "x":11.75, "y":4.25}, {"label":"ka1", "x":12.75, "y":4.25}, {"label":"ka2", "x":13.75, "y":4.25}, {"label":"ka3", "x":14.75, "y":4.25}, {"label":"ka4", "x":15.75, "y":4.25}, {"label":"ka5", "x":16.75, "y":4.25, "w":1.75}, {"label":"ka7", "x":20, "y":4.25}, {"label":"ka8", "x":21, "y":4.25}, {"label":"ka9", "x":22, "y":4.25}, {"label":"kaa", "x":23, "y":4.25, "h":2}, {"label":"k44", "x":4.25, "y":4.5}, {"label":"k96", "x":18.75, "y":4.5}, + {"label":"k51", "x":1, "y":5.25}, {"label":"k52", "x":2, "y":5.25}, {"label":"k56", "x":6.5, "y":5.25}, {"label":"k57", "x":7.5, "y":5.25}, {"label":"kb0", "x":8.5, "y":5.25, "w":7}, {"label":"kb4", "x":15.5, "y":5.25}, {"label":"kb5", "x":16.5, "y":5.25}, {"label":"kb8", "x":21, "y":5.25}, {"label":"kb9", "x":22, "y":5.25}, {"label":"k53", "x":3.25, "y":5.5}, {"label":"k54", "x":4.25, "y":5.5}, {"label":"k55", "x":5.25, "y":5.5}, {"label":"ka6", "x":17.75, "y":5.5}, {"label":"kb6", "x":18.75, "y":5.5}, {"label":"kb7", "x":19.75, "y":5.5} ] }, "LAYOUT_4u_space": { "key_count": 124, "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.75, "y":0}, - {"label":"k06", "x":6.25, "y":0}, - {"label":"k07", "x":7.25, "y":0}, - {"label":"k08", "x":8.25, "y":0}, - {"label":"k09", "x":9.25, "y":0}, - {"label":"k0a", "x":10.75, "y":0}, - {"label":"k60", "x":11.75, "y":0}, - {"label":"k61", "x":12.75, "y":0}, - {"label":"k62", "x":13.75, "y":0}, - {"label":"k63", "x":15.25, "y":0}, - {"label":"k64", "x":16.25, "y":0}, - {"label":"k65", "x":17.25, "y":0}, - {"label":"k66", "x":18.25, "y":0}, - {"label":"k67", "x":20, "y":0}, - {"label":"k68", "x":21, "y":0}, - {"label":"k69", "x":22, "y":0}, - {"label":"k6a", "x":23, "y":0}, - {"label":"k10", "x":0, "y":1.25}, - {"label":"k11", "x":1, "y":1.25}, - {"label":"k12", "x":2, "y":1.25}, - {"label":"k13", "x":3, "y":1.25}, - {"label":"k14", "x":4.5, "y":1.25}, - {"label":"k15", "x":5.5, "y":1.25}, - {"label":"k16", "x":6.5, "y":1.25}, - {"label":"k17", "x":7.5, "y":1.25}, - {"label":"k18", "x":8.5, "y":1.25}, - {"label":"k19", "x":9.5, "y":1.25}, - {"label":"k0a", "x":10.5, "y":1.25}, - {"label":"k70", "x":11.5, "y":1.25}, - {"label":"k71", "x":12.5, "y":1.25}, - {"label":"k72", "x":13.5, "y":1.25}, - {"label":"k73", "x":14.5, "y":1.25}, - {"label":"k74", "x":15.5, "y":1.25}, - {"label":"k75", "x":16.5, "y":1.25}, - {"label":"k76", "x":17.5, "y":1.25, "w":2}, - {"label":"k77", "x":20, "y":1.25}, - {"label":"k78", "x":21, "y":1.25}, - {"label":"k79", "x":22, "y":1.25}, - {"label":"k7a", "x":23, "y":1.25}, - {"label":"k20", "x":0, "y":2.25, "h":2}, - {"label":"k21", "x":1, "y":2.25}, - {"label":"k22", "x":2, "y":2.25}, - {"label":"k23", "x":3, "y":2.25}, - {"label":"k24", "x":4.5, "y":2.25, "w":1.5}, - {"label":"k25", "x":6, "y":2.25}, - {"label":"k26", "x":7, "y":2.25}, - {"label":"k27", "x":8, "y":2.25}, - {"label":"k28", "x":9, "y":2.25}, - {"label":"k29", "x":10, "y":2.25}, - {"label":"k2a", "x":11, "y":2.25}, - {"label":"k80", "x":12, "y":2.25}, - {"label":"k81", "x":13, "y":2.25}, - {"label":"k82", "x":14, "y":2.25}, - {"label":"k83", "x":15, "y":2.25}, - {"label":"k84", "x":16, "y":2.25}, - {"label":"k85", "x":17, "y":2.25}, - {"label":"k86", "x":18, "y":2.25, "w":1.5}, - {"label":"k87", "x":20, "y":2.25}, - {"label":"k88", "x":21, "y":2.25}, - {"label":"k89", "x":22, "y":2.25}, - {"label":"k8a", "x":23, "y":2.25, "h":2}, - {"label":"k31", "x":1, "y":3.25}, - {"label":"k32", "x":2, "y":3.25}, - {"label":"k33", "x":3, "y":3.25}, - {"label":"k34", "x":4.5, "y":3.25, "w":1.75}, - {"label":"k35", "x":6.25, "y":3.25}, - {"label":"k36", "x":7.25, "y":3.25}, - {"label":"k37", "x":8.25, "y":3.25}, - {"label":"k38", "x":9.25, "y":3.25}, - {"label":"k39", "x":10.25, "y":3.25}, - {"label":"k3a", "x":11.25, "y":3.25}, - {"label":"k90", "x":12.25, "y":3.25}, - {"label":"k91", "x":13.25, "y":3.25}, - {"label":"k92", "x":14.25, "y":3.25}, - {"label":"k93", "x":15.25, "y":3.25}, - {"label":"k94", "x":16.25, "y":3.25}, - {"label":"k95", "x":17.25, "y":3.25, "w":2.25}, - {"label":"k97", "x":20, "y":3.25}, - {"label":"k98", "x":21, "y":3.25}, - {"label":"k99", "x":22, "y":3.25}, - {"label":"k40", "x":0, "y":4.25, "h":2}, - {"label":"k41", "x":1, "y":4.25}, - {"label":"k42", "x":2, "y":4.25}, - {"label":"k43", "x":3, "y":4.25}, - {"label":"k45", "x":5.5, "y":4.25, "w":1.25}, - {"label":"k46", "x":6.75, "y":4.25}, - {"label":"k47", "x":7.75, "y":4.25}, - {"label":"k48", "x":8.75, "y":4.25}, - {"label":"k49", "x":9.75, "y":4.25}, - {"label":"k4a", "x":10.75, "y":4.25}, - {"label":"ka0", "x":11.75, "y":4.25}, - {"label":"ka1", "x":12.75, "y":4.25}, - {"label":"ka2", "x":13.75, "y":4.25}, - {"label":"ka3", "x":14.75, "y":4.25}, - {"label":"ka4", "x":15.75, "y":4.25}, - {"label":"ka5", "x":16.75, "y":4.25, "w":1.75}, - {"label":"ka7", "x":20, "y":4.25}, - {"label":"ka8", "x":21, "y":4.25}, - {"label":"ka9", "x":22, "y":4.25}, - {"label":"kaa", "x":23, "y":4.25, "h":2}, - {"label":"k44", "x":4.25, "y":4.5}, - {"label":"k96", "x":18.75, "y":4.5}, - {"label":"k51", "x":1, "y":5.25}, - {"label":"k52", "x":2, "y":5.25}, - {"label":"k56", "x":6.5, "y":5.25}, - {"label":"k57", "x":7.5, "y":5.25}, - {"label":"k58", "x":8.5, "y":5.25}, - {"label":"kb0", "x":9.5, "y":5.25, "w":4}, - {"label":"kb2", "x":13.5, "y":5.25}, - {"label":"kb3", "x":14.5, "y":5.25}, - {"label":"kb4", "x":15.5, "y":5.25}, - {"label":"kb5", "x":16.5, "y":5.25}, - {"label":"kb8", "x":21, "y":5.25}, - {"label":"kb9", "x":22, "y":5.25}, - {"label":"k53", "x":3.25, "y":5.5}, - {"label":"k54", "x":4.25, "y":5.5}, - {"label":"k55", "x":5.25, "y":5.5}, - {"label":"ka6", "x":17.75, "y":5.5}, - {"label":"kb6", "x":18.75, "y":5.5}, - {"label":"kb7", "x":19.75, "y":5.5} + {"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.75, "y":0}, {"label":"k06", "x":6.25, "y":0}, {"label":"k07", "x":7.25, "y":0}, {"label":"k08", "x":8.25, "y":0}, {"label":"k09", "x":9.25, "y":0}, {"label":"k0a", "x":10.75, "y":0}, {"label":"k60", "x":11.75, "y":0}, {"label":"k61", "x":12.75, "y":0}, {"label":"k62", "x":13.75, "y":0}, {"label":"k63", "x":15.25, "y":0}, {"label":"k64", "x":16.25, "y":0}, {"label":"k65", "x":17.25, "y":0}, {"label":"k66", "x":18.25, "y":0}, {"label":"k67", "x":20, "y":0}, {"label":"k68", "x":21, "y":0}, {"label":"k69", "x":22, "y":0}, {"label":"k6a", "x":23, "y":0}, + {"label":"k10", "x":0, "y":1.25}, {"label":"k11", "x":1, "y":1.25}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1.25}, {"label":"k14", "x":4.5, "y":1.25}, {"label":"k15", "x":5.5, "y":1.25}, {"label":"k16", "x":6.5, "y":1.25}, {"label":"k17", "x":7.5, "y":1.25}, {"label":"k18", "x":8.5, "y":1.25}, {"label":"k19", "x":9.5, "y":1.25}, {"label":"k0a", "x":10.5, "y":1.25}, {"label":"k70", "x":11.5, "y":1.25}, {"label":"k71", "x":12.5, "y":1.25}, {"label":"k72", "x":13.5, "y":1.25}, {"label":"k73", "x":14.5, "y":1.25}, {"label":"k74", "x":15.5, "y":1.25}, {"label":"k75", "x":16.5, "y":1.25}, {"label":"k76", "x":17.5, "y":1.25, "w":2}, {"label":"k77", "x":20, "y":1.25}, {"label":"k78", "x":21, "y":1.25}, {"label":"k79", "x":22, "y":1.25}, {"label":"k7a", "x":23, "y":1.25}, + {"label":"k20", "x":0, "y":2.25, "h":2}, {"label":"k21", "x":1, "y":2.25}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2.25}, {"label":"k24", "x":4.5, "y":2.25, "w":1.5}, {"label":"k25", "x":6, "y":2.25}, {"label":"k26", "x":7, "y":2.25}, {"label":"k27", "x":8, "y":2.25}, {"label":"k28", "x":9, "y":2.25}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2a", "x":11, "y":2.25}, {"label":"k80", "x":12, "y":2.25}, {"label":"k81", "x":13, "y":2.25}, {"label":"k82", "x":14, "y":2.25}, {"label":"k83", "x":15, "y":2.25}, {"label":"k84", "x":16, "y":2.25}, {"label":"k85", "x":17, "y":2.25}, {"label":"k86", "x":18, "y":2.25, "w":1.5}, {"label":"k87", "x":20, "y":2.25}, {"label":"k88", "x":21, "y":2.25}, {"label":"k89", "x":22, "y":2.25}, {"label":"k8a", "x":23, "y":2.25, "h":2}, + {"label":"k31", "x":1, "y":3.25}, {"label":"k32", "x":2, "y":3.25}, {"label":"k33", "x":3, "y":3.25}, {"label":"k34", "x":4.5, "y":3.25, "w":1.75}, {"label":"k35", "x":6.25, "y":3.25}, {"label":"k36", "x":7.25, "y":3.25}, {"label":"k37", "x":8.25, "y":3.25}, {"label":"k38", "x":9.25, "y":3.25}, {"label":"k39", "x":10.25, "y":3.25}, {"label":"k3a", "x":11.25, "y":3.25}, {"label":"k90", "x":12.25, "y":3.25}, {"label":"k91", "x":13.25, "y":3.25}, {"label":"k92", "x":14.25, "y":3.25}, {"label":"k93", "x":15.25, "y":3.25}, {"label":"k94", "x":16.25, "y":3.25}, {"label":"k95", "x":17.25, "y":3.25, "w":2.25}, {"label":"k97", "x":20, "y":3.25}, {"label":"k98", "x":21, "y":3.25}, {"label":"k99", "x":22, "y":3.25}, + {"label":"k40", "x":0, "y":4.25, "h":2}, {"label":"k41", "x":1, "y":4.25}, {"label":"k42", "x":2, "y":4.25}, {"label":"k43", "x":3, "y":4.25}, {"label":"k45", "x":5.5, "y":4.25, "w":1.25}, {"label":"k46", "x":6.75, "y":4.25}, {"label":"k47", "x":7.75, "y":4.25}, {"label":"k48", "x":8.75, "y":4.25}, {"label":"k49", "x":9.75, "y":4.25}, {"label":"k4a", "x":10.75, "y":4.25}, {"label":"ka0", "x":11.75, "y":4.25}, {"label":"ka1", "x":12.75, "y":4.25}, {"label":"ka2", "x":13.75, "y":4.25}, {"label":"ka3", "x":14.75, "y":4.25}, {"label":"ka4", "x":15.75, "y":4.25}, {"label":"ka5", "x":16.75, "y":4.25, "w":1.75}, {"label":"ka7", "x":20, "y":4.25}, {"label":"ka8", "x":21, "y":4.25}, {"label":"ka9", "x":22, "y":4.25}, {"label":"kaa", "x":23, "y":4.25, "h":2}, {"label":"k44", "x":4.25, "y":4.5}, {"label":"k96", "x":18.75, "y":4.5}, + {"label":"k51", "x":1, "y":5.25}, {"label":"k52", "x":2, "y":5.25}, {"label":"k56", "x":6.5, "y":5.25}, {"label":"k57", "x":7.5, "y":5.25}, {"label":"k58", "x":8.5, "y":5.25}, {"label":"kb0", "x":9.5, "y":5.25, "w":4}, {"label":"kb2", "x":13.5, "y":5.25}, {"label":"kb3", "x":14.5, "y":5.25}, {"label":"kb4", "x":15.5, "y":5.25}, {"label":"kb5", "x":16.5, "y":5.25}, {"label":"kb8", "x":21, "y":5.25}, {"label":"kb9", "x":22, "y":5.25}, {"label":"k53", "x":3.25, "y":5.5}, {"label":"k54", "x":4.25, "y":5.5}, {"label":"k55", "x":5.25, "y":5.5}, {"label":"ka6", "x":17.75, "y":5.5}, {"label":"kb6", "x":18.75, "y":5.5}, {"label":"kb7", "x":19.75, "y":5.5} ] } } diff --git a/keyboards/clueboard/2x1800/keymaps/default/config.h b/keyboards/clueboard/2x1800/keymaps/default/config.h index f5eccb225297..152e2f148759 100644 --- a/keyboards/clueboard/2x1800/keymaps/default/config.h +++ b/keyboards/clueboard/2x1800/keymaps/default/config.h @@ -14,11 +14,8 @@ * 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/clueboard/2x1800/keymaps/default_4u/config.h b/keyboards/clueboard/2x1800/keymaps/default_4u/config.h index f5eccb225297..152e2f148759 100644 --- a/keyboards/clueboard/2x1800/keymaps/default_4u/config.h +++ b/keyboards/clueboard/2x1800/keymaps/default_4u/config.h @@ -14,11 +14,8 @@ * 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/clueboard/2x1800/keymaps/default_7u/config.h b/keyboards/clueboard/2x1800/keymaps/default_7u/config.h index f5eccb225297..152e2f148759 100644 --- a/keyboards/clueboard/2x1800/keymaps/default_7u/config.h +++ b/keyboards/clueboard/2x1800/keymaps/default_7u/config.h @@ -14,11 +14,8 @@ * 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/clueboard/2x1800/keymaps/macroboard/config.h b/keyboards/clueboard/2x1800/keymaps/macroboard/config.h index f5eccb225297..152e2f148759 100644 --- a/keyboards/clueboard/2x1800/keymaps/macroboard/config.h +++ b/keyboards/clueboard/2x1800/keymaps/macroboard/config.h @@ -14,11 +14,8 @@ * 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/clueboard/2x1800/keymaps/mouseboard_left/config.h b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/config.h index f5eccb225297..152e2f148759 100644 --- a/keyboards/clueboard/2x1800/keymaps/mouseboard_left/config.h +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/config.h @@ -14,11 +14,8 @@ * 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/clueboard/2x1800/keymaps/mouseboard_left/rules.mk b/keyboards/clueboard/2x1800/keymaps/mouseboard_left/rules.mk deleted file mode 100644 index 6c605daecf53..000000000000 --- a/keyboards/clueboard/2x1800/keymaps/mouseboard_left/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h index f5eccb225297..152e2f148759 100644 --- a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h +++ b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/config.h @@ -14,11 +14,8 @@ * 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/clueboard/2x1800/keymaps/mouseboard_right/rules.mk b/keyboards/clueboard/2x1800/keymaps/mouseboard_right/rules.mk deleted file mode 100644 index 6c605daecf53..000000000000 --- a/keyboards/clueboard/2x1800/keymaps/mouseboard_right/rules.mk +++ /dev/null @@ -1 +0,0 @@ -MOUSEKEY_ENABLE = yes diff --git a/keyboards/clueboard/2x1800/readme.md b/keyboards/clueboard/2x1800/readme.md index afc043f484e4..7e2c206ede76 100644 --- a/keyboards/clueboard/2x1800/readme.md +++ b/keyboards/clueboard/2x1800/readme.md @@ -2,11 +2,11 @@ Clueboard Double 1800 All The Way -Keyboard Maintainer: [Zach White](https://github.com/skullydazed) -Hardware Supported: Clueboard 2x1800 PCB -Hardware Availability: 2018 Apr 1 Group Buy +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Clueboard 2x1800 PCB +* Hardware Availability: 2018 Apr 1 Group Buy -Make example for this keyboard (after setting up your build environment): +Make example for this keyboard: make 2x1800:default diff --git a/keyboards/clueboard/2x1800/rules.mk b/keyboards/clueboard/2x1800/rules.mk index 516a536f6b1d..eb679b9fb774 100644 --- a/keyboards/clueboard/2x1800/rules.mk +++ b/keyboards/clueboard/2x1800/rules.mk @@ -1,64 +1,20 @@ -# MCU name +# MCU details 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 - - -# Boot Section Size in *bytes* -# 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 = no # Audio control and System control(+450) +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 -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode -RGBLIGHT_ENABLE = no # RGB on port C6 -AUDIO_ENABLE = no # Audio output on port C4 and B7 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +RGBLIGHT_ENABLE = yes # RGB on port C6 +AUDIO_ENABLE = yes # Audio output on port C4 and B7 diff --git a/keyboards/clueboard/60/60.h b/keyboards/clueboard/60/60.h index ffff18f9e443..713f0d42be80 100644 --- a/keyboards/clueboard/60/60.h +++ b/keyboards/clueboard/60/60.h @@ -19,15 +19,15 @@ #include "quantum.h" /* - * These are shortcuts to help you work with the various layout options. If your + * 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 + * and to contribute your keymap to the corresponding layout in * `qmk_firmware/layouts/community`. */ -/* The fully-featured KEYMAP() that has every single key available in the matrix. +/* The fully-featured LAYOUT_all() that has every single key available in the matrix. */ -#define KEYMAP(\ +#define LAYOUT_all(\ 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, k1e, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ @@ -44,7 +44,7 @@ /* A layout that matches the Apple Extended Keyboard's main area. No split keys, * 3 mods on either side of the spacebar. */ -#define KEYMAP_AEK(\ +#define LAYOUT_aek(\ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ 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, \ @@ -102,4 +102,7 @@ { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, }, \ { k40, k41, k42, KC_NO, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, k4a, k4b, k4c, KC_NO, k4e, }, \ } + +#define LAYOUT LAYOUT_all +#define KEYMAP LAYOUT_all #endif diff --git a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 4331155df4b6..000000000000 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - 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. -*/ - -#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_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#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/clueboard/60/boards/GENERIC_STM32_F303XC/board.h b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index e09112eb982a..000000000000 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - 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 _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Clueboard 60% Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Clueboard 60 PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 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_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 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_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 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 - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#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_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * 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 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - 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_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(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_PIN0) | \ - 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_PIN0) | \ - 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_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ - PIN_PUPDR_FLOATING(GPIOA_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ - PIN_PUPDR_FLOATING(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_PIN0) | \ - 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_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 0) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(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_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#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_OPENDRAIN(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_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(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_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(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_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#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_LOW(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_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - 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_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - 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_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - 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_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - 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_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - 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_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * 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). - * PD11 - 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, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(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_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(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_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(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_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (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_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - 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_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#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/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3cc..000000000000 --- a/keyboards/clueboard/60/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/clueboard/60/bootloader_defs.h b/keyboards/clueboard/60/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a6ab..000000000000 --- a/keyboards/clueboard/60/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* 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/clueboard/60/config.h b/keyboards/clueboard/60/config.h index a862d2cda3f6..c7dbf8ad0006 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -15,8 +15,9 @@ * 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 0xC1ED @@ -26,6 +27,12 @@ #define PRODUCT Clueboard 60% #define DESCRIPTION Clueboard 60% +/* 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 + /* key matrix size */ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 @@ -33,18 +40,16 @@ /* * Keyboard Matrix Assignments * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom + * COLS: Pins used for columns, left to right + * ROWS: 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) * */ -/* Note: These are not used for arm boards. They're here purely as documentation. - * #define MATRIX_ROW_PINS { PB0, PB1, PB2, PA15, PA10 } - * #define MATRIX_COL_PINS { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } - * #define UNUSED_PINS - */ +#define MATRIX_ROW_PINS { B0, B1, B2, A15, A10 } +#define MATRIX_COL_PINS { A2, A3, A6, B14, B15, A8, A9, A7, B3, B4, C14, C15, C13, B5, B6 } +#define UNUSED_PINS { A0, A1, A9, B7, B8, B9, B10, B11, B12, B13 } +#define DIODE_DIRECTION COL2ROW /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 6 @@ -121,8 +126,6 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 -#endif - /* Backlight configuration */ #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/clueboard/60/info.json b/keyboards/clueboard/60/info.json index abafb69f99e7..aed18b6f05cf 100644 --- a/keyboards/clueboard/60/info.json +++ b/keyboards/clueboard/60/info.json @@ -8,1642 +8,51 @@ "LAYOUT_60_ansi": { "key_count": 61, "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "label": "Enter", - "x": 12.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "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 - } + {"label": "~", "x": 0, "y": 0}, {"label": "!", "x": 1, "y": 0}, {"label": "@", "x": 2, "y": 0}, {"label": "#", "x": 3, "y": 0}, {"label": "$", "x": 4, "y": 0}, {"label": "%", "x": 5, "y": 0}, {"label": "^", "x": 6, "y": 0}, {"label": "&", "x": 7, "y": 0}, {"label": "*", "x": 8, "y": 0}, {"label": "(", "x": 9, "y": 0}, {"label": ")", "x": 10, "y": 0}, {"label": "_", "x": 11, "y": 0}, {"label": "+", "x": 12, "y": 0}, {"label": "Backspace", "x": 13, "y": 0, "w": 2}, + {"label": "Tab", "x": 0, "y": 1, "w": 1.5}, {"label": "Q", "x": 1.5, "y": 1}, {"label": "W", "x": 2.5, "y": 1}, {"label": "E", "x": 3.5, "y": 1}, {"label": "R", "x": 4.5, "y": 1}, {"label": "T", "x": 5.5, "y": 1}, {"label": "Y", "x": 6.5, "y": 1}, {"label": "U", "x": 7.5, "y": 1}, {"label": "I", "x": 8.5, "y": 1}, {"label": "O", "x": 9.5, "y": 1}, {"label": "P", "x": 10.5, "y": 1}, {"label": "{", "x": 11.5, "y": 1}, {"label": "}", "x": 12.5, "y": 1}, {"label": "|", "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "x": 0, "y": 2, "w": 1.75}, {"label": "A", "x": 1.75, "y": 2}, {"label": "S", "x": 2.75, "y": 2}, {"label": "D", "x": 3.75, "y": 2}, {"label": "F", "x": 4.75, "y": 2}, {"label": "G", "x": 5.75, "y": 2}, {"label": "H", "x": 6.75, "y": 2}, {"label": "J", "x": 7.75, "y": 2}, {"label": "K", "x": 8.75, "y": 2}, {"label": "L", "x": 9.75, "y": 2}, {"label": ":", "x": 10.75, "y": 2}, {"label": "\"", "x": 11.75, "y": 2}, {"label": "Enter", "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Shift", "x": 0, "y": 3, "w": 2.25}, {"label": "Z", "x": 2.25, "y": 3}, {"label": "X", "x": 3.25, "y": 3}, {"label": "C", "x": 4.25, "y": 3}, {"label": "V", "x": 5.25, "y": 3}, {"label": "B", "x": 6.25, "y": 3}, {"label": "N", "x": 7.25, "y": 3}, {"label": "M", "x": 8.25, "y": 3}, {"label": "<", "x": 9.25, "y": 3}, {"label": ">", "x": 10.25, "y": 3}, {"label": "?", "x": 11.25, "y": 3}, {"label": "Shift", "x": 12.25, "y": 3, "w": 2.75}, + {"label": "Ctrl", "x": 0, "y": 4, "w": 1.25}, {"label": "Win", "x": 1.25, "y": 4, "w": 1.25}, {"label": "Alt", "x": 2.5, "y": 4, "w": 1.25}, {"x": 3.75, "y": 4, "w": 6.25}, {"label": "Alt", "x": 10, "y": 4, "w": 1.25}, {"label": "Win", "x": 11.25, "y": 4, "w": 1.25}, {"label": "Menu", "x": 12.5, "y": 4, "w": 1.25}, {"label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 } ] - }, + }, "LAYOUT_60_iso": { "key_count": 62, "layout": [ - { - "label": "\\u00ac", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "\"", - "x": 2, - "y": 0 - }, - { - "label": "\\u00a3", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "Enter", - "x": 13.75, - "y": 1, - "w": 1.25, - "h": 2 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "@", - "x": 11.75, - "y": 2 - }, - { - "label": "~", - "x": 12.75, - "y": 2 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 1.25 - }, - { - "label": "|", - "x": 1.25, - "y": 3 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 1.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.5, - "y": 4, - "w": 1.25 - }, - { - "x": 3.75, - "y": 4, - "w": 6.25 - }, - { - "label": "AltGr", - "x": 10, - "y": 4, - "w": 1.25 - }, - { - "label": "Win", - "x": 11.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Menu", - "x": 12.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.75, - "y": 4, - "w": 1.25 - } + {"label": "\\u00ac", "x": 0, "y": 0}, {"label": "!", "x": 1, "y": 0}, {"label": "\"", "x": 2, "y": 0}, {"label": "\\u00a3", "x": 3, "y": 0}, {"label": "$", "x": 4, "y": 0}, {"label": "%", "x": 5, "y": 0}, {"label": "^", "x": 6, "y": 0}, {"label": "&", "x": 7, "y": 0}, {"label": "*", "x": 8, "y": 0}, {"label": "(", "x": 9, "y": 0}, {"label": ")", "x": 10, "y": 0}, {"label": "_", "x": 11, "y": 0}, {"label": "+", "x": 12, "y": 0}, {"label": "Backspace", "x": 13, "y": 0, "w": 2}, + {"label": "Tab", "x": 0, "y": 1, "w": 1.5}, {"label": "Q", "x": 1.5, "y": 1}, {"label": "W", "x": 2.5, "y": 1}, {"label": "E", "x": 3.5, "y": 1}, {"label": "R", "x": 4.5, "y": 1}, {"label": "T", "x": 5.5, "y": 1}, {"label": "Y", "x": 6.5, "y": 1}, {"label": "U", "x": 7.5, "y": 1}, {"label": "I", "x": 8.5, "y": 1}, {"label": "O", "x": 9.5, "y": 1}, {"label": "P", "x": 10.5, "y": 1}, {"label": "{", "x": 11.5, "y": 1}, {"label": "}", "x": 12.5, "y": 1}, {"label": "Enter", "x": 13.75, "y": 1, "w": 1.25, "h": 2}, + {"label": "Caps Lock", "x": 0, "y": 2, "w": 1.75}, {"label": "A", "x": 1.75, "y": 2}, {"label": "S", "x": 2.75, "y": 2}, {"label": "D", "x": 3.75, "y": 2}, {"label": "F", "x": 4.75, "y": 2}, {"label": "G", "x": 5.75, "y": 2}, {"label": "H", "x": 6.75, "y": 2}, {"label": "J", "x": 7.75, "y": 2}, {"label": "K", "x": 8.75, "y": 2}, {"label": "L", "x": 9.75, "y": 2}, {"label": ":", "x": 10.75, "y": 2}, {"label": "@", "x": 11.75, "y": 2}, {"label": "~", "x": 12.75, "y": 2}, + {"label": "Shift", "x": 0, "y": 3, "w": 1.25}, {"label": "|", "x": 1.25, "y": 3}, {"label": "Z", "x": 2.25, "y": 3}, {"label": "X", "x": 3.25, "y": 3}, {"label": "C", "x": 4.25, "y": 3}, {"label": "V", "x": 5.25, "y": 3}, {"label": "B", "x": 6.25, "y": 3}, {"label": "N", "x": 7.25, "y": 3}, {"label": "M", "x": 8.25, "y": 3}, {"label": "<", "x": 9.25, "y": 3}, {"label": ">", "x": 10.25, "y": 3}, {"label": "?", "x": 11.25, "y": 3}, {"label": "Shift", "x": 12.25, "y": 3, "w": 2.75}, + {"label": "Ctrl", "x": 0, "y": 4, "w": 1.25}, {"label": "Win", "x": 1.25, "y": 4, "w": 1.25}, {"label": "Alt", "x": 2.5, "y": 4, "w": 1.25}, {"x": 3.75, "y": 4, "w": 6.25}, {"label": "AltGr", "x": 10, "y": 4, "w": 1.25}, {"label": "Win", "x": 11.25, "y": 4, "w": 1.25}, {"label": "Menu", "x": 12.5, "y": 4, "w": 1.25}, {"label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 } ] - }, - "KEYMAP_AEK": { + }, + "LAYOUT_aek": { "key_count": 60, "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "label": "Backspace", - "x": 13, - "y": 0, - "w": 2 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "label": "Enter", - "x": 12.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 2.75 - }, - { - "label": "Ctrl", - "x": 0, - "y": 4, - "w": 1.5 - }, - { - "label": "Win", - "x": 1.5, - "y": 4, - "w": 1.25 - }, - { - "label": "Alt", - "x": 2.75, - "y": 4, - "w": 1.5 - }, - { - "x": 4.25, - "y": 4, - "w": 6.5 - }, - { - "label": "AltGr", - "x": 10.75, - "y": 4, - "w": 1.5 - }, - { - "label": "Win", - "x": 12.25, - "y": 4, - "w": 1.25 - }, - { - "label": "Ctrl", - "x": 13.5, - "y": 4, - "w": 1.5 - } + {"label": "~", "x": 0, "y": 0}, {"label": "!", "x": 1, "y": 0}, {"label": "@", "x": 2, "y": 0}, {"label": "#", "x": 3, "y": 0}, {"label": "$", "x": 4, "y": 0}, {"label": "%", "x": 5, "y": 0}, {"label": "^", "x": 6, "y": 0}, {"label": "&", "x": 7, "y": 0}, {"label": "*", "x": 8, "y": 0}, {"label": "(", "x": 9, "y": 0}, {"label": ")", "x": 10, "y": 0}, {"label": "_", "x": 11, "y": 0}, {"label": "+", "x": 12, "y": 0}, {"label": "Backspace", "x": 13, "y": 0, "w": 2}, + {"label": "Tab", "x": 0, "y": 1, "w": 1.5}, {"label": "Q", "x": 1.5, "y": 1}, {"label": "W", "x": 2.5, "y": 1}, {"label": "E", "x": 3.5, "y": 1}, {"label": "R", "x": 4.5, "y": 1}, {"label": "T", "x": 5.5, "y": 1}, {"label": "Y", "x": 6.5, "y": 1}, {"label": "U", "x": 7.5, "y": 1}, {"label": "I", "x": 8.5, "y": 1}, {"label": "O", "x": 9.5, "y": 1}, {"label": "P", "x": 10.5, "y": 1}, {"label": "{", "x": 11.5, "y": 1}, {"label": "}", "x": 12.5, "y": 1}, {"label": "|", "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "x": 0, "y": 2, "w": 1.75}, {"label": "A", "x": 1.75, "y": 2}, {"label": "S", "x": 2.75, "y": 2}, {"label": "D", "x": 3.75, "y": 2}, {"label": "F", "x": 4.75, "y": 2}, {"label": "G", "x": 5.75, "y": 2}, {"label": "H", "x": 6.75, "y": 2}, {"label": "J", "x": 7.75, "y": 2}, {"label": "K", "x": 8.75, "y": 2}, {"label": "L", "x": 9.75, "y": 2}, {"label": ":", "x": 10.75, "y": 2}, {"label": "\"", "x": 11.75, "y": 2}, {"label": "Enter", "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Shift", "x": 0, "y": 3, "w": 2.25}, {"label": "Z", "x": 2.25, "y": 3}, {"label": "X", "x": 3.25, "y": 3}, {"label": "C", "x": 4.25, "y": 3}, {"label": "V", "x": 5.25, "y": 3}, {"label": "B", "x": 6.25, "y": 3}, {"label": "N", "x": 7.25, "y": 3}, {"label": "M", "x": 8.25, "y": 3}, {"label": "<", "x": 9.25, "y": 3}, {"label": ">", "x": 10.25, "y": 3}, {"label": "?", "x": 11.25, "y": 3}, {"label": "Shift", "x": 12.25, "y": 3, "w": 2.75}, + {"label": "Ctrl", "x": 0, "y": 4, "w": 1.5}, {"label": "Win", "x": 1.5, "y": 4, "w": 1.25}, {"label": "Alt", "x": 2.75, "y": 4, "w": 1.5}, {"x": 4.25, "y": 4, "w": 6.5}, {"label": "AltGr", "x": 10.75, "y": 4, "w": 1.5}, {"label": "Win", "x": 12.25, "y": 4, "w": 1.25}, {"label": "Ctrl", "x": 13.5, "y": 4, "w": 1.5 } ] - }, - "KEYMAP": { + }, + "LAYOUT_all": { "key_count": 65, "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "x": 13, - "y": 0 - }, - { - "label": "Back", - "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 - }, - { - "x": 0, - "y": 3 - }, - { - "label": "Shift", - "x": 1, - "y": 3, - "w": 1.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 - }, - { - "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 - } + {"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}, {"label": "Back", "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}, + {"x": 0, "y": 3}, {"label": "Shift", "x": 1, "y": 3, "w": 1.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}, {"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_split_bs_rshift": { "key_count": 63, "layout": [ - { - "label": "~", - "x": 0, - "y": 0 - }, - { - "label": "!", - "x": 1, - "y": 0 - }, - { - "label": "@", - "x": 2, - "y": 0 - }, - { - "label": "#", - "x": 3, - "y": 0 - }, - { - "label": "$", - "x": 4, - "y": 0 - }, - { - "label": "%", - "x": 5, - "y": 0 - }, - { - "label": "^", - "x": 6, - "y": 0 - }, - { - "label": "&", - "x": 7, - "y": 0 - }, - { - "label": "*", - "x": 8, - "y": 0 - }, - { - "label": "(", - "x": 9, - "y": 0 - }, - { - "label": ")", - "x": 10, - "y": 0 - }, - { - "label": "_", - "x": 11, - "y": 0 - }, - { - "label": "+", - "x": 12, - "y": 0 - }, - { - "x": 13, - "y": 0 - }, - { - "label": "Back", - "x": 14, - "y": 0 - }, - { - "label": "Tab", - "x": 0, - "y": 1, - "w": 1.5 - }, - { - "label": "Q", - "x": 1.5, - "y": 1 - }, - { - "label": "W", - "x": 2.5, - "y": 1 - }, - { - "label": "E", - "x": 3.5, - "y": 1 - }, - { - "label": "R", - "x": 4.5, - "y": 1 - }, - { - "label": "T", - "x": 5.5, - "y": 1 - }, - { - "label": "Y", - "x": 6.5, - "y": 1 - }, - { - "label": "U", - "x": 7.5, - "y": 1 - }, - { - "label": "I", - "x": 8.5, - "y": 1 - }, - { - "label": "O", - "x": 9.5, - "y": 1 - }, - { - "label": "P", - "x": 10.5, - "y": 1 - }, - { - "label": "{", - "x": 11.5, - "y": 1 - }, - { - "label": "}", - "x": 12.5, - "y": 1 - }, - { - "label": "|", - "x": 13.5, - "y": 1, - "w": 1.5 - }, - { - "label": "Caps Lock", - "x": 0, - "y": 2, - "w": 1.75 - }, - { - "label": "A", - "x": 1.75, - "y": 2 - }, - { - "label": "S", - "x": 2.75, - "y": 2 - }, - { - "label": "D", - "x": 3.75, - "y": 2 - }, - { - "label": "F", - "x": 4.75, - "y": 2 - }, - { - "label": "G", - "x": 5.75, - "y": 2 - }, - { - "label": "H", - "x": 6.75, - "y": 2 - }, - { - "label": "J", - "x": 7.75, - "y": 2 - }, - { - "label": "K", - "x": 8.75, - "y": 2 - }, - { - "label": "L", - "x": 9.75, - "y": 2 - }, - { - "label": ":", - "x": 10.75, - "y": 2 - }, - { - "label": "\"", - "x": 11.75, - "y": 2 - }, - { - "label": "Enter", - "x": 12.75, - "y": 2, - "w": 2.25 - }, - { - "label": "Shift", - "x": 0, - "y": 3, - "w": 2.25 - }, - { - "label": "Z", - "x": 2.25, - "y": 3 - }, - { - "label": "X", - "x": 3.25, - "y": 3 - }, - { - "label": "C", - "x": 4.25, - "y": 3 - }, - { - "label": "V", - "x": 5.25, - "y": 3 - }, - { - "label": "B", - "x": 6.25, - "y": 3 - }, - { - "label": "N", - "x": 7.25, - "y": 3 - }, - { - "label": "M", - "x": 8.25, - "y": 3 - }, - { - "label": "<", - "x": 9.25, - "y": 3 - }, - { - "label": ">", - "x": 10.25, - "y": 3 - }, - { - "label": "?", - "x": 11.25, - "y": 3 - }, - { - "label": "Shift", - "x": 12.25, - "y": 3, - "w": 1.75 - }, - { - "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 - } + {"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}, {"label": "Back", "x": 14, "y": 0}, + {"label": "Tab", "x": 0, "y": 1, "w": 1.5}, {"label": "Q", "x": 1.5, "y": 1}, {"label": "W", "x": 2.5, "y": 1}, {"label": "E", "x": 3.5, "y": 1}, {"label": "R", "x": 4.5, "y": 1}, {"label": "T", "x": 5.5, "y": 1}, {"label": "Y", "x": 6.5, "y": 1}, {"label": "U", "x": 7.5, "y": 1}, {"label": "I", "x": 8.5, "y": 1}, {"label": "O", "x": 9.5, "y": 1}, {"label": "P", "x": 10.5, "y": 1}, {"label": "{", "x": 11.5, "y": 1}, {"label": "}", "x": 12.5, "y": 1}, {"label": "|", "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "x": 0, "y": 2, "w": 1.75}, {"label": "A", "x": 1.75, "y": 2}, {"label": "S", "x": 2.75, "y": 2}, {"label": "D", "x": 3.75, "y": 2}, {"label": "F", "x": 4.75, "y": 2}, {"label": "G", "x": 5.75, "y": 2}, {"label": "H", "x": 6.75, "y": 2}, {"label": "J", "x": 7.75, "y": 2}, {"label": "K", "x": 8.75, "y": 2}, {"label": "L", "x": 9.75, "y": 2}, {"label": ":", "x": 10.75, "y": 2}, {"label": "\"", "x": 11.75, "y": 2}, {"label": "Enter", "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Shift", "x": 0, "y": 3, "w": 2.25}, {"label": "Z", "x": 2.25, "y": 3}, {"label": "X", "x": 3.25, "y": 3}, {"label": "C", "x": 4.25, "y": 3}, {"label": "V", "x": 5.25, "y": 3}, {"label": "B", "x": 6.25, "y": 3}, {"label": "N", "x": 7.25, "y": 3}, {"label": "M", "x": 8.25, "y": 3}, {"label": "<", "x": 9.25, "y": 3}, {"label": ">", "x": 10.25, "y": 3}, {"label": "?", "x": 11.25, "y": 3}, {"label": "Shift", "x": 12.25, "y": 3, "w": 1.75}, {"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} ] } } diff --git a/keyboards/clueboard/60/keymaps/default/keymap.c b/keyboards/clueboard/60/keymaps/default/keymap.c index 3e906737b6e5..89d2180ca65f 100644 --- a/keyboards/clueboard/60/keymaps/default/keymap.c +++ b/keyboards/clueboard/60/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum keyboard_layers { _BL, _FL, @@ -46,19 +44,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | * `-----------------------------------------------------------' */ - [_BL] = KEYMAP( + [_BL] = 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_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, \ 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_BSLS, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), - [_FL] = KEYMAP( + [_FL] = 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, _______,_______,\ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ _______,_______,_______, _______, _______, _______, MO(_FL), _______), - [_CL] = KEYMAP( + [_CL] = LAYOUT_all( BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ diff --git a/keyboards/clueboard/60/keymaps/default_aek/keymap.c b/keyboards/clueboard/60/keymaps/default_aek/keymap.c index ea5333e3c91d..ed4132f415e8 100644 --- a/keyboards/clueboard/60/keymaps/default_aek/keymap.c +++ b/keyboards/clueboard/60/keymaps/default_aek/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum keyboard_layers { _BL, _FL, @@ -22,19 +20,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl |Gui|Alt | Space |Alt|Fn |Ctrl | * `-----------------------------------------------------------' */ - [_BL] = KEYMAP_AEK( + [_BL] = LAYOUT_aek( 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(_FL), KC_RCTL), - [_FL] = KEYMAP_AEK( + [_FL] = LAYOUT_aek( 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(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______, _______, _______, _______, MO(_FL), _______), - [_CL] = KEYMAP_AEK( + [_CL] = LAYOUT_aek( BL_STEP,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______,\ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ diff --git a/keyboards/clueboard/60/keymaps/yanfali/keymap.c b/keyboards/clueboard/60/keymaps/yanfali/keymap.c index b810bdcf8e73..7c81ea028b66 100644 --- a/keyboards/clueboard/60/keymaps/yanfali/keymap.c +++ b/keyboards/clueboard/60/keymaps/yanfali/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - enum keyboard_layers { _BL, _FL, @@ -47,25 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl |Alt|Gui | Space |Alt |Gui|Fn |Ctrl | * `-----------------------------------------------------------------' */ - [_BL] = KEYMAP( + [_BL] = 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_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, \ 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_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, MO(_YF), \ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL), - [_FL] = KEYMAP( + [_FL] = 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, _______,_______,\ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, MO(_YF), \ _______,_______,_______, _______, _______, _______, MO(_FL), _______), - [_CL] = KEYMAP( + [_CL] = LAYOUT_all( BL_STEP,S_BSKTC,S_ODEJY,S_RCKBY,S_DOEDR,S_SCALE,S_ONEUP,S_COIN, S_SONIC,S_ZELDA,_______,_______,_______,_______,_______,\ _______, _______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______, _______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MO(_YF), \ _______, _______, _______, _______, _______, _______, MO(_FL), _______), - [_YF] = KEYMAP( + [_YF] = LAYOUT_all( _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ _______,_______,KC_UP ,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ _______,KC_LEFT,KC_DOWN,KC_RIGHT,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ diff --git a/keyboards/clueboard/60/matrix.c b/keyboards/clueboard/60/matrix.c deleted file mode 100644 index 7c38a3bd45a1..000000000000 --- a/keyboards/clueboard/60/matrix.c +++ /dev/null @@ -1,175 +0,0 @@ -#include -#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "printf.h" -#include "backlight.h" -#include "matrix.h" - - -/* Clueboard 60% - * - * Column pins are input with internal pull-down. - * Row pins are output and strobe with high. - * Key is high or 1 when it turns on. - * - * col: { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } - * row: { PB0, PB1, PB2, PA15, PA10 } - */ -/* 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; - - /* Column(sense) */ - palSetPadMode(GPIOA, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 6, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 15, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 9, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOA, 7, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 15, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 14, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 13, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 5, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 6, PAL_MODE_OUTPUT_PUSHPULL); - - /* Row(strobe) */ - palSetPadMode(GPIOB, 0, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOB, 1, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOB, 2, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 15, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLDOWN); - - memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t)); - memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_row_t)); - - palClearPad(GPIOB, 7); // Turn off capslock - matrix_init_quantum(); -} - -uint8_t matrix_scan(void) { - for (int col = 0; col < MATRIX_COLS; col++) { - matrix_row_t data = 0; - - // strobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC14, PC15, PC13, PB5, PB6 } - switch (col) { - case 0: palSetPad(GPIOA, 2); break; - case 1: palSetPad(GPIOA, 3); break; - case 2: palSetPad(GPIOA, 6); break; - case 3: palSetPad(GPIOB, 14); break; - case 4: palSetPad(GPIOB, 15); break; - case 5: palSetPad(GPIOA, 8); break; - case 6: palSetPad(GPIOA, 9); break; - case 7: palSetPad(GPIOA, 7); break; - case 8: palSetPad(GPIOB, 3); break; - case 9: palSetPad(GPIOB, 4); break; - case 10: palSetPad(GPIOC, 15); break; - case 11: palSetPad(GPIOC, 14); break; - case 12: palSetPad(GPIOC, 13); break; - case 13: palSetPad(GPIOB, 5); break; - case 14: palSetPad(GPIOB, 6); break; - } - - // need wait to settle pin state - wait_us(20); - - // read row data { PB0, PB1, PB2, PA15, PA10 } - data = ( - (palReadPad(GPIOB, 0) << 0 ) | - (palReadPad(GPIOB, 1) << 1 ) | - (palReadPad(GPIOB, 2) << 2 ) | - (palReadPad(GPIOA, 15) << 3 ) | - (palReadPad(GPIOA, 10) << 4 ) - ); - - // unstrobe col { PA2, PA3, PA6, PB14, PB15, PA8, PA9, PA7, PB3, PB4, PC15, PC14, PC13, PB5, PB6 } - switch (col) { - case 0: palClearPad(GPIOA, 2); break; - case 1: palClearPad(GPIOA, 3); break; - case 2: palClearPad(GPIOA, 6); break; - case 3: palClearPad(GPIOB, 14); break; - case 4: palClearPad(GPIOB, 15); break; - case 5: palClearPad(GPIOA, 8); break; - case 6: palClearPad(GPIOA, 9); break; - case 7: palClearPad(GPIOA, 7); break; - case 8: palClearPad(GPIOB, 3); break; - case 9: palClearPad(GPIOB, 4); break; - case 10: palClearPad(GPIOC, 15); break; - case 11: palClearPad(GPIOC, 14); break; - case 12: palClearPad(GPIOC, 13); break; - case 13: palClearPad(GPIOB, 5); break; - case 14: palClearPad(GPIOB, 6); 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< - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General 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 CLUEBOARD_66_CONFIG_H -#define CLUEBOARD_66_CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xC1ED -#define MANUFACTURER Clueboard -#define PRODUCT Clueboard -#define DESCRIPTION QMK keyboard firmware for Clueboard - -/* 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 - -/* 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/clueboard/66/info.json b/keyboards/clueboard/66/info.json index 1675ae7617a3..05eb6627d842 100644 --- a/keyboards/clueboard/66/info.json +++ b/keyboards/clueboard/66/info.json @@ -3,12 +3,33 @@ "width": 16.5, "height": 5, "layouts": { - "KEYMAP": { - "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": 12.75, "y": 2, "w": 1, "label": "ISOHASH"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH"}, {"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": 12.25, "y": 3, "w": 1, "label": "JPBACKSLASH"}, {"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": { + "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": 12.75, "y": 2, "w": 1, "label": "ISOHASH"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, + {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH"}, {"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": 12.25, "y": 3, "w": 1, "label": "JPBACKSLASH"}, {"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}] - } + "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}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Win", "x":11, "y":4, "w":1.25}, {"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} + ] + }, + + "LAYOUT_66_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, "w":2}, {"label":"Insert", "x":15.5, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":15.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"", "x":12.75, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":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}, {"label":"\u2191", "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}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Ctrl", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13.5, "y":4}, {"label":"\u2193", "x":14.5, "y":4}, {"label":"\u2192", "x":15.5, "y":4} + } } } diff --git a/keyboards/clueboard/66/keymaps/66_ansi/keymap.c b/keyboards/clueboard/66/keymaps/66_ansi/keymap.c index cfa641dcc6c8..73c809ded6f1 100644 --- a/keyboards/clueboard/66/keymaps/66_ansi/keymap.c +++ b/keyboards/clueboard/66/keymaps/66_ansi/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/66_ansi/readme.md b/keyboards/clueboard/66/keymaps/66_ansi/readme.md index 25b5d7eb18c7..eee81c0c2d1a 100644 --- a/keyboards/clueboard/66/keymaps/66_ansi/readme.md +++ b/keyboards/clueboard/66/keymaps/66_ansi/readme.md @@ -1,6 +1,4 @@ -![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) - -# Basic Clueboard 66% Hotswap Layout +# Basic Clueboard 66% Hotswap ANSI Layout This is the default layout that comes flashed on every Clueboard. For the most part it's a straightforward and easy to follow layout. The only unusual key is diff --git a/keyboards/clueboard/66/keymaps/66_iso/keymap.c b/keyboards/clueboard/66/keymaps/66_iso/keymap.c index 577cf045b540..ff27acf5cdef 100644 --- a/keyboards/clueboard/66/keymaps/66_iso/keymap.c +++ b/keyboards/clueboard/66/keymaps/66_iso/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/66_iso/readme.md b/keyboards/clueboard/66/keymaps/66_iso/readme.md index 019131aeb199..6d895b0eba72 100644 --- a/keyboards/clueboard/66/keymaps/66_iso/readme.md +++ b/keyboards/clueboard/66/keymaps/66_iso/readme.md @@ -1,6 +1,4 @@ -![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) - -# Default Clueboard Layout +# Default Clueboard 66% ISO Layout This is the default layout that comes flashed on every Clueboard. For the most part it's a straightforward and easy to follow layout. The only unusual key is diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/config.h b/keyboards/clueboard/66/keymaps/bloodlvst/config.h index 456936cf930d..60c6ad4a12cb 100644 --- a/keyboards/clueboard/66/keymaps/bloodlvst/config.h +++ b/keyboards/clueboard/66/keymaps/bloodlvst/config.h @@ -1,7 +1,3 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once #define DISABLE_SPACE_CADET_ROLLOVER -#endif diff --git a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c index 73543cbfad9c..7c7faba9ce9f 100644 --- a/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c +++ b/keyboards/clueboard/66/keymaps/bloodlvst/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/caps_fn/keymap.c b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c index c48c50738790..fc0c56d9a771 100644 --- a/keyboards/clueboard/66/keymaps/caps_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/caps_fn/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/caps_fn/readme.md b/keyboards/clueboard/66/keymaps/caps_fn/readme.md index 47a530a80b4e..71d1246c0788 100644 --- a/keyboards/clueboard/66/keymaps/caps_fn/readme.md +++ b/keyboards/clueboard/66/keymaps/caps_fn/readme.md @@ -1,5 +1,3 @@ -![Clueboard Layout Image](http://i.imgur.com/kGADucy.png) - # Caps Fn Layout This is the default layout except that Caps Lock acts like Caps Lock when diff --git a/keyboards/clueboard/66/keymaps/colemak/keymap.c b/keyboards/clueboard/66/keymaps/colemak/keymap.c index 3666bd0e6407..4479556b65bf 100644 --- a/keyboards/clueboard/66/keymaps/colemak/keymap.c +++ b/keyboards/clueboard/66/keymaps/colemak/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/default/keymap.c b/keyboards/clueboard/66/keymaps/default/keymap.c index 555ff97f0c69..95283db886cb 100644 --- a/keyboards/clueboard/66/keymaps/default/keymap.c +++ b/keyboards/clueboard/66/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/default/readme.md b/keyboards/clueboard/66/keymaps/default/readme.md index 019131aeb199..b1cdcbe4e26a 100644 --- a/keyboards/clueboard/66/keymaps/default/readme.md +++ b/keyboards/clueboard/66/keymaps/default/readme.md @@ -1,6 +1,4 @@ -![Clueboard Layout Image](http://i.imgur.com/7Capi8W.png) - -# Default Clueboard Layout +# Default Clueboard 66% Universal Layout This is the default layout that comes flashed on every Clueboard. For the most part it's a straightforward and easy to follow layout. The only unusual key is diff --git a/keyboards/clueboard/66/keymaps/jokrik/keymap.c b/keyboards/clueboard/66/keymaps/jokrik/keymap.c index 118efe0a9771..9c6997c34e2b 100644 --- a/keyboards/clueboard/66/keymaps/jokrik/keymap.c +++ b/keyboards/clueboard/66/keymaps/jokrik/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c index 29d96842963c..30e772900ee6 100644 --- a/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/mac_optimized/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/mac_optimized/readme.md b/keyboards/clueboard/66/keymaps/mac_optimized/readme.md index 282da369dc6c..db7a87d443b6 100644 --- a/keyboards/clueboard/66/keymaps/mac_optimized/readme.md +++ b/keyboards/clueboard/66/keymaps/mac_optimized/readme.md @@ -1,5 +1,3 @@ -![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png) - # Default Clueboard Layout for Mac This is the default Clueboard layout with Alt and GUI switched to match Mac diff --git a/keyboards/clueboard/66/keymaps/magicmonty/config.h b/keyboards/clueboard/66/keymaps/magicmonty/config.h index d933fa9979e7..65853f6b0c1d 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/config.h +++ b/keyboards/clueboard/66/keymaps/magicmonty/config.h @@ -1,7 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once /* * MIDI options @@ -36,5 +33,3 @@ #define LSPO_KEY KC_8 #define RSPC_KEY KC_9 #define PERMISSIVE_HOLD - -#endif diff --git a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c index 7f91224cfb5c..8d93715676af 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/keymap.c +++ b/keyboards/clueboard/66/keymaps/magicmonty/keymap.c @@ -1,4 +1,4 @@ -#include "66.h" +#include QMK_KEYBOARD_H // Helpful defines #define xxxxxxx KC_NO diff --git a/keyboards/clueboard/66/keymaps/magicmonty/rules.mk b/keyboards/clueboard/66/keymaps/magicmonty/rules.mk index 7ee1ff169052..46222e2d3428 100644 --- a/keyboards/clueboard/66/keymaps/magicmonty/rules.mk +++ b/keyboards/clueboard/66/keymaps/magicmonty/rules.mk @@ -1,6 +1,7 @@ MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality MIDI_ENABLE = yes diff --git a/keyboards/clueboard/66/keymaps/manofinterests/keymap.c b/keyboards/clueboard/66/keymaps/manofinterests/keymap.c index 08815dc5a90b..e71419980d6f 100644 --- a/keyboards/clueboard/66/keymaps/manofinterests/keymap.c +++ b/keyboards/clueboard/66/keymaps/manofinterests/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/maximised/keymap.c b/keyboards/clueboard/66/keymaps/maximised/keymap.c index 1b117dc60508..c2e05a5a2775 100644 --- a/keyboards/clueboard/66/keymaps/maximised/keymap.c +++ b/keyboards/clueboard/66/keymaps/maximised/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/maximised/readme.md b/keyboards/clueboard/66/keymaps/maximised/readme.md index fc82e6879356..b8d54a309393 100644 --- a/keyboards/clueboard/66/keymaps/maximised/readme.md +++ b/keyboards/clueboard/66/keymaps/maximised/readme.md @@ -1,5 +1,3 @@ -![Clueboard Layout Image](http://i.imgur.com/7oZCsHF.png) - # Maximised Clueboard Layout This layout is intended for a board with one or both shifts split. The outside key on the split shift is an Fn, while the inside is shift. The bottom row has all the mods on both sides, optimised for a Mac. diff --git a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c index 2169312d4659..be5634f103f1 100644 --- a/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c +++ b/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/mouse_keys/readme.md b/keyboards/clueboard/66/keymaps/mouse_keys/readme.md index 7fb038205a3a..de883e8940ba 100644 --- a/keyboards/clueboard/66/keymaps/mouse_keys/readme.md +++ b/keyboards/clueboard/66/keymaps/mouse_keys/readme.md @@ -1,5 +1,3 @@ -![Clueboard Layout Image](layout.png) - # MouseKeys Layout This layout adds a mouse layer. When you hold down the spacebar the arrow keys diff --git a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c index abf98615ea45..302649c9234a 100644 --- a/keyboards/clueboard/66/keymaps/mrscooty/keymap.c +++ b/keyboards/clueboard/66/keymaps/mrscooty/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/serubin/keymap.c b/keyboards/clueboard/66/keymaps/serubin/keymap.c index 32507e91848e..e77417c3c298 100644 --- a/keyboards/clueboard/66/keymaps/serubin/keymap.c +++ b/keyboards/clueboard/66/keymaps/serubin/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/shift_fn/keymap.c b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c index 3736db899211..8556f90803ac 100644 --- a/keyboards/clueboard/66/keymaps/shift_fn/keymap.c +++ b/keyboards/clueboard/66/keymaps/shift_fn/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/shift_fn/readme.md b/keyboards/clueboard/66/keymaps/shift_fn/readme.md index 4bd920ad4ef3..d68c5b053214 100644 --- a/keyboards/clueboard/66/keymaps/shift_fn/readme.md +++ b/keyboards/clueboard/66/keymaps/shift_fn/readme.md @@ -1,4 +1,4 @@ -# Shift Fn Clueboard Layout +# Shift Fn Clueboard 66% Layout This is an experimental layout. It makes the left shift key a dual roll key. For most keys it acts as a shift key, but for some keys it activates an diff --git a/keyboards/clueboard/66/keymaps/smt/keymap.c b/keyboards/clueboard/66/keymaps/smt/keymap.c index 42dcfecac099..c1e3756909aa 100644 --- a/keyboards/clueboard/66/keymaps/smt/keymap.c +++ b/keyboards/clueboard/66/keymaps/smt/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/tetris/keymap.c b/keyboards/clueboard/66/keymaps/tetris/keymap.c index f7c6d4c139dd..ef3abd667200 100644 --- a/keyboards/clueboard/66/keymaps/tetris/keymap.c +++ b/keyboards/clueboard/66/keymaps/tetris/keymap.c @@ -1,4 +1,4 @@ -#include "66.h" +#include QMK_KEYBOARD_H #include "tetris_text.h" // Helpful defines diff --git a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c index 927e848539c7..823959ee0dc7 100644 --- a/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/unix_optimized/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/unix_optimized/readme.md b/keyboards/clueboard/66/keymaps/unix_optimized/readme.md index 9e6d0e902aa9..79c7daef8422 100644 --- a/keyboards/clueboard/66/keymaps/unix_optimized/readme.md +++ b/keyboards/clueboard/66/keymaps/unix_optimized/readme.md @@ -1,6 +1,4 @@ -![Clueboard Layout Image](http://i.imgur.com/BnWlOht.png) - -# Default Clueboard Layout +# Default Clueboard 66% Layout This is the default layout except that Caps Lock has been changed to Control and Insert and Delete have been put into the Fn layer. diff --git a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c index 2432350164fe..2c5cb863986b 100644 --- a/keyboards/clueboard/66/keymaps/win_optimized/keymap.c +++ b/keyboards/clueboard/66/keymaps/win_optimized/keymap.c @@ -1,4 +1,4 @@ -#include "66.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/clueboard/66/keymaps/win_optimized/readme.md b/keyboards/clueboard/66/keymaps/win_optimized/readme.md index 703a37be0c1c..d79603268d27 100644 --- a/keyboards/clueboard/66/keymaps/win_optimized/readme.md +++ b/keyboards/clueboard/66/keymaps/win_optimized/readme.md @@ -1,6 +1,4 @@ -![Clueboard Layout Image](http://i.imgur.com/fsqOqZo.png) - -# Default Clueboard Layout +# Default Clueboard 66% Layout This is the default layout that comes flashed on every Clueboard. For the most part it's a straightforward and easy to follow layout. The only unusual key is diff --git a/keyboards/clueboard/66/keymaps/xyverz/config.h b/keyboards/clueboard/66/keymaps/xyverz/config.h index 4999e4ff6c0e..979cbf57687d 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/config.h +++ b/keyboards/clueboard/66/keymaps/xyverz/config.h @@ -1,3 +1,3 @@ -#include "../config.h" +#pragma once -#define TAPPING_TERM 600 // ms +#define TAPPING_TERM 600 // ms diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index e3f413b49015..916a448e26ca 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -1,7 +1,7 @@ // Xyverz' keymap. // It's based on the default keymap, but Dvorak! -#include "66.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" diff --git a/keyboards/clueboard/66/readme.md b/keyboards/clueboard/66/readme.md index b7ca6cb56753..094cc219e9c5 100644 --- a/keyboards/clueboard/66/readme.md +++ b/keyboards/clueboard/66/readme.md @@ -1,6 +1,6 @@ # Clueboard 66% -![Clueboard](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/5867eeaad2b857fd0d196f4b/1494021396651/IMGP4201.jpg?format=1500w) +![Clueboard](https://i.imgur.com/hLePwJu.jpg) A fully customizable 66% keyboard. @@ -8,7 +8,7 @@ A fully customizable 66% keyboard. * Hardware Supported: Clueboard 66% PCB * rev1 (PCB Version 1.0) * rev2 (PCB Versions 2.0, 2.0.1, 2.1, 2.5, 2.5.1, 2.6) - * rev3 (PCB Versions 2.7, 2.8) + * rev3 (PCB Versions 2.7, 2.8, 2.9) * Hardware Availability: [clueboard.co](https://clueboard.co/) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/clueboard/66/rev1/config.h b/keyboards/clueboard/66/rev1/config.h index 210718d56034..a35c0d0f65dc 100644 --- a/keyboards/clueboard/66/rev1/config.h +++ b/keyboards/clueboard/66/rev1/config.h @@ -1,28 +1,60 @@ -#ifndef CLUEBOARD_66_REV1_CONFIG_H -#define CLUEBOARD_66_REV1_CONFIG_H +#pragma once #include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED #define PRODUCT_ID 0x2301 #define DEVICE_VER 0x0003 +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard +#define DESCRIPTION QMK keyboard firmware for Clueboard -/* key matrix size */ +/* key matrix size + */ #define MATRIX_ROWS 5 #define MATRIX_COLS 16 -// ROWS: Top to bottom, COLS: Left to right -/* Column pin configuration -* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -* pin: B3 F1 F4 F5 F6 C7 C6 B6 B5 B4 D7 D6 D4 F7 B0 B1 -*/ +/* ROWS: Top to bottom, COLS: Left to right + */ #define MATRIX_COL_PINS { B3, F1, F4, F5, F6, C7, C6, B6, B5, B4, D7, D6, D4, F7, B0, B1 } -/* Row pin configuration -* row: 0 1 2 3 4 -* pin: D1 D0 D2 D5 D3 -*/ #define MATRIX_ROW_PINS { D1, D0, D2, D5, D3 } #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 + +/* 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 + /* Underlight configuration */ #define RGB_DI_PIN B2 @@ -31,6 +63,3 @@ #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - - -#endif diff --git a/keyboards/clueboard/66/rev1/rev1.h b/keyboards/clueboard/66/rev1/rev1.h index 58694fcb973d..8a5e9bf68091 100644 --- a/keyboards/clueboard/66/rev1/rev1.h +++ b/keyboards/clueboard/66/rev1/rev1.h @@ -1,7 +1,6 @@ -#ifndef REV1_H -#define REV1_H +#pragma once -#include "../66.h" +#include "quantum.h" /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. @@ -43,7 +42,6 @@ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ { k40, k41, k42, k43, KC_NO, k45, k46, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D, k4E, k4F } \ } -#define KEYMAP LAYOUT #define LAYOUT_66_ansi( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ @@ -73,4 +71,4 @@ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F } \ } -#endif +#define KEYMAP LAYOUT diff --git a/keyboards/clueboard/66/rev1/rules.mk b/keyboards/clueboard/66/rev1/rules.mk index f845616741c2..96d4125ac4cb 100644 --- a/keyboards/clueboard/66/rev1/rules.mk +++ b/keyboards/clueboard/66/rev1/rules.mk @@ -1 +1,23 @@ -BACKLIGHT_ENABLE = no \ No newline at end of file +LAYOUTS = 66_ansi 66_iso +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +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 # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/clueboard/66/rev2/config.h b/keyboards/clueboard/66/rev2/config.h index 6ab2b1127db2..0216b5e1fef5 100644 --- a/keyboards/clueboard/66/rev2/config.h +++ b/keyboards/clueboard/66/rev2/config.h @@ -1,28 +1,59 @@ -#ifndef CLUEBOARD_66_REV2_CONFIG_H -#define CLUEBOARD_66_REV2_CONFIG_H +#pragma once #include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED #define PRODUCT_ID 0x2320 #define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard +#define DESCRIPTION QMK keyboard firmware for Clueboard /* 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 +/* ROWS: Top to bottom, COLS: Left to right */ #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 +/* 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 + +/* 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 + /* Backlight configuration */ #define BACKLIGHT_LEVELS 1 @@ -44,5 +75,3 @@ #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 1 // The led to start at #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up - -#endif diff --git a/keyboards/clueboard/66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h index bac608df979a..267e6795e7a7 100644 --- a/keyboards/clueboard/66/rev2/rev2.h +++ b/keyboards/clueboard/66/rev2/rev2.h @@ -1,7 +1,6 @@ -#ifndef REV2_H -#define REV2_H +#pragma once -#include "66.h" +#include "quantum.h" /* Clueboard matrix layout * ,-----------------------------------------------------------. ,---. @@ -48,7 +47,6 @@ { k80, k81, k82, k83, k84, k85, k86, KC_NO }, \ { k90, KC_NO, k92, k93, k94, k95, k96, k97 } \ } -#define KEYMAP LAYOUT /* LAYOUT_66_ansi, standard 66 key ANSI layout */ @@ -92,4 +90,4 @@ { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ } -#endif +#define KEYMAP LAYOUT diff --git a/keyboards/clueboard/66/rev2/rules.mk b/keyboards/clueboard/66/rev2/rules.mk index 54a2685bf634..4987ac1378df 100644 --- a/keyboards/clueboard/66/rev2/rules.mk +++ b/keyboards/clueboard/66/rev2/rules.mk @@ -1 +1,22 @@ -BACKLIGHT_ENABLE = yes \ No newline at end of file +LAYOUTS = 66_ansi 66_iso +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +BACKLIGHT_ENABLE = yes +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 # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/clueboard/66/rev3/config.h b/keyboards/clueboard/66/rev3/config.h index 218736a889d5..e7cda4ccf025 100644 --- a/keyboards/clueboard/66/rev3/config.h +++ b/keyboards/clueboard/66/rev3/config.h @@ -1,28 +1,59 @@ -#ifndef CLUEBOARD_66_REV3_CONFIG_H -#define CLUEBOARD_66_REV3_CONFIG_H +#pragma once #include "config_common.h" +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED #define PRODUCT_ID 0x2370 #define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard +#define DESCRIPTION QMK keyboard firmware for Clueboard /* 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 +/* ROWS: Top to bottom, COLS: Left to right */ #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 +/* 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 + +/* 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 + /* Backlight configuration */ #define BACKLIGHT_LEVELS 1 @@ -44,5 +75,3 @@ #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up - -#endif diff --git a/keyboards/clueboard/66/rev3/rev3.c b/keyboards/clueboard/66/rev3/rev3.c index 713d998e6d1a..195a21a9e888 100644 --- a/keyboards/clueboard/66/rev3/rev3.c +++ b/keyboards/clueboard/66/rev3/rev3.c @@ -8,10 +8,6 @@ void matrix_init_kb(void) { // 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<. */ #pragma once + #include "config_common.h" /* USB Device descriptor parameter */ diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index 14188634b373..d5d36d4a1c2e 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -1,4 +1,5 @@ #pragma once + #include "config_common.h" #define PRODUCT_ID 0x2390 @@ -8,17 +9,9 @@ #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 +/* ROWS: Top to bottom, COLS: Left to right */ - #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 diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.h b/keyboards/clueboard/66_hotswap/gen1/gen1.h index 2d0a9d3977e9..e71994f9c0dc 100644 --- a/keyboards/clueboard/66_hotswap/gen1/gen1.h +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.h @@ -3,65 +3,65 @@ /* 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| 74| 75| - * |------------------------------------------------------------. - * | 30| 31| 32| 33| 34| 35| 36| 37| 80| 81| 82| 83| 84| 85|86| - * |------------------------------------------------------------------. - * | 40| 41| 42| 43| 45| 46| 90| 92| 93| 94| 95| 96| 97| - * `------------------------------------------------------------------' + * | 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| + * `-----------------------------------------------------------------' * ,-----------------------------------------------------------. ,---. * | `| 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|Left|Down|Rgt| - * `------------------------------------------------------------------' + * |-------------------------------------------------------------. + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up | + * |-----------------------------------------------------------------. + * |Ctrl|Alt |Gui | Space| Space|Gui |Alt |Fn |Ctrl|Lft|Dwn|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, k31, k32, k33, k34, k35, k36, k37, k80, k81, k82, k83, k84, k85, k86, \ - k40, k41, k42, k45, k46, k90, k92, k93, k94, k95, k96, k97 \ + 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, k31, 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, k84, 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, 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 } \ } #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 \ + 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, 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 } \ } diff --git a/keyboards/clueboard/66_hotswap/info.json b/keyboards/clueboard/66_hotswap/info.json index 42fbecedddb5..04a748764c4f 100644 --- a/keyboards/clueboard/66_hotswap/info.json +++ b/keyboards/clueboard/66_hotswap/info.json @@ -4,11 +4,22 @@ "height": 5, "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": 12.75, "y": 2, "w": 1, "label": "ISOHASH"}, {"x": 13.75, "y": 2, "w": 1.25, "label": "ENTER"}, {"x": 0, "y": 3, "w": 1.25, "label": "LSHIFT"}, {"x": 1.25, "y": 3, "w": 1, "label": "ISOBACKSLASH"}, {"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": 12.25, "y": 3, "w": 1, "label": "JPBACKSLASH"}, {"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": [ + {"x": 0, "y": 0, "label": "GRAVE"}, {"x": 1, "y": 0, "label": "1"}, {"x": 2, "y": 0, "label": "2"}, {"x": 3, "y": 0, "label": "3"}, {"x": 4, "y": 0, "label": "4"}, {"x": 5, "y": 0, "label": "5"}, {"x": 6, "y": 0, "label": "6"}, {"x": 7, "y": 0, "label": "7"}, {"x": 8, "y": 0, "label": "8"}, {"x": 9, "y": 0, "label": "9"}, {"x": 10, "y": 0, "label": "0"}, {"x": 11, "y": 0, "label": "DASH"}, {"x": 12, "y": 0, "label": "EQUALSIGN"}, {"x": 13, "y": 0, "w": 2, "label": "BACKSPACE"}, {"x": 15.5, "y": 0, "label": "PAGEUP"}, + {"x": 0, "y": 1, "w": 1.5, "label": "TAB"}, {"x": 1.5, "y": 1, "label": "Q"}, {"x": 2.5, "y": 1, "label": "W"}, {"x": 3.5, "y": 1, "label": "E"}, {"x": 4.5, "y": 1, "label": "R"}, {"x": 5.5, "y": 1, "label": "T"}, {"x": 6.5, "y": 1, "label": "Y"}, {"x": 7.5, "y": 1, "label": "U"}, {"x": 8.5, "y": 1, "label": "I"}, {"x": 9.5, "y": 1, "label": "O"}, {"x": 10.5, "y": 1, "label": "P"}, {"x": 11.5, "y": 1, "label": "LBRACKET"}, {"x": 12.5, "y": 1, "label": "RBRACKET"}, {"x": 13.5, "y": 1, "w": 1.5, "label": "BACKSLASH"}, {"x": 15.5, "y": 1, "label": "PAGEDOWN"}, + {"x": 0, "y": 2, "w": 1.75, "label": "CAPS LOCK"}, {"x": 1.75, "y": 2, "label": "A"}, {"x": 2.75, "y": 2, "label": "S"}, {"x": 3.75, "y": 2, "label": "D"}, {"x": 4.75, "y": 2, "label": "F"}, {"x": 5.75, "y": 2, "label": "G"}, {"x": 6.75, "y": 2, "label": "H"}, {"x": 7.75, "y": 2, "label": "J"}, {"x": 8.75, "y": 2, "label": "K"}, {"x": 9.75, "y": 2, "label": "L"}, {"x": 10.75, "y": 2, "label": "SEMICOLON"}, {"x": 11.75, "y": 2, "label": "QUOTE"}, {"x": 12.75, "y": 2, "w": 2.25, "label": "ENTER"}, + {"x": 0, "y": 3, "w": 2.25, "label": "LSHIFT"}, {"x": 2.25, "y": 3, "label": "Z"}, {"x": 3.25, "y": 3, "label": "X"}, {"x": 4.25, "y": 3, "label": "C"}, {"x": 5.25, "y": 3, "label": "V"}, {"x": 6.25, "y": 3, "label": "B"}, {"x": 7.25, "y": 3, "label": "N"}, {"x": 8.25, "y": 3, "label": "M"}, {"x": 9.25, "y": 3, "label": "COMMA"}, {"x": 10.25, "y": 3, "label": "PERIOD"}, {"x": 11.25, "y": 3, "label": "SLASH"}, {"x": 12.25, "y": 3, "w": 2.25, "label": "RSHIFT"}, {"x": 14.5, "y": 3, "label": "UP"}, + {"x": 0, "y": 4, "w": 1.25, "label": "LCTRL"}, {"x": 1.25, "y": 4, "w": 1.25, "label": "LGUI"}, {"x": 2.5, "y": 4, "w": 1.25, "label": "LALT"}, {"x": 3.75, "y": 4, "w": 2.75, "label": "SPACE1"}, {"x": 6.5, "y": 4, "w": 2.25, "label": "SPACE2"}, {"x": 8.75, "y": 4, "w": 1.25, "label": "RGUI"}, {"x": 10, "y": 4, "w": 1.25, "label": "RALT"}, {"x": 11.25, "y": 4, "label": "FN"}, {"x": 12.25, "y": 4, "w": 1.25, "label": "RCTRL"}, {"x": 13.5, "y": 4, "label": "LEFT"}, {"x": 14.5, "y": 4, "label": "DOWN"}, {"x": 15.5, "y": 4, "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}] + "layout": [ + {"label": "~", "x": 0, "y": 0}, {"label": "!", "x": 1, "y": 0}, {"label": "@", "x": 2, "y": 0}, {"label": "#", "x": 3, "y": 0}, {"label": "$", "x": 4, "y": 0}, {"label": "%", "x": 5, "y": 0}, {"label": "^", "x": 6, "y": 0}, {"label": "&", "x": 7, "y": 0}, {"label": "*", "x": 8, "y": 0}, {"label": "(", "x": 9, "y": 0}, {"label": ")", "x": 10, "y": 0}, {"label": "_", "x": 11, "y": 0}, {"label": "+", "x": 12, "y": 0}, {"label": "BACKSPACE", "x": 13, "y": 0, "w": 2}, {"label": "PAGEUP", "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}, {"label": "PAGEDOWN", "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": "SEMICOLON", "x": 10.75, "y": 2}, {"label": "QUOTE", "x": 11.75, "y": 2}, {"label": "ENTER", "x": 12.75, "y": 2, "w": 2.25}, + {"label": "LSHIFT", "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": "COMMA", "x": 9.25, "y": 3}, {"label": "PERIOD", "x": 10.25, "y": 3}, {"label": "SLASH", "x": 11.25, "y": 3}, {"label": "RSHIFT", "x": 12.25, "y": 3, "w": 2.25}, {"label": "UP", "x": 14.5, "y": 3}, + {"label": "LCTRL", "x": 0, "y": 4, "w": 1.25}, {"label": "LGUI", "x": 1.25, "y": 4, "w": 1.25}, {"label": "LALT", "x": 2.5, "y": 4, "w": 1.25}, {"label": "SPACE", "x": 3.75, "y": 4, "w": 6.25}, {"label": "RALT", "x": 10, "y": 4, "w": 1.25}, {"label": "RGUI", "x": 11.25, "y": 4}, {"label": "FN", "x": 12.25, "y": 4, "w": 1.25}, {"label": "LEFT", "x": 13.5, "y": 4}, {"label": "DOWN", "x": 14.5, "y": 4}, {"label": "RIGHT", "x": 15.5, "y": 4} + ] } } } diff --git a/keyboards/clueboard/66_hotswap/keymaps/66_ansi/keymap.c b/keyboards/clueboard/66_hotswap/keymaps/66_ansi/keymap.c index 977a3501b139..224362fe549e 100644 --- a/keyboards/clueboard/66_hotswap/keymaps/66_ansi/keymap.c +++ b/keyboards/clueboard/66_hotswap/keymaps/66_ansi/keymap.c @@ -1,4 +1,4 @@ -#include "66_hotswap.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/clueboard/66_hotswap/keymaps/default/keymap.c b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c index 240eb0e97048..94f2ec0c400a 100644 --- a/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c +++ b/keyboards/clueboard/66_hotswap/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "66_hotswap.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. @@ -13,7 +13,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_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_ENT, \ - KC_LSFT,MO(_FL),KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,MO(_FL), 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, KC_SPC, KC_RGUI,KC_RALT,MO(_FL),KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT), /* Keymap _FL: Function Layer @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______,MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,MO(_FL),_______, KC_PGUP, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, KC_PGUP, \ _______,_______,_______, _______,_______, _______,_______,MO(_FL),_______,KC_HOME,KC_PGDN,KC_END), /* Keymap _CL: Control layer @@ -31,6 +31,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, \ _______,_______,MO(_CL),_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ - _______,MO(_FL),_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,MO(_FL),_______, RGB_SAI, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, RGB_SAI, \ _______,_______,_______, RGB_MOD,RGB_MOD, _______,_______,MO(_FL),_______,RGB_HUD,RGB_SAD,RGB_HUI), }; diff --git a/keyboards/clueboard/66_hotswap/readme.md b/keyboards/clueboard/66_hotswap/readme.md index 8ece12e8886b..036df01c6445 100644 --- a/keyboards/clueboard/66_hotswap/readme.md +++ b/keyboards/clueboard/66_hotswap/readme.md @@ -1,16 +1,16 @@ # Clueboard 66% HotSwap -![Clueboard](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/5867eeaad2b857fd0d196f4b/1494021396651/IMGP4201.jpg?format=1500w) +![Clueboard](https://i.imgur.com/8UmBoNx.jpg) A fully customizable 66% keyboard with Hot Swap sockets. * Keyboard Maintainer: [Zach White](https://github.com/skullydazed) * Hardware Supported: Clueboard 66% HotSwap PCB - * 2.9 + * 2.9 (gen1) * Hardware Availability: [clueboard.co](https://clueboard.co/) Make example for this keyboard (after setting up your build environment): - make clueboard/66_hotswap:default + make clueboard/66_hotswap/gen1: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/clueboard/card/card.h b/keyboards/clueboard/card/card.h index 3342a0823355..a09285eb04f6 100644 --- a/keyboards/clueboard/card/card.h +++ b/keyboards/clueboard/card/card.h @@ -1,22 +1,19 @@ -#ifndef CLUECARD_H -#define CLUECARD_H +#pragma once #include "quantum.h" // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - k00, k01, k02, \ - k10, k12, \ - k20, k21, k22, \ - k11, \ - k30, k31, k32 \ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k12, \ + k20, k21, k22, \ + k11, \ + k30, k31, k32 \ ) { \ { k00, k01, k02, }, \ { k10, k11, k12, }, \ { k20, k21, k22, }, \ { k30, k31, k32, } \ } - -#endif diff --git a/keyboards/clueboard/card/config.h b/keyboards/clueboard/card/config.h index 6520eb5574a7..8059821213e5 100644 --- a/keyboards/clueboard/card/config.h +++ b/keyboards/clueboard/card/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" @@ -32,15 +31,7 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #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) - * +/* Keyboard Matrix Assignments */ #define MATRIX_ROW_PINS { F0, F5, F4, B4 } #define MATRIX_COL_PINS { F1, F7, F6 } @@ -163,5 +154,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/clueboard/card/info.json b/keyboards/clueboard/card/info.json new file mode 100644 index 000000000000..86dbb4faa7e5 --- /dev/null +++ b/keyboards/clueboard/card/info.json @@ -0,0 +1,20 @@ +{ + "keyboard_name": "Cluecard", + "keyboard_folder": "clueboard/card", + "url": "", + "maintainer": "skullydazed", + "width": 10, + "height": 7, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"ON/OFF", "x":0, "y":0}, {"label":"SAT+", "x":4, "y":0}, {"label":"BRIGHT+", "x":8, "y":0}, + {"label":"HUE-", "x":2, "y":1}, {"label":"HUE+", "x":6, "y":1}, + {"label":"MODE", "x":0, "y":2}, {"label":"SAT-", "x":4, "y":2}, {"label":"BRIGHT-", "x":8, "y":2}, + {"label":"LAYER", "x":2, "y":4}, + + {"label":"MX1", "x":4, "y":6, "w":2, "h":2}, {"label":"MX2", "x":6, "y":6, "w":2, "h":2}, {"label":"MX3", "x":8, "y":6, "w":2, "h":2} + ] + } + } +} diff --git a/keyboards/clueboard/card/keymaps/default/config.h b/keyboards/clueboard/card/keymaps/default/config.h index 8893d122e04b..271f48d0011b 100644 --- a/keyboards/clueboard/card/keymaps/default/config.h +++ b/keyboards/clueboard/card/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/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index 5fa6ae20a933..687343e1b7ac 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -1,10 +1,7 @@ -#include "card.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( RGB_TOG, RGB_SAI, RGB_VAI, \ RGB_HUD, RGB_HUI, \ RGB_MOD, RGB_SAD, RGB_VAD, \ diff --git a/keyboards/clueboard/card/keymaps/default/rules.mk b/keyboards/clueboard/card/keymaps/default/rules.mk index ed7eceea0907..3b11f550f957 100644 --- a/keyboards/clueboard/card/keymaps/default/rules.mk +++ b/keyboards/clueboard/card/keymaps/default/rules.mk @@ -3,16 +3,15 @@ # 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 = yes # Console for debug(+400) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 +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 = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/config.h b/keyboards/clueboard/card/keymaps/rgb_effects/config.h index c6c9342c8188..0b2a68f544f4 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/config.h +++ b/keyboards/clueboard/card/keymaps/rgb_effects/config.h @@ -1,12 +1,7 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" +#pragma once // place overrides here #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 - -#endif diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c index 15cf5325d034..92d39aef5b62 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c +++ b/keyboards/clueboard/card/keymaps/rgb_effects/keymap.c @@ -1,12 +1,12 @@ -#include "card.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [0] = LAYOUT( RGB_TOG, RGB_SAI, RGB_VAI, \ RGB_HUD, RGB_HUI, \ RGB_MOD, RGB_SAD, RGB_VAD, \ BL_STEP, \ - KC_NO, KC_NO, KC_NO \ + KC_NO, KC_NO, KC_NO \ ) }; diff --git a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk index 1418ba1bf4fd..54d74abbe53a 100644 --- a/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk +++ b/keyboards/clueboard/card/keymaps/rgb_effects/rules.mk @@ -3,16 +3,15 @@ # 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 = yes # Console for debug(+400) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +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. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - diff --git a/keyboards/clueboard/card/readme.md b/keyboards/clueboard/card/readme.md index 00d7d285b117..20272d236c42 100644 --- a/keyboards/clueboard/card/readme.md +++ b/keyboards/clueboard/card/readme.md @@ -1,5 +1,7 @@ # Cluecard +![Cluecard](https://i.imgur.com/dTu0Pzx.jpg) + A simple QMK dev kit. * Keyboard Maintainer: [Zach White](https://github.com/skullydazed) @@ -10,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make clueboard/card: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/clueboard/card/rules.mk b/keyboards/clueboard/card/rules.mk index 2117c8127287..37b439e75a7a 100644 --- a/keyboards/clueboard/card/rules.mk +++ b/keyboards/clueboard/card/rules.mk @@ -1,70 +1,21 @@ - - -# 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=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 -RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default -MIDI_ENABLE = no # MIDI controls -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = yes # Audio output on port C6 +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 +NKRO_ENABLE = no # USB Nkey Rollover +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality by default +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md index 226bc079c65f..451db3307b90 100644 --- a/keyboards/clueboard/readme.md +++ b/keyboards/clueboard/readme.md @@ -1,12 +1,13 @@ -![Clueboard Logo](https://static1.squarespace.com/static/55c13bdee4b099be5dcb82eb/t/59c9703318b27d1ab34f40df/1508257572555/) +![Clueboard Logo](https://i.imgur.com/220uMry.png) -Clueboard makes fully customizable custom keyboards in a variety of formfactors. Inside this directory you'll find support for the entire line of Clueboard products. +Clueboard makes fully customizable custom keyboards in a variety of form-factors. Inside this directory you'll find support for the entire line of Clueboard products. * Maintainer: [Zach White](https://github.com/skullydazed) * Hardware Supported: * [`17`](17/): Clueboard "Cluepad" PCB + * [`2x1800`](2x1800/): Clueboard 2x1800 PCB * [`60`](60/): Clueboard 60% PCB * [`66`](66/): Clueboard 66% PCB - * [`2x1800`](2x1800/): Clueboard 2x1800 PCB + * [`66_hotswap`](66/): Clueboard 66% USB-C Hotswappable PCB * [`card`](card/): Special Cluecard PCB * Hardware Availability: [clueboard.co](https://clueboard.co/) From f940b6c5fa7752e45cd07311ca3bed4e59b4151f Mon Sep 17 00:00:00 2001 From: skullY Date: Wed, 23 Jan 2019 16:31:40 -0800 Subject: [PATCH 176/458] Fixup the clueboard 66 info.json --- keyboards/clueboard/66/info.json | 11 ++++++----- keyboards/clueboard/66/rev1/rev1.h | 5 +++-- keyboards/clueboard/66/rev2/rev2.h | 5 +++-- keyboards/clueboard/66/rev3/rev3.h | 5 +++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/keyboards/clueboard/66/info.json b/keyboards/clueboard/66/info.json index 05eb6627d842..514ba456dab0 100644 --- a/keyboards/clueboard/66/info.json +++ b/keyboards/clueboard/66/info.json @@ -3,7 +3,7 @@ "width": 16.5, "height": 5, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "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"}, @@ -26,10 +26,11 @@ "LAYOUT_66_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, "w":2}, {"label":"Insert", "x":15.5, "y":0}, - {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Delete", "x":15.5, "y":1}, - {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"", "x":12.75, "y":2}, - {"label":"Shift", "x":0, "y":3, "w":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}, {"label":"\u2191", "x":14.5, "y":3}, + {"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":15.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"\\", "x":1.25, "y":3, "w":1}, {"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}, {"label":"\u2191", "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}, {"label":"Alt", "x":9.75, "y":4, "w":1.25}, {"label":"Ctrl", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13.5, "y":4}, {"label":"\u2193", "x":14.5, "y":4}, {"label":"\u2192", "x":15.5, "y":4} - } + ] + } } } diff --git a/keyboards/clueboard/66/rev1/rev1.h b/keyboards/clueboard/66/rev1/rev1.h index 8a5e9bf68091..e071f4c79681 100644 --- a/keyboards/clueboard/66/rev1/rev1.h +++ b/keyboards/clueboard/66/rev1/rev1.h @@ -29,7 +29,7 @@ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define LAYOUT_all( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ @@ -71,4 +71,5 @@ { k40, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4A, k4B, k4C, k4D, k4E, k4F } \ } -#define KEYMAP LAYOUT +#define KEYMAP LAYOUT_all +#define LAYOUT LAYOUT_all diff --git a/keyboards/clueboard/66/rev2/rev2.h b/keyboards/clueboard/66/rev2/rev2.h index 267e6795e7a7..86688c7a1559 100644 --- a/keyboards/clueboard/66/rev2/rev2.h +++ b/keyboards/clueboard/66/rev2/rev2.h @@ -29,7 +29,7 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define LAYOUT_all( \ k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, 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, k74, k75, \ @@ -90,4 +90,5 @@ { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ } -#define KEYMAP LAYOUT +#define KEYMAP LAYOUT_all +#define LAYOUT LAYOUT_all diff --git a/keyboards/clueboard/66/rev3/rev3.h b/keyboards/clueboard/66/rev3/rev3.h index 267e6795e7a7..86688c7a1559 100644 --- a/keyboards/clueboard/66/rev3/rev3.h +++ b/keyboards/clueboard/66/rev3/rev3.h @@ -29,7 +29,7 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ +#define LAYOUT_all( \ k00, k01, k02, k03, k04, k05, k06, k07, k50, k51, k52, k53, k54, k55, 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, k74, k75, \ @@ -90,4 +90,5 @@ { KC_NO, KC_NO, k92, k93, k94, k95, k96, k97 } \ } -#define KEYMAP LAYOUT +#define KEYMAP LAYOUT_all +#define LAYOUT LAYOUT_all From fafb33d9ddbc38335b4488efbc47ed29fc279d1a Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 23 Jan 2019 17:37:24 -0800 Subject: [PATCH 177/458] [Keyboard] Add KBD67 Hotswap Support (#4916) * initial commit * move the original kbd67 stuff into its own directory, rev1 * get rid of vanilla cookie cutter code * put in the switch matrix pins, backlight pin, and rgb underglow pin. Number of underglow LEDs is questionable. * switch matrix created for hotswap * create a basic keymap for testing * make info.json for QMK Configurator support * rename kbd67 due to compile error * kbd67 generic readme file * fix make instructions for the new rev1 * comment out unneeded rgb light #defines * Update keyboards/kbd67/readme.md Add an extra space for proper markdown rendering Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/kbd67/hotswap/hotswap.h Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update keyboards/kbd67/hotswap/keymaps/default/keymap.c Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * use pragma once * proper format of MechMerlin --- keyboards/kbd67/hotswap/config.h | 245 ++++++++++++++++++ keyboards/kbd67/hotswap/hotswap.c | 43 +++ keyboards/kbd67/hotswap/hotswap.h | 43 +++ keyboards/kbd67/hotswap/info.json | 12 + .../kbd67/hotswap/keymaps/default/config.h | 19 ++ .../kbd67/hotswap/keymaps/default/keymap.c | 65 +++++ .../kbd67/hotswap/keymaps/default/readme.md | 1 + keyboards/kbd67/hotswap/readme.md | 13 + keyboards/kbd67/hotswap/rules.mk | 80 ++++++ keyboards/kbd67/readme.md | 12 +- keyboards/kbd67/{ => rev1}/config.h | 0 keyboards/kbd67/{ => rev1}/info.json | 0 .../kbd67/{ => rev1}/keymaps/default/config.h | 0 .../kbd67/{ => rev1}/keymaps/default/keymap.c | 0 .../{ => rev1}/keymaps/default/readme.md | 0 keyboards/kbd67/rev1/readme.md | 13 + keyboards/kbd67/{kbd67.c => rev1/rev1.c} | 2 +- keyboards/kbd67/{kbd67.h => rev1/rev1.h} | 4 +- keyboards/kbd67/{ => rev1}/rules.mk | 0 19 files changed, 544 insertions(+), 8 deletions(-) create mode 100644 keyboards/kbd67/hotswap/config.h create mode 100644 keyboards/kbd67/hotswap/hotswap.c create mode 100644 keyboards/kbd67/hotswap/hotswap.h create mode 100644 keyboards/kbd67/hotswap/info.json create mode 100644 keyboards/kbd67/hotswap/keymaps/default/config.h create mode 100644 keyboards/kbd67/hotswap/keymaps/default/keymap.c create mode 100644 keyboards/kbd67/hotswap/keymaps/default/readme.md create mode 100644 keyboards/kbd67/hotswap/readme.md create mode 100644 keyboards/kbd67/hotswap/rules.mk rename keyboards/kbd67/{ => rev1}/config.h (100%) rename keyboards/kbd67/{ => rev1}/info.json (100%) rename keyboards/kbd67/{ => rev1}/keymaps/default/config.h (100%) rename keyboards/kbd67/{ => rev1}/keymaps/default/keymap.c (100%) rename keyboards/kbd67/{ => rev1}/keymaps/default/readme.md (100%) create mode 100644 keyboards/kbd67/rev1/readme.md rename keyboards/kbd67/{kbd67.c => rev1/rev1.c} (98%) rename keyboards/kbd67/{kbd67.h => rev1/rev1.h} (98%) rename keyboards/kbd67/{ => rev1}/rules.mk (100%) diff --git a/keyboards/kbd67/hotswap/config.h b/keyboards/kbd67/hotswap/config.h new file mode 100644 index 000000000000..f952235adcf7 --- /dev/null +++ b/keyboards/kbd67/hotswap/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 KBDFans +#define PRODUCT KBD67 Hotswap +#define DESCRIPTION A custom 65% 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 { B3, B2, B1, B0, D4 } +#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 */ +#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 B4 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 8 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kbd67/hotswap/hotswap.c b/keyboards/kbd67/hotswap/hotswap.c new file mode 100644 index 000000000000..e6999f6af2b8 --- /dev/null +++ b/keyboards/kbd67/hotswap/hotswap.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 "hotswap.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/kbd67/hotswap/hotswap.h b/keyboards/kbd67/hotswap/hotswap.h new file mode 100644 index 000000000000..57220050b62a --- /dev/null +++ b/keyboards/kbd67/hotswap/hotswap.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, K0D, K2C, 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, K3C, K3D, K3E, \ + K40, K41, K42, K45, K49, K4A, K4B, 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, K2C, K2D, 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, KC_NO, K4D, K4E}, \ +} + diff --git a/keyboards/kbd67/hotswap/info.json b/keyboards/kbd67/hotswap/info.json new file mode 100644 index 000000000000..9f23a5f348be --- /dev/null +++ b/keyboards/kbd67/hotswap/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "kbd67 hotswap", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "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":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":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":15, "y":1}, {"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":15, "y":2}, {"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":15, "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.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/kbd67/hotswap/keymaps/default/config.h b/keyboards/kbd67/hotswap/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/kbd67/hotswap/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/kbd67/hotswap/keymaps/default/keymap.c b/keyboards/kbd67/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000000..d9c1e1ebbdf9 --- /dev/null +++ b/keyboards/kbd67/hotswap/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* 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_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_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, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbd67/hotswap/keymaps/default/readme.md b/keyboards/kbd67/hotswap/keymaps/default/readme.md new file mode 100644 index 000000000000..7e681294f2f4 --- /dev/null +++ b/keyboards/kbd67/hotswap/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for hotswap diff --git a/keyboards/kbd67/hotswap/readme.md b/keyboards/kbd67/hotswap/readme.md new file mode 100644 index 000000000000..6b4070593280 --- /dev/null +++ b/keyboards/kbd67/hotswap/readme.md @@ -0,0 +1,13 @@ +# hotswap + +A 65% hot swap board with blocker and USB Type C port. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: KBD67 Hotswap +Hardware Availability: [KBDFans](https://kbdfans.cn/products/coming-soon-kbd67-mechanical-keyboard-diy-kit) + +Make example for this keyboard (after setting up your build environment): + + make kbd67/hotswap: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/kbd67/hotswap/rules.mk b/keyboards/kbd67/hotswap/rules.mk new file mode 100644 index 000000000000..bc370be0397c --- /dev/null +++ b/keyboards/kbd67/hotswap/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 = 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) diff --git a/keyboards/kbd67/readme.md b/keyboards/kbd67/readme.md index f9e25099949c..cdaf7e922dbc 100644 --- a/keyboards/kbd67/readme.md +++ b/keyboards/kbd67/readme.md @@ -1,13 +1,15 @@ -# kbd67 +# KBD67 -65% keyboard with blocker. +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. 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 +Hardware Availability: KBDFans Make example for this keyboard (after setting up your build environment): - make kbd67:default + make kbd67/rev1:default + make kbd67/hotswap: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/kbd67/config.h b/keyboards/kbd67/rev1/config.h similarity index 100% rename from keyboards/kbd67/config.h rename to keyboards/kbd67/rev1/config.h diff --git a/keyboards/kbd67/info.json b/keyboards/kbd67/rev1/info.json similarity index 100% rename from keyboards/kbd67/info.json rename to keyboards/kbd67/rev1/info.json diff --git a/keyboards/kbd67/keymaps/default/config.h b/keyboards/kbd67/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/kbd67/keymaps/default/config.h rename to keyboards/kbd67/rev1/keymaps/default/config.h diff --git a/keyboards/kbd67/keymaps/default/keymap.c b/keyboards/kbd67/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd67/keymaps/default/keymap.c rename to keyboards/kbd67/rev1/keymaps/default/keymap.c diff --git a/keyboards/kbd67/keymaps/default/readme.md b/keyboards/kbd67/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd67/keymaps/default/readme.md rename to keyboards/kbd67/rev1/keymaps/default/readme.md diff --git a/keyboards/kbd67/rev1/readme.md b/keyboards/kbd67/rev1/readme.md new file mode 100644 index 000000000000..ab5209646f6c --- /dev/null +++ b/keyboards/kbd67/rev1/readme.md @@ -0,0 +1,13 @@ +# kbd67 + +65% keyboard with blocker. + +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) + +Make example for this keyboard (after setting up your build environment): + + make kbd67/rev1: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/kbd67/kbd67.c b/keyboards/kbd67/rev1/rev1.c similarity index 98% rename from keyboards/kbd67/kbd67.c rename to keyboards/kbd67/rev1/rev1.c index 5e0369673b2c..94cb9e553b0a 100644 --- a/keyboards/kbd67/kbd67.c +++ b/keyboards/kbd67/rev1/rev1.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 "kbd67.h" +#include "rev1.h" void matrix_init_kb(void) { // put your keyboard start-up code here diff --git a/keyboards/kbd67/kbd67.h b/keyboards/kbd67/rev1/rev1.h similarity index 98% rename from keyboards/kbd67/kbd67.h rename to keyboards/kbd67/rev1/rev1.h index 4a98c66f7ae1..4ee136393a72 100644 --- a/keyboards/kbd67/kbd67.h +++ b/keyboards/kbd67/rev1/rev1.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 KBD67_H -#define KBD67_H +#ifndef REV1_H +#define REV1_H #include "quantum.h" diff --git a/keyboards/kbd67/rules.mk b/keyboards/kbd67/rev1/rules.mk similarity index 100% rename from keyboards/kbd67/rules.mk rename to keyboards/kbd67/rev1/rules.mk From 87ab49e4033db5afe835863c4ebab8858cbe3e2d Mon Sep 17 00:00:00 2001 From: Danny Date: Wed, 23 Jan 2019 20:58:04 -0500 Subject: [PATCH 178/458] [Keyboard] Add BDN9 (#4919) --- keyboards/bdn9/bdn9.c | 1 + keyboards/bdn9/bdn9.h | 35 ++++++++++++ keyboards/bdn9/config.h | 74 +++++++++++++++++++++++++ keyboards/bdn9/info.json | 0 keyboards/bdn9/keymaps/default/keymap.c | 41 ++++++++++++++ keyboards/bdn9/readme.md | 15 +++++ keyboards/bdn9/rules.mk | 50 +++++++++++++++++ 7 files changed, 216 insertions(+) create mode 100644 keyboards/bdn9/bdn9.c create mode 100644 keyboards/bdn9/bdn9.h create mode 100644 keyboards/bdn9/config.h create mode 100644 keyboards/bdn9/info.json create mode 100644 keyboards/bdn9/keymaps/default/keymap.c create mode 100644 keyboards/bdn9/readme.md create mode 100644 keyboards/bdn9/rules.mk diff --git a/keyboards/bdn9/bdn9.c b/keyboards/bdn9/bdn9.c new file mode 100644 index 000000000000..0ff55fd6d45c --- /dev/null +++ b/keyboards/bdn9/bdn9.c @@ -0,0 +1 @@ +#include "bdn9.h" diff --git a/keyboards/bdn9/bdn9.h b/keyboards/bdn9/bdn9.h new file mode 100644 index 000000000000..26b043560501 --- /dev/null +++ b/keyboards/bdn9/bdn9.h @@ -0,0 +1,35 @@ +/* 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 + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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( \ + KA1, KA2, KA3, \ + KB1, KB2, KB3, \ + KC1, KC2, KC3 \ +) \ +{ \ + { KA1, KA2, KA3, KB1, KB2, KB3, KC1, KC2, KC3 } \ +} diff --git a/keyboards/bdn9/config.h b/keyboards/bdn9/config.h new file mode 100644 index 000000000000..604da5ef4149 --- /dev/null +++ b/keyboards/bdn9/config.h @@ -0,0 +1,74 @@ +/* +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 +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x1133 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Keebio +#define PRODUCT BDN9 +#define DESCRIPTION 3x3 Macropad with Rotary Encoders + +/* key matrix size */ +#define MATRIX_ROWS 1 +#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 } + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define NUMBER_OF_ENCODERS 2 +#define ENCODERS_PAD_A { D1, F5 } +#define ENCODERS_PAD_B { D0, F6 } + + +#define BACKLIGHT_PIN B5 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 7 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 3 + #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 +#endif + +/* 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 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) diff --git a/keyboards/bdn9/info.json b/keyboards/bdn9/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/bdn9/keymaps/default/keymap.c b/keyboards/bdn9/keymaps/default/keymap.c new file mode 100644 index 000000000000..66b9a3eb674c --- /dev/null +++ b/keyboards/bdn9/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +/* 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 + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_A, KC_B, KC_C, \ + BL_STEP, KC_UP, RGB_MOD, \ + KC_LEFT, KC_DOWN, KC_RGHT \ + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } + else if (index == 1) { + if (clockwise) { + tap_code(KC_DOWN); + } else { + tap_code(KC_UP); + } + } +} diff --git a/keyboards/bdn9/readme.md b/keyboards/bdn9/readme.md new file mode 100644 index 000000000000..c9d5ed0b3567 --- /dev/null +++ b/keyboards/bdn9/readme.md @@ -0,0 +1,15 @@ +# BDN9 + +![BDN9](https://cdn.shopify.com/s/files/1/1851/5125/products/image_bd8d9423-950e-4aad-bea5-665d896f879a_530x@2x.jpg?v=1547909493) + +A 3x3 macropad with support for a rotary encoder at the upper two corners. + +Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges) +Hardware Supported: Pro Micro, Elite-C, Proton C +Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-macropad-rotary-encoder-support) + +Make example for this keyboard (after setting up your build environment): + + make 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/bdn9/rules.mk new file mode 100644 index 000000000000..3ab84910890b --- /dev/null +++ b/keyboards/bdn9/rules.mk @@ -0,0 +1,50 @@ +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = 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 = 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) +ENCODER_ENABLE = yes From cf596a0371ad63106e764e96379deb48ec21e92b Mon Sep 17 00:00:00 2001 From: zvecr Date: Fri, 18 Jan 2019 00:25:03 +0000 Subject: [PATCH 179/458] Remove lfkeyboards parent rules.mk as its only required for mini1800 --- keyboards/lfkeyboards/mini1800/rules.mk | 2 ++ keyboards/lfkeyboards/rules.mk | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 keyboards/lfkeyboards/rules.mk diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index be670b9b48b4..a1e52aae94a9 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -52,6 +52,8 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# Extra source files for IS3731 lighting +SRC = TWIlib.c issi.c lighting.c ifeq ($(strip $(ISSI_ENABLE)), yes) # TMK_COMMON_DEFS += -DISSI_ENABLE diff --git a/keyboards/lfkeyboards/rules.mk b/keyboards/lfkeyboards/rules.mk deleted file mode 100644 index 5cf759a2fcc8..000000000000 --- a/keyboards/lfkeyboards/rules.mk +++ /dev/null @@ -1 +0,0 @@ -SRC = TWIlib.c issi.c lighting.c From 465559e1666b4f2d346bd899d884a6266a4d9ca4 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 23 Jan 2019 21:04:04 -0800 Subject: [PATCH 180/458] Optimize/Update the new_project script (#4920) * use pragma once in our templates * template.h is present in both avr/ps2avrgb options so we moved it to base. In addition we now use pragma once --- quantum/template/avr/template.h | 38 ------------------- .../template/{ps2avrgb => base}/template.h | 5 +-- 2 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 quantum/template/avr/template.h rename quantum/template/{ps2avrgb => base}/template.h (94%) diff --git a/quantum/template/avr/template.h b/quantum/template/avr/template.h deleted file mode 100644 index aaa971504c60..000000000000 --- a/quantum/template/avr/template.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright 2019 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 . - */ -#ifndef %KEYBOARD_UPPERCASE%_H -#define %KEYBOARD_UPPERCASE%_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. - */ -#define LAYOUT( \ - K00, K01, K02, \ - K10, K11 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K10, KC_NO, K11 }, \ -} - -#endif diff --git a/quantum/template/ps2avrgb/template.h b/quantum/template/base/template.h similarity index 94% rename from quantum/template/ps2avrgb/template.h rename to quantum/template/base/template.h index 1958f48a02cc..caf2abb4c6b5 100644 --- a/quantum/template/ps2avrgb/template.h +++ b/quantum/template/base/template.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 %KEYBOARD_UPPERCASE%_H -#define %KEYBOARD_UPPERCASE%_H +#pragma once #include "quantum.h" @@ -34,5 +33,3 @@ { k00, k01, k02 }, \ { k10, KC_NO, k11 }, \ } - -#endif From ba70ab1748bcb033ad8387cd909be186fd0ad0b0 Mon Sep 17 00:00:00 2001 From: shovelpaw <33362396+shovelpaw@users.noreply.github.com> Date: Wed, 23 Jan 2019 22:05:21 -0700 Subject: [PATCH 181/458] [Keymap] Adding keymap for Nyquist (#4918) * Added busby222 config * Fixed bug with leftover colemak and dvorak layouts * Fixing dumb mistake * Minor tweaks to layout. Need to use at work tomorrow to make more adjustments * Added mouse controls for raised layer * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update config.h Added mouse specific settings for smoother mouse movement (default is sort of hard to use) * config.h cleanup * Lowering max mouse speed (personal preference) * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update keymap.c * Update config.h * Update rules.mk * Added MIDI layer * Switched the Adjust layer to an MO call * Update keymap.c * Fixing bugs related to midi layer * Changed "Caps Lock" ctrl to RCTRL for use in VirtualBox * Added shovelpaw keyamp * Removed deprecated QUANTUM_DIR code block * Switched midi layer to be only active when held * Addressing requested changes * Removed unnecessary include statement --- keyboards/nyquist/keymaps/shovelpaw/config.h | 43 +++++ keyboards/nyquist/keymaps/shovelpaw/keymap.c | 156 +++++++++++++++++++ keyboards/nyquist/keymaps/shovelpaw/rules.mk | 3 + 3 files changed, 202 insertions(+) create mode 100644 keyboards/nyquist/keymaps/shovelpaw/config.h create mode 100644 keyboards/nyquist/keymaps/shovelpaw/keymap.c create mode 100644 keyboards/nyquist/keymaps/shovelpaw/rules.mk diff --git a/keyboards/nyquist/keymaps/shovelpaw/config.h b/keyboards/nyquist/keymaps/shovelpaw/config.h new file mode 100644 index 000000000000..d0adbfe0c8a5 --- /dev/null +++ b/keyboards/nyquist/keymaps/shovelpaw/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 . +*/ + +#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 + +// Mouse specific settings +#define MOUSEKEY_INTERVAL 16 +#define MOUSEKEY_DELAY 0 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 6 +#define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/nyquist/keymaps/shovelpaw/keymap.c b/keyboards/nyquist/keymaps/shovelpaw/keymap.c new file mode 100644 index 000000000000..87e44ff04363 --- /dev/null +++ b/keyboards/nyquist/keymaps/shovelpaw/keymap.c @@ -0,0 +1,156 @@ +#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 _MIDI 3 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + MIDI, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------| |-------------------------------------------. + * | GEsc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+-------+------+------+------+-------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | + * |------+------+------+------+------+------| |------+-------+------+------+------+-------| + * | Ctrl | A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+-------+------+------+------+-------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / | Enter | + * |------+------+------+------+------+------| |------+-------+------+------+------+-------| + * | Ctrl |Adjust| GUI | Alt |Lower |Space | | Space |Raise | Left | Up | Down | Right | + * `-----------------------------------------| |-------------------------------------------| + */ + +[_QWERTY] = LAYOUT( \ + KC_GESC, 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_RCTL, 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, MO(_ADJUST), KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------| |------------------------------------------. + * | ` | F1 | F2 | F3 | | | | - | = | ( | ) | | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+-------| + * | ~ | F4 | F5 | F6 | | | | & | * | { | } | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+-------| + * | Del | F7 | F8 | F9 | | | | _ | + | [ | ] | | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+-------| + * | | F10 | F11 | F12 | | | | | | | F5 | Up | Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+-------| + * | | | | | | Home | | End | | | Left | Down | Right | + * `-----------------------------------------| |------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + KC_GRV, KC_F1, KC_F2, KC_F3, _______, _______, KC_MINS, KC_EQL, _______, KC_LPRN, KC_RPRN, KC_BSPC, \ + KC_TILD, KC_F4, KC_F5, KC_F6, _______, _______, KC_AMPR, KC_ASTR, _______, KC_LCBR, KC_RCBR, KC_DEL, \ + KC_DEL, KC_F7, KC_F8, KC_F9, _______, _______, KC_UNDS, KC_PLUS, _______, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, KC_F5, KC_UP, _______, \ + _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT \ +), + +/* Raise + * ,-----------------------------------------| |-----------------------------------------. + * | Back | m0 | m1 | m2 | | | | | 7 | 8 | 9 | - | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | For | sD | mU | sU | | | | | 4 | 5 | 6 | + | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | mL | mD | mR | | | | | 1 | 2 | 3 | * | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | 0 | mB1 | mB1 | mB2 | | | | 0 | . | = | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | MIDI | | | | | | | | | Mute | Vol- | Vol+ | Play | + * `-----------------------------------------| |-----------------------------------------' + */ +[_RAISE] = LAYOUT( \ + LALT(KC_LEFT), KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, KC_7, KC_8, KC_9, KC_MINS, KC_BSPC, \ + LALT(KC_RIGHT), KC_MS_WH_DOWN, KC_MS_UP, KC_MS_WH_UP, _______, _______, _______, KC_4, KC_5, KC_6, KC_PLUS, KC_DEL, \ + KC_DEL, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______, _______, KC_1, KC_2, KC_3, KC_ASTR, KC_BSLS, \ + _______, KC_P0, KC_MS_BTN1, KC_MS_BTN1, KC_MS_BTN2, _______, _______, KC_0, KC_DOT, KC_EQL, KC_SLSH, _______, \ + MO(_MIDI), _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* + * MIDI + */ + +[_MIDI] = LAYOUT( \ + QWERTY, MI_C, MI_D, MI_E, MI_F, MI_G, MI_A, MI_B, MI_C_1, MI_C_2, MI_C_3, QWERTY, \ + MI_A_3, MI_As_3, MI_B_3, MI_C_3, MI_Cs_3, MI_D_3, MI_Ds_3, MI_E_3, MI_F_3, MI_Fs_3, MI_G_3, MI_Gs_3, \ + MI_A_2, MI_As_2, MI_B_2, MI_C_2, MI_Cs_2, MI_D_2, MI_Ds_2, MI_E_2, MI_F_2, MI_Fs_2, MI_G_2, MI_Gs_2, \ + MI_A_1, MI_As_1, MI_B_1, MI_C_1, MI_Cs_1, MI_D_1, MI_Ds_1, MI_E_1, MI_F_1, MI_Fs_1, MI_G_1, MI_Gs_1, \ + MI_A, MI_As, MI_B, MI_C, MI_Cs, MI_D, MI_Ds, MI_E, MI_F, MI_Fs, MI_G, MI_Gs \ +), + + +/* Adjust (Lower + Raise) + * ,-----------------------------------------| |-----------------------------------------. + * |QWERTY| F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn| |Sat Up| 7 | 8 | 9 | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap| 6 | 5 | 4 | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | [ | | ] | 1 | 2 | 3 | | | + * |------+------+------+------+------+------+ |------+------+------+------+------+------| + * | | | | | | { | | } | 0 | . | | | | + * `-----------------------------------------| |-----------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + QWERTY, 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, KC_7, KC_8, KC_9, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_6, KC_5, KC_4, _______, _______, \ + _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, KC_0, KC_DOT, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(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; + } + return true; +} diff --git a/keyboards/nyquist/keymaps/shovelpaw/rules.mk b/keyboards/nyquist/keymaps/shovelpaw/rules.mk new file mode 100644 index 000000000000..44ca075c340a --- /dev/null +++ b/keyboards/nyquist/keymaps/shovelpaw/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +MIDI_ENABLE = yes # MIDI support (+2400 to 4200, depending on config) + From 5d1ea88bf7c16b858dd94d9a0ce5a351a49f6e07 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 23 Jan 2019 21:06:55 -0800 Subject: [PATCH 182/458] [Keyboard] KBD67: enable bootmagic lite by default (#4931) * enable bootmagic lite by default * add a second layer with a reset key --- .../kbd67/hotswap/keymaps/default/keymap.c | 17 ++++++++++++----- keyboards/kbd67/hotswap/rules.mk | 2 +- keyboards/kbd67/rev1/rules.mk | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/keyboards/kbd67/hotswap/keymaps/default/keymap.c b/keyboards/kbd67/hotswap/keymaps/default/keymap.c index d9c1e1ebbdf9..53696301163b 100644 --- a/keyboards/kbd67/hotswap/keymaps/default/keymap.c +++ b/keyboards/kbd67/hotswap/keymaps/default/keymap.c @@ -23,11 +23,18 @@ enum custom_keycodes { 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_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_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, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), 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_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, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, 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, 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), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/kbd67/hotswap/rules.mk b/keyboards/kbd67/hotswap/rules.mk index bc370be0397c..f8667d280f45 100644 --- a/keyboards/kbd67/hotswap/rules.mk +++ b/keyboards/kbd67/hotswap/rules.mk @@ -61,7 +61,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 = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/kbd67/rev1/rules.mk b/keyboards/kbd67/rev1/rules.mk index 65c82dd7f566..0d7c14ad4531 100644 --- a/keyboards/kbd67/rev1/rules.mk +++ b/keyboards/kbd67/rev1/rules.mk @@ -61,7 +61,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -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) From b5feae07c27eb8fcac07d165091cce186e253be8 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 25 Jan 2019 02:38:44 +1100 Subject: [PATCH 183/458] Remove unused fn_actions[] and action_function() in default keymaps (#4829) --- keyboards/alu84/keymaps/default/keymap.c | 35 ------------------ keyboards/amjpad/keymaps/default/keymap.c | 37 ------------------- keyboards/bface/keymaps/default/keymap.c | 4 -- keyboards/cospad/keymaps/default/keymap.c | 5 --- keyboards/cu75/keymaps/default/keymap.c | 6 --- keyboards/cu75/keymaps/iso/keymap.c | 6 --- keyboards/ergodox_ez/keymaps/testing/keymap.c | 4 -- .../traveller/keymaps/default/keymap.c | 3 -- keyboards/katana60/keymaps/colemak/keymap.c | 6 --- keyboards/katana60/keymaps/default/keymap.c | 6 --- .../lfk87/keymaps/default/keymap.c | 2 +- .../lfkeyboards/lfk87/keymaps/iso/keymap.c | 16 +++----- .../mini1800/keymaps/default/keymap.c | 2 +- .../smk65/keymaps/default/keymap.c | 12 +++--- .../lfkeyboards/smk65/keymaps/iso/keymap.c | 11 +++--- .../ergodox/erez_experimental/keymap.c | 6 --- .../community/ergodox/reset_eeprom/keymap.c | 4 -- .../ergodox/robot_test_layout/keymap.c | 6 --- 18 files changed, 18 insertions(+), 153 deletions(-) diff --git a/keyboards/alu84/keymaps/default/keymap.c b/keyboards/alu84/keymaps/default/keymap.c index 10dbe273a798..8c08010705f9 100755 --- a/keyboards/alu84/keymaps/default/keymap.c +++ b/keyboards/alu84/keymaps/default/keymap.c @@ -1,5 +1,4 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define _BL 0 #define _FN1 1 @@ -108,37 +107,3 @@ 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; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} \ No newline at end of file diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c index 1ec81e6db81e..01621d54f62d 100644 --- a/keyboards/amjpad/keymaps/default/keymap.c +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -4,9 +4,6 @@ #include "rgblight.h" #endif -// Used for SHIFT_ESC -#define MODS_CTRL_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 @@ -66,37 +63,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P0, LT(_FL,KC_PDOT), KC_PENT \ ), }; - -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; - if (record->event.pressed) { - if (shift_esc_shift_mask) { - add_key(KC_GRV); - send_keyboard_report(); - } else { - add_key(KC_ESC); - send_keyboard_report(); - } - } else { - if (shift_esc_shift_mask) { - del_key(KC_GRV); - send_keyboard_report(); - } else { - del_key(KC_ESC); - send_keyboard_report(); - } - } - break; - } -} diff --git a/keyboards/bface/keymaps/default/keymap.c b/keyboards/bface/keymaps/default/keymap.c index 9c41014bcbaf..a3e9bc9577d8 100644 --- a/keyboards/bface/keymaps/default/keymap.c +++ b/keyboards/bface/keymaps/default/keymap.c @@ -41,7 +41,3 @@ 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 ), // */ }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/cospad/keymaps/default/keymap.c b/keyboards/cospad/keymaps/default/keymap.c index 3cea2f8e635e..f066ad677da2 100644 --- a/keyboards/cospad/keymaps/default/keymap.c +++ b/keyboards/cospad/keymaps/default/keymap.c @@ -63,11 +63,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_P0, RESET, KC_PENT), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = MO(_FL), -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case BL_TOGG: diff --git a/keyboards/cu75/keymaps/default/keymap.c b/keyboards/cu75/keymaps/default/keymap.c index 9fbd41089b0b..e8abbb6f1fcd 100644 --- a/keyboards/cu75/keymaps/default/keymap.c +++ b/keyboards/cu75/keymaps/default/keymap.c @@ -61,12 +61,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape - }; - - 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/cu75/keymaps/iso/keymap.c b/keyboards/cu75/keymaps/iso/keymap.c index 7f5952c1c2e5..040029084685 100644 --- a/keyboards/cu75/keymaps/iso/keymap.c +++ b/keyboards/cu75/keymaps/iso/keymap.c @@ -60,12 +60,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape - }; - - 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/testing/keymap.c b/keyboards/ergodox_ez/keymaps/testing/keymap.c index df0ed073f20f..2fdd12236388 100644 --- a/keyboards/ergodox_ez/keymaps/testing/keymap.c +++ b/keyboards/ergodox_ez/keymaps/testing/keymap.c @@ -28,10 +28,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/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index 13d889ab8b53..f7f08268f0ba 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -157,11 +157,8 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key 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 - [_HI] = ACTION_LAYER_TAP_TOGGLE(_HI), // Turn on LW when holding, or tap 3 times to switch [_NAV] = ACTION_LAYER_TOGGLE(_NAV), [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS), - [_LWOUT] = ACTION_LAYER_OFF(_LW,ON_RELEASE), - [_HIOUT] = ACTION_LAYER_OFF(_HI,ON_RELEASE), // Functions [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE), diff --git a/keyboards/katana60/keymaps/colemak/keymap.c b/keyboards/katana60/keymaps/colemak/keymap.c index 9a1af8d68ea4..63768f9372a8 100644 --- a/keyboards/katana60/keymaps/colemak/keymap.c +++ b/keyboards/katana60/keymaps/colemak/keymap.c @@ -67,12 +67,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC), - [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE), -}; - 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/katana60/keymaps/default/keymap.c b/keyboards/katana60/keymaps/default/keymap.c index abc018952a49..d4e77e26da17 100644 --- a/keyboards/katana60/keymaps/default/keymap.c +++ b/keyboards/katana60/keymaps/default/keymap.c @@ -67,12 +67,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(CURS, KC_BSPC), - [1] = ACTION_LAYER_TAP_KEY(SYMB, KC_SPACE), -}; - 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/lfkeyboards/lfk87/keymaps/default/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c index e215033a2d14..18d5d8cadce3 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/default/keymap.c @@ -89,7 +89,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_FN0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, XXXXXXX, XXXXXXX, XXXXXXX, \ KC_FN0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, \ MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FN2, RGB_MOD, RGB_VAD, XXXXXXX, \ - AU_TOG, KC_F1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \ + AU_TOG, KC_FN1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, \ KC_FN5, KC_FN2, KC_FN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, \ XXXXXXX, XXXXXXX, XXXXXXX, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, _______, RGB_SAD, RGB_HUD, RGB_SAI \ ), diff --git a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c index ec8bedbb0c51..a916f80f1a1a 100644 --- a/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/lfk87/keymaps/iso/keymap.c @@ -96,16 +96,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape - ACTION_FUNCTION(LFK_LED_TEST), // FN2 - cycle through LEDs for testing - ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN3 - Increase Freq of audio click - ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN4 - Decrease Freq of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN5 - Increase length of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN6 - Decrease length of audio click - ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN7 - Toggle audio click - ACTION_FUNCTION(LFK_LED_TEST), // FN8 - cycle through LEDs for testing - ACTION_FUNCTION(LFK_DEBUG_SETTINGS), // FN9 - prints LED and click settings to HID + [0] = ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers + [3] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN3 - Increase Freq of audio click + [4] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN4 - Decrease Freq of audio click + [5] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN5 - Increase length of audio click + [6] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN6 - Decrease length of audio click + [7] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN7 - Toggle audio click }; diff --git a/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c b/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c index 443064748d4b..dc064ebf2d2f 100644 --- a/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/mini1800/keymaps/default/keymap.c @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SETTINGS] = LAYOUT( KC_FN0, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_INC, BL_TOGG, RGB_TOG, RGB_VAI, XXXXXXX, XXXXXXX, \ MU_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FN2, RGB_MOD, RGB_VAD, XXXXXXX, XXXXXXX, \ - AU_TOG, KC_F1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + AU_TOG, KC_FN1, KC_FN3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ KC_FN5, KC_FN2, KC_FN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_HUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, RGB_SAD, RGB_HUD, RGB_SAI, XXXXXXX, XXXXXXX \ ), diff --git a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c index 26430a81b9ea..757217ddb2ea 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/default/keymap.c @@ -56,15 +56,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click - ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click - ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click + [1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click + [2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click + [3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click + [4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click + [5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; - 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/lfkeyboards/smk65/keymaps/iso/keymap.c b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c index 9adf722fd912..40a7ee03f920 100644 --- a/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c +++ b/keyboards/lfkeyboards/smk65/keymaps/iso/keymap.c @@ -56,12 +56,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers - ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click - ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click - ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click - ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click + [1] = ACTION_FUNCTION(LFK_CLICK_FREQ_HIGHER), // FN1 - Increase Freq of audio click + [2] = ACTION_FUNCTION(LFK_CLICK_FREQ_LOWER), // FN2 - Decrease Freq of audio click + [3] = ACTION_FUNCTION(LFK_CLICK_TIME_LONGER), // FN3 - Increase length of audio click + [4] = ACTION_FUNCTION(LFK_CLICK_TIME_SHORTER), // FN4 - Decrease length of audio click + [5] = ACTION_FUNCTION(LFK_CLICK_TOGGLE), // FN5 - Toggle audio click }; diff --git a/layouts/community/ergodox/erez_experimental/keymap.c b/layouts/community/ergodox/erez_experimental/keymap.c index 481f984d5d10..1270188f9754 100644 --- a/layouts/community/ergodox/erez_experimental/keymap.c +++ b/layouts/community/ergodox/erez_experimental/keymap.c @@ -142,12 +142,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_MACRO_TAP(0), // Eric Tang's Famous Macro! - [3] = ACTION_MACRO_TAP(1) // Eric Tang's Famous Macro! -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; diff --git a/layouts/community/ergodox/reset_eeprom/keymap.c b/layouts/community/ergodox/reset_eeprom/keymap.c index c960af9cb935..9033205b98c7 100644 --- a/layouts/community/ergodox/reset_eeprom/keymap.c +++ b/layouts/community/ergodox/reset_eeprom/keymap.c @@ -60,10 +60,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/robot_test_layout/keymap.c b/layouts/community/ergodox/robot_test_layout/keymap.c index 5d672deeb990..07b294a9856a 100644 --- a/layouts/community/ergodox/robot_test_layout/keymap.c +++ b/layouts/community/ergodox/robot_test_layout/keymap.c @@ -43,12 +43,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) { From af3956d8baa1a20dde25085581da29e58eb892f0 Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 24 Jan 2019 19:12:50 +0000 Subject: [PATCH 184/458] [Keyboard] Remove hadron ver0 as it is no longer required (#4921) --- keyboards/hadron/ver0/config.h | 32 -------------------------------- keyboards/hadron/ver0/rules.mk | 1 - keyboards/hadron/ver0/ver0.c | 1 - keyboards/hadron/ver0/ver0.h | 6 ------ 4 files changed, 40 deletions(-) delete mode 100644 keyboards/hadron/ver0/config.h delete mode 100644 keyboards/hadron/ver0/rules.mk delete mode 100644 keyboards/hadron/ver0/ver0.c delete mode 100644 keyboards/hadron/ver0/ver0.h diff --git a/keyboards/hadron/ver0/config.h b/keyboards/hadron/ver0/config.h deleted file mode 100644 index 2157a52cee0c..000000000000 --- a/keyboards/hadron/ver0/config.h +++ /dev/null @@ -1,32 +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 - -/* USB Device descriptor parameter */ -#define DEVICE_VER 0x0001 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* Hadron Ver0 PCB default pin-out */ -#define MATRIX_ROW_PINS { D7, E6, B4, B5, B6 } -#define MATRIX_COL_PINS { F6, F7, C6, C7, F5, F4, F1, F0, D2, D3, D5, B3, B2, B1, B0 } -#define UNUSED_PINS - - - diff --git a/keyboards/hadron/ver0/rules.mk b/keyboards/hadron/ver0/rules.mk deleted file mode 100644 index a3952a5d338e..000000000000 --- a/keyboards/hadron/ver0/rules.mk +++ /dev/null @@ -1 +0,0 @@ -#AUDIO_ENABLE ?= yes # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/hadron/ver0/ver0.c b/keyboards/hadron/ver0/ver0.c deleted file mode 100644 index acb3a9105f71..000000000000 --- a/keyboards/hadron/ver0/ver0.c +++ /dev/null @@ -1 +0,0 @@ -#include "ver0.h" \ No newline at end of file diff --git a/keyboards/hadron/ver0/ver0.h b/keyboards/hadron/ver0/ver0.h deleted file mode 100644 index 5710af322e80..000000000000 --- a/keyboards/hadron/ver0/ver0.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef VER0_H -#define VER0_H - -#include "../hadron.h" - -#endif \ No newline at end of file From 5dcb1114d771473d6b48577c666f354ebd77967d Mon Sep 17 00:00:00 2001 From: Balz Guenat Date: Fri, 25 Jan 2019 00:24:00 +0100 Subject: [PATCH 185/458] Fix a typo in link to the Pro Micro ISP firmware --- docs/isp_flashing_guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md index 008f944cc3ae..18f2147846b9 100644 --- a/docs/isp_flashing_guide.md +++ b/docs/isp_flashing_guide.md @@ -53,7 +53,7 @@ This is pretty straight-forward - we'll be connecting like-things to like-things The only difference between the .hex files below is which pin is connected to RESET. You can use them on other boards as well, as long as you're aware of the pins being used. If for some reason neither of these pins are available, [create an issue](https://github.com/qmk/qmk_firmware/issues/new), and we can generate one for you! * Teensy 2.0: [`util/teensy_2.0_ISP_B0.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/teensy_2.0_ISP_B0.hex) (`B0`) -* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_mico_ISP_B6_10.hex) (`B6/10`) +* Pro Micro: [`util/pro_micro_ISP_B6_10.hex`](https://github.com/qmk/qmk_firmware/blob/master/util/pro_micro_ISP_B6_10.hex) (`B6/10`) **Flash your Teenys/Pro Micro with one of these and continue - you won't need the file after flashing your ISP device.** From 4d8eefc694a9c45a6acf616ecad0b4d42db7a02e Mon Sep 17 00:00:00 2001 From: skullY Date: Wed, 23 Jan 2019 22:07:31 -0800 Subject: [PATCH 186/458] Add support for Clueboard 66% rev4 --- keyboards/clueboard/66/rev4/chconf.h | 520 ++++++++++++++++++++++++++ keyboards/clueboard/66/rev4/config.h | 83 ++++ keyboards/clueboard/66/rev4/halconf.h | 388 +++++++++++++++++++ keyboards/clueboard/66/rev4/mcuconf.h | 257 +++++++++++++ keyboards/clueboard/66/rev4/readme.md | 15 + keyboards/clueboard/66/rev4/rev4.c | 76 ++++ keyboards/clueboard/66/rev4/rev4.h | 94 +++++ keyboards/clueboard/66/rev4/rules.mk | 32 ++ 8 files changed, 1465 insertions(+) create mode 100644 keyboards/clueboard/66/rev4/chconf.h create mode 100644 keyboards/clueboard/66/rev4/config.h create mode 100644 keyboards/clueboard/66/rev4/halconf.h create mode 100644 keyboards/clueboard/66/rev4/mcuconf.h create mode 100644 keyboards/clueboard/66/rev4/readme.md create mode 100644 keyboards/clueboard/66/rev4/rev4.c create mode 100644 keyboards/clueboard/66/rev4/rev4.h create mode 100644 keyboards/clueboard/66/rev4/rules.mk diff --git a/keyboards/clueboard/66/rev4/chconf.h b/keyboards/clueboard/66/rev4/chconf.h new file mode 100644 index 000000000000..1d9f12ff1f8b --- /dev/null +++ b/keyboards/clueboard/66/rev4/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/rev4/config.h b/keyboards/clueboard/66/rev4/config.h new file mode 100644 index 000000000000..19a9837a32ad --- /dev/null +++ b/keyboards/clueboard/66/rev4/config.h @@ -0,0 +1,83 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xC1ED +#define PRODUCT_ID 0x2390 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Clueboard +#define PRODUCT Clueboard 66% rev4 +#define DESCRIPTION QMK keyboard firmware for 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 + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFD800 + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* ROWS: Top to bottom, COLS: Left to right +*/ +#define MATRIX_ROW_PINS { B11, A6, A3, A2, A1, B7, B6, C15, C14, C13 } +#define MATRIX_COL_PINS { B10, B2, B1, B0, A7, B4, B3, B5 } +#define UNUSED_PINS { B15, B14, B13, B12, B9, B8, A15, A10, A9, A8 } + +/* 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 + +/* 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 + + /* Backlight configuration + */ +#define BACKLIGHT_LEVELS 1 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLED_NUM 18 // 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 3 // How many LEDs wide to light up +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 2 // The led to start at +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 5 // How many LEDs to travel +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // How many LEDs wide to light up diff --git a/keyboards/clueboard/66/rev4/halconf.h b/keyboards/clueboard/66/rev4/halconf.h new file mode 100644 index 000000000000..e617fdffc790 --- /dev/null +++ b/keyboards/clueboard/66/rev4/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 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 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/rev4/mcuconf.h b/keyboards/clueboard/66/rev4/mcuconf.h new file mode 100644 index 000000000000..94cb540ec9f8 --- /dev/null +++ b/keyboards/clueboard/66/rev4/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 FALSE +#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/clueboard/66/rev4/readme.md b/keyboards/clueboard/66/rev4/readme.md new file mode 100644 index 000000000000..ba0afff781cd --- /dev/null +++ b/keyboards/clueboard/66/rev4/readme.md @@ -0,0 +1,15 @@ +# Clueboard 66% + +![Clueboard](https://i.imgur.com/hLePwJu.jpg) + +A fully customizable 66% keyboard. + +* Keyboard Maintainer: [Zach White](https://github.com/skullydazed) +* Hardware Supported: Clueboard 66% PCB rev4 (stm32f303cc, PCB Version 3.0) +* Hardware Availability: [clueboard.co](https://clueboard.co/) + +Make example for this keyboard (after setting up your build environment): + + make clueboard/66/rev4: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. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/clueboard/66/rev4/rev4.c b/keyboards/clueboard/66/rev4/rev4.c new file mode 100644 index 000000000000..041c31cd3229 --- /dev/null +++ b/keyboards/clueboard/66/rev4/rev4.c @@ -0,0 +1,76 @@ +#include "rev4.h" +//#include "backlight.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +void backlight_init_ports(void) { + print("init_backlight_pin()\n"); + // Set our LED pins as output + //DDRD |= (1<<6); // Esc + //DDRB |= (1<<7); // Page Up + //DDRD |= (1<<4); // Arrows + + // Set our LED pins low + //PORTD &= ~(1<<6); // Esc + //PORTB &= ~(1<<7); // Page Up + //PORTD &= ~(1<<4); // Arrows +} + +void backlight_set(uint8_t level) { +/* + if ( level == 0 ) { + // Turn off light + PORTD |= (1<<6); // Esc + PORTB |= (1<<7); // Page Up + PORTD |= (1<<4); // Arrows + } else { + // Turn on light + PORTD &= ~(1<<6); // Esc + PORTB &= ~(1<<7); // Page Up + PORTD &= ~(1<<4); // Arrows + } +*/ +} + +void led_init_ports() { + // Set our LED pins as output + palSetPadMode(GPIOB, 13, PAL_MODE_OUTPUT_PUSHPULL); // LED1 + palClearPad(GPIOB, 13); + palSetPadMode(GPIOB, 14, PAL_MODE_OUTPUT_PUSHPULL); // LED2 + palClearPad(GPIOB, 14); + palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); // LED3 + palClearPad(GPIOA, 8); + palSetPadMode(GPIOA, 0, PAL_MODE_OUTPUT_PUSHPULL); // Capslock LED + palClearPad(GPIOA, 0); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< Date: Fri, 25 Jan 2019 09:46:49 -0800 Subject: [PATCH 187/458] [Keymap] New kbd67/hotswap keymap for writing both code and math (#4933) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Custom keymap. * Fix magic layer, enable Unicode. * Update README. * Make Unicode config change keymap-local. * Move magic to AltGr, simplifying layout. * Changes per Drashna. * Fix magic+esc = backtick! * Change reset implementation per Drashna's suggestion. * Add a few more symbols so long as the commit is open - √ℜℂℤ⊙ℚℕ and the like. * Typo fix. * Slight simplification, drop an extra variable. --- .../kbd67/hotswap/keymaps/zunger/config.h | 22 +++ .../kbd67/hotswap/keymaps/zunger/keymap.c | 176 ++++++++++++++++++ .../kbd67/hotswap/keymaps/zunger/readme.md | 27 +++ .../kbd67/hotswap/keymaps/zunger/rules.mk | 2 + 4 files changed, 227 insertions(+) create mode 100644 keyboards/kbd67/hotswap/keymaps/zunger/config.h create mode 100644 keyboards/kbd67/hotswap/keymaps/zunger/keymap.c create mode 100644 keyboards/kbd67/hotswap/keymaps/zunger/readme.md create mode 100644 keyboards/kbd67/hotswap/keymaps/zunger/rules.mk diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/config.h b/keyboards/kbd67/hotswap/keymaps/zunger/config.h new file mode 100644 index 000000000000..cc06440e0dd6 --- /dev/null +++ b/keyboards/kbd67/hotswap/keymaps/zunger/config.h @@ -0,0 +1,22 @@ +/* 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 + +// Enable cmd-option-escape on mac. +#define GRAVE_ESC_ALT_OVERRIDE + +// place overrides here diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/keymap.c b/keyboards/kbd67/hotswap/keymaps/zunger/keymap.c new file mode 100644 index 000000000000..0d542bf843ed --- /dev/null +++ b/keyboards/kbd67/hotswap/keymaps/zunger/keymap.c @@ -0,0 +1,176 @@ +/* Copyright 2019 Yonatan Zunger + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + // Use this instead of RALT, so we can use it to switch layers but not trigger other alt-related + // behavior (like GRAVE_ESC_ALT_OVERRIDE). + MAGIC = SAFE_RANGE, +}; + +enum layers_keymap { + _QWERTY = 0, + _FUNCTION, + + _MAGIC, + _SHIFTMAGIC, +}; + +// This is so that H(xxxx) has the same width as _______, which makes the grids more legible. +#define H(x) UC(0x##x) + + +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| -| =|Del|Brk|Home| + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |End | + * |----------------------------------------------------------------| + * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |Win | Space |Alt| FN |||||Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_QWERTY] = 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_BRK, 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_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_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, MAGIC, MO(_FUNCTION), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap Fn Layer. Blank keys are deliberately NO, not TRNS. + * ,----------------------------------------------------------------. + * |Rst |F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|F13|PSc|PAUS| + * |----------------------------------------------------------------| + * |Debug| | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * |Ctrl | |Vo+| | | | | | | | | | | | + * |----------------------------------------------------------------| + * |Shift |REV|Vo-|FWD| | | | | | | | McL|MsU|McR | + * |----------------------------------------------------------------| + * |Ctrl|Alt |Win | |Alt| |||||MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ +[_FUNCTION] = 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_F13, KC_PSCR, KC_MPLY, \ + DEBUG, 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__VOLUP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + _______, KC_MRWD, KC__VOLDOWN, KC_MFFD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, \ + _______, _______, _______, KC_NO, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R), + + /* Mathematical lower layer. Blank keys are TRNS. + * Note that escape turns into grave here. This doesn't just generalize GRAVE_ESC; it means that + * magic+esc is a way to create backticks without a dedicated key. + * ,----------------------------------------------------------------. + * | ` | ¹| ² | ³ | ⁴ | ⁵ | ⁶ | ⁷ | ⁸ | ⁹ | ⁰ | ⁻ | ⁺ | ⊕ | ≠ | √ | + * |----------------------------------------------------------------| + * | | ± | ω | ε | ρ | τ | θ | υ | ι | ο | π | ∃ | ∀ | ℚ | ℝ | + * |----------------------------------------------------------------| + * | | α | σ | δ | φ | γ | η | ∅ | κ | λ | ∨ | ∧ | | ℕ | + * |----------------------------------------------------------------| + * | | ζ | ξ | χ | ψ | β | ν | μ | ≲ | ≳ | ∈ | | ↑ | ↔ | + * |----------------------------------------------------------------| + * | | | | | | ||||| ← | ↓ | → | + * `----------------------------------------------------------------' + */ +[_MAGIC] = LAYOUT( + KC_GRV, H(00b9), H(00b2), H(00b3), H(2074), H(2075), H(2076), H(2077), H(2078), H(2079), H(2070), H(207b), H(207a), H(2295), H(2260), H(221a), \ + _______, H(00b1), H(03c9), H(03b5), H(03c1), H(03c4), H(03b8), H(03c5), H(03b9), H(03bf), H(03c0), H(2203), H(2200), H(211a), H(211d), \ + _______, H(03b1), H(03c3), H(03b4), H(03c6), H(03b3), H(03b7), H(2205), H(03ba), H(03bb), H(2228), H(2227), _______, H(2115), \ + _______, H(03b6), H(03be), H(03c7), H(03c8), H(03b2), H(03bd), H(03bc), H(2272), H(2273), H(2208), _______, H(2191), H(2194), \ + _______, _______, _______, _______, _______, _______, H(2190), H(2193), H(2192)), + + /* Mathematical upper layer. Blank keys are TRNS. + * ,----------------------------------------------------------------. + * | ` | ₁| ₂ | ₃ | ₄ | ₅ | ₆ | ₇ | ₈ | ₉ | ₀ | ₋ | ₊ | ⊗ | ≈ | ∂ | + * |----------------------------------------------------------------| + * | | ∓ | Ω | Ε | Ρ | Τ | Θ | Υ | Ι | Ο | Π | ∄ | ∞ | ⊙ | ℂ | + * |----------------------------------------------------------------| + * | | Α | Σ | Δ | Φ | Γ | Η | ¬ | Κ | Λ | ∪ | ∩ | | ℤ | + * |----------------------------------------------------------------| + * | | Ζ | Ξ | Χ | Ψ | Β | Ν | Μ | ⊆ | ⊇ | ∉ | | ⇑ | ⇔ | + * |----------------------------------------------------------------| + * | | | | | | ||||| ⇐ | ⇓ | ⇒ | + * `----------------------------------------------------------------' + */ +[_SHIFTMAGIC] = LAYOUT( + KC_GRV, H(2081), H(2082), H(2083), H(2084), H(2085), H(2086), H(2087), H(2088), H(2089), H(2080), H(208b), H(208a), H(2297), H(2248), H(2202), \ + _______, H(2213), H(03a9), H(0395), H(03a1), H(03a4), H(0398), H(03a5), H(0399), H(039f), H(03a0), H(2204), H(221e), H(2299), H(2102), \ + _______, H(0391), H(03a3), H(0394), H(03a6), H(0393), H(0397), H(00ac), H(039a), H(039b), H(222a), H(2229), _______, H(2124), \ + _______, H(0396), H(039e), H(03a7), H(03a8), H(0392), H(039d), H(039c), H(2286), H(2287), H(2209), _______, H(21d1), H(21d4), \ + _______, _______, _______, _______, _______, _______, H(21d0), H(21d3), H(21d2)), +}; + +// Layer bitfields. +#define MAGIC_LAYER (1UL << _MAGIC) +#define SHIFTMAGIC_LAYER (1UL << _SHIFTMAGIC) +// The layers we don't touch. +#define LAYER_MASK ~(MAGIC_LAYER|SHIFTMAGIC_LAYER) + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + // Activate the appropriate magic layer: + // User is holding AltGr+Shift => _SHIFTMAGIC + // User is holding AltGr => _MAGIC + // Not holding AltGr => None + // We do this the efficient way, by grabbing the non-magic bits from the current layer bitmap, + // setting the appropriate magic or shiftmagic bit, and doing an absolute layer set. (Layer + // sets are nontrivial, so we don't want to do extras!) + + // We track shift and AltGr state on our own, because this function is called before get_mods is + // updated! + static bool shifted = false; + static bool magic = false; + + if (keycode == KC_LSHIFT || keycode == KC_RSHIFT) { + shifted = record->event.pressed; + } else if (keycode == MAGIC) { + magic = record->event.pressed; + } else if (keycode == RESET) { + // Safe reset: Only actually let this keycode through if shift is held as well. Since there's no + // right-shift in the function layer, this means that reset is Fn+LShift+Esc, something you're + // not likely to hit by accident. (Especially since AltGr+Esc is backtick!) + return (record->event.pressed && shifted); + } + + // Update the layer. + uint32_t new_layer_state = layer_state & LAYER_MASK; + if (magic) { + new_layer_state |= (shifted ? SHIFTMAGIC_LAYER : MAGIC_LAYER); + } + if (layer_state != new_layer_state) { + layer_state_set(new_layer_state); + } + + return true; +} + +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_OSX); +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/readme.md b/keyboards/kbd67/hotswap/keymaps/zunger/readme.md new file mode 100644 index 000000000000..923a4824a52e --- /dev/null +++ b/keyboards/kbd67/hotswap/keymaps/zunger/readme.md @@ -0,0 +1,27 @@ +* Custom keymap for kbd67, for those who need to both code and type math. +* Author: Yonatan Zunger (zunger@gmail.com) + +This keymap is presently rather Mac-centric, as it uses Mac media keys in its function layer and the +OS X Unicode input mode for the "magic" layers. + +*Layer 0 (Base QWERTY):* The layout has a few minor quirks: grave escape, Home/End/PgUp/PgDn in the +right-hand column (rather than the more common Home/PgUp/PgDn/End), and a pause key between +backspace and home -- this being something I use for screen lock, a necessity when one works with +and sits next to security engineers. (Using a heavier switch on the pause key greatly reduces the +risk of accidental triggering) In OS X style, alt and win are swapped on the left-hand side. + +The right-hand alt and gui keys take on a different meaning: right-alt lives up to its old name of +AltGr by invoking Greek (the "magic" layers, 2 and 3), and right-gui invokes the function layer. + +*Layer 1 (Functions):* This layer deliberately sets KC_NO for the keys it doesn't use. I realize +this isn't common, but I like to keep my functions quite distinct from all other layers. + +RESET can be accessed at Fn+Left Shift+Escape. + +*Layers 2 and 3*: These are invoked by the "magic" key (AltGr) and by magic+shift. The +letters mostly produce Greek; the numbers, superscripts (magic) and subscripts (magic+shift); and +the various other keys, mathematical symbols. There unfortunately aren't nearly enough keys for all +the symbols I'd like, so magic+alt and magic+alt+shift may end up existing as well, giving this a +proper Space Cadet effect; but that said, it's going to be hard to remember where all these symbols +are without some extremely custom keycaps. In the limit of arbitrarily complex layers, the keyboard +will probably start running LISP and turn into EMACS. diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/rules.mk b/keyboards/kbd67/hotswap/keymaps/zunger/rules.mk new file mode 100644 index 000000000000..a61cfa33fa9e --- /dev/null +++ b/keyboards/kbd67/hotswap/keymaps/zunger/rules.mk @@ -0,0 +1,2 @@ +# You need Unicode for this map. +UNICODE_ENABLE = yes # Unicode From 8e47f64888b4b9edfcf6038d2dac0ec7d95623c1 Mon Sep 17 00:00:00 2001 From: lambda_sakura Date: Wed, 25 Apr 2018 19:14:27 +0900 Subject: [PATCH 188/458] Add support for RETRO_TAPPING to LT(layer, kc) --- tmk_core/common/action.c | 10 +++++++++- tmk_core/common/action.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index b99c2acaa7a9..ec8d6ed7b9cb 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c @@ -653,7 +653,7 @@ void process_action(keyrecord_t *record, action_t action) #ifndef NO_ACTION_TAPPING #ifdef RETRO_TAPPING - if (!is_tap_key(record->event.key)) { + if (!is_tap_action(action)) { retro_tapping_counter = 0; } else { if (event.pressed) { @@ -929,7 +929,15 @@ void clear_keyboard_but_mods_and_keys() bool is_tap_key(keypos_t key) { action_t action = layer_switch_get_action(key); + return is_tap_action(action); +} +/** \brief Utilities for actions. (FIXME: Needs better description) + * + * FIXME: Needs documentation. + */ +bool is_tap_action(action_t action) +{ switch (action.kind.id) { case ACT_LMODS_TAP: case ACT_RMODS_TAP: diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 8e47e5339eda..799e3bb0efd5 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -97,6 +97,7 @@ void clear_keyboard_but_mods(void); void clear_keyboard_but_mods_and_keys(void); void layer_switch(uint8_t new_layer); bool is_tap_key(keypos_t key); +bool is_tap_action(action_t action); #ifndef NO_ACTION_TAPPING void process_record_tap_hint(keyrecord_t *record); From b4ae07cbb1a07517d1490359e73916da4fc618cc Mon Sep 17 00:00:00 2001 From: Dave Brown Date: Fri, 25 Jan 2019 15:00:04 -0500 Subject: [PATCH 189/458] Adding documentation for the LM layer modifier. (#3617) * Adding documentation for the LM layer modifier. This will hopefully clear up some of the confusion around adding this layer modifier. I struggled with this a bit as well at first. * Removing duplicate table. * Changed section title to `Changing Layers` * Retain name --- docs/keycodes.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/keycodes.md b/docs/keycodes.md index 165c3c4d169c..7fd772091f48 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -290,7 +290,7 @@ This is a reference only. Each group of keys links to the page documenting their |`DF(layer)` |Set the base (default) layer | |`MO(layer)` |Momentarily turn on `layer` when pressed (requires `KC_TRNS` on destination layer)| |`OSL(layer)` |Momentarily activates `layer` until a key is pressed. See [One Shot Keys](https://docs.qmk.fm/#/feature_advanced_keycodes?id=one-shot-keys) for details. | -|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. +|`LM(layer, mod)`|Momentarily turn on `layer` (like MO) with `mod` active as well. Where `mod` is a mods_bit. Mods can be viewed [here](https://docs.qmk.fm/#/feature_advanced_keycodes?id=mod-tap). Example Implementation: `LM(LAYER_1, MOD_LALT)`| |`LT(layer, kc)` |Turn on `layer` when held, `kc` when tapped | |`TG(layer)` |Toggle `layer` on or off | |`TO(layer)` |Turn on `layer` when pressed | From 3c0c432836fb251c48b9cefc20cc0cdde36758bb Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Wed, 15 Aug 2018 01:25:26 +0900 Subject: [PATCH 190/458] Fix problem that MAGIC_SWAP_ALT_GUI will not be effective when OSM(mod) is used --- quantum/keymap_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index f6c8b70d28b9..1a6af9e08f3c 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -120,7 +120,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) break; case QK_ONE_SHOT_MOD ... QK_ONE_SHOT_MOD_MAX: ; // OSM(mod) - One-shot mod - mod = keycode & 0xFF; + mod = mod_config(keycode & 0xFF); action.code = ACTION_MODS_ONESHOT(mod); break; case QK_LAYER_TAP_TOGGLE ... QK_LAYER_TAP_TOGGLE_MAX: From b4161136167556afd9a6073aa476846b90e3bfab Mon Sep 17 00:00:00 2001 From: Shihpin Tseng Date: Sat, 26 Jan 2019 04:09:53 +0800 Subject: [PATCH 191/458] Fix oneshot_time wrong type (#3696) * Fix oneshot_time wrong type * Fix oneshot_time_layer wrong type --- tmk_core/common/action_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c index afd4ae8b2559..58401ace5588 100644 --- a/tmk_core/common/action_util.c +++ b/tmk_core/common/action_util.c @@ -54,7 +54,7 @@ int8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; } void set_oneshot_locked_mods(int8_t mods) { oneshot_locked_mods = mods; } void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; } #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) -static int16_t oneshot_time = 0; +static uint16_t oneshot_time = 0; bool has_oneshot_mods_timed_out(void) { return TIMER_DIFF_16(timer_read(), oneshot_time) >= ONESHOT_TIMEOUT; } @@ -79,7 +79,7 @@ inline uint8_t get_oneshot_layer(void) { return oneshot_layer_data >> 3; } inline uint8_t get_oneshot_layer_state(void) { return oneshot_layer_data & 0b111; } #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) -static int16_t oneshot_layer_time = 0; +static uint16_t oneshot_layer_time = 0; inline bool has_oneshot_layer_timed_out() { return TIMER_DIFF_16(timer_read(), oneshot_layer_time) >= ONESHOT_TIMEOUT && !(get_oneshot_layer_state() & ONESHOT_TOGGLED); From e611433cb5a479d84b37088e64da01b556f314fa Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Fri, 25 Jan 2019 12:57:10 -0800 Subject: [PATCH 192/458] rs: code friendly keymap for preonic, iris and my preonic clone (#4303) I worked on those keymap to simplify the use of 60% keyboards for coders. Instead of trying to mimic planck, this keymap remove raise/lower layer complexity and keep some important sign keys for coder in the upper right side pretty much the same way as they are on a full keyboard. A karabiner configuration is also provided to mimic most of the keymap features on the macbook internal keyboard for when you are forced to use it. --- keyboards/ergotravel/keymaps/rs/config.h | 38 ++++ keyboards/ergotravel/keymaps/rs/keymap.c | 59 +++++ keyboards/ergotravel/keymaps/rs/readme.md | 13 ++ keyboards/ergotravel/keymaps/rs/rules.mk | 0 keyboards/handwired/rs60/README.md | 27 +++ keyboards/handwired/rs60/config.h | 47 ++++ .../handwired/rs60/keymaps/default/keymap.c | 207 ++++++++++++++++++ .../handwired/rs60/keymaps/default/readme.md | 1 + keyboards/handwired/rs60/rs60.c | 18 ++ keyboards/handwired/rs60/rs60.h | 36 +++ keyboards/handwired/rs60/rules.mk | 61 ++++++ keyboards/iris/keymaps/rs/config.h | 38 ++++ keyboards/iris/keymaps/rs/karabiner.json | 154 +++++++++++++ keyboards/iris/keymaps/rs/keymap.c | 48 ++++ keyboards/iris/keymaps/rs/readme.md | 13 ++ keyboards/iris/keymaps/rs/rules.mk | 1 + layouts/community/ortho_5x12/rs/config.h | 35 +++ .../community/ortho_5x12/rs/karabiner.json | 154 +++++++++++++ layouts/community/ortho_5x12/rs/keymap.c | 63 ++++++ layouts/community/ortho_5x12/rs/readme.md | 17 ++ 20 files changed, 1030 insertions(+) create mode 100644 keyboards/ergotravel/keymaps/rs/config.h create mode 100644 keyboards/ergotravel/keymaps/rs/keymap.c create mode 100644 keyboards/ergotravel/keymaps/rs/readme.md create mode 100644 keyboards/ergotravel/keymaps/rs/rules.mk create mode 100644 keyboards/handwired/rs60/README.md create mode 100644 keyboards/handwired/rs60/config.h create mode 100644 keyboards/handwired/rs60/keymaps/default/keymap.c create mode 100644 keyboards/handwired/rs60/keymaps/default/readme.md create mode 100644 keyboards/handwired/rs60/rs60.c create mode 100644 keyboards/handwired/rs60/rs60.h create mode 100644 keyboards/handwired/rs60/rules.mk create mode 100644 keyboards/iris/keymaps/rs/config.h create mode 100644 keyboards/iris/keymaps/rs/karabiner.json create mode 100644 keyboards/iris/keymaps/rs/keymap.c create mode 100644 keyboards/iris/keymaps/rs/readme.md create mode 100644 keyboards/iris/keymaps/rs/rules.mk create mode 100644 layouts/community/ortho_5x12/rs/config.h create mode 100644 layouts/community/ortho_5x12/rs/karabiner.json create mode 100644 layouts/community/ortho_5x12/rs/keymap.c create mode 100644 layouts/community/ortho_5x12/rs/readme.md diff --git a/keyboards/ergotravel/keymaps/rs/config.h b/keyboards/ergotravel/keymaps/rs/config.h new file mode 100644 index 000000000000..eeca26ce1dbb --- /dev/null +++ b/keyboards/ergotravel/keymaps/rs/config.h @@ -0,0 +1,38 @@ +/* +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 + +#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/ergotravel/keymaps/rs/keymap.c b/keyboards/ergotravel/keymaps/rs/keymap.c new file mode 100644 index 000000000000..634e97c49c78 --- /dev/null +++ b/keyboards/ergotravel/keymaps/rs/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _HYPER, + _SIGN +}; + + +#define KC_ KC_TRNS + +#define KC_ESCC MT(MOD_LCTL, KC_ESC) +#define KC_ENTS MT(MOD_LSFT, KC_ENT) +#define KC_HYPE MO(_HYPER) +#define KC_SIGN MO(_SIGN) +#define KC_RST RESET +// Brightness +#define KC_BRUP KC_PAUS +#define KC_BRDN KC_SLCK + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ESCC, A , S , D , F , G ,PIPE, MINS, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS, + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + SIGN, ,LCTL,LALT,LGUI, SPC, BSPC, HYPE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + + [_HYPER] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , , , 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , ,PGUP, , , , , , , UP ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,HOME,PGDN,END , , , VOLU, ,LEFT,DOWN,RGHT, ,PIPE, + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , VOLD, ,MUTE, , , + //`----+----+----+----+----/----/ \----\----+----+----+----+----' + ), + + [_SIGN] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LBRC,RBRC, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + RST , F1 , F2 , F3 , F4 , F5 , F6 , , , , ,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , 1 , 2 , 3 , 4 , 5 , , BRUP, 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , BRDN, , , , , + //`----+----+----+----+----/----/ \----\----+----+----+----+----' + ), +}; \ No newline at end of file diff --git a/keyboards/ergotravel/keymaps/rs/readme.md b/keyboards/ergotravel/keymaps/rs/readme.md new file mode 100644 index 000000000000..93b87cc23a16 --- /dev/null +++ b/keyboards/ergotravel/keymaps/rs/readme.md @@ -0,0 +1,13 @@ +# Code friendly 60% keymap + +I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys. + +The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement. + +The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout. + +Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc. + +This keymap is also available for other keyboards: +- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c) +- [Iris/rs](../../../iris/keymaps/rs/keymap.c) diff --git a/keyboards/ergotravel/keymaps/rs/rules.mk b/keyboards/ergotravel/keymaps/rs/rules.mk new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/handwired/rs60/README.md b/keyboards/handwired/rs60/README.md new file mode 100644 index 000000000000..07c967e276b2 --- /dev/null +++ b/keyboards/handwired/rs60/README.md @@ -0,0 +1,27 @@ +# rs60: Handwired Slim Preonic Clone + +I wanted a preonic layout but with a very low profile. As Jack is still working on the Preonic PCB for Kailh Choc switches, I figured I could try to handwire one myself. It's my first custom keyboard, so I had a lot to learn. + +First I designed the case in fusion 360. I wanted to build it using acrylic, constrained myself to standard acrylic sheet thickness. + +![](https://imgur.com/NscS7Rd.jpg) + +You can download the model [here](https://a360.co/2OqiKLm). + +To test my design I 3D printed the parts. + +![](https://imgur.com/MSF7zLS.jpg) + +The result was encouraging, so I decided to build a prototype out of the printed plates using Kailh Choc brown switches. I tried to make the handwiring job as flat as possible so it can fit in my design. + +![](https://i.imgur.com/67yZx0V.jpg) +![](https://i.imgur.com/ft72Cgj.jpg) + +I designed switch plate and the middle plates so that they would be glued together. The middle plate has inserts to attach the bottom plate using m8 screws. + +![](https://i.imgur.com/GstTohI.jpg) + +The end result is not too bad, but there is a few things I would do differently. Gluing 3D printed plates wasn't a good idea. The switch layer is so thin, that it bends when all the switches are slotted. As a result, the keyboard is not entirely flat. I will replace the bottom plate by a metal one so I get more weight and rigidity. + +Even with acrylic, I think I will have the same issue. I might switch to screws + bolts that go all the way through. + diff --git a/keyboards/handwired/rs60/config.h b/keyboards/handwired/rs60/config.h new file mode 100644 index 000000000000..371150a79a83 --- /dev/null +++ b/keyboards/handwired/rs60/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x4260 +#define DEVICE_VER 0x0001 +#define MANUFACTURER rs +#define PRODUCT rs60 +#define DESCRIPTION Preonic clone based on pro micro + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5, B6, B4, B2, E6 } +#define MATRIX_COL_PINS { C6, D4, D0, D1, D2, D3, F4, F5, F6, F7, B1, B3} +#define UNUSED_PINS { } + +#define QMK_ESC_OUTPUT C6 +#define QMK_ESC_INPUT B4 +#define QMK_LED B0 +// #define QMK_SPEAKER C6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* key combination for command */ +#define IS_COMMAND() ( \ + false \ +) diff --git a/keyboards/handwired/rs60/keymaps/default/keymap.c b/keyboards/handwired/rs60/keymaps/default/keymap.c new file mode 100644 index 000000000000..9fea769d05c4 --- /dev/null +++ b/keyboards/handwired/rs60/keymaps/default/keymap.c @@ -0,0 +1,207 @@ +/* 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 + +enum layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | 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, \ + 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, 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( \ + 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, \ + _______, 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( \ + 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, \ + _______, 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 | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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( \ + 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( \ + 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, \ + _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) +}; + +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; + } + return true; +}; diff --git a/keyboards/handwired/rs60/keymaps/default/readme.md b/keyboards/handwired/rs60/keymaps/default/readme.md new file mode 100644 index 000000000000..e911968dd964 --- /dev/null +++ b/keyboards/handwired/rs60/keymaps/default/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/handwired/rs60/rs60.c b/keyboards/handwired/rs60/rs60.c new file mode 100644 index 000000000000..f748740cbe70 --- /dev/null +++ b/keyboards/handwired/rs60/rs60.c @@ -0,0 +1,18 @@ +/* +Copyright 2018 QMK Community + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "rs60.h" diff --git a/keyboards/handwired/rs60/rs60.h b/keyboards/handwired/rs60/rs60.h new file mode 100644 index 000000000000..f2113f05c3dd --- /dev/null +++ b/keyboards/handwired/rs60/rs60.h @@ -0,0 +1,36 @@ +/* +Copyright 2018 QMK Community + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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( \ + 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 } \ +} + +#define LAYOUT_ortho_5x12 LAYOUT diff --git a/keyboards/handwired/rs60/rules.mk b/keyboards/handwired/rs60/rules.mk new file mode 100644 index 000000000000..7b4ec69d0d35 --- /dev/null +++ b/keyboards/handwired/rs60/rules.mk @@ -0,0 +1,61 @@ +# 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 +BOOTLOADER = qmk-dfu + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +LAYOUTS = ortho_5x12 + +# Boot Section Size in *bytes* +#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 = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + diff --git a/keyboards/iris/keymaps/rs/config.h b/keyboards/iris/keymaps/rs/config.h new file mode 100644 index 000000000000..7c5b5ca43308 --- /dev/null +++ b/keyboards/iris/keymaps/rs/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define TAPPING_TERM 150 + +#undef RGBLED_NUM +#define RGBLED_NUM 6 +#define RGBLIGHT_SLEEP +#define RGBLIGHT_HUE_STEP 1 +#define RGBLIGHT_SAT_STEP 1 +#define RGBLIGHT_VAL_STEP 1 \ No newline at end of file diff --git a/keyboards/iris/keymaps/rs/karabiner.json b/keyboards/iris/keymaps/rs/karabiner.json new file mode 100644 index 000000000000..f5214650adea --- /dev/null +++ b/keyboards/iris/keymaps/rs/karabiner.json @@ -0,0 +1,154 @@ +{ + "title": "RS", + "rules": [{ + "description": "CapsLock to Escape / Control Mod-Tap", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": ["any"] + } + }, + "to": [{"key_code": "left_control"}], + "to_if_alone": [{"key_code": "escape"}] + }] + }, + { + "description": "Right-Shift / Enter Mod-Tap", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "right_shift", + "modifiers": { + "optional": ["any"] + } + }, + "to": [{"key_code": "right_shift"}], + "to_if_alone": [{"key_code": "return_or_enter"}] + }] + }, + { + "description": "Right-Command / Backspace Mod-Tap", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "right_command", + "modifiers": { + "optional": ["any"] + } + }, + "to": [{"key_code": "right_command"}], + "to_if_alone": [{"key_code": "delete_or_backspace"}] + }] + }, + { + "description": "Right-Command Accents", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["left_shift", "right_shift"] + } + }, + "to": [ + {"key_code": "grave_accent_and_tilde", "modifiers": ["left_option"]}, + {"key_code": "a"} + ] + }] + }, + { + "description": "Right Command Navigation", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "left_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "k", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "down_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "i", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "up_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "right_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "page_up"}] + }, + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "page_down"}] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "home"}] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "end"}] + }] + }] +} diff --git a/keyboards/iris/keymaps/rs/keymap.c b/keyboards/iris/keymaps/rs/keymap.c new file mode 100644 index 000000000000..43374e59f39f --- /dev/null +++ b/keyboards/iris/keymaps/rs/keymap.c @@ -0,0 +1,48 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _HYPER, +}; + +#define KC_ KC_TRNS + +#define KC_ESCC MT(MOD_LCTL, KC_ESC) +#define KC_ENTS MT(MOD_LSFT, KC_ENT) +#define KC_HYPE MO(_HYPER) +#define KC_RST RESET +// Brightness +#define KC_BRUP KC_PAUS +#define KC_BRDN KC_SLCK +#define KC_BLTG BL_TOGG + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LALT,LGUI,SPC, BSPC,HYPE,ENT + // `----+----+----' `+---+----+----' + ), // | + // | + [_HYPER] = LAYOUT_kc( // V + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 ,LBRC,RBRC, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , ,PGUP, ,BRUP, , , UP ,LCBR,RCBR,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,HOME,PGDN,END ,BRDN, MINS,LEFT,DOWN,RGHT, ,PIPE, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , ,BLTG, VOLU, , , , , , , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , VOLD, ,MUTE + // `----+----+----' `----+----+----' + ), +}; diff --git a/keyboards/iris/keymaps/rs/readme.md b/keyboards/iris/keymaps/rs/readme.md new file mode 100644 index 000000000000..bdf44121e4b5 --- /dev/null +++ b/keyboards/iris/keymaps/rs/readme.md @@ -0,0 +1,13 @@ +# Code friendly 60% keymap + +I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys. + +The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement. + +The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout. + +Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc. + +This keymap is also available for other keyboards: +- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c) +- [ErgoTravel/rs](../../../ergotravel/keymaps/rs/keymap.c) diff --git a/keyboards/iris/keymaps/rs/rules.mk b/keyboards/iris/keymaps/rs/rules.mk new file mode 100644 index 000000000000..bd518d8f273f --- /dev/null +++ b/keyboards/iris/keymaps/rs/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes diff --git a/layouts/community/ortho_5x12/rs/config.h b/layouts/community/ortho_5x12/rs/config.h new file mode 100644 index 000000000000..02076e8728d1 --- /dev/null +++ b/layouts/community/ortho_5x12/rs/config.h @@ -0,0 +1,35 @@ +#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 diff --git a/layouts/community/ortho_5x12/rs/karabiner.json b/layouts/community/ortho_5x12/rs/karabiner.json new file mode 100644 index 000000000000..f5214650adea --- /dev/null +++ b/layouts/community/ortho_5x12/rs/karabiner.json @@ -0,0 +1,154 @@ +{ + "title": "RS", + "rules": [{ + "description": "CapsLock to Escape / Control Mod-Tap", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "caps_lock", + "modifiers": { + "optional": ["any"] + } + }, + "to": [{"key_code": "left_control"}], + "to_if_alone": [{"key_code": "escape"}] + }] + }, + { + "description": "Right-Shift / Enter Mod-Tap", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "right_shift", + "modifiers": { + "optional": ["any"] + } + }, + "to": [{"key_code": "right_shift"}], + "to_if_alone": [{"key_code": "return_or_enter"}] + }] + }, + { + "description": "Right-Command / Backspace Mod-Tap", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "right_command", + "modifiers": { + "optional": ["any"] + } + }, + "to": [{"key_code": "right_command"}], + "to_if_alone": [{"key_code": "delete_or_backspace"}] + }] + }, + { + "description": "Right-Command Accents", + "manipulators": [ + { + "type": "basic", + "from": { + "key_code": "a", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["left_shift", "right_shift"] + } + }, + "to": [ + {"key_code": "grave_accent_and_tilde", "modifiers": ["left_option"]}, + {"key_code": "a"} + ] + }] + }, + { + "description": "Right Command Navigation", + "manipulators": [{ + "type": "basic", + "from": { + "key_code": "j", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "left_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "k", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "down_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "i", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "up_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "l", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "right_arrow"}] + }, + { + "type": "basic", + "from": { + "key_code": "e", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "page_up"}] + }, + { + "type": "basic", + "from": { + "key_code": "d", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "page_down"}] + }, + { + "type": "basic", + "from": { + "key_code": "s", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "home"}] + }, + { + "type": "basic", + "from": { + "key_code": "f", + "modifiers": { + "mandatory": ["right_command"], + "optional": ["any"] + } + }, + "to": [{"key_code": "end"}] + }] + }] +} diff --git a/layouts/community/ortho_5x12/rs/keymap.c b/layouts/community/ortho_5x12/rs/keymap.c new file mode 100644 index 000000000000..f33dcc253632 --- /dev/null +++ b/layouts/community/ortho_5x12/rs/keymap.c @@ -0,0 +1,63 @@ +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _HYPER, +}; + +#define KC_ KC_TRNS + +#define KC_ESCC MT(MOD_LCTL, KC_ESC) +#define KC_RST RESET +#define KC_BSPH LT(_HYPER, KC_BSPC) +#define KC_ENTS MT(MOD_LSFT, KC_ENT) +// Brightness +#define KC_BRUP KC_PAUS +#define KC_BRDN KC_SLCK + +// Used to create a keymap using only KC_ prefixed keys +#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, \ + 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 \ + ) \ + LAYOUT_ortho_5x12( \ + 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, \ + KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k46, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b \ + ) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( \ + // ,-----------------------------------------------------------------------------------. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + TAB , Q , W , E , R , T , Y , U , I , O , P , EQL , + // |------+------+------+------+------+------+------+------+------+------+------+------| + ESCC , A , S , D , F , G , H , J , K , L , SCLN , QUOT , + // |------+------+------+------+------+------+------+------+------+------+------+------| + LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , LCTL , LALT , LGUI , SPC , SPC , BSPC , BSPH , LEFT , DOWN , UP , RGHT + // `---------------------------------------------------+-------------------------------' + ), // | + // | + [_HYPER] = LAYOUT_kc( /* V */ \ + // ,-----------------------------------------------------------------------------------. + RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , PGUP , , , , , UP , LCBR , RCBR , BSLS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , , , , , , , BRDN , BRUP , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , , , , , , MUTE , VOLD , VOLU , MPLY + // `-----------------------------------------------------------------------------------' + ), +}; diff --git a/layouts/community/ortho_5x12/rs/readme.md b/layouts/community/ortho_5x12/rs/readme.md new file mode 100644 index 000000000000..d75eefd5b9ce --- /dev/null +++ b/layouts/community/ortho_5x12/rs/readme.md @@ -0,0 +1,17 @@ +# Code friendly 60% keymap + +I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys. + +The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement. + +The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout. + +Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc. + +This keymap has been tested with those keyboards: +- [Preonic](../../../../keyboards/preonic/) +- [My preonic clone](../../../rs60/) + +Checkout an adaptation of this keymap for other keyboards: +- [Iris/rs](../../../../keyboards/iris/keymaps/rs/keymap.c) +- [ErgoTravel/rs](../../../../keyboards/ergotravel/keymaps/rs/keymap.c) \ No newline at end of file From 2f009d7461a486cfa7307ef0cecd67d1abe570b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Fri, 25 Jan 2019 22:02:38 +0100 Subject: [PATCH 193/458] Add MOD_MASK_* macros to core code (#4337) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add MOD_MASK_* macros to core code * MOD_MASK_ALL → MOD_MASK_CSAG --- tmk_core/common/keycode.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tmk_core/common/keycode.h b/tmk_core/common/keycode.h index fd975dd6ad10..d5904276eebb 100644 --- a/tmk_core/common/keycode.h +++ b/tmk_core/common/keycode.h @@ -46,6 +46,22 @@ along with this program. If not, see . #define MOD_BIT(code) (1 << MOD_INDEX(code)) #define MOD_INDEX(code) ((code) & 0x07) +#define MOD_MASK_CTRL (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) +#define MOD_MASK_SHIFT (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) +#define MOD_MASK_ALT (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) +#define MOD_MASK_GUI (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) +#define MOD_MASK_CS (MOD_MASK_CTRL | MOD_MASK_SHIFT) +#define MOD_MASK_CA (MOD_MASK_CTRL | MOD_MASK_ALT) +#define MOD_MASK_CG (MOD_MASK_CTRL | MOD_MASK_GUI) +#define MOD_MASK_SA (MOD_MASK_SHIFT | MOD_MASK_ALT) +#define MOD_MASK_SG (MOD_MASK_SHIFT | MOD_MASK_GUI) +#define MOD_MASK_AG (MOD_MASK_ALT | MOD_MASK_GUI) +#define MOD_MASK_CSA (MOD_MASK_CTRL | MOD_MASK_SHIFT | MOD_MASK_ALT) +#define MOD_MASK_CSG (MOD_MASK_CTRL | MOD_MASK_SHIFT | MOD_MASK_GUI) +#define MOD_MASK_CAG (MOD_MASK_CTRL | MOD_MASK_ALT | MOD_MASK_GUI) +#define MOD_MASK_SAG (MOD_MASK_SHIFT | MOD_MASK_ALT | MOD_MASK_GUI) +#define MOD_MASK_CSAG (MOD_MASK_CTRL | MOD_MASK_SHIFT | MOD_MASK_ALT | MOD_MASK_GUI) + #define FN_BIT(code) (1 << FN_INDEX(code)) #define FN_INDEX(code) ((code) - KC_FN0) #define FN_MIN KC_FN0 From 79b58937f41413f52ffc7b6af2149dca7a632b73 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 26 Jan 2019 08:12:48 +1100 Subject: [PATCH 194/458] Add C(), A() and G() to match already existing S() (#4673) --- docs/feature_advanced_keycodes.md | 44 ++++++++--------- docs/keycodes.md | 48 +++++++++---------- .../kitten_paw/keymaps/ickerwx/keymap.c | 7 +-- .../pegasushoof/keymaps/citadel/keymap.c | 10 ++-- .../promethium/keymaps/default/keymap.c | 1 - .../promethium/keymaps/priyadi/keymap.c | 1 - .../handwired/pteron/keymaps/FSund/keymap.c | 4 +- keyboards/planck/keymaps/callum/keymap.c | 3 -- keyboards/planck/keymaps/rai-suta/keymap.c | 1 - .../keymaps/zach/zach_common_functions.c | 1 + .../keymaps/zach/zach_common_functions.c | 1 + quantum/quantum_keycodes.h | 5 +- 12 files changed, 64 insertions(+), 62 deletions(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 98c7f8451790..37a3d43fc39d 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -60,21 +60,21 @@ Sometimes, you might want to switch between layers in a macro or as part of a ta These allow you to combine a modifier with a keycode. When pressed, the keydown event for the modifier, then `kc` will be sent. On release, the keyup event for `kc`, then the modifier will be sent. -|Key |Aliases |Description | -|----------|----------------------|----------------------------------------------------| -|`LCTL(kc)`| |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`| |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|Key |Aliases |Description | +|----------|-------------------------------|----------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| You can also chain them, for example `LCTL(LALT(KC_DEL))` makes a key that sends Control+Alt+Delete with a single keypress. @@ -110,20 +110,20 @@ For convenience, QMK includes some Mod-Tap shortcuts to make common combinations |Key |Aliases |Description | |------------|-----------------------------------------------------------------|-------------------------------------------------------| |`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | |`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | |`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | |`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | |`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| |`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## Caveats diff --git a/docs/keycodes.md b/docs/keycodes.md index 7fd772091f48..91578414d199 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -319,43 +319,43 @@ This is a reference only. Each group of keys links to the page documenting their ## [Modifiers](feature_advanced_keycodes.md#modifier-keys) -|Key |Aliases |Description | -|----------|----------------------|----------------------------------------------------| -|`KC_HYPR` | |Hold Left Control, Shift, Alt and GUI | -|`KC_MEH` | |Hold Left Control, Shift and Alt | -|`LCTL(kc)`| |Hold Left Control and press `kc` | -|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | -|`LALT(kc)`| |Hold Left Alt and press `kc` | -|`LGUI(kc)`|`LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | -|`RCTL(kc)`| |Hold Right Control and press `kc` | -|`RSFT(kc)`| |Hold Right Shift and press `kc` | -|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` | -|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)`|Hold Right GUI and press `kc` | -|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| -|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | -|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | -|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)`|Hold Left Shift and GUI and press `kc` | -|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|Key |Aliases |Description | +|----------|-------------------------------|----------------------------------------------------| +|`LCTL(kc)`|`C(kc)` |Hold Left Control and press `kc` | +|`LSFT(kc)`|`S(kc)` |Hold Left Shift and press `kc` | +|`LALT(kc)`|`A(kc)` |Hold Left Alt and press `kc` | +|`LGUI(kc)`|`G(kc)`, `LCMD(kc)`, `LWIN(kc)`|Hold Left GUI and press `kc` | +|`RCTL(kc)`| |Hold Right Control and press `kc` | +|`RSFT(kc)`| |Hold Right Shift and press `kc` | +|`RALT(kc)`|`ALGR(kc)` |Hold Right Alt and press `kc` | +|`RGUI(kc)`|`RCMD(kc)`, `LWIN(kc)` |Hold Right GUI and press `kc` | +|`SGUI(kc)`|`SCMD(kc)`, `SWIN(kc)` |Hold Left Shift and GUI and press `kc` | +|`LCA(kc)` | |Hold Left Control and Alt and press `kc` | +|`LCAG(kc)`| |Hold Left Control, Alt and GUI and press `kc` | +|`MEH(kc)` | |Hold Left Control, Shift and Alt and press `kc` | +|`HYPR(kc)`| |Hold Left Control, Shift, Alt and GUI and press `kc`| +|`KC_MEH` | |Left Control, Shift and Alt | +|`KC_HYPR` | |Left Control, Shift, Alt and GUI | ## [Mod-Tap Keys](feature_advanced_keycodes.md#mod-tap) |Key |Aliases |Description | |------------|-----------------------------------------------------------------|-------------------------------------------------------| |`LCTL_T(kc)`|`CTL_T(kc)` |Left Control when held, `kc` when tapped | -|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | |`LSFT_T(kc)`|`SFT_T(kc)` |Left Shift when held, `kc` when tapped | -|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | |`LALT_T(kc)`|`ALT_T(kc)` |Left Alt when held, `kc` when tapped | -|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |`LGUI_T(kc)`|`LCMD_T(kc)`, `LWIN_T(kc)`, `GUI_T(kc)`, `CMD_T(kc)`, `WIN_T(kc)`|Left GUI when held, `kc` when tapped | +|`RCTL_T(kc)`| |Right Control when held, `kc` when tapped | +|`RSFT_T(kc)`| |Right Shift when held, `kc` when tapped | +|`RALT_T(kc)`|`ALGR_T(kc)` |Right Alt when held, `kc` when tapped | |`RGUI_T(kc)`|`RCMD_T(kc)`, `RWIN_T(kc)` |Right GUI when held, `kc` when tapped | -|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | -|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| +|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | +|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | |`LCAG_T(kc)`| |Left Control, Alt and GUI when held, `kc` when tapped | |`RCAG_T(kc)`| |Right Control, Alt and GUI when held, `kc` when tapped | +|`C_S_T(kc)` | |Left Control and Shift when held, `kc` when tapped | +|`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped| |`HYPR_T(kc)`|`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| -|`SGUI_T(kc)`|`SCMD_T(kc)`, `SWIN_T(kc)` |Left Shift and GUI when held, `kc` when tapped | -|`LCA_T(kc)` | |Left Control and Alt when held, `kc` when tapped | ## [RGB Lighting](feature_rgblight.md) diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c index 856cef9cc24c..c0549c424eae 100644 --- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c +++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c @@ -3,12 +3,13 @@ #define _______ KC_TRNS #define XXXXXXX KC_NO -#define C(kc) LCTL(KC_##kc) +#undef C +#undef S +#define C(kc) LCTL(KC_##kc) +#define S(kc) LSFT(KC_##kc) #define RA(kc) RALT(KC_##kc) #define KC_SLCT KC_SELECT #define MEDAPP LT(MEDIA, KC_APP) -#undef S -#define S(kc) LSFT(KC_##kc) uint8_t current_layer_global = 255; diff --git a/keyboards/bpiphany/pegasushoof/keymaps/citadel/keymap.c b/keyboards/bpiphany/pegasushoof/keymaps/citadel/keymap.c index 79f07d3bb8c9..5036bcb3f535 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/citadel/keymap.c +++ b/keyboards/bpiphany/pegasushoof/keymaps/citadel/keymap.c @@ -17,11 +17,15 @@ #include QMK_KEYBOARD_H /* Allow shortcuts for combos like RALT(KC_RBRC) that don't take up more than 7 characters: */ -#define G(kc) RALT(KC_##kc) -#define A(kc) LALT(KC_##kc) +/* Original shortcuts (quantum_keycodes.h) take full-sized keycodes: too long! */ +#undef C +#undef S +#undef A +#undef G #define C(kc) LCTL(KC_##kc) -#undef S /* Original shortcut (quantum_keycodes.h) takes full-sized keycodes: too long! */ #define S(kc) LSFT(KC_##kc) +#define A(kc) LALT(KC_##kc) +#define G(kc) RALT(KC_##kc) #define CTALDEL LCTL(LALT(KC_DEL)) enum layers { diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index a1ca79f9a940..faae89f935d7 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -60,7 +60,6 @@ along with this program. If not, see . // Fillers to make layering clearer #define _______ KC_TRNS #define XXXXXXX KC_NO -#define G(x) LGUI(x) #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index a1ca79f9a940..faae89f935d7 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -60,7 +60,6 @@ along with this program. If not, see . // Fillers to make layering clearer #define _______ KC_TRNS #define XXXXXXX KC_NO -#define G(x) LGUI(x) #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD diff --git a/keyboards/handwired/pteron/keymaps/FSund/keymap.c b/keyboards/handwired/pteron/keymaps/FSund/keymap.c index f34beae0637d..a52e84297777 100644 --- a/keyboards/handwired/pteron/keymaps/FSund/keymap.c +++ b/keyboards/handwired/pteron/keymaps/FSund/keymap.c @@ -10,10 +10,8 @@ enum pteron_layers { #define LOWER MO(_LOWER) #define RAISE MO(_RAISE) -// use S() to produce shifted versions of keys -// #define S(kc) LSFT(kc) // defined by default - // alt gr +#undef G #define G(kc) RALT(kc) // custom keycodes diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 1cffe15d4658..039e8024823f 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -4,9 +4,6 @@ extern keymap_config_t keymap_config; -#define G(X) LGUI(X) -#define A(X) LALT(X) -#define C(X) LCTL(X) #define AC(X) A(C(X)) #define SC(X) S(C(X)) #define _______ KC_TRNS diff --git a/keyboards/planck/keymaps/rai-suta/keymap.c b/keyboards/planck/keymaps/rai-suta/keymap.c index 59fe34b1e451..97da0e80689d 100644 --- a/keyboards/planck/keymaps/rai-suta/keymap.c +++ b/keyboards/planck/keymaps/rai-suta/keymap.c @@ -9,7 +9,6 @@ // Keycode defines #define _______ KC_TRNS #define XXXXXXX KC_NO -#define C(kc) LCTL(kc) // JIS keyboard #define JK_CIRC KC_EQL // ^ #define JK_AT KC_LBRC // @ diff --git a/keyboards/planck/keymaps/zach/zach_common_functions.c b/keyboards/planck/keymaps/zach/zach_common_functions.c index e6aeaa50a31b..e9866883b4b2 100644 --- a/keyboards/planck/keymaps/zach/zach_common_functions.c +++ b/keyboards/planck/keymaps/zach/zach_common_functions.c @@ -8,6 +8,7 @@ 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/preonic/keymaps/zach/zach_common_functions.c b/keyboards/preonic/keymaps/zach/zach_common_functions.c index e6aeaa50a31b..e9866883b4b2 100644 --- a/keyboards/preonic/keymaps/zach/zach_common_functions.c +++ b/keyboards/preonic/keymaps/zach/zach_common_functions.c @@ -8,6 +8,7 @@ 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/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 9f9d35b1c013..0462291c2b17 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -567,9 +567,12 @@ enum quantum_keycodes { #define FUNC(kc) (QK_FUNCTION | (kc)) // Aliases +#define C(kc) LCTL(kc) #define S(kc) LSFT(kc) -#define F(kc) FUNC(kc) +#define A(kc) LALT(kc) +#define G(kc) LGUI(kc) +#define F(kc) FUNC(kc) #define M(kc) (QK_MACRO | (kc)) #define MACROTAP(kc) (QK_MACRO | (FUNC_TAP << 8) | (kc)) From 2e8b32b9b5434c6cee011ef953f3ad3ec8a099e7 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Thu, 10 Jan 2019 12:04:01 +0900 Subject: [PATCH 195/458] move `#include "rgb.h"` from quantum.h to quantum.c I think `quantum.h` should contain only API declarations that `quantum.c` provides externally. `rgb.h` contains function weak definitions. This should not be in `quantum.h`. --- quantum/quantum.c | 5 +++++ quantum/quantum.h | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/quantum/quantum.c b/quantum/quantum.c index 85db100ab4b8..5d8ffe34eb8f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -15,6 +15,11 @@ */ #include "quantum.h" + +#if !defined(RGBLIGHT_ENABLE) && !defined(RGB_MATRIX_ENABLE) + #include "rgb.h" +#endif + #ifdef PROTOCOL_LUFA #include "outputselect.h" #endif diff --git a/quantum/quantum.h b/quantum/quantum.h index f78915fdfbc0..56a6a1a991ad 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -30,9 +30,6 @@ #ifdef BACKLIGHT_ENABLE #include "backlight.h" #endif -#if !defined(RGBLIGHT_ENABLE) && !defined(RGB_MATRIX_ENABLE) - #include "rgb.h" -#endif #ifdef RGBLIGHT_ENABLE #include "rgblight.h" #else From 1d3b9eea940908d02b6c2deda5d744a73cd838da Mon Sep 17 00:00:00 2001 From: walkerstop Date: Fri, 25 Jan 2019 16:57:15 -0700 Subject: [PATCH 196/458] [Keyboard] Support for Wheat Field Peripherals blocked 65% PCB (#4763) * Basic Fanoe support (no LED yet) * Enable RGB lights * Backlighting support * Change to reflect Wheat Field brand of Fanoe PCB * Hot swap variant * Fix review comment issues * Fix review issues * Corrected rules.mk * Change naming to avoid using possibly copyrighted names * Added info.json * Corrected manufacturer name in info.json * Keymap updates * Add layout for use with ws2812b and such * Fixes based on code review --- keyboards/wheatfield/blocked65/blocked65.c | 1 + keyboards/wheatfield/blocked65/blocked65.h | 20 +++++++ keyboards/wheatfield/blocked65/config.h | 53 +++++++++++++++++ keyboards/wheatfield/blocked65/info.json | 13 ++++ .../blocked65/keymaps/default/keymap.c | 25 ++++++++ .../blocked65/keymaps/walker/config.h | 9 +++ .../blocked65/keymaps/walker/keymap.c | 27 +++++++++ keyboards/wheatfield/blocked65/rules.mk | 59 +++++++++++++++++++ 8 files changed, 207 insertions(+) create mode 100755 keyboards/wheatfield/blocked65/blocked65.c create mode 100755 keyboards/wheatfield/blocked65/blocked65.h create mode 100755 keyboards/wheatfield/blocked65/config.h create mode 100644 keyboards/wheatfield/blocked65/info.json create mode 100644 keyboards/wheatfield/blocked65/keymaps/default/keymap.c create mode 100644 keyboards/wheatfield/blocked65/keymaps/walker/config.h create mode 100644 keyboards/wheatfield/blocked65/keymaps/walker/keymap.c create mode 100755 keyboards/wheatfield/blocked65/rules.mk diff --git a/keyboards/wheatfield/blocked65/blocked65.c b/keyboards/wheatfield/blocked65/blocked65.c new file mode 100755 index 000000000000..81da8005b0b6 --- /dev/null +++ b/keyboards/wheatfield/blocked65/blocked65.c @@ -0,0 +1 @@ +#include "blocked65.h" diff --git a/keyboards/wheatfield/blocked65/blocked65.h b/keyboards/wheatfield/blocked65/blocked65.h new file mode 100755 index 000000000000..54b4485b7ea9 --- /dev/null +++ b/keyboards/wheatfield/blocked65/blocked65.h @@ -0,0 +1,20 @@ +#pragma once + +#include "quantum.h" + +#define _x_ KC_NO + +#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, K46, 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, _x_, K2D, K2E }, \ + { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E }, \ +} + diff --git a/keyboards/wheatfield/blocked65/config.h b/keyboards/wheatfield/blocked65/config.h new file mode 100755 index 000000000000..36ec18f1478a --- /dev/null +++ b/keyboards/wheatfield/blocked65/config.h @@ -0,0 +1,53 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Dou +#define PRODUCT Blocked65 +#define DESCRIPTION 65% keyboard with arrow cluster blocker + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + diff --git a/keyboards/wheatfield/blocked65/info.json b/keyboards/wheatfield/blocked65/info.json new file mode 100644 index 000000000000..e3f9c360bf43 --- /dev/null +++ b/keyboards/wheatfield/blocked65/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Wheat Field blocked 65% keyboard", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 16, + "height": 5, + "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":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":"PrScr", "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":"\u2191", "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":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Alt", "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}] + } + } +} diff --git a/keyboards/wheatfield/blocked65/keymaps/default/keymap.c b/keyboards/wheatfield/blocked65/keymaps/default/keymap.c new file mode 100644 index 000000000000..9891d2f63ca9 --- /dev/null +++ b/keyboards/wheatfield/blocked65/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +#define RAISE MO(_RAISE) + +enum layers { + _QWERTY, + _RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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_INSERT, \ + 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_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RAISE, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_RAISE] = 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_PSCR, \ + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, BL_TOGG,KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END) +}; diff --git a/keyboards/wheatfield/blocked65/keymaps/walker/config.h b/keyboards/wheatfield/blocked65/keymaps/walker/config.h new file mode 100644 index 000000000000..e7c26d1d0b33 --- /dev/null +++ b/keyboards/wheatfield/blocked65/keymaps/walker/config.h @@ -0,0 +1,9 @@ +#pragma once + +#define RGB_DI_PIN E2 +#define RGBLIGHT_ANIMATIONS +#undef RGBLED_NUM +#define RGBLED_NUM 72 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c b/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c new file mode 100644 index 000000000000..3dc7a7dbd313 --- /dev/null +++ b/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c @@ -0,0 +1,27 @@ +#include QMK_KEYBOARD_H + +#define RAISE MO(_RAISE) + +enum layers { + _QWERTY, + _RAISE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = 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_INSERT, \ + 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_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RAISE, KC_LEFT, KC_DOWN, KC_RIGHT), + + [_RAISE] = 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_PSCR, \ + KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ + KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, BL_TOGG,KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END) + +}; + diff --git a/keyboards/wheatfield/blocked65/rules.mk b/keyboards/wheatfield/blocked65/rules.mk new file mode 100755 index 000000000000..86525031a01d --- /dev/null +++ b/keyboards/wheatfield/blocked65/rules.mk @@ -0,0 +1,59 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = atmel-dfu + +# Boot Section Size in *bytes* +# 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 = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes +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 From 569ed9db9da5cdc4fc78584b51a66c7689d79806 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 25 Jan 2019 17:11:19 -0800 Subject: [PATCH 197/458] Revert Commit 1d3b9eea940908d02b6c2deda5d744a73cd838da (#4942) Was not supposed to merge 4763 yet This reverts commit 1d3b9eea940908d02b6c2deda5d744a73cd838da. --- keyboards/wheatfield/blocked65/blocked65.c | 1 - keyboards/wheatfield/blocked65/blocked65.h | 20 ------- keyboards/wheatfield/blocked65/config.h | 53 ----------------- keyboards/wheatfield/blocked65/info.json | 13 ---- .../blocked65/keymaps/default/keymap.c | 25 -------- .../blocked65/keymaps/walker/config.h | 9 --- .../blocked65/keymaps/walker/keymap.c | 27 --------- keyboards/wheatfield/blocked65/rules.mk | 59 ------------------- 8 files changed, 207 deletions(-) delete mode 100755 keyboards/wheatfield/blocked65/blocked65.c delete mode 100755 keyboards/wheatfield/blocked65/blocked65.h delete mode 100755 keyboards/wheatfield/blocked65/config.h delete mode 100644 keyboards/wheatfield/blocked65/info.json delete mode 100644 keyboards/wheatfield/blocked65/keymaps/default/keymap.c delete mode 100644 keyboards/wheatfield/blocked65/keymaps/walker/config.h delete mode 100644 keyboards/wheatfield/blocked65/keymaps/walker/keymap.c delete mode 100755 keyboards/wheatfield/blocked65/rules.mk diff --git a/keyboards/wheatfield/blocked65/blocked65.c b/keyboards/wheatfield/blocked65/blocked65.c deleted file mode 100755 index 81da8005b0b6..000000000000 --- a/keyboards/wheatfield/blocked65/blocked65.c +++ /dev/null @@ -1 +0,0 @@ -#include "blocked65.h" diff --git a/keyboards/wheatfield/blocked65/blocked65.h b/keyboards/wheatfield/blocked65/blocked65.h deleted file mode 100755 index 54b4485b7ea9..000000000000 --- a/keyboards/wheatfield/blocked65/blocked65.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define _x_ KC_NO - -#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, K46, 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, _x_, K2D, K2E }, \ - { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E }, \ -} - diff --git a/keyboards/wheatfield/blocked65/config.h b/keyboards/wheatfield/blocked65/config.h deleted file mode 100755 index 36ec18f1478a..000000000000 --- a/keyboards/wheatfield/blocked65/config.h +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Dou -#define PRODUCT Blocked65 -#define DESCRIPTION 65% keyboard with arrow cluster blocker - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* 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 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 - diff --git a/keyboards/wheatfield/blocked65/info.json b/keyboards/wheatfield/blocked65/info.json deleted file mode 100644 index e3f9c360bf43..000000000000 --- a/keyboards/wheatfield/blocked65/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Wheat Field blocked 65% keyboard", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 16, - "height": 5, - "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":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":"PrScr", "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":"\u2191", "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":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Alt", "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}] - } - } -} diff --git a/keyboards/wheatfield/blocked65/keymaps/default/keymap.c b/keyboards/wheatfield/blocked65/keymaps/default/keymap.c deleted file mode 100644 index 9891d2f63ca9..000000000000 --- a/keyboards/wheatfield/blocked65/keymaps/default/keymap.c +++ /dev/null @@ -1,25 +0,0 @@ -#include QMK_KEYBOARD_H - -#define RAISE MO(_RAISE) - -enum layers { - _QWERTY, - _RAISE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = 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_INSERT, \ - 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_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RAISE, KC_LEFT, KC_DOWN, KC_RIGHT), - - [_RAISE] = 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_PSCR, \ - KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ - KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, BL_TOGG,KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END) -}; diff --git a/keyboards/wheatfield/blocked65/keymaps/walker/config.h b/keyboards/wheatfield/blocked65/keymaps/walker/config.h deleted file mode 100644 index e7c26d1d0b33..000000000000 --- a/keyboards/wheatfield/blocked65/keymaps/walker/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#undef RGBLED_NUM -#define RGBLED_NUM 72 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c b/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c deleted file mode 100644 index 3dc7a7dbd313..000000000000 --- a/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c +++ /dev/null @@ -1,27 +0,0 @@ -#include QMK_KEYBOARD_H - -#define RAISE MO(_RAISE) - -enum layers { - _QWERTY, - _RAISE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = 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_INSERT, \ - 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_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, RAISE, KC_LEFT, KC_DOWN, KC_RIGHT), - - [_RAISE] = 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_PSCR, \ - KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ - KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, BL_TOGG,KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END) - -}; - diff --git a/keyboards/wheatfield/blocked65/rules.mk b/keyboards/wheatfield/blocked65/rules.mk deleted file mode 100755 index 86525031a01d..000000000000 --- a/keyboards/wheatfield/blocked65/rules.mk +++ /dev/null @@ -1,59 +0,0 @@ -# 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 - -# Boot Section Size in *bytes* -# 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 = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes -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 From 7aba1fd1767ecd7df25323c51332c7af986a3805 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 25 Jan 2019 17:11:49 -0800 Subject: [PATCH 198/458] Fix RGBLIGHT_SLEEP function (#4865) * Only re-enable RGBLIGHT if it was on when going to sleep * Reformat file to follow QMK Standards * Fix check, since this is a loop, whoops Much thanks to @Rockman18 for catching this and posting the additional code! --- tmk_core/common/avr/suspend.c | 47 ++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 5bca64685493..28219f4ddd7b 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -11,6 +11,9 @@ #include "led.h" #include "host.h" #include "rgblight_reconfig.h" +#ifdef SPLIT_KEYBOARD + #include "split_flags.h" +#endif #ifdef PROTOCOL_LUFA #include "lufa.h" @@ -22,6 +25,9 @@ #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) #include "rgblight.h" + extern rgblight_config_t rgblight_config; + static bool rgblight_enabled; + static bool is_suspended; #endif @@ -46,8 +52,7 @@ __asm__ __volatile__ ( \ * * FIXME: needs doc */ -void suspend_idle(uint8_t time) -{ +void suspend_idle(uint8_t time) { cli(); set_sleep_mode(SLEEP_MODE_IDLE); sleep_enable(); @@ -95,8 +100,7 @@ static uint8_t wdt_timeout = 0; * * FIXME: needs doc */ -static void power_down(uint8_t wdto) -{ +static void power_down(uint8_t wdto) { #ifdef PROTOCOL_LUFA if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif @@ -120,7 +124,14 @@ static void power_down(uint8_t wdto) #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif - rgblight_disable_noeeprom(); + if (!is_suspended) { + is_suspended = true; + rgblight_enabled = rgblight_config.enable; + rgblight_disable_noeeprom(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif + } #endif suspend_power_down_kb(); @@ -145,8 +156,7 @@ static void power_down(uint8_t wdto) * * FIXME: needs doc */ -void suspend_power_down(void) -{ +void suspend_power_down(void) { suspend_power_down_kb(); #ifndef NO_SUSPEND_POWER_DOWN @@ -156,8 +166,7 @@ void suspend_power_down(void) __attribute__ ((weak)) void matrix_power_up(void) {} __attribute__ ((weak)) void matrix_power_down(void) {} -bool suspend_wakeup_condition(void) -{ +bool suspend_wakeup_condition(void) { matrix_power_up(); matrix_scan(); matrix_power_down(); @@ -186,8 +195,7 @@ void suspend_wakeup_init_kb(void) { * * FIXME: needs doc */ -void suspend_wakeup_init(void) -{ +void suspend_wakeup_init(void) { // clear keyboard state clear_keyboard(); #ifdef BACKLIGHT_ENABLE @@ -195,10 +203,16 @@ void suspend_wakeup_init(void) #endif led_set(host_keyboard_leds()); #if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) -#ifdef BOOTLOADER_TEENSY - wait_ms(10); -#endif - rgblight_enable_noeeprom(); + is_suspended = false; + if (rgblight_enabled) { + #ifdef BOOTLOADER_TEENSY + wait_ms(10); + #endif + rgblight_enable_noeeprom(); + #ifdef SPLIT_KEYBOARD + RGB_DIRTY = true; + #endif + } #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); #endif @@ -208,8 +222,7 @@ void suspend_wakeup_init(void) #ifndef NO_SUSPEND_POWER_DOWN /* watchdog timeout */ -ISR(WDT_vect) -{ +ISR(WDT_vect) { // compensate timer for sleep switch (wdt_timeout) { case WDTO_15MS: From 39ca330f103bf85fd29b0fb595469221c9c3680c Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sat, 26 Jan 2019 16:56:01 +1100 Subject: [PATCH 199/458] 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 200/458] 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 201/458] 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 202/458] 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 203/458] 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 204/458] 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 205/458] 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 206/458] 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 207/458] 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 208/458] 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 209/458] 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 210/458] 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 211/458] 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 212/458] 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 213/458] 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 0772b4932c9ab2734e51cdff58a566bf6b3bc922 Mon Sep 17 00:00:00 2001 From: Chuck Lauer Vose Date: Sat, 26 Jan 2019 07:55:42 -0800 Subject: [PATCH 214/458] [Keymap] Add userspace files for vosechu (#4912) * Add userspace files for vosechu * Code review corrections * Few more code review corrections --- users/vosechu/config.h | 24 ++++++++++++++ users/vosechu/readme.md | 14 ++++++++ users/vosechu/rules.mk | 1 + users/vosechu/vosechu.c | 25 +++++++++++++++ users/vosechu/vosechu.h | 71 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 users/vosechu/config.h create mode 100644 users/vosechu/readme.md create mode 100644 users/vosechu/rules.mk create mode 100644 users/vosechu/vosechu.c create mode 100644 users/vosechu/vosechu.h diff --git a/users/vosechu/config.h b/users/vosechu/config.h new file mode 100644 index 000000000000..837cc60ff7c1 --- /dev/null +++ b/users/vosechu/config.h @@ -0,0 +1,24 @@ +#pragma once + +// 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.) +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD +//#define TAPPING_FORCE_HOLD +//#define RETRO_TAPPING + +#ifndef TAPPING_TOGGLE +#define TAPPING_TOGGLE 2 +#endif + +#ifdef TAPPING_TERM +#undef TAPPING_TERM +#endif +#define TAPPING_TERM 150 + +// Disable action_get_macro and fn_actions, since we don't use these +// and it saves on space in the firmware. +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/users/vosechu/readme.md b/users/vosechu/readme.md new file mode 100644 index 000000000000..44789a9ff2c8 --- /dev/null +++ b/users/vosechu/readme.md @@ -0,0 +1,14 @@ +Copyright 2018 Chuck Lauer Vose vosechu@gmail.com @vosechu + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/users/vosechu/rules.mk b/users/vosechu/rules.mk new file mode 100644 index 000000000000..e346db93fb81 --- /dev/null +++ b/users/vosechu/rules.mk @@ -0,0 +1 @@ +SRC += vosechu.c diff --git a/users/vosechu/vosechu.c b/users/vosechu/vosechu.c new file mode 100644 index 000000000000..3f58ca26a8d1 --- /dev/null +++ b/users/vosechu/vosechu.c @@ -0,0 +1,25 @@ +#include "vosechu.h" + +// void my_custom_function(void) { + +// } + +// [DV] = { /* ================================================== DVORAK ============================================================ */ +// { KC_1, KC_A, KC_B, KC_C, KC_D, KC_E, _______ , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, +// { KC_2, KC_A, KC_B, KC_C, KC_D, KC_E, _______ , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, +// { KC_3, KC_A, KC_B, KC_C, KC_D, KC_E, _______ , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, +// { KC_4, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M }, +// { KC_5, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F , KC_G, KC_H, KC_J, KC_K, KC_L, KC_M } +// }, + +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// if (record->event.pressed) { +// // These also need to be defined in the header file +// switch(keycode) { +// case PAWFIVE: +// SEND_STRING(":pawfive:"); +// return false; +// } +// } +// return true; +// }; diff --git a/users/vosechu/vosechu.h b/users/vosechu/vosechu.h new file mode 100644 index 000000000000..5cd2217ea19c --- /dev/null +++ b/users/vosechu/vosechu.h @@ -0,0 +1,71 @@ +#pragma once + +#include "quantum.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +enum userspace_custom_layers { + DV = 0, + QW, + GAM1, + RSE, + LWR, + LFT, + MOUSE +}; + +enum userspace_custom_keycodes { + PAWFIVE = SAFE_RANGE, + MOUKEY, + MS_BTN1, + MS_BTN2, + MS_BTN3 +}; + +// Transparent macro to indicate that this spot is already being pressed +// to activate this layer +#define _LAYER_ KC_TRNS + +// == Dual-action keys on most of the modifiers +#define CTL_ESC CTL_T(KC_ESC) +#define CTL_GRV CTL_T(KC_GRV) +#define ALT_TAB ALT_T(KC_TAB) +#define SFT_SPC SFT_T(KC_SPC) + +// == Macro keys for commonly used apps +// -- Slack +// Move one conversation up/down +#define SLACKUP LALT(LSFT(KC_UP)) +#define SLACKDN LALT(LSFT(KC_DOWN)) + +// -- Browser and OS X +// Activate one tab left/right +#define TAB_LFT LGUI(LSFT(KC_LBRC)) +#define TAB_RGT LGUI(LSFT(KC_RBRC)) +// Go back/forward in history +#define BWSR_BK LGUI(KC_LBRC) +#define BWSR_FW LGUI(KC_RBRC) + +// -- Screen management +// Make window fill the left/right side +#define SCR_LFT HYPR(KC_LEFT) +#define SCR_RGT HYPR(KC_RGHT) +// Make window fill the whole monitor +#define SCR_FUL HYPR(KC_F) + +// == Extended alpha layer toggles +// -- Dvorak +// Pressing U opens up the LWR layer (numpad) +#define LWR_U LT(LWR, KC_U) +// Pressing H opens up the RSE layer (brackets/parens) +#define RSE_H LT(RSE, KC_H) + +// -- Qwerty +// Pressing F opens up the LWR layer (numpad) +#define LWR_F LT(LWR, KC_F) +// Pressing J opens up the RSE layer (brackets/parens) +#define RSE_J LT(RSE, KC_J) + +// -- LFT layer (Works on both Qwerty and Dvorak) +// Pressing Back space or Enter opens up the LFT layer (media/navigation) +#define LFT_BK LT(LFT, KC_BSPC) +#define LFT_ENT LT(LFT, KC_ENT) From 8da9d3330e7904c57b240cfb1b2d3312ad81ccf9 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Fri, 25 Jan 2019 19:18:14 -0500 Subject: [PATCH 215/458] use built-in arm stuff --- .../rev3/boards/GENERIC_STM32_F303XC/board.c | 126 -- .../rev3/boards/GENERIC_STM32_F303XC/board.h | 1187 ----------------- .../rev3/boards/GENERIC_STM32_F303XC/board.mk | 5 - keyboards/preonic/rev3/bootloader_defs.h | 7 - keyboards/preonic/rev3/chconf.h | 520 -------- keyboards/preonic/rev3/config.h | 4 + keyboards/preonic/rev3/halconf.h | 388 ------ keyboards/preonic/rev3/matrix.c | 22 - keyboards/preonic/rev3/mcuconf.h | 257 ---- keyboards/preonic/rev3/rules.mk | 48 +- 10 files changed, 12 insertions(+), 2552 deletions(-) delete mode 100644 keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.c delete mode 100644 keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.h delete mode 100644 keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.mk delete mode 100644 keyboards/preonic/rev3/bootloader_defs.h delete mode 100644 keyboards/preonic/rev3/chconf.h delete mode 100644 keyboards/preonic/rev3/halconf.h delete mode 100644 keyboards/preonic/rev3/mcuconf.h diff --git a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.c b/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.c deleted file mode 100644 index 4331155df4b6..000000000000 --- a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.c +++ /dev/null @@ -1,126 +0,0 @@ -/* - 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. -*/ - -#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_SDC || defined(__DOXYGEN__) -/** - * @brief SDC card detection. - */ -bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return true; -} - -/** - * @brief SDC card write protection detection. - */ -bool sdc_lld_is_write_protected(SDCDriver *sdcp) { - - (void)sdcp; - /* TODO: Fill the implementation.*/ - return false; -} -#endif /* HAL_USE_SDC */ - -#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/preonic/rev3/boards/GENERIC_STM32_F303XC/board.h b/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.h deleted file mode 100644 index ec26557f3a62..000000000000 --- a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.h +++ /dev/null @@ -1,1187 +0,0 @@ -/* - 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 _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for Clueboard 60% Keyboard - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Planck PCB" - -/* - * Board oscillators-related settings. - * NOTE: LSE not fitted. - */ -#if !defined(STM32_LSECLK) -#define STM32_LSECLK 0U -#endif - -#define STM32_LSEDRV (3U << 3U) - -#if !defined(STM32_HSECLK) -#define STM32_HSECLK 8000000U -#endif - -// #define STM32_HSE_BYPASS - -/* - * MCU type as defined in the ST header. - */ -#define STM32F303xC - -/* - * IO pins assignments. - */ -#define GPIOA_PIN0 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_PIN13 13U -#define GPIOB_PIN14 14U -#define GPIOB_PIN15 15U - -#define GPIOC_PIN0 0U -#define GPIOC_PIN1 1U -#define GPIOC_PIN2 2U -#define GPIOC_PIN3 3U -#define GPIOC_PIN4 4U -#define GPIOC_PIN5 5U -#define GPIOC_PIN6 6U -#define GPIOC_PIN7 7U -#define GPIOC_PIN8 8U -#define GPIOC_PIN9 9U -#define GPIOC_PIN10 10U -#define GPIOC_PIN11 11U -#define GPIOC_PIN12 12U -#define GPIOC_PIN13 13U -#define GPIOC_PIN14 14U -#define GPIOC_PIN15 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_I2C2_SDA 0U -#define GPIOF_I2C2_SCL 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 - -#define GPIOG_PIN0 0U -#define GPIOG_PIN1 1U -#define GPIOG_PIN2 2U -#define GPIOG_PIN3 3U -#define GPIOG_PIN4 4U -#define GPIOG_PIN5 5U -#define GPIOG_PIN6 6U -#define GPIOG_PIN7 7U -#define GPIOG_PIN8 8U -#define GPIOG_PIN9 9U -#define GPIOG_PIN10 10U -#define GPIOG_PIN11 11U -#define GPIOG_PIN12 12U -#define GPIOG_PIN13 13U -#define GPIOG_PIN14 14U -#define GPIOG_PIN15 15U - -#define GPIOH_PIN0 0U -#define GPIOH_PIN1 1U -#define GPIOH_PIN2 2U -#define GPIOH_PIN3 3U -#define GPIOH_PIN4 4U -#define GPIOH_PIN5 5U -#define GPIOH_PIN6 6U -#define GPIOH_PIN7 7U -#define GPIOH_PIN8 8U -#define GPIOH_PIN9 9U -#define GPIOH_PIN10 10U -#define GPIOH_PIN11 11U -#define GPIOH_PIN12 12U -#define GPIOH_PIN13 13U -#define GPIOH_PIN14 14U -#define GPIOH_PIN15 15U - -/* - * IO lines assignments. - */ -#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) -#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_PIN6 PAL_LINE(GPIOF, 0U) -#define LINE_PIN7 PAL_LINE(GPIOF, 1U) - -#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) - - -/* - * 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 - NC - * PA1 - NC - * PA2 - COL1 - * PA3 - COL2 - * PA4 - SPEAKER1 - * PA5 - SPEAKER2 - * PA6 - COL3 - * PA7 - COL8 - * PA8 - COL6 - * PA9 - COL7 - * PA10 - ROW5 - * PA11 - USB_DM (alternate 14). - * PA12 - USB_DP (alternate 14). - * PA13 - SWDIO (alternate 0). - * PA14 - SWCLK (alternate 0). - * PA15 - ROW4 - */ -#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ - PIN_MODE_ALTERNATE(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_ALTERNATE(GPIOA_USB_DM) | \ - PIN_MODE_ALTERNATE(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_PIN0) | \ - 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_PIN0) | \ - PIN_OSPEED_HIGH(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_HIGH(GPIOA_USB_DM) | \ - PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ - PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ - PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ - PIN_OSPEED_VERYLOW(GPIOA_PIN15)) -#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ - PIN_PUPDR_FLOATING(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_FLOATING(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_PIN0) | \ - 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_PIN0, 0) | \ - PIN_AFIO_AF(GPIOA_PIN1, 1) | \ - PIN_AFIO_AF(GPIOA_PIN2, 0) | \ - PIN_AFIO_AF(GPIOA_PIN3, 0) | \ - PIN_AFIO_AF(GPIOA_PIN4, 0) | \ - PIN_AFIO_AF(GPIOA_PIN5, 5) | \ - PIN_AFIO_AF(GPIOA_PIN6, 5) | \ - PIN_AFIO_AF(GPIOA_PIN7, 5)) -#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ - PIN_AFIO_AF(GPIOA_PIN9, 0) | \ - PIN_AFIO_AF(GPIOA_PIN10, 0) | \ - PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ - PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ - PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ - PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ - PIN_AFIO_AF(GPIOA_PIN15, 0)) - -/* - * GPIOB setup: - * - * PB0 - PIN0 (input pullup). - * PB1 - PIN1 (input pullup). - * PB2 - PIN2 (input pullup). - * PB3 - PIN3 (alternate 0). - * PB4 - PIN4 (input pullup). - * PB5 - PIN5 (input pullup). - * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). - * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). - * PB8 - PIN8 (input pullup). - * PB9 - PIN9 (input pullup). - * PB10 - PIN10 (input pullup). - * PB11 - PIN11 (input pullup). - * PB12 - PIN12 (input pullup). - * PB13 - PIN13 (input pullup). - * PB14 - PIN14 (input pullup). - * PB15 - PIN15 (input pullup). - */ -#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ - PIN_MODE_INPUT(GPIOB_PIN1) | \ - PIN_MODE_INPUT(GPIOB_PIN2) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ - PIN_MODE_INPUT(GPIOB_PIN4) | \ - PIN_MODE_INPUT(GPIOB_PIN5) | \ - PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ - PIN_MODE_OUTPUT(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_INPUT(GPIOB_PIN13) | \ - PIN_MODE_INPUT(GPIOB_PIN14) | \ - PIN_MODE_INPUT(GPIOB_PIN15)) -#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_OPENDRAIN(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_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) -#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ - PIN_OSPEED_HIGH(GPIOB_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ - PIN_OSPEED_HIGH(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_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOB_PIN15)) -#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ - PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ - PIN_PUPDR_PULLDOWN(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_PULLUP(GPIOB_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOB_PIN15)) -#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_LOW(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_PIN13) | \ - PIN_ODR_HIGH(GPIOB_PIN14) | \ - PIN_ODR_HIGH(GPIOB_PIN15)) -#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ - PIN_AFIO_AF(GPIOB_PIN1, 0) | \ - PIN_AFIO_AF(GPIOB_PIN2, 0) | \ - PIN_AFIO_AF(GPIOB_PIN3, 0) | \ - PIN_AFIO_AF(GPIOB_PIN4, 0) | \ - PIN_AFIO_AF(GPIOB_PIN5, 0) | \ - PIN_AFIO_AF(GPIOB_PIN6, 4) | \ - PIN_AFIO_AF(GPIOB_PIN7, 0)) -#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ - PIN_AFIO_AF(GPIOB_PIN9, 0) | \ - PIN_AFIO_AF(GPIOB_PIN10, 0) | \ - PIN_AFIO_AF(GPIOB_PIN11, 0) | \ - PIN_AFIO_AF(GPIOB_PIN12, 0) | \ - PIN_AFIO_AF(GPIOB_PIN13, 0) | \ - PIN_AFIO_AF(GPIOB_PIN14, 0) | \ - PIN_AFIO_AF(GPIOB_PIN15, 0)) - -/* - * GPIOC setup: - * - * PC0 - PIN0 (input pullup). - * PC1 - PIN1 (input pullup). - * PC2 - PIN2 (input pullup). - * PC3 - PIN3 (input pullup). - * PC4 - PIN4 (input pullup). - * PC5 - PIN5 (input pullup). - * PC6 - PIN6 (input pullup). - * PC7 - PIN7 (input pullup). - * PC8 - PIN8 (input pullup). - * PC9 - PIN9 (input pullup). - * PC10 - PIN10 (input pullup). - * PC11 - PIN11 (input pullup). - * PC12 - PIN12 (input pullup). - * PC13 - PIN13 (input pullup). - * PC14 - PIN14 (input floating). - * PC15 - PIN15 (input floating). - */ -#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ - 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_INPUT(GPIOC_PIN6) | \ - PIN_MODE_INPUT(GPIOC_PIN7) | \ - PIN_MODE_INPUT(GPIOC_PIN8) | \ - PIN_MODE_INPUT(GPIOC_PIN9) | \ - PIN_MODE_INPUT(GPIOC_PIN10) | \ - PIN_MODE_INPUT(GPIOC_PIN11) | \ - PIN_MODE_INPUT(GPIOC_PIN12) | \ - PIN_MODE_INPUT(GPIOC_PIN13) | \ - PIN_MODE_INPUT(GPIOC_PIN14) | \ - PIN_MODE_INPUT(GPIOC_PIN15)) -#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ - 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_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) -#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ - 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_VERYLOW(GPIOC_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ - PIN_OSPEED_HIGH(GPIOC_PIN14) | \ - PIN_OSPEED_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ - 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_PULLUP(GPIOC_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ - PIN_PUPDR_FLOATING(GPIOC_PIN15)) -#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ - 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_HIGH(GPIOC_PIN6) | \ - PIN_ODR_HIGH(GPIOC_PIN7) | \ - PIN_ODR_HIGH(GPIOC_PIN8) | \ - PIN_ODR_HIGH(GPIOC_PIN9) | \ - PIN_ODR_HIGH(GPIOC_PIN10) | \ - PIN_ODR_HIGH(GPIOC_PIN11) | \ - PIN_ODR_HIGH(GPIOC_PIN12) | \ - PIN_ODR_HIGH(GPIOC_PIN13) | \ - PIN_ODR_HIGH(GPIOC_PIN14) | \ - PIN_ODR_HIGH(GPIOC_PIN15)) -#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ - PIN_AFIO_AF(GPIOC_PIN1, 0) | \ - PIN_AFIO_AF(GPIOC_PIN2, 0) | \ - PIN_AFIO_AF(GPIOC_PIN3, 0) | \ - PIN_AFIO_AF(GPIOC_PIN4, 0) | \ - PIN_AFIO_AF(GPIOC_PIN5, 0) | \ - PIN_AFIO_AF(GPIOC_PIN6, 0) | \ - PIN_AFIO_AF(GPIOC_PIN7, 0)) -#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ - PIN_AFIO_AF(GPIOC_PIN9, 0) | \ - PIN_AFIO_AF(GPIOC_PIN10, 0) | \ - PIN_AFIO_AF(GPIOC_PIN11, 0) | \ - PIN_AFIO_AF(GPIOC_PIN12, 0) | \ - PIN_AFIO_AF(GPIOC_PIN13, 0) | \ - PIN_AFIO_AF(GPIOC_PIN14, 0) | \ - PIN_AFIO_AF(GPIOC_PIN15, 0)) - -/* - * 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). - * PD11 - 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, 0) | \ - PIN_AFIO_AF(GPIOD_PIN1, 0) | \ - PIN_AFIO_AF(GPIOD_PIN2, 0) | \ - PIN_AFIO_AF(GPIOD_PIN3, 0) | \ - PIN_AFIO_AF(GPIOD_PIN4, 0) | \ - PIN_AFIO_AF(GPIOD_PIN5, 0) | \ - PIN_AFIO_AF(GPIOD_PIN6, 0) | \ - PIN_AFIO_AF(GPIOD_PIN7, 0)) -#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ - PIN_AFIO_AF(GPIOD_PIN9, 0) | \ - PIN_AFIO_AF(GPIOD_PIN10, 0) | \ - PIN_AFIO_AF(GPIOD_PIN11, 0) | \ - PIN_AFIO_AF(GPIOD_PIN12, 0) | \ - PIN_AFIO_AF(GPIOD_PIN13, 0) | \ - PIN_AFIO_AF(GPIOD_PIN14, 0) | \ - PIN_AFIO_AF(GPIOD_PIN15, 0)) - -/* - * GPIOE setup: - * - * PE0 - PIN0 (input pullup). - * PE1 - PIN1 (input pullup). - * PE2 - PIN2 (input pullup). - * PE3 - PIN3 L3GD20_CS (output pushpull maximum). - * PE4 - PIN4 (input pullup). - * PE5 - PIN5 (input pullup). - * PE6 - PIN6 (input pullup). - * PE7 - PIN7 (input pullup). - * PE8 - PIN8 (output pushpull maximum). - * PE9 - PIN9 (output pushpull maximum). - * PE10 - PIN10 (output pushpull maximum). - * PE11 - PIN11 (output pushpull maximum). - * PE12 - PIN12 (output pushpull maximum). - * PE13 - PIN13 (output pushpull maximum). - * PE14 - PIN14 (output pushpull maximum). - * PE15 - PIN15 (output pushpull maximum). - */ -#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ - PIN_MODE_INPUT(GPIOE_PIN1) | \ - PIN_MODE_INPUT(GPIOE_PIN2) |\ - PIN_MODE_OUTPUT(GPIOE_PIN3) | \ - PIN_MODE_INPUT(GPIOE_PIN4) |\ - PIN_MODE_INPUT(GPIOE_PIN5) |\ - PIN_MODE_INPUT(GPIOE_PIN6) | \ - PIN_MODE_INPUT(GPIOE_PIN7) | \ - PIN_MODE_OUTPUT(GPIOE_PIN8) | \ - PIN_MODE_OUTPUT(GPIOE_PIN9) | \ - PIN_MODE_OUTPUT(GPIOE_PIN10) | \ - PIN_MODE_OUTPUT(GPIOE_PIN11) | \ - PIN_MODE_OUTPUT(GPIOE_PIN12) | \ - PIN_MODE_OUTPUT(GPIOE_PIN13) | \ - PIN_MODE_OUTPUT(GPIOE_PIN14) | \ - PIN_MODE_OUTPUT(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_HIGH(GPIOE_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ - PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ - PIN_OSPEED_HIGH(GPIOE_PIN8) | \ - PIN_OSPEED_HIGH(GPIOE_PIN9) | \ - PIN_OSPEED_HIGH(GPIOE_PIN10) | \ - PIN_OSPEED_HIGH(GPIOE_PIN11) | \ - PIN_OSPEED_HIGH(GPIOE_PIN12) | \ - PIN_OSPEED_HIGH(GPIOE_PIN13) | \ - PIN_OSPEED_HIGH(GPIOE_PIN14) | \ - PIN_OSPEED_HIGH(GPIOE_PIN15)) -#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ - PIN_PUPDR_FLOATING(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_FLOATING(GPIOE_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ - PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ - PIN_PUPDR_FLOATING(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_LOW(GPIOE_PIN8) | \ - PIN_ODR_LOW(GPIOE_PIN9) | \ - PIN_ODR_LOW(GPIOE_PIN10) | \ - PIN_ODR_LOW(GPIOE_PIN11) | \ - PIN_ODR_LOW(GPIOE_PIN12) | \ - PIN_ODR_LOW(GPIOE_PIN13) | \ - PIN_ODR_LOW(GPIOE_PIN14) | \ - PIN_ODR_LOW(GPIOE_PIN15)) -#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ - PIN_AFIO_AF(GPIOE_PIN1, 0) | \ - PIN_AFIO_AF(GPIOE_PIN2, 0) |\ - PIN_AFIO_AF(GPIOE_PIN3, 0) | \ - PIN_AFIO_AF(GPIOE_PIN4, 0) |\ - PIN_AFIO_AF(GPIOE_PIN5, 0) |\ - PIN_AFIO_AF(GPIOE_PIN6, 0) | \ - PIN_AFIO_AF(GPIOE_PIN7, 0)) -#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ - PIN_AFIO_AF(GPIOE_PIN9, 0) | \ - PIN_AFIO_AF(GPIOE_PIN10, 0) | \ - PIN_AFIO_AF(GPIOE_PIN11, 0) | \ - PIN_AFIO_AF(GPIOE_PIN12, 0) | \ - PIN_AFIO_AF(GPIOE_PIN13, 0) | \ - PIN_AFIO_AF(GPIOE_PIN14, 0) | \ - PIN_AFIO_AF(GPIOE_PIN15, 0)) - -/* - * GPIOF setup: - * - * PF0 - I2C2_SDA (input floating). - * PF1 - I2C2_SCL (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_I2C2_SDA) | \ - PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ - 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_HIGH(GPIOF_I2C2_SDA) | \ - PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA) | \ - PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ - 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_I2C2_SDA, 0) | \ - PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ - PIN_AFIO_AF(GPIOF_PIN2, 0) | \ - PIN_AFIO_AF(GPIOF_PIN3, 0) | \ - PIN_AFIO_AF(GPIOF_PIN4, 0) | \ - PIN_AFIO_AF(GPIOF_PIN5, 0) | \ - PIN_AFIO_AF(GPIOF_PIN6, 0) | \ - PIN_AFIO_AF(GPIOF_PIN7, 0)) -#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ - PIN_AFIO_AF(GPIOF_PIN9, 0) | \ - PIN_AFIO_AF(GPIOF_PIN10, 0) | \ - PIN_AFIO_AF(GPIOF_PIN11, 0) | \ - PIN_AFIO_AF(GPIOF_PIN12, 0) | \ - PIN_AFIO_AF(GPIOF_PIN13, 0) | \ - PIN_AFIO_AF(GPIOF_PIN14, 0) | \ - PIN_AFIO_AF(GPIOF_PIN15, 0)) - -/* - * GPIOG setup: - * - * PG0 - PIN0 (input pullup). - * PG1 - PIN1 (input pullup). - * PG2 - PIN2 (input pullup). - * PG3 - PIN3 (input pullup). - * PG4 - PIN4 (input pullup). - * PG5 - PIN5 (input pullup). - * PG6 - PIN6 (input pullup). - * PG7 - PIN7 (input pullup). - * PG8 - PIN8 (input pullup). - * PG9 - PIN9 (input pullup). - * PG10 - PIN10 (input pullup). - * PG11 - PIN11 (input pullup). - * PG12 - PIN12 (input pullup). - * PG13 - PIN13 (input pullup). - * PG14 - PIN14 (input pullup). - * PG15 - PIN15 (input pullup). - */ -#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ - PIN_MODE_INPUT(GPIOG_PIN1) | \ - PIN_MODE_INPUT(GPIOG_PIN2) | \ - PIN_MODE_INPUT(GPIOG_PIN3) | \ - PIN_MODE_INPUT(GPIOG_PIN4) | \ - PIN_MODE_INPUT(GPIOG_PIN5) | \ - PIN_MODE_INPUT(GPIOG_PIN6) | \ - PIN_MODE_INPUT(GPIOG_PIN7) | \ - PIN_MODE_INPUT(GPIOG_PIN8) | \ - PIN_MODE_INPUT(GPIOG_PIN9) | \ - PIN_MODE_INPUT(GPIOG_PIN10) | \ - PIN_MODE_INPUT(GPIOG_PIN11) | \ - PIN_MODE_INPUT(GPIOG_PIN12) | \ - PIN_MODE_INPUT(GPIOG_PIN13) | \ - PIN_MODE_INPUT(GPIOG_PIN14) | \ - PIN_MODE_INPUT(GPIOG_PIN15)) -#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) -#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOG_PIN15)) -#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOG_PIN15)) -#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ - PIN_ODR_HIGH(GPIOG_PIN1) | \ - PIN_ODR_HIGH(GPIOG_PIN2) | \ - PIN_ODR_HIGH(GPIOG_PIN3) | \ - PIN_ODR_HIGH(GPIOG_PIN4) | \ - PIN_ODR_HIGH(GPIOG_PIN5) | \ - PIN_ODR_HIGH(GPIOG_PIN6) | \ - PIN_ODR_HIGH(GPIOG_PIN7) | \ - PIN_ODR_HIGH(GPIOG_PIN8) | \ - PIN_ODR_HIGH(GPIOG_PIN9) | \ - PIN_ODR_HIGH(GPIOG_PIN10) | \ - PIN_ODR_HIGH(GPIOG_PIN11) | \ - PIN_ODR_HIGH(GPIOG_PIN12) | \ - PIN_ODR_HIGH(GPIOG_PIN13) | \ - PIN_ODR_HIGH(GPIOG_PIN14) | \ - PIN_ODR_HIGH(GPIOG_PIN15)) -#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ - PIN_AFIO_AF(GPIOG_PIN1, 0) | \ - PIN_AFIO_AF(GPIOG_PIN2, 0) | \ - PIN_AFIO_AF(GPIOG_PIN3, 0) | \ - PIN_AFIO_AF(GPIOG_PIN4, 0) | \ - PIN_AFIO_AF(GPIOG_PIN5, 0) | \ - PIN_AFIO_AF(GPIOG_PIN6, 0) | \ - PIN_AFIO_AF(GPIOG_PIN7, 0)) -#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ - PIN_AFIO_AF(GPIOG_PIN9, 0) | \ - PIN_AFIO_AF(GPIOG_PIN10, 0) | \ - PIN_AFIO_AF(GPIOG_PIN11, 0) | \ - PIN_AFIO_AF(GPIOG_PIN12, 0) | \ - PIN_AFIO_AF(GPIOG_PIN13, 0) | \ - PIN_AFIO_AF(GPIOG_PIN14, 0) | \ - PIN_AFIO_AF(GPIOG_PIN15, 0)) - -/* - * GPIOH setup: - * - * PH0 - PIN0 (input pullup). - * PH1 - PIN1 (input pullup). - * PH2 - PIN2 (input pullup). - * PH3 - PIN3 (input pullup). - * PH4 - PIN4 (input pullup). - * PH5 - PIN5 (input pullup). - * PH6 - PIN6 (input pullup). - * PH7 - PIN7 (input pullup). - * PH8 - PIN8 (input pullup). - * PH9 - PIN9 (input pullup). - * PH10 - PIN10 (input pullup). - * PH11 - PIN11 (input pullup). - * PH12 - PIN12 (input pullup). - * PH13 - PIN13 (input pullup). - * PH14 - PIN14 (input pullup). - * PH15 - PIN15 (input pullup). - */ -#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ - PIN_MODE_INPUT(GPIOH_PIN1) | \ - PIN_MODE_INPUT(GPIOH_PIN2) | \ - PIN_MODE_INPUT(GPIOH_PIN3) | \ - PIN_MODE_INPUT(GPIOH_PIN4) | \ - PIN_MODE_INPUT(GPIOH_PIN5) | \ - PIN_MODE_INPUT(GPIOH_PIN6) | \ - PIN_MODE_INPUT(GPIOH_PIN7) | \ - PIN_MODE_INPUT(GPIOH_PIN8) | \ - PIN_MODE_INPUT(GPIOH_PIN9) | \ - PIN_MODE_INPUT(GPIOH_PIN10) | \ - PIN_MODE_INPUT(GPIOH_PIN11) | \ - PIN_MODE_INPUT(GPIOH_PIN12) | \ - PIN_MODE_INPUT(GPIOH_PIN13) | \ - PIN_MODE_INPUT(GPIOH_PIN14) | \ - PIN_MODE_INPUT(GPIOH_PIN15)) -#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ - PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) -#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ - PIN_OSPEED_VERYLOW(GPIOH_PIN15)) -#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ - PIN_PUPDR_PULLUP(GPIOH_PIN15)) -#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ - PIN_ODR_HIGH(GPIOH_PIN1) | \ - PIN_ODR_HIGH(GPIOH_PIN2) | \ - PIN_ODR_HIGH(GPIOH_PIN3) | \ - PIN_ODR_HIGH(GPIOH_PIN4) | \ - PIN_ODR_HIGH(GPIOH_PIN5) | \ - PIN_ODR_HIGH(GPIOH_PIN6) | \ - PIN_ODR_HIGH(GPIOH_PIN7) | \ - PIN_ODR_HIGH(GPIOH_PIN8) | \ - PIN_ODR_HIGH(GPIOH_PIN9) | \ - PIN_ODR_HIGH(GPIOH_PIN10) | \ - PIN_ODR_HIGH(GPIOH_PIN11) | \ - PIN_ODR_HIGH(GPIOH_PIN12) | \ - PIN_ODR_HIGH(GPIOH_PIN13) | \ - PIN_ODR_HIGH(GPIOH_PIN14) | \ - PIN_ODR_HIGH(GPIOH_PIN15)) -#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ - PIN_AFIO_AF(GPIOH_PIN1, 0) | \ - PIN_AFIO_AF(GPIOH_PIN2, 0) | \ - PIN_AFIO_AF(GPIOH_PIN3, 0) | \ - PIN_AFIO_AF(GPIOH_PIN4, 0) | \ - PIN_AFIO_AF(GPIOH_PIN5, 0) | \ - PIN_AFIO_AF(GPIOH_PIN6, 0) | \ - PIN_AFIO_AF(GPIOH_PIN7, 0)) -#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ - PIN_AFIO_AF(GPIOH_PIN9, 0) | \ - PIN_AFIO_AF(GPIOH_PIN10, 0) | \ - PIN_AFIO_AF(GPIOH_PIN11, 0) | \ - PIN_AFIO_AF(GPIOH_PIN12, 0) | \ - PIN_AFIO_AF(GPIOH_PIN13, 0) | \ - PIN_AFIO_AF(GPIOH_PIN14, 0) | \ - PIN_AFIO_AF(GPIOH_PIN15, 0)) - - -/* - * USB bus activation macro, required by the USB driver. - */ -// #define usb_lld_connect_bus(usbp) -#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) -// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) -/* - * USB bus de-activation macro, required by the USB driver. - */ -// #define usb_lld_disconnect_bus(usbp) -#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) -// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) - -#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/preonic/rev3/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.mk deleted file mode 100644 index 43377629a3cc..000000000000 --- a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.mk +++ /dev/null @@ -1,5 +0,0 @@ -# List of all the board related files. -BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c - -# Required include directories -BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/preonic/rev3/bootloader_defs.h b/keyboards/preonic/rev3/bootloader_defs.h deleted file mode 100644 index 3b0e9d20a6ab..000000000000 --- a/keyboards/preonic/rev3/bootloader_defs.h +++ /dev/null @@ -1,7 +0,0 @@ -/* 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/preonic/rev3/chconf.h b/keyboards/preonic/rev3/chconf.h deleted file mode 100644 index b52ca7d2c87a..000000000000 --- a/keyboards/preonic/rev3/chconf.h +++ /dev/null @@ -1,520 +0,0 @@ -/* - 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 16 - -/** - * @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 - -/** @} */ - -/*===========================================================================*/ -/** - * @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/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 98899dc6ac77..3dc9dc4ebfe7 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -43,6 +43,10 @@ * #define UNUSED_PINS */ +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } + #define MUSIC_MAP #undef AUDIO_VOICES #undef C6_AUDIO diff --git a/keyboards/preonic/rev3/halconf.h b/keyboards/preonic/rev3/halconf.h deleted file mode 100644 index 5e5d70219e2b..000000000000 --- a/keyboards/preonic/rev3/halconf.h +++ /dev/null @@ -1,388 +0,0 @@ -/* - 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 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 TRUE -#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 TRUE -#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/preonic/rev3/matrix.c b/keyboards/preonic/rev3/matrix.c index 05f6da71b677..db7a4f2a3a6b 100644 --- a/keyboards/preonic/rev3/matrix.c +++ b/keyboards/preonic/rev3/matrix.c @@ -21,10 +21,6 @@ static matrix_col_t matrix_debouncing[MATRIX_COLS]; static bool debouncing = false; static uint16_t debouncing_time = 0; -static uint8_t encoder_state = 0; -static int8_t encoder_value = 0; -static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; - static bool dip_switch[4] = {0, 0, 0, 0}; __attribute__ ((weak)) @@ -53,12 +49,6 @@ void matrix_init(void) { palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOB, 9, PAL_MODE_INPUT_PULLUP); - // encoder setup - palSetPadMode(GPIOB, 12, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP); - - encoder_state = (palReadPad(GPIOB, 12) << 0) | (palReadPad(GPIOB, 13) << 1); - // actual matrix setup palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); @@ -110,18 +100,6 @@ uint8_t matrix_scan(void) { } memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch)); - // encoder on B12 and B13 - encoder_state <<= 2; - encoder_state |= (palReadPad(GPIOB, 12) << 0) | (palReadPad(GPIOB, 13) << 1); - encoder_value += encoder_LUT[encoder_state & 0xF]; - if (encoder_value >= ENCODER_RESOLUTION) { - encoder_update(0); - } - if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise - encoder_update(1); - } - encoder_value %= ENCODER_RESOLUTION; - // actual matrix for (int col = 0; col < MATRIX_COLS; col++) { matrix_col_t data = 0; diff --git a/keyboards/preonic/rev3/mcuconf.h b/keyboards/preonic/rev3/mcuconf.h deleted file mode 100644 index 2d27bee4e6cf..000000000000 --- a/keyboards/preonic/rev3/mcuconf.h +++ /dev/null @@ -1,257 +0,0 @@ -/* - 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 FALSE -#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 TRUE -#define STM32_PWM_USE_TIM3 TRUE -#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 TRUE -#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 4 - -/* - * 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/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 7c40d514d269..0c171b2fb09a 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -1,56 +1,24 @@ # project specific files -SRC = matrix.c +SRC = matrix.c LAYOUTS += ortho_5x12 -## 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 = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +MCU = STM32F303 # Build Options # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +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 +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 +NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no # SERIAL_LINK_ENABLE = yes +ENCODER_ENABLE = yes From 438386401f29cb3b543d0439dabc7f9747a61483 Mon Sep 17 00:00:00 2001 From: Danny Date: Sat, 26 Jan 2019 11:58:02 -0500 Subject: [PATCH 216/458] [Keymap] Add Maxim keymap for Fourier (#4534) * Add maxim keymap * Add QMK DFU configuration to Fourier * Update config.h * Update keymap.c * Update config.h --- keyboards/fourier/keymaps/maxim/config.h | 29 +++++++++++++++ keyboards/fourier/keymaps/maxim/keymap.c | 45 ++++++++++++++++++++++++ keyboards/fourier/rev1/config.h | 6 ++++ 3 files changed, 80 insertions(+) create mode 100644 keyboards/fourier/keymaps/maxim/config.h create mode 100644 keyboards/fourier/keymaps/maxim/keymap.c diff --git a/keyboards/fourier/keymaps/maxim/config.h b/keyboards/fourier/keymaps/maxim/config.h new file mode 100644 index 000000000000..fb13b56cdc7a --- /dev/null +++ b/keyboards/fourier/keymaps/maxim/config.h @@ -0,0 +1,29 @@ +/* +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 + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + diff --git a/keyboards/fourier/keymaps/maxim/keymap.c b/keyboards/fourier/keymaps/maxim/keymap.c new file mode 100644 index 000000000000..68bd649ecc2b --- /dev/null +++ b/keyboards/fourier/keymaps/maxim/keymap.c @@ -0,0 +1,45 @@ +#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 +#define _FN2 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + + +#define FN1 MO(_FN1) +#define FN2 MO(_FN2) +#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, + XXXXXXX, KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, FN1, KC_RCTL, KC_RGUI, FN2, XXXXXXX + ), + + [_FN1] = 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, + RESET, RGB_HUI, RGB_SAI, RGB_VAI, KC_VOLU, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_SCLN, _______, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_VOLD, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_UP, _______, + RGB_TOG, _______, _______, _______, _______, KC_DEL, KC_0, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN2] = LAYOUT( + KC_TILD, 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_INS, KC_PGUP, KC_HOME, _______, _______, _______, _______, KC_COLN, _______, + _______, _______, _______, KC_DEL, KC_PGDN, KC_END, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/fourier/rev1/config.h b/keyboards/fourier/rev1/config.h index d9913d7dee62..2a8fa06fa50b 100644 --- a/keyboards/fourier/rev1/config.h +++ b/keyboards/fourier/rev1/config.h @@ -35,11 +35,17 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { F4, D7, E6, B4 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define QMK_ESC_OUTPUT F5 +#define QMK_ESC_INPUT F4 +#define QMK_LED B0 +#define QMK_SPEAKER C6 + /* Split Defines */ #define SPLIT_HAND_PIN D2 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST From 478538e0d9938952568c62d135166d2cba15a70c Mon Sep 17 00:00:00 2001 From: seebs Date: Sat, 26 Jan 2019 13:17:16 -0600 Subject: [PATCH 217/458] [Keyboard] drop unused i2c files (#4948) The Ergodox EZ used to use twimaster.c/i2cmaster.h, but now uses a standard centralized AVR i2c driver. Drop the now-unused files. --- keyboards/ergodox_ez/i2cmaster.h | 178 -------------------------- keyboards/ergodox_ez/twimaster.c | 208 ------------------------------- 2 files changed, 386 deletions(-) delete mode 100644 keyboards/ergodox_ez/i2cmaster.h delete mode 100644 keyboards/ergodox_ez/twimaster.c diff --git a/keyboards/ergodox_ez/i2cmaster.h b/keyboards/ergodox_ez/i2cmaster.h deleted file mode 100644 index 3917b9e6c006..000000000000 --- a/keyboards/ergodox_ez/i2cmaster.h +++ /dev/null @@ -1,178 +0,0 @@ -#ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 -/************************************************************************* -* Title: C include file for the I2C master interface -* (i2cmaster.S or twimaster.c) -* Author: Peter Fleury http://jump.to/fleury -* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device -* Usage: see Doxygen manual -**************************************************************************/ - -#ifdef DOXYGEN -/** - @defgroup pfleury_ic2master I2C Master library - @code #include @endcode - - @brief I2C (TWI) Master Software Library - - Basic routines for communicating with I2C slave devices. This single master - implementation is limited to one bus master on the I2C bus. - - This I2c library is implemented as a compact assembler software implementation of the I2C protocol - which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). - Since the API for these two implementations is exactly the same, an application can be linked either against the - software I2C implementation or the hardware I2C implementation. - - Use 4.7k pull-up resistor on the SDA and SCL pin. - - Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module - i2cmaster.S to your target when using the software I2C implementation ! - - Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. - - @note - The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted - to GNU assembler and AVR-GCC C call interface. - Replaced the incorrect quarter period delays found in AVR300 with - half period delays. - - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - - @par API Usage Example - The following code shows typical usage of this library, see example test_i2cmaster.c - - @code - - #include - - - #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet - - int main(void) - { - unsigned char ret; - - i2c_init(); // initialize I2C library - - // write 0x75 to EEPROM address 5 (Byte Write) - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - i2c_write(0x05); // write address = 5 - i2c_write(0x75); // write value 0x75 to EEPROM - i2c_stop(); // set stop conditon = release bus - - - // read previously written value back from EEPROM address 5 - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - - i2c_write(0x05); // write address = 5 - i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode - - ret = i2c_readNak(); // read one byte from EEPROM - i2c_stop(); - - for(;;); - } - @endcode - -*/ -#endif /* DOXYGEN */ - -/**@{*/ - -#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 -#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" -#endif - -#include - -/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_READ 1 - -/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_WRITE 0 - - -/** - @brief initialize the I2C master interace. Need to be called only once - @param void - @return none - */ -extern void i2c_init(void); - - -/** - @brief Terminates the data transfer and releases the I2C bus - @param void - @return none - */ -extern void i2c_stop(void); - - -/** - @brief Issues a start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_start(unsigned char addr); - - -/** - @brief Issues a repeated start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_rep_start(unsigned char addr); - - -/** - @brief Issues a start condition and sends address and transfer direction - - If device is busy, use ack polling to wait until device ready - @param addr address and transfer direction of I2C device - @return none - */ -extern void i2c_start_wait(unsigned char addr); - - -/** - @brief Send one byte to I2C device - @param data byte to be transfered - @retval 0 write successful - @retval 1 write failed - */ -extern unsigned char i2c_write(unsigned char data); - - -/** - @brief read one byte from the I2C device, request more data from device - @return byte read from I2C device - */ -extern unsigned char i2c_readAck(void); - -/** - @brief read one byte from the I2C device, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_readNak(void); - -/** - @brief read one byte from the I2C device - - Implemented as a macro, which calls either i2c_readAck or i2c_readNak - - @param ack 1 send ack, request more data from device
- 0 send nak, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_read(unsigned char ack); -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - - -/**@}*/ -#endif diff --git a/keyboards/ergodox_ez/twimaster.c b/keyboards/ergodox_ez/twimaster.c deleted file mode 100644 index f91c08e6e4e8..000000000000 --- a/keyboards/ergodox_ez/twimaster.c +++ /dev/null @@ -1,208 +0,0 @@ -/************************************************************************* -* Title: I2C master library using hardware TWI interface -* Author: Peter Fleury http://jump.to/fleury -* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device with hardware TWI -* Usage: API compatible with I2C Software Library i2cmaster.h -**************************************************************************/ -#include -#include - -#include - - -/* define CPU frequency in Mhz here if not defined in Makefile */ -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -/* I2C clock in Hz */ -#define SCL_CLOCK 400000L - - -/************************************************************************* - Initialization of the I2C bus interface. Need to be called only once -*************************************************************************/ -void i2c_init(void) -{ - /* initialize TWI clock - * minimal values in Bit Rate Register (TWBR) and minimal Prescaler - * bits in the TWI Status Register should give us maximal possible - * I2C bus speed - about 444 kHz - * - * for more details, see 20.5.2 in ATmega16/32 secification - */ - - TWSR = 0; /* no prescaler */ - TWBR = 10; /* must be >= 10 for stable operation */ - -}/* i2c_init */ - - -/************************************************************************* - Issues a start condition and sends address and transfer direction. - return 0 = device accessible, 1= failed to access device -*************************************************************************/ -unsigned char i2c_start(unsigned char address) -{ - uint8_t twst; - - // send START condition - TWCR = (1< Date: Sun, 27 Jan 2019 07:23:15 +1100 Subject: [PATCH 218/458] 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 b05c0e46c6c62972b68518635104fb58927d1a13 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 26 Jan 2019 15:49:45 -0800 Subject: [PATCH 219/458] Adds a default value for IS_COMMAND for COMMAND feature (#4301) * Add default value for IS_COMMAND for COMMAND feature * Cleanup and consistency * Update Templates to reflect change * Fix IS_COMMAND in template * Fix IS_COMMAND define * Use consistent IS_COMMAND block in templates * Remove unnecessary `#undef IS_COMMAND` directives * Fix compile issue on orthodox * Reomve IS_COMMAND option for newer boards * Remove all existing definitions of IS_COMMAND if they use default LSHIFT and RSHIFT setting * Remove a couple of additional IS_COMMAND defines * Remove remaining redundant IS_COMMAND definitions * Remove #undef IS_COMMAND from orthodox:drashna and whitefox:konstantin * Remove multiple empty lines in modified config.h files * Update additional boards * Reomve IS_COMMAND from newer boards * Update Alice keyboard * Remove IS_COMMAND from additional boards Jan 24th edition --- keyboards/1upkeyboards/1up60hse/config.h | 6 ----- keyboards/1upkeyboards/1up60rgb/config.h | 5 ----- keyboards/1upkeyboards/sweet16/config.h | 5 ----- keyboards/30wer/config.h | 5 ----- keyboards/40percentclub/25/config.h | 5 ----- keyboards/40percentclub/4x4/config.h | 8 ------- keyboards/40percentclub/5x5/config.h | 5 ----- keyboards/40percentclub/6lit/config.h | 5 ----- keyboards/40percentclub/foobar/config.h | 5 ----- keyboards/40percentclub/gherkin/config.h | 5 ----- keyboards/40percentclub/i75/config.h | 5 ----- keyboards/40percentclub/luddite/config.h | 5 ----- keyboards/40percentclub/mf68/config.h | 6 ----- keyboards/40percentclub/mf68_ble/config.h | 5 ----- keyboards/40percentclub/nori/config.h | 5 ----- keyboards/40percentclub/tomato/config.h | 5 ----- keyboards/40percentclub/ut47/config.h | 5 ----- keyboards/412_64/config.h | 8 ------- keyboards/acr60/config.h | 5 ----- keyboards/al1/config.h | 6 ----- keyboards/alf/dc60/config.h | 6 ----- keyboards/alf/x2/config.h | 5 ----- keyboards/alice/config.h | 3 --- keyboards/alpha/config.h | 6 ----- keyboards/alps64/config.h | 7 ------ keyboards/alu84/config.h | 5 ----- keyboards/amj40/config.h | 5 ----- keyboards/amj60/config.h | 5 ----- keyboards/amj96/config.h | 5 ----- keyboards/amjpad/config.h | 5 ----- keyboards/at101_blackheart/config.h | 5 ----- keyboards/atom47/rev2/config.h | 5 ----- keyboards/atom47/rev3/config.h | 6 ----- keyboards/atomic/config.h | 5 ----- keyboards/atomic/keymaps/pvc/config.h | 7 ------ keyboards/atreus/config.h | 5 ----- keyboards/atreus/keymaps/alphadox/config.h | 5 ----- .../atreus/keymaps/dvorak_42_key/config.h | 7 ------ keyboards/atreus/keymaps/erlandsona/config.h | 6 ----- keyboards/atreus62/config.h | 5 ----- keyboards/baguette/config.h | 6 ----- keyboards/bantam44/config.h | 5 ----- keyboards/bdn9/config.h | 5 ----- keyboards/bface/config.h | 5 +---- keyboards/bfake/config.h | 3 --- keyboards/bfo9000/config.h | 6 ----- keyboards/blockey/config.h | 7 ------ keyboards/bmini/config.h | 3 --- keyboards/bminiex/config.h | 4 ---- keyboards/bpiphany/frosty_flake/config.h | 5 ----- keyboards/bpiphany/kitten_paw/config.h | 7 ------ keyboards/bpiphany/pegasushoof/config.h | 5 ----- keyboards/bpiphany/tiger_lily/config.h | 5 ----- keyboards/bpiphany/unloved_bastard/config.h | 5 ----- keyboards/bthlabs/geekpad/config.h | 5 ----- keyboards/candybar/config.h | 6 ----- keyboards/canoe/config.h | 3 --- keyboards/chibios_test/config.h | 7 ------ keyboards/chimera_ergo/config.h | 6 ----- keyboards/chimera_ls/config.h | 6 ----- keyboards/chimera_ortho/config.h | 6 ----- keyboards/chocopad/config.h | 5 ----- keyboards/christmas_tree/config.h | 5 ----- keyboards/ckeys/handwire_101/config.h | 6 ----- keyboards/ckeys/nakey/config.h | 6 ----- keyboards/ckeys/obelus/config.h | 6 ----- keyboards/clueboard/17/config.h | 5 ----- keyboards/clueboard/2x1800/config.h | 5 ----- keyboards/clueboard/60/config.h | 5 ----- keyboards/clueboard/66/rev1/config.h | 5 ----- keyboards/clueboard/66/rev2/config.h | 5 ----- keyboards/clueboard/66/rev3/config.h | 5 ----- keyboards/clueboard/66_hotswap/config.h | 5 ----- keyboards/clueboard/card/config.h | 7 +----- keyboards/cod67/config.h | 6 ----- keyboards/comet46/keymaps/satt/config.h | 5 ----- keyboards/contra/config.h | 5 ----- keyboards/converter/usb_usb/config.h | 4 ---- keyboards/cospad/config.h | 5 ----- keyboards/crkbd/rev1/config.h | 5 ----- keyboards/cu24/config.h | 5 ----- keyboards/cu75/config.h | 5 ----- keyboards/daisy/config.h | 6 ----- keyboards/dc01/arrow/config.h | 6 ----- keyboards/dc01/left/config.h | 6 ----- keyboards/dc01/numpad/config.h | 6 ----- keyboards/dc01/right/config.h | 6 ----- keyboards/deltasplit75/v2/config.h | 6 ----- keyboards/dichotomy/config.h | 6 ----- keyboards/dilly/config.h | 5 ----- keyboards/diverge3/config.h | 7 ------ keyboards/divergetm2/config.h | 8 ------- keyboards/dk60/config.h | 5 ----- keyboards/do60/config.h | 5 ----- keyboards/duck/eagle_viper/v2/config.h | 5 ----- keyboards/duck/jetfire/config.h | 8 ------- keyboards/duck/lightsaver/config.h | 5 ----- keyboards/duck/octagon/v1/config.h | 5 ----- keyboards/duck/octagon/v2/config.h | 5 ----- keyboards/dz60/config.h | 5 ----- keyboards/dz60/keymaps/LEdiodes/config.h | 5 ----- keyboards/e6v2/le/config.h | 6 ----- keyboards/e6v2/oe/config.h | 6 ----- keyboards/eco/config.h | 5 ----- keyboards/ep/40/config.h | 4 ---- keyboards/ep/96/config.h | 7 ------ keyboards/ergo42/rev1/config.h | 6 ----- keyboards/ergodash/mini/config.h | 5 ----- keyboards/ergodash/rev1/config.h | 6 ----- keyboards/ergodash/rev2/config.h | 6 ----- keyboards/ergoinu/config.h | 5 ----- keyboards/ergotravel/rev1/config.h | 5 ----- keyboards/espectro/config.h | 7 ------ keyboards/evil80/config.h | 5 ----- keyboards/facew/config.h | 3 --- keyboards/fc660c/config.h | 7 ------ keyboards/fc980c/config.h | 7 ------ keyboards/felix/config.h | 6 ----- keyboards/fleuron/config.h | 6 ----- keyboards/fortitude60/rev1/config.h | 5 ----- keyboards/four_banger/config.h | 5 ----- keyboards/fourier/rev1/config.h | 5 ----- keyboards/fractal/config.h | 5 ----- keyboards/gh60/config.h | 5 ----- keyboards/gh60/keymaps/dbroqua/config.h | 5 ----- keyboards/gh60/keymaps/robotmaxtron/config.h | 5 ----- keyboards/gh80_3000/config.h | 5 ----- keyboards/gonnerd/config.h | 5 ----- keyboards/gskt00/config.h | 7 ------ keyboards/h87a/config.h | 6 ----- keyboards/hadron/config.h | 10 --------- keyboards/hadron/ver3/config.h | 7 ------ .../handwired/108key_trackpoint/config.h | 6 ----- keyboards/handwired/arrow_pad/config.h | 5 ----- .../arrow_pad/keymaps/pad_21/config.h | 5 ----- .../arrow_pad/keymaps/pad_24/config.h | 5 ----- keyboards/handwired/atreus50/config.h | 8 ------- keyboards/handwired/bluepill/config.h | 5 ----- keyboards/handwired/cmd60/config.h | 6 ----- keyboards/handwired/dactyl_manuform/config.h | 6 ----- keyboards/handwired/datahand/config.h | 5 ----- keyboards/handwired/downbubble/config.h | 5 ----- keyboards/handwired/fivethirteen/config.h | 6 ----- keyboards/handwired/gamenum/config.h | 6 ----- keyboards/handwired/hexon38/config.h | 6 ----- keyboards/handwired/ibm122m/config.h | 6 ----- keyboards/handwired/jn68m/config.h | 5 ----- keyboards/handwired/kbod/config.h | 6 ----- keyboards/handwired/maartenwut/config.h | 5 ----- keyboards/handwired/magicforce61/config.h | 6 ----- keyboards/handwired/magicforce68/config.h | 6 ----- keyboards/handwired/minorca/config.h | 5 ----- keyboards/handwired/ms_sculpt_mobile/config.h | 8 ------- keyboards/handwired/nicekey/config.h | 7 ------ keyboards/handwired/not_so_minidox/config.h | 7 ------ keyboards/handwired/numbrero/config.h | 5 ----- keyboards/handwired/numpad20/config.h | 6 ----- keyboards/handwired/onekey/config.h | 7 ------ keyboards/handwired/ortho5x13/config.h | 6 ----- keyboards/handwired/ortho60/config.h | 7 ------ keyboards/handwired/pilcrow/config.h | 6 ----- keyboards/handwired/practice60/config.h | 7 ------ keyboards/handwired/prime_exl/config.h | 5 ----- keyboards/handwired/pteron/config.h | 5 ----- keyboards/handwired/qc60/config.h | 5 ----- keyboards/handwired/reddot/config.h | 8 ------- keyboards/handwired/retro_refit/config.h | 6 ----- keyboards/handwired/space_oddity/config.h | 5 ----- keyboards/handwired/terminus_mini/config.h | 5 ----- keyboards/handwired/trackpoint/config.h | 5 ----- keyboards/handwired/tradestation/config.h | 6 ----- keyboards/handwired/traveller/config.h | 7 ------ keyboards/handwired/woodpad/config.h | 5 ----- keyboards/handwired/xealous/rev1/config.h | 5 ----- keyboards/helix/pico/config.h | 7 ------ keyboards/helix/rev1/config.h | 6 ----- keyboards/helix/rev2/config.h | 7 ------ keyboards/hhkb/config.h | 5 ----- keyboards/hhkb/keymaps/mjt/config.h | 5 ----- keyboards/hid_liber/config.h | 5 ----- keyboards/hs60/v1/config.h | 5 ----- keyboards/hs60/v2/config.h | 15 +++++++++---- keyboards/idobo/config.h | 5 ----- keyboards/infinity60/config.h | 5 ----- keyboards/iris/rev1/config.h | 5 ----- keyboards/iris/rev1_led/config.h | 5 ----- keyboards/iris/rev2/config.h | 5 ----- keyboards/iris/rev3/config.h | 5 ----- keyboards/jc65/v32a/config.h | 4 ---- keyboards/jc65/v32u4/config.h | 6 ----- keyboards/jd40/config.h | 6 ----- keyboards/jd45/config.h | 5 ----- keyboards/jd45/keymaps/mjt/config.h | 5 ----- keyboards/jj40/config.h | 3 --- keyboards/jj50/config.h | 3 --- keyboards/jm60/config.h | 5 ----- keyboards/k_type/config.h | 5 ----- keyboards/katana60/config.h | 6 ----- keyboards/kbd19x/config.h | 6 ----- keyboards/kbd4x/config.h | 5 ----- keyboards/kbd66/config.h | 6 ----- keyboards/kbd67/hotswap/config.h | 5 ----- keyboards/kbd67/rev1/config.h | 5 ----- keyboards/kbd6x/config.h | 6 ----- keyboards/kbd75/config.h | 5 ----- keyboards/kbd8x/config.h | 8 ------- keyboards/kc60/config.h | 5 ----- keyboards/kc60se/config.h | 6 ----- keyboards/kinesis/config.h | 7 ------ keyboards/kinesis/stapelberg/config.h | 6 ----- keyboards/kira75/config.h | 6 ----- keyboards/kmac/config.h | 5 ----- keyboards/kmini/config.h | 5 ----- keyboards/knops/mini/config.h | 6 ----- keyboards/kona_classic/config.h | 5 ----- keyboards/laplace/config.h | 5 ----- keyboards/launchpad/config.h | 5 ----- keyboards/lazydesigners/the50/config.h | 5 ----- keyboards/lets_split/rev1/config.h | 5 ----- keyboards/lets_split/rev2/config.h | 5 ----- keyboards/lets_split/sockets/config.h | 5 ----- keyboards/lets_split_eh/config.h | 5 ----- keyboards/levinson/rev1/config.h | 5 ----- keyboards/levinson/rev2/config.h | 5 ----- keyboards/lfkeyboards/lfk65_hs/config.h | 5 ----- keyboards/lfkeyboards/lfk78/config.h | 5 ----- keyboards/lfkeyboards/lfk87/config.h | 6 ----- keyboards/lfkeyboards/lfkpad/config.h | 5 ----- keyboards/lfkeyboards/mini1800/config.h | 5 ----- keyboards/lfkeyboards/smk65/config.h | 5 ----- keyboards/lily58/rev1/config.h | 5 ----- keyboards/m10a/config.h | 5 ----- keyboards/massdrop/alt/config.h | 5 ----- keyboards/massdrop/ctrl/config.h | 5 ----- keyboards/maxipad/config.h | 6 ----- keyboards/mechmini/v1/config.h | 3 --- keyboards/mechmini/v2/config.h | 6 ----- keyboards/mehkee96/config.h | 1 - keyboards/meira/featherble/config.h | 6 ----- keyboards/meira/promicro/config.h | 6 ----- keyboards/melody96/config.h | 5 ----- keyboards/meme/config.h | 6 ----- keyboards/miniaxe/config.h | 6 ----- keyboards/minidox/config.h | 5 ----- keyboards/mint60/config.h | 9 -------- keyboards/mitosis/config.h | 6 ----- keyboards/miuni32/config.h | 7 ------ keyboards/mt40/config.h | 5 ----- keyboards/mxss/config.h | 5 ----- keyboards/namecard2x4/config.h | 7 ------ keyboards/niu_mini/config.h | 5 ----- keyboards/noxary/268/config.h | 5 ----- keyboards/noxary/268_2/config.h | 5 ----- keyboards/noxary/x268/config.h | 5 ----- keyboards/nyquist/rev1/config.h | 5 ----- keyboards/nyquist/rev2/config.h | 5 ----- keyboards/nyquist/rev3/config.h | 5 ----- keyboards/ok60/config.h | 5 ----- keyboards/omnikey_blackheart/config.h | 5 ----- keyboards/org60/config.h | 5 ----- keyboards/orthodox/keymaps/drashna/config.h | 9 +------- keyboards/paladin64/config.h | 5 ----- keyboards/panc60/config.h | 3 --- keyboards/pearl/config.h | 4 ---- keyboards/phantom/config.h | 5 ----- keyboards/pinky/3/config.h | 5 ----- keyboards/pinky/4/config.h | 5 ----- keyboards/plain60/config.h | 7 +----- keyboards/planck/config.h | 5 ----- keyboards/planck/keymaps/dodger/config.h | 5 ----- keyboards/planck/keymaps/zach/config.h | 5 ----- keyboards/planck/rev6/config.h | 5 ----- keyboards/playkbtw/ca66/config.h | 6 ----- keyboards/playkbtw/pk60/config.h | 5 ----- keyboards/preonic/config.h | 5 ----- keyboards/preonic/keymaps/kinesis/config.h | 5 ----- keyboards/preonic/keymaps/zach/config.h | 7 ------ keyboards/preonic/rev3/config.h | 5 ----- keyboards/primekb/prime_l/config.h | 5 ----- keyboards/primekb/prime_m/config.h | 5 ----- keyboards/primekb/prime_o/config.h | 5 ----- keyboards/primekb/prime_r/config.h | 5 ----- keyboards/proton_c/config.h | 6 ----- keyboards/ps2avrGB/config.h | 3 --- keyboards/quefrency/rev1/config.h | 5 ----- keyboards/qwertyydox/config.h | 5 ----- keyboards/qwertyydox/rev1/config.h | 6 ----- keyboards/rama/m10_b/config.h | 5 ----- keyboards/rama/m60_a/config.h | 7 ------ keyboards/rama/m6_a/config.h | 6 ----- keyboards/rama/m6_b/config.h | 6 ----- keyboards/rama/u80_a/config.h | 6 ----- keyboards/redox/rev1/config.h | 5 ----- keyboards/redox_w/config.h | 6 ----- keyboards/rorschach/rev1/config.h | 5 ----- keyboards/s60_x/config.h | 5 ----- keyboards/s60_x/default/config.h | 5 ----- keyboards/s60_x/keymaps/ansi_qwertz/config.h | 7 +----- keyboards/s60_x/keymaps/bluebear/config.h | 5 ----- keyboards/s65_plus/config.h | 5 ----- keyboards/s65_x/config.h | 5 ----- keyboards/s7_elephant/config.h | 5 ----- keyboards/satan/config.h | 5 ----- .../satan/keymaps/admiralStrokers/config.h | 7 ------ keyboards/satan/keymaps/fakb/config.h | 8 ++----- keyboards/scrabblepad/config.h | 6 ----- keyboards/singa/config.h | 3 --- keyboards/sixkeyboard/config.h | 6 ----- keyboards/sixshooter/config.h | 6 ----- keyboards/skog/config.h | 3 --- keyboards/snagpad/config.h | 6 ----- keyboards/sol/rev1/config.h | 8 ------- keyboards/speedo/config.h | 6 ----- keyboards/subatomic/config.h | 5 ----- keyboards/sx60/config.h | 7 ------ keyboards/tada68/config.h | 5 ----- keyboards/tanuki/config.h | 6 ----- keyboards/telophase/config.h | 6 ----- keyboards/tetris/config.h | 5 ----- keyboards/the_ruler/config.h | 7 ------ .../thevankeyboards/bananasplit/config.h | 7 ------ keyboards/thevankeyboards/minivan/config.h | 6 ----- keyboards/thevankeyboards/roadkit/config.h | 6 ----- keyboards/tkc1800/config.h | 5 ----- keyboards/tmo50/config.h | 6 ----- keyboards/toad/config.h | 5 ----- keyboards/tokyo60/config.h | 5 ----- keyboards/touchpad/config.h | 5 ----- keyboards/tragicforce68/config.h | 5 ----- keyboards/treasure/type9/config.h | 6 ----- keyboards/uk78/config.h | 5 ----- keyboards/v60_type_r/config.h | 6 ----- keyboards/vinta/config.h | 5 ----- keyboards/vision_division/config.h | 7 ------ keyboards/vitamins_included/rev1/config.h | 6 ----- keyboards/viterbi/rev1/config.h | 5 ----- keyboards/wavelet/config.h | 5 ----- keyboards/westfoxtrot/cyclops/config.h | 5 ----- keyboards/whitefox/config.h | 5 ----- .../whitefox/keymaps/konstantin/config.h | 22 ++++++++++++++++++- keyboards/wilba_tech/wt60_a/config.h | 6 ----- keyboards/wilba_tech/wt65_a/config.h | 6 ----- keyboards/wilba_tech/wt80_a/config.h | 6 ----- keyboards/xd60/config.h | 5 ----- keyboards/xd75/config.h | 6 ----- keyboards/xd87/config.h | 7 ------ keyboards/xmmx/config.h | 5 ----- keyboards/yd68/config.h | 6 ----- keyboards/ymd75/config.h | 3 --- keyboards/ymd96/config.h | 3 --- .../ymd96/keymaps/AnthonyWharton/config.h | 4 ---- keyboards/ymdk_np21/config.h | 3 --- keyboards/z150_blackheart/config.h | 5 ----- keyboards/zeal60/config.h | 6 ----- keyboards/zeal65/config.h | 6 ----- keyboards/zen/rev1/config.h | 6 ----- keyboards/zinc/rev1/config.h | 8 ------- keyboards/zinc/reva/config.h | 7 ------ keyboards/zlant/config.h | 5 ----- quantum/template/avr/config.h | 5 ++--- quantum/template/ps2avrgb/config.h | 5 +++-- tmk_core/common/command.h | 3 +++ 362 files changed, 47 insertions(+), 1960 deletions(-) diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index c3682de43eeb..420d0a025897 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/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 @@ -221,4 +216,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index ee49211b48fa..86696dab8457 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index 20d99651da9c..eedd3708f219 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/30wer/config.h b/keyboards/30wer/config.h index d497585246fb..cf1bd72e5632 100644 --- a/keyboards/30wer/config.h +++ b/keyboards/30wer/config.h @@ -22,10 +22,5 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 7fe59fcca091..338683ee7e7b 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -121,11 +121,6 @@ * */ -/* 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/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index e66e9433a9db..5dc780f0e7b3 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -30,7 +30,6 @@ #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 */ #define DIODE_DIRECTION COL2ROW @@ -38,7 +37,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -90,11 +88,6 @@ * */ -/* 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 @@ -199,4 +192,3 @@ #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index bc609934e3e6..bf521e71e91e 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -97,11 +97,6 @@ * */ -/* 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/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 940518f36566..6a96c4757dd5 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -122,11 +122,6 @@ * */ -/* 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/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index 88075c456061..aba9f09ae478 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -122,11 +122,6 @@ * */ -/* 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/40percentclub/gherkin/config.h b/keyboards/40percentclub/gherkin/config.h index 3ed638b66f75..d0c2be35be49 100644 --- a/keyboards/40percentclub/gherkin/config.h +++ b/keyboards/40percentclub/gherkin/config.h @@ -37,11 +37,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/40percentclub/i75/config.h b/keyboards/40percentclub/i75/config.h index bc032ba4554e..611ae62b3d04 100644 --- a/keyboards/40percentclub/i75/config.h +++ b/keyboards/40percentclub/i75/config.h @@ -77,11 +77,6 @@ * */ -/* 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/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 62ff72bb03d0..5a6f2c799cbe 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -34,11 +34,6 @@ /* 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 B4 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 22d987e52c0f..857205c37d8f 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -99,11 +98,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/40percentclub/mf68_ble/config.h b/keyboards/40percentclub/mf68_ble/config.h index e7edd77fe69d..3d9bb360bf5e 100644 --- a/keyboards/40percentclub/mf68_ble/config.h +++ b/keyboards/40percentclub/mf68_ble/config.h @@ -99,11 +99,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/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index 9232344bfc74..f46ca4264457 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -110,11 +110,6 @@ * */ -/* 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/40percentclub/tomato/config.h b/keyboards/40percentclub/tomato/config.h index 05c83c30cddf..db90d8042b83 100644 --- a/keyboards/40percentclub/tomato/config.h +++ b/keyboards/40percentclub/tomato/config.h @@ -28,11 +28,6 @@ /* 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)) \ -) - /* eliminate lag on space cadet mods */ #define PERMISSIVE_HOLD diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index cd55e4d7324f..4a221ca52726 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -53,11 +53,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* Enable GNAP matrix serial output */ #define GNAP_ENABLE diff --git a/keyboards/412_64/config.h b/keyboards/412_64/config.h index 28d9763c313f..948ae743abfe 100644 --- a/keyboards/412_64/config.h +++ b/keyboards/412_64/config.h @@ -30,7 +30,6 @@ #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 */ #define DIODE_DIRECTION COL2ROW @@ -38,7 +37,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -90,11 +88,6 @@ * */ -/* 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 @@ -199,4 +192,3 @@ #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/acr60/config.h b/keyboards/acr60/config.h index 3066f349de05..ab5a1932bc65 100644 --- a/keyboards/acr60/config.h +++ b/keyboards/acr60/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 20 diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h index f92ed44d3c12..3a3daf8673f0 100644 --- a/keyboards/al1/config.h +++ b/keyboards/al1/config.h @@ -50,7 +50,6 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -102,11 +101,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/alf/dc60/config.h b/keyboards/alf/dc60/config.h index f6e527119f80..c3e2ecb2e032 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/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 @@ -221,4 +216,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/alf/x2/config.h b/keyboards/alf/x2/config.h index f2106fa88e10..21d919983ae5 100644 --- a/keyboards/alf/x2/config.h +++ b/keyboards/alf/x2/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/alice/config.h b/keyboards/alice/config.h index 7a8cbb52f1eb..34412a7e7060 100644 --- a/keyboards/alice/config.h +++ b/keyboards/alice/config.h @@ -37,6 +37,3 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h index 1e16f5ca3c99..b177c8a4b557 100755 --- a/keyboards/alpha/config.h +++ b/keyboards/alpha/config.h @@ -38,12 +38,6 @@ /* 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)) \ -) - - #define RGB_DI_PIN F4 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 858a82ecdd9f..74f8017add07 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -47,13 +47,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/alu84/config.h b/keyboards/alu84/config.h index 9d2dca409c7e..257c22e537a3 100755 --- a/keyboards/alu84/config.h +++ b/keyboards/alu84/config.h @@ -54,11 +54,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 16 diff --git a/keyboards/amj40/config.h b/keyboards/amj40/config.h index 411011122307..4d5e4889c289 100755 --- a/keyboards/amj40/config.h +++ b/keyboards/amj40/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/amj60/config.h b/keyboards/amj60/config.h index 7c06f9a6c79e..165f20cd4089 100644 --- a/keyboards/amj60/config.h +++ b/keyboards/amj60/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 6c51a2443656..2e49380ae672 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -114,11 +114,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/amjpad/config.h b/keyboards/amjpad/config.h index 1a26d2ab6c42..f568d82f00f2 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/at101_blackheart/config.h b/keyboards/at101_blackheart/config.h index 237cb095e663..af4be3d71466 100644 --- a/keyboards/at101_blackheart/config.h +++ b/keyboards/at101_blackheart/config.h @@ -33,8 +33,3 @@ /* force n-key rollover*/ #define FORCE_NKRO - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/atom47/rev2/config.h b/keyboards/atom47/rev2/config.h index df21130d36b1..7a044620bfe0 100644 --- a/keyboards/atom47/rev2/config.h +++ b/keyboards/atom47/rev2/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/atom47/rev3/config.h b/keyboards/atom47/rev3/config.h index b94dc9773b79..e14800b0f890 100644 --- a/keyboards/atom47/rev3/config.h +++ b/keyboards/atom47/rev3/config.h @@ -49,12 +49,6 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/atomic/config.h b/keyboards/atomic/config.h index 9c40f54e78d1..8af23ffeb197 100644 --- a/keyboards/atomic/config.h +++ b/keyboards/atomic/config.h @@ -98,11 +98,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/atomic/keymaps/pvc/config.h b/keyboards/atomic/keymaps/pvc/config.h index e63a7340c706..50afa768848a 100644 --- a/keyboards/atomic/keymaps/pvc/config.h +++ b/keyboards/atomic/keymaps/pvc/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // Enable Keyboard Locking via magic key #define KEYBOARD_LOCK_ENABLE - /* * Force NKRO * @@ -87,11 +86,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 @@ -153,7 +147,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - //#define VIBRATO_ENABLE //#define VIBRATO_STRENGTH_ENABLE diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index f8808892c314..18c66c4e2a09 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -66,11 +66,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h index df56849b083a..e81029a032c8 100644 --- a/keyboards/atreus/keymaps/alphadox/config.h +++ b/keyboards/atreus/keymaps/alphadox/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/atreus/keymaps/dvorak_42_key/config.h b/keyboards/atreus/keymaps/dvorak_42_key/config.h index 43c51fb2f28e..953178ee4225 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/config.h +++ b/keyboards/atreus/keymaps/dvorak_42_key/config.h @@ -18,10 +18,8 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H - #include "config_common.h" - // mouse speed #define MOUSEKEY_INTERVAL 15 @@ -80,11 +78,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index d9eb1903eddc..5af7e6e6cfac 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . #include "config_common.h" - /* Make Overloaded Keys switch faster */ #define TAPPING_TERM 150 @@ -70,11 +69,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h index 8d9248947c44..67b5f9cb2095 100644 --- a/keyboards/atreus62/config.h +++ b/keyboards/atreus62/config.h @@ -55,11 +55,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 806f9fb4f69d..0b53c653f679 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/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 @@ -221,4 +216,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/bantam44/config.h b/keyboards/bantam44/config.h index a55f629990ad..32385285005b 100644 --- a/keyboards/bantam44/config.h +++ b/keyboards/bantam44/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/bdn9/config.h b/keyboards/bdn9/config.h index 604da5ef4149..3fc92a062e90 100644 --- a/keyboards/bdn9/config.h +++ b/keyboards/bdn9/config.h @@ -67,8 +67,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/bface/config.h b/keyboards/bface/config.h index 3d74af4f14aa..11ac373c023e 100644 --- a/keyboards/bface/config.h +++ b/keyboards/bface/config.h @@ -21,7 +21,7 @@ along with this program. If not, see . #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -// You can edit those at usbconfig.h about line 250. These values will +// You can edit those at usbconfig.h about line 250. These values will // unforunatly be ignored so far #define MANUFACTURER winkeyless.kr #define PRODUCT b.face @@ -36,9 +36,6 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #ifdef BACKLIGHT_ENABLE // the backlight PWM does not work (yet). Therefore, we only have two backlight levels (on/off) #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index de8c4b5df54e..01fd4dff3ff1 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -43,7 +43,4 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/bfo9000/config.h b/keyboards/bfo9000/config.h index 893fa5ab6a40..8098428d66cc 100644 --- a/keyboards/bfo9000/config.h +++ b/keyboards/bfo9000/config.h @@ -46,11 +46,6 @@ along with this program. If not, see . /* 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 B4 @@ -74,5 +69,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index 53860bfbc986..f47849744afd 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -58,8 +58,6 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS - - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -111,11 +109,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/bmini/config.h b/keyboards/bmini/config.h index b7a25e050e2a..96acd9bf16e0 100644 --- a/keyboards/bmini/config.h +++ b/keyboards/bmini/config.h @@ -35,7 +35,4 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/bminiex/config.h b/keyboards/bminiex/config.h index 3f160109e3a4..ebd33ad61e70 100644 --- a/keyboards/bminiex/config.h +++ b/keyboards/bminiex/config.h @@ -35,7 +35,3 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 5 #define NO_UART 1 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index 2c73f10743b3..a797fef4286a 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -85,11 +85,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/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index d7089734aa6c..5ecf6d8dd83e 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . #include "config_common.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6050 @@ -53,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +98,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/bpiphany/pegasushoof/config.h b/keyboards/bpiphany/pegasushoof/config.h index 0dbec26e465b..885afaa900ed 100644 --- a/keyboards/bpiphany/pegasushoof/config.h +++ b/keyboards/bpiphany/pegasushoof/config.h @@ -38,9 +38,4 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/bpiphany/tiger_lily/config.h b/keyboards/bpiphany/tiger_lily/config.h index 4908192906fa..de1d90127067 100644 --- a/keyboards/bpiphany/tiger_lily/config.h +++ b/keyboards/bpiphany/tiger_lily/config.h @@ -85,11 +85,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/bpiphany/unloved_bastard/config.h b/keyboards/bpiphany/unloved_bastard/config.h index d89e85862eb1..fc5090e647de 100644 --- a/keyboards/bpiphany/unloved_bastard/config.h +++ b/keyboards/bpiphany/unloved_bastard/config.h @@ -83,11 +83,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/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index 2c33f359fdae..6b03ae30a733 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/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/candybar/config.h b/keyboards/candybar/config.h index 113e917175ae..c1539671301b 100644 --- a/keyboards/candybar/config.h +++ b/keyboards/candybar/config.h @@ -63,11 +63,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. @@ -118,4 +113,3 @@ // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP - diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h index 0e70094ae8b2..d552fee5b43e 100644 --- a/keyboards/canoe/config.h +++ b/keyboards/canoe/config.h @@ -43,7 +43,4 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/chibios_test/config.h b/keyboards/chibios_test/config.h index 89eb1f33b4d5..91350c4457cf 100644 --- a/keyboards/chibios_test/config.h +++ b/keyboards/chibios_test/config.h @@ -44,13 +44,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/chimera_ergo/config.h b/keyboards/chimera_ergo/config.h index 8ce195cc06b0..4a47effdde33 100644 --- a/keyboards/chimera_ergo/config.h +++ b/keyboards/chimera_ergo/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chimera_ls/config.h b/keyboards/chimera_ls/config.h index 254dad30645d..d7a21892a4c6 100644 --- a/keyboards/chimera_ls/config.h +++ b/keyboards/chimera_ls/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chimera_ortho/config.h b/keyboards/chimera_ortho/config.h index 4bf85eb88f3b..1282008e2c7c 100644 --- a/keyboards/chimera_ortho/config.h +++ b/keyboards/chimera_ortho/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chocopad/config.h b/keyboards/chocopad/config.h index d2a1a7b48432..62596a2ed752 100644 --- a/keyboards/chocopad/config.h +++ b/keyboards/chocopad/config.h @@ -35,11 +35,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/christmas_tree/config.h b/keyboards/christmas_tree/config.h index 4929f0ef50de..769a9e98b666 100644 --- a/keyboards/christmas_tree/config.h +++ b/keyboards/christmas_tree/config.h @@ -55,9 +55,4 @@ along with this program. If not, see . /* 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)) \ -) - #endif diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 7689c470387d..106a7fd961ed 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -121,11 +121,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 @@ -194,4 +189,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index 38fed297efb5..cdd16015d477 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,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/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index a1451c1420e7..4ef308819aca 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/clueboard/17/config.h b/keyboards/clueboard/17/config.h index bd64dfd27d9a..21728348dbb2 100644 --- a/keyboards/clueboard/17/config.h +++ b/keyboards/clueboard/17/config.h @@ -62,11 +62,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Underlight configuration */ #define RGB_DI_PIN F6 diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h index cddcd1ce78bb..1b47a9d65562 100644 --- a/keyboards/clueboard/2x1800/config.h +++ b/keyboards/clueboard/2x1800/config.h @@ -115,11 +115,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/clueboard/60/config.h b/keyboards/clueboard/60/config.h index c7dbf8ad0006..aa544c70bbad 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/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/clueboard/66/rev1/config.h b/keyboards/clueboard/66/rev1/config.h index a35c0d0f65dc..f8fb4bd35b1d 100644 --- a/keyboards/clueboard/66/rev1/config.h +++ b/keyboards/clueboard/66/rev1/config.h @@ -32,11 +32,6 @@ /* 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. diff --git a/keyboards/clueboard/66/rev2/config.h b/keyboards/clueboard/66/rev2/config.h index 0216b5e1fef5..9227cd2dfc49 100644 --- a/keyboards/clueboard/66/rev2/config.h +++ b/keyboards/clueboard/66/rev2/config.h @@ -31,11 +31,6 @@ /* 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. diff --git a/keyboards/clueboard/66/rev3/config.h b/keyboards/clueboard/66/rev3/config.h index e7cda4ccf025..ba646f15755a 100644 --- a/keyboards/clueboard/66/rev3/config.h +++ b/keyboards/clueboard/66/rev3/config.h @@ -31,11 +31,6 @@ /* 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. diff --git a/keyboards/clueboard/66_hotswap/config.h b/keyboards/clueboard/66_hotswap/config.h index d676af0ca86b..88adb57378d3 100644 --- a/keyboards/clueboard/66_hotswap/config.h +++ b/keyboards/clueboard/66_hotswap/config.h @@ -36,11 +36,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/clueboard/card/config.h b/keyboards/clueboard/card/config.h index 8059821213e5..9520c31a6f2e 100644 --- a/keyboards/clueboard/card/config.h +++ b/keyboards/clueboard/card/config.h @@ -39,7 +39,7 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL - + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 20 @@ -87,11 +87,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/cod67/config.h b/keyboards/cod67/config.h index 612379271fe5..51c695de4921 100644 --- a/keyboards/cod67/config.h +++ b/keyboards/cod67/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,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/comet46/keymaps/satt/config.h b/keyboards/comet46/keymaps/satt/config.h index c99de2cf804a..a3ca2ebfefe9 100644 --- a/keyboards/comet46/keymaps/satt/config.h +++ b/keyboards/comet46/keymaps/satt/config.h @@ -21,11 +21,6 @@ along with this program. If not, see . #ifndef CONFIG_USER_H #define CONFIG_USER_H -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - /* Use I2C or Serial */ #define USE_I2C diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index c6bb374da233..8e1369f129c0 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h @@ -38,11 +38,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index deee35948bfe..1cab3c1c3c57 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -32,7 +32,6 @@ along with this program. If not, see . #define PRODUCT QMK USB-USB Converter #define DESCRIPTION USB to USB Keyboard Converter with QMK - /* size of virtual matrix */ #define MATRIX_ROWS 16 #define MATRIX_COLS 16 @@ -40,9 +39,6 @@ along with this program. If not, see . /* matrix scanning is done in custom_matrix.cpp */ #define DIODE_DIRECTION CUSTOM_MATRIX -/* 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. diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 4bdf434a47de..1f7c174e6e46 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 915779060b94..55bf5930fd2e 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -50,11 +50,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index df009c953a6a..351694a111fe 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -107,11 +107,6 @@ * */ -/* 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/cu75/config.h b/keyboards/cu75/config.h index c21e1da017f1..baaed33e6b38 100644 --- a/keyboards/cu75/config.h +++ b/keyboards/cu75/config.h @@ -89,11 +89,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/daisy/config.h b/keyboards/daisy/config.h index d2ab92f875b7..4698c216e1d1 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -35,7 +35,6 @@ #define BACKLIGHT_PIN D0 #define BACKLIGHT_LEVELS 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -82,11 +81,6 @@ * */ -/* 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/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h index 75c674f63165..f734d9b18968 100644 --- a/keyboards/dc01/arrow/config.h +++ b/keyboards/dc01/arrow/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index e3d49404ea53..9a8ba1b558d6 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -55,7 +55,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -107,11 +106,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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/numpad/config.h b/keyboards/dc01/numpad/config.h index 16d75b2a8fd4..982be66456a2 100644 --- a/keyboards/dc01/numpad/config.h +++ b/keyboards/dc01/numpad/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/right/config.h b/keyboards/dc01/right/config.h index a1d49cc5cbb1..e7aea97a32f5 100644 --- a/keyboards/dc01/right/config.h +++ b/keyboards/dc01/right/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h index 475a5c9dc54b..fc85f9125b9b 100644 --- a/keyboards/deltasplit75/v2/config.h +++ b/keyboards/deltasplit75/v2/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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 @@ -82,5 +77,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/dichotomy/config.h b/keyboards/dichotomy/config.h index f0847ec52ce1..2fc098fe3438 100755 --- a/keyboards/dichotomy/config.h +++ b/keyboards/dichotomy/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dilly/config.h b/keyboards/dilly/config.h index 084186fc66df..1489ec302916 100644 --- a/keyboards/dilly/config.h +++ b/keyboards/dilly/config.h @@ -38,11 +38,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index 464dc835ff55..27938cf239a0 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -63,7 +62,6 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -107,11 +105,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/divergetm2/config.h b/keyboards/divergetm2/config.h index cbeeff9aa87f..a5b1eaa682d7 100644 --- a/keyboards/divergetm2/config.h +++ b/keyboards/divergetm2/config.h @@ -48,7 +48,6 @@ /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION ROW2COL - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -73,10 +72,3 @@ * 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)) \ -) - - diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h index 5b712fe9bd3f..9df38474067e 100644 --- a/keyboards/dk60/config.h +++ b/keyboards/dk60/config.h @@ -47,9 +47,4 @@ along with this program. If not, see . #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)) \ - ) #endif diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 4a7dcddfdb4a..74d27de39e14 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -72,11 +72,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define TAPPING_TERM 200 #endif diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h index 9c49344ff9f2..f454b2e0e1db 100644 --- a/keyboards/duck/eagle_viper/v2/config.h +++ b/keyboards/duck/eagle_viper/v2/config.h @@ -40,11 +40,6 @@ along with this program. If not, see . /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index 54c5321c6bdc..f49a298883cb 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -34,7 +34,6 @@ along with this program. If not, see . /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_LEVELS 1 #define RGB_DI_PIN D6 @@ -49,7 +48,6 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 - /* 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). */ @@ -88,11 +86,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 @@ -197,4 +190,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h index 745af4330d29..9e3a08fbd1a5 100644 --- a/keyboards/duck/lightsaver/config.h +++ b/keyboards/duck/lightsaver/config.h @@ -40,11 +40,6 @@ along with this program. If not, see . /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h index a2b3d641305d..5400c53ef246 100644 --- a/keyboards/duck/octagon/v1/config.h +++ b/keyboards/duck/octagon/v1/config.h @@ -40,11 +40,6 @@ along with this program. If not, see . /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h index 7adcb2760a81..78d18d3bb3b2 100644 --- a/keyboards/duck/octagon/v2/config.h +++ b/keyboards/duck/octagon/v2/config.h @@ -40,11 +40,6 @@ along with this program. If not, see . /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index e58eae0858a4..46702adcdf9a 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 diff --git a/keyboards/dz60/keymaps/LEdiodes/config.h b/keyboards/dz60/keymaps/LEdiodes/config.h index 4f991b9ca2ca..6cdc4a91e3db 100644 --- a/keyboards/dz60/keymaps/LEdiodes/config.h +++ b/keyboards/dz60/keymaps/LEdiodes/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 diff --git a/keyboards/e6v2/le/config.h b/keyboards/e6v2/le/config.h index e1554515034f..580929ba8afc 100644 --- a/keyboards/e6v2/le/config.h +++ b/keyboards/e6v2/le/config.h @@ -56,10 +56,4 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - - - #endif diff --git a/keyboards/e6v2/oe/config.h b/keyboards/e6v2/oe/config.h index b80afcb51ae8..0bb89eba6dbf 100644 --- a/keyboards/e6v2/oe/config.h +++ b/keyboards/e6v2/oe/config.h @@ -56,10 +56,4 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - - - #endif diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index f6b78631ea02..f5820eafca18 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -45,11 +45,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/ep/40/config.h b/keyboards/ep/40/config.h index 90630cd68d4d..0a2495953d6d 100644 --- a/keyboards/ep/40/config.h +++ b/keyboards/ep/40/config.h @@ -91,10 +91,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)) \ -) /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 0c37e4c5960e..9438553093b6 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -56,7 +56,6 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -100,11 +99,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 @@ -209,4 +203,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index a7edb4097241..f9d909cc7e97 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -59,11 +59,6 @@ along with this program. If not, see . /* 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 @@ -87,5 +82,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/ergodash/mini/config.h b/keyboards/ergodash/mini/config.h index 11cff145e181..fc63cc1e9d20 100644 --- a/keyboards/ergodash/mini/config.h +++ b/keyboards/ergodash/mini/config.h @@ -66,11 +66,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index d3f3314ee61f..160e703629fc 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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 @@ -84,5 +79,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/ergodash/rev2/config.h b/keyboards/ergodash/rev2/config.h index 5f9c689916bd..09657250b135 100644 --- a/keyboards/ergodash/rev2/config.h +++ b/keyboards/ergodash/rev2/config.h @@ -63,11 +63,6 @@ along with this program. If not, see . /* 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 @@ -91,5 +86,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/ergoinu/config.h b/keyboards/ergoinu/config.h index de72635b19d2..a59e5da745aa 100644 --- a/keyboards/ergoinu/config.h +++ b/keyboards/ergoinu/config.h @@ -64,11 +64,6 @@ along with this program. If not, see . /* 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 B6 diff --git a/keyboards/ergotravel/rev1/config.h b/keyboards/ergotravel/rev1/config.h index e6d557361c00..1d8a60afdd08 100644 --- a/keyboards/ergotravel/rev1/config.h +++ b/keyboards/ergotravel/rev1/config.h @@ -51,11 +51,6 @@ along with this program. If not, see . /* 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)) \ -) - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/espectro/config.h b/keyboards/espectro/config.h index 294091d58226..438530c41091 100755 --- a/keyboards/espectro/config.h +++ b/keyboards/espectro/config.h @@ -42,7 +42,6 @@ #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 - /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -52,11 +51,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 18 @@ -67,4 +61,3 @@ #define RGBLIGHT_ANIMATIONS #endif - diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h index 81138a7703c1..6bb286146447 100644 --- a/keyboards/evil80/config.h +++ b/keyboards/evil80/config.h @@ -40,11 +40,6 @@ /* 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. diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index d424404865e1..c952ca737233 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -43,7 +43,4 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index 9771c8c03d76..96f04b097c1c 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -52,13 +52,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index 1b1f41c9091b..a6cb97756261 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -56,13 +56,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/felix/config.h b/keyboards/felix/config.h index 003fe87dc832..0e5dd9d2d191 100644 --- a/keyboards/felix/config.h +++ b/keyboards/felix/config.h @@ -37,12 +37,6 @@ /* 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)) \ -) - - /* there is no rgb underglow by default. */ #define RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index a3ff43b06ba5..cccb798be07e 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,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/fortitude60/rev1/config.h b/keyboards/fortitude60/rev1/config.h index b89f5c7df920..2fa179ae2ef3 100644 --- a/keyboards/fortitude60/rev1/config.h +++ b/keyboards/fortitude60/rev1/config.h @@ -58,11 +58,6 @@ along with this program. If not, see . /* 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 */ #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B5 diff --git a/keyboards/four_banger/config.h b/keyboards/four_banger/config.h index 761ddba71516..4567cec8e02f 100644 --- a/keyboards/four_banger/config.h +++ b/keyboards/four_banger/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/fourier/rev1/config.h b/keyboards/fourier/rev1/config.h index 2a8fa06fa50b..601d843e713f 100644 --- a/keyboards/fourier/rev1/config.h +++ b/keyboards/fourier/rev1/config.h @@ -57,11 +57,6 @@ along with this program. If not, see . /* 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_ANIMATIONS diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h index 396c3b4b9499..fce0931c2162 100755 --- a/keyboards/fractal/config.h +++ b/keyboards/fractal/config.h @@ -39,11 +39,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/gh60/config.h b/keyboards/gh60/config.h index 97753bc069d2..a99dd4e59b46 100644 --- a/keyboards/gh60/config.h +++ b/keyboards/gh60/config.h @@ -99,11 +99,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/gh60/keymaps/dbroqua/config.h b/keyboards/gh60/keymaps/dbroqua/config.h index fd63c9a8f769..380b8303f319 100644 --- a/keyboards/gh60/keymaps/dbroqua/config.h +++ b/keyboards/gh60/keymaps/dbroqua/config.h @@ -96,11 +96,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/gh60/keymaps/robotmaxtron/config.h b/keyboards/gh60/keymaps/robotmaxtron/config.h index 925a69efe09e..ec2f8ceea080 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/config.h +++ b/keyboards/gh60/keymaps/robotmaxtron/config.h @@ -99,11 +99,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/gh80_3000/config.h b/keyboards/gh80_3000/config.h index ca72aba5aa31..7fb41831285b 100644 --- a/keyboards/gh80_3000/config.h +++ b/keyboards/gh80_3000/config.h @@ -38,11 +38,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/gonnerd/config.h b/keyboards/gonnerd/config.h index cad8fe58618c..40615da5fca5 100644 --- a/keyboards/gonnerd/config.h +++ b/keyboards/gonnerd/config.h @@ -35,9 +35,4 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/gskt00/config.h b/keyboards/gskt00/config.h index f36493f28894..376f89dbe8d8 100755 --- a/keyboards/gskt00/config.h +++ b/keyboards/gskt00/config.h @@ -30,10 +30,3 @@ /* 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)) \ -) - - diff --git a/keyboards/h87a/config.h b/keyboards/h87a/config.h index a98b7b2832d2..a7a94a0bc9c0 100644 --- a/keyboards/h87a/config.h +++ b/keyboards/h87a/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -66,11 +65,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h index d54d2c543750..7024f8fcbf7b 100644 --- a/keyboards/hadron/config.h +++ b/keyboards/hadron/config.h @@ -26,9 +26,6 @@ along with this program. If not, see . #define PRODUCT Hadron Keyboard #define DESCRIPTION A low profile ortholinear keyboard - - - //#define AUDIO_VOICES //#define BACKLIGHT_PIN B7 @@ -50,11 +47,6 @@ along with this program. If not, see . /* 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. @@ -72,5 +64,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 7db5003043fd..d6c3830dfd42 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -27,7 +27,6 @@ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 - //Audio #undef AUDIO_VOICES #undef C6_AUDIO @@ -96,11 +95,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. @@ -167,7 +161,6 @@ #endif - /* Control 1 register settings */ #define DRIVE_TIME 25 #define AC_COUPLE 0 diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index 7a63fe262861..a773a72b1aad 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -65,9 +65,3 @@ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE - -/* key combination for commkand */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index 3d8d8709a5ea..1ae3d21c441a 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -98,11 +98,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/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h index a095e8737439..9b6ecfaa36d8 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h @@ -96,11 +96,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/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h index e940acaa0c18..db89e4b844fa 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h @@ -98,11 +98,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/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h index 2e34e0f89804..4cdc7ed125d1 100644 --- a/keyboards/handwired/atreus50/config.h +++ b/keyboards/handwired/atreus50/config.h @@ -44,7 +44,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -58,7 +57,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN C6 #define RGBLIGHT_ANIMATIONS @@ -67,7 +65,6 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - /* * Force NKRO * @@ -101,11 +98,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/handwired/bluepill/config.h b/keyboards/handwired/bluepill/config.h index aeab1808a8c1..6d583b989666 100644 --- a/keyboards/handwired/bluepill/config.h +++ b/keyboards/handwired/bluepill/config.h @@ -29,11 +29,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlighting include */ /*#define BACKLIGHT_PIN 19 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/handwired/cmd60/config.h b/keyboards/handwired/cmd60/config.h index 27eb400b878b..e95cac1e49c2 100644 --- a/keyboards/handwired/cmd60/config.h +++ b/keyboards/handwired/cmd60/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h index 0e6f3f98ed60..5e7605d3ab7f 100644 --- a/keyboards/handwired/dactyl_manuform/config.h +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -46,11 +46,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Enables This makes it easier for fast typists to use dual-function keys */ #define PERMISSIVE_HOLD @@ -59,7 +54,6 @@ along with this program. If not, see . #define RGBLED_NUM 12 // Number of LEDs - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/datahand/config.h b/keyboards/handwired/datahand/config.h index 1ba8479f0a1c..75d8372bf709 100644 --- a/keyboards/handwired/datahand/config.h +++ b/keyboards/handwired/datahand/config.h @@ -71,11 +71,6 @@ * 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)) \ -) - /* * Command/Windows key option * diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h index 0da13a4b15e2..77e34ceab7fc 100644 --- a/keyboards/handwired/downbubble/config.h +++ b/keyboards/handwired/downbubble/config.h @@ -130,11 +130,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/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h index 76596342b481..685d421b1262 100644 --- a/keyboards/handwired/fivethirteen/config.h +++ b/keyboards/handwired/fivethirteen/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h index 6af876ab79ba..180b1b01ae94 100644 --- a/keyboards/handwired/gamenum/config.h +++ b/keyboards/handwired/gamenum/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/hexon38/config.h b/keyboards/handwired/hexon38/config.h index 23eb51e01481..5453eda543aa 100644 --- a/keyboards/handwired/hexon38/config.h +++ b/keyboards/handwired/hexon38/config.h @@ -33,12 +33,6 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index 1c8e0587dcf7..3986f0ded6fd 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 15 @@ -104,11 +103,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)) \ -) - #define B6_AUDIO #define C6_AUDIO diff --git a/keyboards/handwired/jn68m/config.h b/keyboards/handwired/jn68m/config.h index 22ab1158d7fd..9cb00172376d 100644 --- a/keyboards/handwired/jn68m/config.h +++ b/keyboards/handwired/jn68m/config.h @@ -47,8 +47,3 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index d3869f99efe9..8772ead3a2c9 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -99,11 +98,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/handwired/maartenwut/config.h b/keyboards/handwired/maartenwut/config.h index 066f1385603e..b939fa1f6298 100755 --- a/keyboards/handwired/maartenwut/config.h +++ b/keyboards/handwired/maartenwut/config.h @@ -34,11 +34,6 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define QMK_ESC_OUTPUT C6 // usually COL #define QMK_ESC_INPUT D0 // usually ROW diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h index bb329541c7c6..c6c689ab6c5d 100644 --- a/keyboards/handwired/magicforce61/config.h +++ b/keyboards/handwired/magicforce61/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 1e2b7d3e7316..dc0a82c94ac9 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h index 4cdafcbd2e4f..c30d54db709f 100644 --- a/keyboards/handwired/minorca/config.h +++ b/keyboards/handwired/minorca/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/handwired/ms_sculpt_mobile/config.h b/keyboards/handwired/ms_sculpt_mobile/config.h index c3bdf333e26b..6739b44fcf76 100644 --- a/keyboards/handwired/ms_sculpt_mobile/config.h +++ b/keyboards/handwired/ms_sculpt_mobile/config.h @@ -46,7 +46,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7} #define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 } - #endif /* COL2ROW or ROW2COL */ @@ -58,7 +57,6 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* * Magic Key Options * @@ -71,12 +69,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)) \ -) - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/nicekey/config.h b/keyboards/handwired/nicekey/config.h index 652711be8492..4af56cc52899 100644 --- a/keyboards/handwired/nicekey/config.h +++ b/keyboards/handwired/nicekey/config.h @@ -47,13 +47,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h index 3c0af7bf76b3..fc6068628d80 100644 --- a/keyboards/handwired/not_so_minidox/config.h +++ b/keyboards/handwired/not_so_minidox/config.h @@ -61,11 +61,6 @@ along with this program. If not, see . /* 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)) \ -) - /* disable debug print */ //#define NO_DEBUG @@ -79,6 +74,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - #endif diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/handwired/numbrero/config.h index cbcb1d826131..bb178bd22565 100644 --- a/keyboards/handwired/numbrero/config.h +++ b/keyboards/handwired/numbrero/config.h @@ -37,11 +37,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h index 847f2111f526..c597494c416d 100644 --- a/keyboards/handwired/numpad20/config.h +++ b/keyboards/handwired/numpad20/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index c0a6b5839214..4a3042eeae4c 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -47,13 +47,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h index f85159596ca7..1e2128b650bc 100644 --- a/keyboards/handwired/ortho5x13/config.h +++ b/keyboards/handwired/ortho5x13/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/ortho60/config.h b/keyboards/handwired/ortho60/config.h index dd06f3f9531b..7234b54af1b4 100644 --- a/keyboards/handwired/ortho60/config.h +++ b/keyboards/handwired/ortho60/config.h @@ -48,13 +48,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h index d63eeba36e8b..8f562de3b530 100644 --- a/keyboards/handwired/pilcrow/config.h +++ b/keyboards/handwired/pilcrow/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/handwired/practice60/config.h b/keyboards/handwired/practice60/config.h index 31ddd77d1776..648dd62edcf2 100644 --- a/keyboards/handwired/practice60/config.h +++ b/keyboards/handwired/practice60/config.h @@ -48,13 +48,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index e34fbb8ccc0d..c5395dab4272 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -49,8 +49,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/handwired/pteron/config.h b/keyboards/handwired/pteron/config.h index 9650839e304d..d0b074c6814c 100644 --- a/keyboards/handwired/pteron/config.h +++ b/keyboards/handwired/pteron/config.h @@ -25,10 +25,5 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 // 5 is default -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/handwired/qc60/config.h b/keyboards/handwired/qc60/config.h index 00d095ddf12b..aad1d64a0365 100644 --- a/keyboards/handwired/qc60/config.h +++ b/keyboards/handwired/qc60/config.h @@ -20,8 +20,3 @@ /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h index 15f114297178..82fe01863d93 100755 --- a/keyboards/handwired/reddot/config.h +++ b/keyboards/handwired/reddot/config.h @@ -46,7 +46,6 @@ along with this program. If not, see . #define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -54,14 +53,12 @@ along with this program. If not, see . // #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 - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -100,11 +97,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/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h index f2194e550cc0..34def3815ab2 100644 --- a/keyboards/handwired/retro_refit/config.h +++ b/keyboards/handwired/retro_refit/config.h @@ -54,7 +54,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - /* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ #define FORCE_NKRO @@ -64,11 +63,6 @@ along with this program. If not, see . * 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 diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h index 46d854099cb5..aae53e98108c 100644 --- a/keyboards/handwired/space_oddity/config.h +++ b/keyboards/handwired/space_oddity/config.h @@ -44,11 +44,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index ef9a26a19f52..de146b225b87 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -105,11 +105,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/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 7558c03bf40d..22ec75f761d4 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -67,9 +67,4 @@ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE - /* key combination for command */ - #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - #endif diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/handwired/tradestation/config.h index 346577a922ba..22650d2f1aae 100644 --- a/keyboards/handwired/tradestation/config.h +++ b/keyboards/handwired/tradestation/config.h @@ -37,12 +37,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h index 2b82da447f04..ccf214736d39 100644 --- a/keyboards/handwired/traveller/config.h +++ b/keyboards/handwired/traveller/config.h @@ -55,7 +55,6 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -63,7 +62,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -111,11 +109,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/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h index b2eb7020fc49..f4d005307b53 100644 --- a/keyboards/handwired/woodpad/config.h +++ b/keyboards/handwired/woodpad/config.h @@ -99,11 +99,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/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h index 6fc769b5f21d..f58c8f90b83e 100644 --- a/keyboards/handwired/xealous/rev1/config.h +++ b/keyboards/handwired/xealous/rev1/config.h @@ -64,11 +64,6 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -/* 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. diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index b8822e2273a2..343cecd59d26 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . #define PRODUCT HelixPico #define DESCRIPTION A split keyboard for the cheap makers - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -71,11 +70,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Audio */ #ifdef AUDIO_ENABLE #define B5_AUDIO @@ -145,5 +139,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/helix/rev1/config.h b/keyboards/helix/rev1/config.h index 07b5c4f6f8bc..22e61acc7531 100644 --- a/keyboards/helix/rev1/config.h +++ b/keyboards/helix/rev1/config.h @@ -67,11 +67,6 @@ along with this program. If not, see . /* 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 @@ -94,5 +89,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index f7d35b371469..2dc2fb8dd8a0 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -27,7 +27,6 @@ along with this program. If not, see . #define PRODUCT Helix Beta #define DESCRIPTION A split keyboard for the cheap makers - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -80,11 +79,6 @@ along with this program. If not, see . /* 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 @@ -161,5 +155,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/config.h index af7ecc5e258e..fc747a6e9421 100644 --- a/keyboards/hhkb/config.h +++ b/keyboards/hhkb/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ //#define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef HHKB_RN42_ENABLE // rn42 support -- acquired from the tmk repo. This is almost certainly not // integrated with qmk in the correct way. diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/keymaps/mjt/config.h index d38611538f99..3b8f2e676c91 100644 --- a/keyboards/hhkb/keymaps/mjt/config.h +++ b/keyboards/hhkb/keymaps/mjt/config.h @@ -51,11 +51,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index 0817db00127e..849c89ce38a2 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -85,11 +85,6 @@ * */ -/* 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/hs60/v1/config.h b/keyboards/hs60/v1/config.h index c297a6e191f1..debc6bdde601 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -102,11 +102,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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index bc1681ffd15a..6f5e0012c3e3 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -70,10 +70,17 @@ along with this program. If not, see . */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) +/* + * 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. + * + */ /* Backlight options */ diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index f6b552bad8dc..70b6a48063b5 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/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/infinity60/config.h b/keyboards/infinity60/config.h index c1e9ec5b1f2a..16272e4279c2 100644 --- a/keyboards/infinity60/config.h +++ b/keyboards/infinity60/config.h @@ -39,11 +39,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Keymap for Infinity prototype */ //#define INFINITY_PROTOTYPE diff --git a/keyboards/iris/rev1/config.h b/keyboards/iris/rev1/config.h index 1eddb54b4f8e..13302c60c4e1 100644 --- a/keyboards/iris/rev1/config.h +++ b/keyboards/iris/rev1/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN D2 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev1_led/config.h b/keyboards/iris/rev1_led/config.h index 4505c2229972..5fb8be674ec3 100644 --- a/keyboards/iris/rev1_led/config.h +++ b/keyboards/iris/rev1_led/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev2/config.h b/keyboards/iris/rev2/config.h index e0465ca8a41e..235c5710f569 100644 --- a/keyboards/iris/rev2/config.h +++ b/keyboards/iris/rev2/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev3/config.h b/keyboards/iris/rev3/config.h index ad5937dc155e..70e5d6e2a5df 100644 --- a/keyboards/iris/rev3/config.h +++ b/keyboards/iris/rev3/config.h @@ -65,11 +65,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index 466cb7a28e4c..a5ec23ae4d70 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -39,9 +39,5 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 6e1306b27630..98256b1281b7 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -54,10 +54,4 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - - - #endif diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h index 047be5707b0f..70648d2f5304 100644 --- a/keyboards/jd40/config.h +++ b/keyboards/jd40/config.h @@ -63,12 +63,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 // Number of LEDs diff --git a/keyboards/jd45/config.h b/keyboards/jd45/config.h index 43d138f4eda9..d3137b9f4b56 100644 --- a/keyboards/jd45/config.h +++ b/keyboards/jd45/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/jd45/keymaps/mjt/config.h b/keyboards/jd45/keymaps/mjt/config.h index a8c8e9d17efe..5507caae5dc3 100644 --- a/keyboards/jd45/keymaps/mjt/config.h +++ b/keyboards/jd45/keymaps/mjt/config.h @@ -59,11 +59,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index 7fac1ed5b99e..67561b0b28b9 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -48,7 +48,4 @@ along with this program. If not, see . #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index 6aa7628837f4..0f09f02ff87b 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -48,7 +48,4 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/jm60/config.h b/keyboards/jm60/config.h index cb5c90bb1937..0d2d0730e79f 100644 --- a/keyboards/jm60/config.h +++ b/keyboards/jm60/config.h @@ -50,11 +50,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index 4937d9ad99a5..a841a5710736 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -41,11 +41,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h index aaf2b5d5447c..177a09ff4507 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/katana60/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,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)) \ -) - #define TAPPING_TERM 200 /* control how magic key switches layers */ diff --git a/keyboards/kbd19x/config.h b/keyboards/kbd19x/config.h index 47cfd7484a7a..03b701b1cc98 100644 --- a/keyboards/kbd19x/config.h +++ b/keyboards/kbd19x/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 @@ -221,4 +216,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/kbd4x/config.h b/keyboards/kbd4x/config.h index b967ab8f7566..cac4ed95d11d 100644 --- a/keyboards/kbd4x/config.h +++ b/keyboards/kbd4x/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/kbd66/config.h b/keyboards/kbd66/config.h index 1802a0219665..f9990c0e4fee 100644 --- a/keyboards/kbd66/config.h +++ b/keyboards/kbd66/config.h @@ -54,7 +54,6 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BREATHING_PERIOD 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -106,11 +105,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/kbd67/hotswap/config.h b/keyboards/kbd67/hotswap/config.h index f952235adcf7..f54ffa1cac17 100644 --- a/keyboards/kbd67/hotswap/config.h +++ b/keyboards/kbd67/hotswap/config.h @@ -130,11 +130,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/kbd67/rev1/config.h b/keyboards/kbd67/rev1/config.h index 2e3cf85c3854..2a1e558ab324 100644 --- a/keyboards/kbd67/rev1/config.h +++ b/keyboards/kbd67/rev1/config.h @@ -125,11 +125,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/kbd6x/config.h b/keyboards/kbd6x/config.h index 9f23fb867cb5..4a3fb881bf67 100644 --- a/keyboards/kbd6x/config.h +++ b/keyboards/kbd6x/config.h @@ -61,7 +61,6 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 12 #endif - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -113,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/kbd75/config.h b/keyboards/kbd75/config.h index 726afcaf6e79..6f0cd86de31e 100644 --- a/keyboards/kbd75/config.h +++ b/keyboards/kbd75/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/kbd8x/config.h b/keyboards/kbd8x/config.h index 7749e04724b3..dca9b40ee052 100644 --- a/keyboards/kbd8x/config.h +++ b/keyboards/kbd8x/config.h @@ -61,7 +61,6 @@ along with this program. If not, see . #define RGBLIGHT_VAL_STEP 8 #endif - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -113,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 @@ -194,5 +188,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 - - diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index 29695d0b9d74..5c002f9b3fef 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -102,11 +102,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/kc60se/config.h b/keyboards/kc60se/config.h index 9f8b3e28aecf..54e66cb31da5 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -46,7 +46,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -98,11 +97,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/kinesis/config.h b/keyboards/kinesis/config.h index a4e06b6ebb24..74e85f6f1b8f 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -76,11 +76,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 @@ -135,8 +130,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - #ifdef SUBPROJECT_alvicstep #include "alvicstep/config.h" #endif diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 0677e0adebf2..321aec5eb279 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -41,10 +41,4 @@ #define IGNORE_MOD_TAP_INTERRUPT -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - - #endif diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index e75ac342c433..f4b1c7a5ce69 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -60,7 +60,6 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -112,11 +111,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/kmac/config.h b/keyboards/kmac/config.h index 5c164bfc1795..18eb1de1f942 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -93,11 +93,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/kmini/config.h b/keyboards/kmini/config.h index 567a7544290d..b2ee7185e4da 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -50,9 +50,4 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 154fbf01fd76..a12ed2720efc 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,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/kona_classic/config.h b/keyboards/kona_classic/config.h index fecf64c041cd..819a7475a034 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -101,11 +101,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/laplace/config.h b/keyboards/laplace/config.h index b4a524368943..45b89a97acb5 100644 --- a/keyboards/laplace/config.h +++ b/keyboards/laplace/config.h @@ -46,9 +46,4 @@ along with this program. If not, see . #define TAPPING_TERM 200 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/launchpad/config.h b/keyboards/launchpad/config.h index 9d1e310d3ecf..4023a22015e4 100644 --- a/keyboards/launchpad/config.h +++ b/keyboards/launchpad/config.h @@ -45,11 +45,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/lazydesigners/the50/config.h b/keyboards/lazydesigners/the50/config.h index e4f91f5eef05..d1ddbfea400c 100644 --- a/keyboards/lazydesigners/the50/config.h +++ b/keyboards/lazydesigners/the50/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLED_NUM 1 diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 18b7cce5a4fe..e9dc0a534678 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -53,11 +53,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 1c0871cd1ec6..e3102696588d 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -53,11 +53,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index e73c45722def..9c6367f5335f 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -53,11 +53,6 @@ along with this program. If not, see . /* 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 D4 diff --git a/keyboards/lets_split_eh/config.h b/keyboards/lets_split_eh/config.h index abfee0eace72..c227326c09f3 100644 --- a/keyboards/lets_split_eh/config.h +++ b/keyboards/lets_split_eh/config.h @@ -39,9 +39,4 @@ along with this program. If not, see . /* serial.c configuration for split keyboard */ //#define SOFT_SERIAL_PIN D0 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/levinson/rev1/config.h b/keyboards/levinson/rev1/config.h index 07ba1e221ea9..4d70a6af1682 100644 --- a/keyboards/levinson/rev1/config.h +++ b/keyboards/levinson/rev1/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/levinson/rev2/config.h b/keyboards/levinson/rev2/config.h index a731c7195566..9bf11bee9b51 100644 --- a/keyboards/levinson/rev2/config.h +++ b/keyboards/levinson/rev2/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h index ffbd1de9b682..73e906c3b334 100644 --- a/keyboards/lfkeyboards/lfk65_hs/config.h +++ b/keyboards/lfkeyboards/lfk65_hs/config.h @@ -79,11 +79,6 @@ * */ -/* 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/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h index 32f4455dae2e..30919894c171 100644 --- a/keyboards/lfkeyboards/lfk78/config.h +++ b/keyboards/lfkeyboards/lfk78/config.h @@ -110,11 +110,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/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h index 84357450b384..00df4297746e 100644 --- a/keyboards/lfkeyboards/lfk87/config.h +++ b/keyboards/lfkeyboards/lfk87/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW - #ifdef LFK_TKL_REV_A /* RevB Matrix config */ #define MATRIX_ROWS 6 @@ -111,11 +110,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/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index ea85f670cf54..ea29e84a4ecf 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -89,11 +89,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/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h index 8389e8b3f5e5..e4d197aa2d45 100644 --- a/keyboards/lfkeyboards/mini1800/config.h +++ b/keyboards/lfkeyboards/mini1800/config.h @@ -97,11 +97,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/lfkeyboards/smk65/config.h b/keyboards/lfkeyboards/smk65/config.h index 78626416c8d6..ddc7c5165a88 100644 --- a/keyboards/lfkeyboards/smk65/config.h +++ b/keyboards/lfkeyboards/smk65/config.h @@ -106,11 +106,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/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 0dee6a6946a5..7a4386e7072b 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -52,11 +52,6 @@ along with this program. If not, see . /* 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 RGBLED_NUM 12 // Number of LEDs diff --git a/keyboards/m10a/config.h b/keyboards/m10a/config.h index f052ab629749..ec425dfbd4f7 100644 --- a/keyboards/m10a/config.h +++ b/keyboards/m10a/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index 660d44421bcf..d2f73a6a8e10 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -99,11 +99,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Force boot in NKRO mode */ //#define FORCE_NKRO diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 31eccda87d19..71ccac0f3991 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -99,11 +99,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Force boot in NKRO mode */ //#define FORCE_NKRO diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index d7a5ef5646a5..1acd232c99ec 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h @@ -51,7 +51,6 @@ along with this program. If not, see . //#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } //#define UNUSED_PINS - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -69,11 +68,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/mechmini/v1/config.h b/keyboards/mechmini/v1/config.h index 1f46451f99a9..9355a6dc33c0 100644 --- a/keyboards/mechmini/v1/config.h +++ b/keyboards/mechmini/v1/config.h @@ -42,7 +42,4 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN E2 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index e0922bb7e22e..edca6a5c42fe 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -17,7 +17,6 @@ #include "config_common.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0xCA40 @@ -57,11 +56,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mehkee96/config.h b/keyboards/mehkee96/config.h index 70ca273c36b2..334358aad1cc 100644 --- a/keyboards/mehkee96/config.h +++ b/keyboards/mehkee96/config.h @@ -15,4 +15,3 @@ #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS /* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index b7cdfe8bdb8d..d8f86fe0271b 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -47,7 +47,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING //#define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -94,11 +93,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/meira/promicro/config.h b/keyboards/meira/promicro/config.h index 0c4e8f17f502..3c2113a20014 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . #include "config_common.h" - /* * Keyboard Matrix Assignments * @@ -83,11 +82,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/melody96/config.h b/keyboards/melody96/config.h index 67123a7e524c..db814d0133dc 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index d1e3d27a185c..58b53b674a17 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,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/miniaxe/config.h b/keyboards/miniaxe/config.h index 7a68476a549a..ae1fd448a6e8 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -120,11 +120,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 @@ -244,4 +239,3 @@ along with this program. If not, see . //#define I2C_MASTER_RIGHT #define DISABLE_JTAG - diff --git a/keyboards/minidox/config.h b/keyboards/minidox/config.h index 306a486cb96a..b99180eb1ab1 100644 --- a/keyboards/minidox/config.h +++ b/keyboards/minidox/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* 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)) \ -) - /* disable debug print */ //#define NO_DEBUG diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index a762c5ffea8b..c3d5d5663e2b 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -20,7 +20,6 @@ along with this program. If not, see . #include "config_common.h" #include - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 @@ -57,7 +56,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -109,11 +107,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 @@ -160,8 +153,6 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h index 5cfd2e4b122e..f2220278eca7 100644 --- a/keyboards/mitosis/config.h +++ b/keyboards/mitosis/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/miuni32/config.h b/keyboards/miuni32/config.h index 37e9113f9d69..d7df83cfec4c 100644 --- a/keyboards/miuni32/config.h +++ b/keyboards/miuni32/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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 @@ -159,7 +153,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #define RGB_DI_PIN D0 // The pin your RGB strip is wired to #define RGBLED_NUM 17 // Number of LEDs #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index cf3326d7bf67..f0b3b9caa33e 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -35,7 +35,6 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 15 - #define NO_UART 1 #define RGB_DI_PIN C0 @@ -74,7 +73,6 @@ along with this program. If not, see . /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* #define LOCKING_SUPPORT_ENABLE */ /* Locking resynchronize hack */ @@ -118,9 +116,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/mxss/config.h b/keyboards/mxss/config.h index 8be64e0b387e..74188c943045 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -94,11 +94,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/namecard2x4/config.h b/keyboards/namecard2x4/config.h index d0c26193c4b4..fbb5cf4454d3 100644 --- a/keyboards/namecard2x4/config.h +++ b/keyboards/namecard2x4/config.h @@ -59,7 +59,6 @@ along with this program. If not, see . //#define BACKLIGHT_BREATHING //#define BACKLIGHT_LEVELS 1 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -111,11 +110,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 @@ -220,4 +214,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h index b9d3ed4e9ddc..9a4b43c1e67c 100644 --- a/keyboards/niu_mini/config.h +++ b/keyboards/niu_mini/config.h @@ -59,11 +59,6 @@ along with this program. If not, see . /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/noxary/268/config.h b/keyboards/noxary/268/config.h index 7eec79a1bcd2..d6f5234cbdb8 100644 --- a/keyboards/noxary/268/config.h +++ b/keyboards/noxary/268/config.h @@ -55,11 +55,6 @@ along with this program. If not, see . /* 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)) \ -) - /* ws2812b options */ #define RGB_DI_PIN B5 #ifdef RGB_DI_PIN diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index f5308d8ecd30..2702f924b572 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -106,11 +106,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/noxary/x268/config.h b/keyboards/noxary/x268/config.h index 5c4f6cdad7ce..ac52d9fc3fe7 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -115,11 +115,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/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h index 892054b7331f..98381aca7415 100644 --- a/keyboards/nyquist/rev1/config.h +++ b/keyboards/nyquist/rev1/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/nyquist/rev2/config.h b/keyboards/nyquist/rev2/config.h index 21aea0aada3a..52c50694bf02 100644 --- a/keyboards/nyquist/rev2/config.h +++ b/keyboards/nyquist/rev2/config.h @@ -51,11 +51,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/nyquist/rev3/config.h b/keyboards/nyquist/rev3/config.h index 0caf8c423cb6..18b40ecec7ae 100644 --- a/keyboards/nyquist/rev3/config.h +++ b/keyboards/nyquist/rev3/config.h @@ -52,11 +52,6 @@ along with this program. If not, see . /* 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 B4 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h index db7b74e58724..eb75b71c97ac 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -66,11 +66,6 @@ along with this program. If not, see . /* 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)) \ -) - #define RGB_DI_PIN F6 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 10 diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_blackheart/config.h index 94412cfa6730..edfd113deef6 100644 --- a/keyboards/omnikey_blackheart/config.h +++ b/keyboards/omnikey_blackheart/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - /* force n-key rollover*/ #define FORCE_NKRO diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h index 62b3b69a0ed4..5f3f4f5deb7e 100644 --- a/keyboards/org60/config.h +++ b/keyboards/org60/config.h @@ -72,11 +72,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define TAPPING_TERM 200 #endif diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 09df12d9ed96..6fca4278dcf3 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -32,16 +32,11 @@ along with this program. If not, see . // #define MASTER_RIGHT #define EE_HANDS - -/* key combination for command */ -#ifdef IS_COMMAND -#undef IS_COMMAND -#endif +/* key combination for magic key command */ #define IS_COMMAND() ( \ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ ) - #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN D3 #define RGBLED_NUM 16 // Number of LEDs @@ -77,7 +72,6 @@ along with this program. If not, see . #define QMK_LED B0 #define QMK_SPEAKER C6 - #define SHFT_LED1 5 #define SHFT_LED2 10 @@ -86,4 +80,3 @@ along with this program. If not, see . #define GUI_LED1 8 #define ALT_LED1 7 - diff --git a/keyboards/paladin64/config.h b/keyboards/paladin64/config.h index a5280f4d48b2..0696fefd065f 100755 --- a/keyboards/paladin64/config.h +++ b/keyboards/paladin64/config.h @@ -105,11 +105,6 @@ /* 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)) \ -) - #define RGB_DI_PIN D0 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index 703141bebfe5..00bdbc60f1b9 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -41,6 +41,3 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define NO_UART 1 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index c0594bf91ab2..6edf170d97b1 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -42,9 +42,5 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - diff --git a/keyboards/phantom/config.h b/keyboards/phantom/config.h index 5b7fa62ff507..3fa462445219 100644 --- a/keyboards/phantom/config.h +++ b/keyboards/phantom/config.h @@ -101,11 +101,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/pinky/3/config.h b/keyboards/pinky/3/config.h index 1b120b9cb0ed..6de5a35d0e6a 100644 --- a/keyboards/pinky/3/config.h +++ b/keyboards/pinky/3/config.h @@ -131,11 +131,6 @@ * */ -/* 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/pinky/4/config.h b/keyboards/pinky/4/config.h index 2348d4084544..53c6f91b1a7f 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -131,11 +131,6 @@ * */ -/* 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/plain60/config.h b/keyboards/plain60/config.h index 9e838616bf5d..763aeff08239 100644 --- a/keyboards/plain60/config.h +++ b/keyboards/plain60/config.h @@ -45,11 +45,6 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define QMK_ESC_OUTPUT D2 // usually COL #define QMK_ESC_INPUT B4 // usually ROW @@ -72,4 +67,4 @@ along with this program. If not, see . // Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 452a99d7463d..837311c76916 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -63,11 +63,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/planck/keymaps/dodger/config.h b/keyboards/planck/keymaps/dodger/config.h index c70acfdc9942..4b7931e778a4 100644 --- a/keyboards/planck/keymaps/dodger/config.h +++ b/keyboards/planck/keymaps/dodger/config.h @@ -63,11 +63,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h index dc79bad064e4..35b28da2369f 100644 --- a/keyboards/planck/keymaps/zach/config.h +++ b/keyboards/planck/keymaps/zach/config.h @@ -33,11 +33,6 @@ //#define LOCKING_RESYNC_ENABLE #undef 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. diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index c0fbb412ee1b..4713d9d233d4 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/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/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h index 53bbe95e3a66..958fdd0d49c4 100644 --- a/keyboards/playkbtw/ca66/config.h +++ b/keyboards/playkbtw/ca66/config.h @@ -37,12 +37,6 @@ /* 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)) \ -) - - #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index 601e3c8a5c67..77822e0a12e7 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index 739e38555b1f..1887bff5df8b 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h @@ -63,11 +63,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/preonic/keymaps/kinesis/config.h b/keyboards/preonic/keymaps/kinesis/config.h index e6099ceb82c1..7899408cda08 100644 --- a/keyboards/preonic/keymaps/kinesis/config.h +++ b/keyboards/preonic/keymaps/kinesis/config.h @@ -56,11 +56,6 @@ along with this program. If not, see . /* 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 D1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index 25f88afdc159..58690a4ababd 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -45,7 +45,6 @@ along with this program. If not, see . /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST - #define BACKLIGHT_BREATHING // LED breathing /* number of backlight levels */ #define BACKLIGHT_LEVELS 5 @@ -58,11 +57,6 @@ along with this program. If not, see . /* 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 D1 @@ -90,5 +84,4 @@ along with this program. If not, see . //#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality //#define SPACE_CADET // Parenthesis on L/R shift - #endif diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 3dc9dc4ebfe7..c37f263adc57 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/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/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 8e2457816667..354f69c4d4b2 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -50,8 +50,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index 366504375e5a..aeddcf25c981 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/config.h @@ -50,8 +50,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/primekb/prime_o/config.h b/keyboards/primekb/prime_o/config.h index eb897ef8fa3d..511d3d483498 100644 --- a/keyboards/primekb/prime_o/config.h +++ b/keyboards/primekb/prime_o/config.h @@ -50,8 +50,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/primekb/prime_r/config.h b/keyboards/primekb/prime_r/config.h index ad92199a22a1..345bf91b89a3 100644 --- a/keyboards/primekb/prime_r/config.h +++ b/keyboards/primekb/prime_r/config.h @@ -55,11 +55,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/proton_c/config.h b/keyboards/proton_c/config.h index 13a608f9b182..5ebd17f99ed4 100644 --- a/keyboards/proton_c/config.h +++ b/keyboards/proton_c/config.h @@ -62,11 +62,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. @@ -117,4 +112,3 @@ // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP - diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index fc17b5d5e2e6..c0de5a2116b9 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -35,7 +35,4 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/quefrency/rev1/config.h b/keyboards/quefrency/rev1/config.h index 88d7044864d9..4b95eea5091c 100644 --- a/keyboards/quefrency/rev1/config.h +++ b/keyboards/quefrency/rev1/config.h @@ -49,11 +49,6 @@ along with this program. If not, see . /* 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_ANIMATIONS diff --git a/keyboards/qwertyydox/config.h b/keyboards/qwertyydox/config.h index a685652230a1..4c651d3c6cd1 100644 --- a/keyboards/qwertyydox/config.h +++ b/keyboards/qwertyydox/config.h @@ -57,11 +57,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN E6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/qwertyydox/rev1/config.h b/keyboards/qwertyydox/rev1/config.h index a2557592d3e1..5823beb3d472 100644 --- a/keyboards/qwertyydox/rev1/config.h +++ b/keyboards/qwertyydox/rev1/config.h @@ -57,11 +57,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN E6 #define BACKLIGHT_LEVELS 5 @@ -70,7 +65,6 @@ along with this program. If not, see . #define RGBLED_NUM 12 // Number of LEDs - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h index 144f88d56d9b..1af1f64a5064 100644 --- a/keyboards/rama/m10_b/config.h +++ b/keyboards/rama/m10_b/config.h @@ -104,11 +104,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/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h index 01cfe05a5f04..2b54cda790db 100644 --- a/keyboards/rama/m60_a/config.h +++ b/keyboards/rama/m60_a/config.h @@ -25,8 +25,6 @@ #define PRODUCT RAMA M60-A #define DESCRIPTION RAMA M60-A Keyboard - - // key matrix size #define MATRIX_ROWS 5 #define MATRIX_COLS 14 @@ -51,11 +49,6 @@ // 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. diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h index 049749bd7d51..3098a988dc46 100644 --- a/keyboards/rama/m6_a/config.h +++ b/keyboards/rama/m6_a/config.h @@ -50,7 +50,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -102,11 +101,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_BACKLIGHT_ENABLED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h index 67034ef8ce4e..5ad648c7634c 100644 --- a/keyboards/rama/m6_b/config.h +++ b/keyboards/rama/m6_b/config.h @@ -50,7 +50,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -102,11 +101,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_BACKLIGHT_ENABLED 1 // This conditionally compiles the backlight code for M6-B specifics diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h index c733601e171a..0a8397c0a09b 100644 --- a/keyboards/rama/u80_a/config.h +++ b/keyboards/rama/u80_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* 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/redox/rev1/config.h b/keyboards/redox/rev1/config.h index 654a84de7470..ce205e02e021 100644 --- a/keyboards/redox/rev1/config.h +++ b/keyboards/redox/rev1/config.h @@ -57,11 +57,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/redox_w/config.h b/keyboards/redox_w/config.h index 810a236d9a53..349185ed30af 100644 --- a/keyboards/redox_w/config.h +++ b/keyboards/redox_w/config.h @@ -39,12 +39,6 @@ #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rorschach/rev1/config.h b/keyboards/rorschach/rev1/config.h index 1ea6dde98d50..0ec9cdb31e0f 100644 --- a/keyboards/rorschach/rev1/config.h +++ b/keyboards/rorschach/rev1/config.h @@ -50,11 +50,6 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/s60_x/config.h b/keyboards/s60_x/config.h index 8b97b3c814cb..bb2602dcabc3 100644 --- a/keyboards/s60_x/config.h +++ b/keyboards/s60_x/config.h @@ -44,11 +44,6 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef SUBPROJECT_default #include "default/config.h" #endif diff --git a/keyboards/s60_x/default/config.h b/keyboards/s60_x/default/config.h index 25fc4ad2e024..f6b7f8d6833e 100644 --- a/keyboards/s60_x/default/config.h +++ b/keyboards/s60_x/default/config.h @@ -13,11 +13,6 @@ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/config.h b/keyboards/s60_x/keymaps/ansi_qwertz/config.h index 6c01d579f87d..aee65690f326 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/config.h +++ b/keyboards/s60_x/keymaps/ansi_qwertz/config.h @@ -6,9 +6,4 @@ // keymap needs oneshot functionality #undef NO_ACTION_ONESHOT -#undef IS_COMMAND -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif \ No newline at end of file +#endif diff --git a/keyboards/s60_x/keymaps/bluebear/config.h b/keyboards/s60_x/keymaps/bluebear/config.h index 10bddf0d3713..c1db5f64a6e9 100644 --- a/keyboards/s60_x/keymaps/bluebear/config.h +++ b/keyboards/s60_x/keymaps/bluebear/config.h @@ -38,11 +38,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/s65_plus/config.h b/keyboards/s65_plus/config.h index 60512db46252..c45fd24124e8 100644 --- a/keyboards/s65_plus/config.h +++ b/keyboards/s65_plus/config.h @@ -44,9 +44,4 @@ /* 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)) \ -) - #endif diff --git a/keyboards/s65_x/config.h b/keyboards/s65_x/config.h index aed55632ab43..66bbd6a35920 100644 --- a/keyboards/s65_x/config.h +++ b/keyboards/s65_x/config.h @@ -44,9 +44,4 @@ /* 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)) \ -) - #endif diff --git a/keyboards/s7_elephant/config.h b/keyboards/s7_elephant/config.h index 55baa4c37b7f..6335fbc9c903 100644 --- a/keyboards/s7_elephant/config.h +++ b/keyboards/s7_elephant/config.h @@ -31,11 +31,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/satan/config.h b/keyboards/satan/config.h index eb357b39e07c..dbe98e87ef63 100644 --- a/keyboards/satan/config.h +++ b/keyboards/satan/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/satan/keymaps/admiralStrokers/config.h index d0338fb7e904..17e0ea3b7635 100644 --- a/keyboards/satan/keymaps/admiralStrokers/config.h +++ b/keyboards/satan/keymaps/admiralStrokers/config.h @@ -55,11 +55,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 @@ -73,8 +68,6 @@ along with this program. If not, see . #define DISABLE_SPACE_CADET_ROLLOVER - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/satan/keymaps/fakb/config.h b/keyboards/satan/keymaps/fakb/config.h index a8df7ecef93c..81598f22ed8c 100644 --- a/keyboards/satan/keymaps/fakb/config.h +++ b/keyboards/satan/keymaps/fakb/config.h @@ -36,11 +36,7 @@ //#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)) \ -) -*/ + /* Backlight configuration */ #define BACKLIGHT_LEVELS 8 @@ -86,7 +82,7 @@ #define MOUSEKEY_WHEEL_TIME_TO_MAX 255 // only change -#undef RGB_DI_PIN +#undef RGB_DI_PIN #define RGB_DI_PIN B2 #endif diff --git a/keyboards/scrabblepad/config.h b/keyboards/scrabblepad/config.h index dabab7d35907..800b9297b5df 100644 --- a/keyboards/scrabblepad/config.h +++ b/keyboards/scrabblepad/config.h @@ -61,7 +61,6 @@ along with this program. If not, see . //#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) - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -113,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/singa/config.h b/keyboards/singa/config.h index a76a4b98ffab..54cacee2e90a 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -43,7 +43,4 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/sixkeyboard/config.h b/keyboards/sixkeyboard/config.h index 4ce25c670917..3a672788bd69 100644 --- a/keyboards/sixkeyboard/config.h +++ b/keyboards/sixkeyboard/config.h @@ -46,7 +46,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - /* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ #define FORCE_NKRO @@ -56,11 +55,6 @@ along with this program. If not, see . * 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 diff --git a/keyboards/sixshooter/config.h b/keyboards/sixshooter/config.h index 163a3ab431b5..3c4fd96998c8 100644 --- a/keyboards/sixshooter/config.h +++ b/keyboards/sixshooter/config.h @@ -31,7 +31,6 @@ /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -68,11 +67,6 @@ * */ -/* 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/skog/config.h b/keyboards/skog/config.h index dea3e28e88a6..f518da8c9b0f 100644 --- a/keyboards/skog/config.h +++ b/keyboards/skog/config.h @@ -36,7 +36,4 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index 03906f33f585..d0c55cf971fe 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -37,15 +37,9 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* prevent stuck modifiers */ //#define STRICT_LAYER_RELEASE - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/sol/rev1/config.h b/keyboards/sol/rev1/config.h index fc91b8d49942..bfdadf9f6c69 100644 --- a/keyboards/sol/rev1/config.h +++ b/keyboards/sol/rev1/config.h @@ -19,7 +19,6 @@ 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 0x3060 @@ -28,7 +27,6 @@ along with this program. If not, see . #define PRODUCT Sol #define DESCRIPTION "An RGB, split, ortho-esque keyboard" - #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 150 @@ -76,11 +74,6 @@ along with this program. If not, see . /* 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 B3 #define RGBLIGHT_TIMER @@ -151,5 +144,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/speedo/config.h b/keyboards/speedo/config.h index 6d6a3f7c8032..8670cceca89e 100644 --- a/keyboards/speedo/config.h +++ b/keyboards/speedo/config.h @@ -54,7 +54,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -106,11 +105,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/subatomic/config.h b/keyboards/subatomic/config.h index 592434aabb0c..d4ace70d8323 100644 --- a/keyboards/subatomic/config.h +++ b/keyboards/subatomic/config.h @@ -59,11 +59,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/sx60/config.h b/keyboards/sx60/config.h index 52a1cc7a18ec..cad8b0ba455e 100755 --- a/keyboards/sx60/config.h +++ b/keyboards/sx60/config.h @@ -21,8 +21,6 @@ #define MATRIX_COL_PINS { F6, B5, B4, D7, D6, D5, D3, D2 } #define UNUSED_PINS - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -41,11 +39,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index 3e011bc7543b..ab564cd3b9af 100755 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index 1e42f13d4ff2..6d728b595c73 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -47,11 +47,6 @@ along with this program. If not, see . /* 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)) \ -) - #define RGB_DI_PIN D1 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 @@ -59,7 +54,6 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - #define TAPPING_TERM 200 /* * Feature disable options diff --git a/keyboards/telophase/config.h b/keyboards/telophase/config.h index be0a36977371..473949ee1e83 100644 --- a/keyboards/telophase/config.h +++ b/keyboards/telophase/config.h @@ -41,12 +41,6 @@ along with this program. If not, see . #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h index c2e552449063..20ec2e655a7e 100644 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/the_ruler/config.h b/keyboards/the_ruler/config.h index e72875c7662f..c340019be7da 100644 --- a/keyboards/the_ruler/config.h +++ b/keyboards/the_ruler/config.h @@ -49,7 +49,6 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -96,11 +95,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 @@ -155,7 +149,6 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #define RGB_DI_PIN E6 // The pin your RGB strip is wired to #define RGBLED_NUM 1 // Number of LEDs #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/thevankeyboards/bananasplit/config.h b/keyboards/thevankeyboards/bananasplit/config.h index 5649ab4aa647..a96c59dbb8a9 100644 --- a/keyboards/thevankeyboards/bananasplit/config.h +++ b/keyboards/thevankeyboards/bananasplit/config.h @@ -56,13 +56,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/thevankeyboards/minivan/config.h b/keyboards/thevankeyboards/minivan/config.h index 726768e0ec9a..38207d38d89a 100644 --- a/keyboards/thevankeyboards/minivan/config.h +++ b/keyboards/thevankeyboards/minivan/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/thevankeyboards/roadkit/config.h b/keyboards/thevankeyboards/roadkit/config.h index 9596f7f3b227..3f7178039892 100644 --- a/keyboards/thevankeyboards/roadkit/config.h +++ b/keyboards/thevankeyboards/roadkit/config.h @@ -53,7 +53,6 @@ along with this program. If not, see . // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,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/tkc1800/config.h b/keyboards/tkc1800/config.h index 92a5f1b38bd0..2f45d04dea68 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h @@ -100,11 +100,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/tmo50/config.h b/keyboards/tmo50/config.h index cf6a3fbf37ee..780a530263f9 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -124,11 +124,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 @@ -205,4 +200,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 - diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index f1d32c15b6f4..f750b52bfb3b 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -38,11 +38,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyo60/config.h index 16927be17e07..fddb37d28291 100644 --- a/keyboards/tokyo60/config.h +++ b/keyboards/tokyo60/config.h @@ -31,11 +31,6 @@ /* Set power consumption to work with mobile devices */ #define USB_MAX_POWER_CONSUMPTION 100 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3 } diff --git a/keyboards/touchpad/config.h b/keyboards/touchpad/config.h index 8d34daae1294..8e93c9427f39 100644 --- a/keyboards/touchpad/config.h +++ b/keyboards/touchpad/config.h @@ -46,11 +46,6 @@ along with this program. If not, see . /* 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. diff --git a/keyboards/tragicforce68/config.h b/keyboards/tragicforce68/config.h index 9afdca614075..2a7f3de0f21d 100644 --- a/keyboards/tragicforce68/config.h +++ b/keyboards/tragicforce68/config.h @@ -61,9 +61,4 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index 367c53cb978f..435325f6c4ae 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/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 @@ -221,4 +216,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 34d67207929a..eff8d1d6207c 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -55,11 +55,6 @@ along with this program. If not, see . /* 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)) \ -) - /* ws2812b options */ #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 1f3ebcd51606..34eb128537f8 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -63,7 +63,6 @@ along with this program. If not, see . #define RGB_DI_PIN 0 #define RGB_STEP 16 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -115,11 +114,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/vinta/config.h b/keyboards/vinta/config.h index 5f6ea7f06b30..81a661f168b5 100644 --- a/keyboards/vinta/config.h +++ b/keyboards/vinta/config.h @@ -63,8 +63,3 @@ * 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)) \ -) diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index 5798d91adf6e..c80a011e2aad 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -22,7 +22,6 @@ along with this program. If not, see . // Due to the configurability of this keyboard, matrix sizes are determined in the keymap's config.h - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL @@ -78,11 +77,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 @@ -137,7 +131,6 @@ along with this program. If not, see . /* Only print user print statements */ // #define USER_PRINT - /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index 0347477eea53..7112c789177f 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -52,11 +52,6 @@ along with this program. If not, see . /* 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 F0 @@ -86,5 +81,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/viterbi/rev1/config.h index d6a66408efae..c7707fa0f123 100644 --- a/keyboards/viterbi/rev1/config.h +++ b/keyboards/viterbi/rev1/config.h @@ -54,11 +54,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/wavelet/config.h b/keyboards/wavelet/config.h index ac6c96696926..eed2b7944de1 100644 --- a/keyboards/wavelet/config.h +++ b/keyboards/wavelet/config.h @@ -46,11 +46,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index f54f818d5339..65107c30a14c 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -99,11 +99,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/whitefox/config.h b/keyboards/whitefox/config.h index a8047cf54f42..87af4edcfcb3 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -46,11 +46,6 @@ along with this program. If not, see . /* 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)) \ -) - /* Keymap for Infinity prototype */ //#define INFINITY_PROTOTYPE diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index d7a072b06fa7..85d472165661 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -3,5 +3,25 @@ #define LAYER_FN #define LAYER_NUMPAD -#undef IS_COMMAND #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) + +#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 NO_ACTION_FUNCTION +#define NO_ACTION_MACRO + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 + +#define UNICODE_CYCLE_PERSIST false +#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX +#define UNICODE_WINC_KEY KC_RGUI diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 9eff7d7f1bd4..0ca896d5ec36 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* 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/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 88366edc0494..59c1d04a1bad 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* 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/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 7c15e4a5b137..36f5c957468d 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* 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/xd60/config.h b/keyboards/xd60/config.h index 4bbaec882d4d..6c447b89ff48 100644 --- a/keyboards/xd60/config.h +++ b/keyboards/xd60/config.h @@ -71,9 +71,4 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h index af7573cb6a3a..482edc9c1ddc 100644 --- a/keyboards/xd75/config.h +++ b/keyboards/xd75/config.h @@ -52,7 +52,6 @@ along with this program. If not, see . #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 @@ -99,11 +98,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/xd87/config.h b/keyboards/xd87/config.h index 3682af7409f6..7af3d03579ac 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h @@ -42,7 +42,6 @@ along with this program. If not, see . * */ - #define MATRIX_ROW_PINS { D1, B0, B1, C7, D3, D5 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } @@ -115,11 +114,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 @@ -224,4 +218,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index 8cb2cf82df92..c08829ce3c0d 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -38,11 +38,6 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 1b4d7f7a1330..811e35c0d224 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/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 @@ -221,4 +216,3 @@ along with this program. If not, see . #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 748f43f26eb8..36031eebf5da 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -48,7 +48,4 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 1e9497fac690..51d42603dcb2 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -54,7 +54,4 @@ along with this program. If not, see . #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1*/ -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/ymd96/keymaps/AnthonyWharton/config.h b/keyboards/ymd96/keymaps/AnthonyWharton/config.h index 715e2c9a5fdc..e730e99b273a 100644 --- a/keyboards/ymd96/keymaps/AnthonyWharton/config.h +++ b/keyboards/ymd96/keymaps/AnthonyWharton/config.h @@ -57,7 +57,3 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 500 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 2b358113d43d..5982b6c53090 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -48,7 +48,4 @@ along with this program. If not, see . #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/z150_blackheart/config.h b/keyboards/z150_blackheart/config.h index 362153652263..c8a38b0388f2 100644 --- a/keyboards/z150_blackheart/config.h +++ b/keyboards/z150_blackheart/config.h @@ -34,11 +34,6 @@ /* force n-key rollover*/ #define FORCE_NKRO -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h index 6f3d43473fbf..e39b06cf6b23 100644 --- a/keyboards/zeal60/config.h +++ b/keyboards/zeal60/config.h @@ -49,11 +49,6 @@ // 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. @@ -126,4 +121,3 @@ #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 - diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h index 24aae5e3681a..7406be865b0b 100644 --- a/keyboards/zeal65/config.h +++ b/keyboards/zeal65/config.h @@ -49,11 +49,6 @@ // 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. @@ -126,4 +121,3 @@ #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 - diff --git a/keyboards/zen/rev1/config.h b/keyboards/zen/rev1/config.h index 890d30757030..f480cadcc517 100644 --- a/keyboards/zen/rev1/config.h +++ b/keyboards/zen/rev1/config.h @@ -54,15 +54,9 @@ along with this program. If not, see . /* 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)) \ -) - #define BACKLIGHT_PIN F4 #define BACKLIGHT_LEVELS 5 - /* ws2812 RGB LED */ #define RGB_DI_PIN D1 diff --git a/keyboards/zinc/rev1/config.h b/keyboards/zinc/rev1/config.h index c628400f2e90..370b5c203015 100644 --- a/keyboards/zinc/rev1/config.h +++ b/keyboards/zinc/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see . #define PRODUCT zinc rev.1 #define DESCRIPTION A split keyboard - #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -44,7 +43,6 @@ along with this program. If not, see . //#define MASTER_RIGHT //#define EE_HANDS - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 @@ -68,11 +66,6 @@ along with this program. If not, see . /* 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 @@ -145,5 +138,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - //#endif diff --git a/keyboards/zinc/reva/config.h b/keyboards/zinc/reva/config.h index 15805189054c..f4277f71387c 100644 --- a/keyboards/zinc/reva/config.h +++ b/keyboards/zinc/reva/config.h @@ -26,7 +26,6 @@ along with this program. If not, see . #define PRODUCT zinc rev.A #define DESCRIPTION A split keyboard - #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -41,7 +40,6 @@ along with this program. If not, see . //#define MASTER_RIGHT //#define EE_HANDS - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 @@ -65,11 +63,6 @@ along with this program. If not, see . /* 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 diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h index ae9dcfef67ec..8732a6d371ba 100755 --- a/keyboards/zlant/config.h +++ b/keyboards/zlant/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN D6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index d05b2cb98dee..3b288c21783d 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -131,9 +131,8 @@ 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)) \ -) +/* defined by default; to change, uncomment and set to the combination you want */ +// #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 diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index 4ff3513bc76a..a05873c34b09 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -42,8 +42,9 @@ along with this program. If not, see . #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h index c38f2b9e809d..e25b974630a5 100644 --- a/tmk_core/common/command.h +++ b/tmk_core/common/command.h @@ -34,6 +34,9 @@ bool command_proc(uint8_t code); #define command_proc(code) false #endif +#ifndef IS_COMMAND +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) +#endif #ifndef MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS #define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true From 5d26ebcbaa8069975411e7acf3d8585c35da394f Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 27 Jan 2019 00:09:03 -0800 Subject: [PATCH 220/458] [Keymap] Move Iris via support to Via keymap (#4893) * Move Iris via support to Via keymap And move it out of the main keyboard files * Actually add via keymap folder Because using git when you're tired is apparently a very bad idea, and you do stupid things like not running git add * Clean up config.h file for iris via keymap --- keyboards/iris/keymaps/default/keymap.c | 71 +++++++++++++++++------ keyboards/iris/keymaps/via/config.h | 20 +++++++ keyboards/iris/keymaps/via/keymap.c | 77 +++++++++++++++++++++++++ keyboards/iris/keymaps/via/rules.mk | 7 +++ keyboards/iris/rules.mk | 5 -- 5 files changed, 158 insertions(+), 22 deletions(-) create mode 100644 keyboards/iris/keymaps/via/config.h create mode 100644 keyboards/iris/keymaps/via/keymap.c create mode 100644 keyboards/iris/keymaps/via/rules.mk diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/iris/keymaps/default/keymap.c index f67b71fc1ab3..4644c3d9b55d 100644 --- a/keyboards/iris/keymaps/default/keymap.c +++ b/keyboards/iris/keymaps/default/keymap.c @@ -2,14 +2,21 @@ extern keymap_config_t keymap_config; -#define _MAIN 0 -#define _FN1 1 -#define _FN2 2 -#define _FN3 3 +#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] = { - [_MAIN] = LAYOUT( + [_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, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -19,11 +26,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ 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_LGUI, FN_MO13, KC_ENT, KC_SPC, FN_MO23, KC_LALT + KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), - [_FN1] = LAYOUT( + [_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, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -37,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), - [_FN2] = LAYOUT( + [_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, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -51,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), - [_FN3] = LAYOUT( + [_ADJUST] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ @@ -66,12 +73,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void encoder_update_user(uint8_t index, bool clockwise) { - if (index == 0) { - if (clockwise) { - tap_code(KC_PGDN); - } else { - tap_code(KC_PGUP); - } - } +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/iris/keymaps/via/config.h b/keyboards/iris/keymaps/via/config.h new file mode 100644 index 000000000000..f2498e5927e6 --- /dev/null +++ b/keyboards/iris/keymaps/via/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 RGBLIGHT_ANIMATIONS diff --git a/keyboards/iris/keymaps/via/keymap.c b/keyboards/iris/keymaps/via/keymap.c new file mode 100644 index 000000000000..f67b71fc1ab3 --- /dev/null +++ b/keyboards/iris/keymaps/via/keymap.c @@ -0,0 +1,77 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _MAIN 0 +#define _FN1 1 +#define _FN2 2 +#define _FN3 3 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MAIN] = 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_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_LGUI, FN_MO13, KC_ENT, KC_SPC, FN_MO23, KC_LALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FN1] = 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, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_DEL, KC_DEL, _______, KC_P0 + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FN2] = 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, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + 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, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_LPRN, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_FN3] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } +} diff --git a/keyboards/iris/keymaps/via/rules.mk b/keyboards/iris/keymaps/via/rules.mk new file mode 100644 index 000000000000..ca2680325e1c --- /dev/null +++ b/keyboards/iris/keymaps/via/rules.mk @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +# VIA Support - Comment these 3 lines out to disable +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/iris/rules.mk b/keyboards/iris/rules.mk index 69bc62f876c7..28ca5a8cb8e2 100644 --- a/keyboards/iris/rules.mk +++ b/keyboards/iris/rules.mk @@ -39,8 +39,3 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes DEFAULT_FOLDER = iris/rev2 - -# VIA Support - Comment these 3 lines out to disable -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c From 9ae800fab3861a96f13b9226fe744b7785c13105 Mon Sep 17 00:00:00 2001 From: Daniel H Klein Date: Sun, 27 Jan 2019 00:12:05 -0800 Subject: [PATCH 221/458] [Keyboard] UniGo66 keyboard added (#4913) * 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 --- keyboards/sirius/unigo66/README.md | 17 + keyboards/sirius/unigo66/config.h | 54 ++ keyboards/sirius/unigo66/custom_matrix.cpp | 242 +++++++++ keyboards/sirius/unigo66/info.json | 485 ++++++++++++++++++ .../unigo66/keymaps/danielhklein/config.h | 3 + .../unigo66/keymaps/danielhklein/keymap.c | 177 +++++++ .../sirius/unigo66/keymaps/default/config.h | 3 + .../sirius/unigo66/keymaps/default/keymap.c | 66 +++ keyboards/sirius/unigo66/main.c | 108 ++++ keyboards/sirius/unigo66/matrix.c | 1 + keyboards/sirius/unigo66/readme.md | 17 + keyboards/sirius/unigo66/rules.mk | 32 ++ keyboards/sirius/unigo66/unigo66.c | 1 + keyboards/sirius/unigo66/unigo66.h | 103 ++++ 14 files changed, 1309 insertions(+) create mode 100644 keyboards/sirius/unigo66/README.md create mode 100644 keyboards/sirius/unigo66/config.h create mode 100644 keyboards/sirius/unigo66/custom_matrix.cpp create mode 100644 keyboards/sirius/unigo66/info.json create mode 100644 keyboards/sirius/unigo66/keymaps/danielhklein/config.h create mode 100644 keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c create mode 100644 keyboards/sirius/unigo66/keymaps/default/config.h create mode 100644 keyboards/sirius/unigo66/keymaps/default/keymap.c create mode 100644 keyboards/sirius/unigo66/main.c create mode 100644 keyboards/sirius/unigo66/matrix.c create mode 100644 keyboards/sirius/unigo66/readme.md create mode 100644 keyboards/sirius/unigo66/rules.mk create mode 100644 keyboards/sirius/unigo66/unigo66.c create mode 100644 keyboards/sirius/unigo66/unigo66.h diff --git a/keyboards/sirius/unigo66/README.md b/keyboards/sirius/unigo66/README.md new file mode 100644 index 000000000000..78a02ed09e29 --- /dev/null +++ b/keyboards/sirius/unigo66/README.md @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 000000000000..883de44a2a3c --- /dev/null +++ b/keyboards/sirius/unigo66/config.h @@ -0,0 +1,54 @@ +/* +Copyright 2017 Balz Guenat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 CUSTOM_MATRIX 2 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5369 +#define PRODUCT_ID 0x005B +#define DEVICE_VER 0x0814 +#define MANUFACTURER Sirius +#define PRODUCT UniGo66 +#define DESCRIPTION UniGo66 Wireless Split keyboard + + +/* size of virtual matrix */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 16 + +/* matrix scanning is done in custom_matrix.cpp */ +#define DIODE_DIRECTION CUSTOM_MATRIX + +/* + * 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/sirius/unigo66/custom_matrix.cpp b/keyboards/sirius/unigo66/custom_matrix.cpp new file mode 100644 index 000000000000..fba107c7cbac --- /dev/null +++ b/keyboards/sirius/unigo66/custom_matrix.cpp @@ -0,0 +1,242 @@ +/* +Copyright 2016 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 +#include + +// USB HID host +#include "Usb.h" +#include "usbhub.h" +#include "hid.h" +#include "hidboot.h" +#include "parser.h" + +#include "keycode.h" +#include "util.h" +#include "print.h" +#include "debug.h" +#include "timer.h" +#include "matrix.h" +#include "led.h" +#include "host.h" +#include "keyboard.h" + +extern "C" { +#include "quantum.h" +} + +/* KEY CODE to Matrix + * + * HID keycode(1 byte): + * Higher 5 bits indicates ROW and lower 3 bits COL. + * + * 7 6 5 4 3 2 1 0 + * +---------------+ + * | ROW | COL | + * +---------------+ + * + * Matrix space(16 * 16): + * r\c0123456789ABCDEF + * 0 +----------------+ + * : | | + * : | | + * 16 +----------------+ + */ +#define ROW_MASK 0xF0 +#define COL_MASK 0x0F +#define CODE(row, col) (((row) << 4) | (col)) +#define ROW(code) (((code) & ROW_MASK) >> 4) +#define COL(code) ((code) & COL_MASK) +#define ROW_BITS(code) (1 << COL(code)) + + +// Integrated key state of all keyboards +static report_keyboard_t local_keyboard_report; + +static bool matrix_is_mod = false; + +/* + * USB Host Shield HID keyboards + * This supports two cascaded hubs and four keyboards + */ +USB usb_host; +USBHub hub1(&usb_host); +USBHub hub2(&usb_host); +HIDBoot kbd1(&usb_host); +HIDBoot kbd2(&usb_host); +HIDBoot kbd3(&usb_host); +HIDBoot kbd4(&usb_host); +KBDReportParser kbd_parser1; +KBDReportParser kbd_parser2; +KBDReportParser kbd_parser3; +KBDReportParser kbd_parser4; + + +extern "C" +{ + uint8_t matrix_rows(void) { return MATRIX_ROWS; } + uint8_t matrix_cols(void) { return MATRIX_COLS; } + bool matrix_has_ghost(void) { return false; } + void matrix_init(void) { + // USB Host Shield setup + usb_host.Init(); + kbd1.SetReportParser(0, (HIDReportParser*)&kbd_parser1); + kbd2.SetReportParser(0, (HIDReportParser*)&kbd_parser2); + kbd3.SetReportParser(0, (HIDReportParser*)&kbd_parser3); + kbd4.SetReportParser(0, (HIDReportParser*)&kbd_parser4); + } + + static void or_report(report_keyboard_t report) { + // integrate reports into local_keyboard_report + local_keyboard_report.mods |= report.mods; + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(report.keys[i])) { + for (uint8_t j = 0; j < KEYBOARD_REPORT_KEYS; j++) { + if (! local_keyboard_report.keys[j]) { + local_keyboard_report.keys[j] = report.keys[i]; + break; + } + } + } + } + } + + uint8_t matrix_scan(void) { + static uint16_t last_time_stamp1 = 0; + static uint16_t last_time_stamp2 = 0; + static uint16_t last_time_stamp3 = 0; + static uint16_t last_time_stamp4 = 0; + + // check report came from keyboards + if (kbd_parser1.time_stamp != last_time_stamp1 || + kbd_parser2.time_stamp != last_time_stamp2 || + kbd_parser3.time_stamp != last_time_stamp3 || + kbd_parser4.time_stamp != last_time_stamp4) { + + last_time_stamp1 = kbd_parser1.time_stamp; + last_time_stamp2 = kbd_parser2.time_stamp; + last_time_stamp3 = kbd_parser3.time_stamp; + last_time_stamp4 = kbd_parser4.time_stamp; + + // clear and integrate all reports + local_keyboard_report = {}; + or_report(kbd_parser1.report); + or_report(kbd_parser2.report); + or_report(kbd_parser3.report); + or_report(kbd_parser4.report); + + matrix_is_mod = true; + + dprintf("state: %02X %02X", local_keyboard_report.mods, local_keyboard_report.reserved); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + dprintf(" %02X", local_keyboard_report.keys[i]); + } + dprint("\r\n"); + } else { + matrix_is_mod = false; + } + + uint16_t timer; + timer = timer_read(); + usb_host.Task(); + timer = timer_elapsed(timer); + if (timer > 100) { + dprintf("host.Task: %d\n", timer); + } + + static uint8_t usb_state = 0; + if (usb_state != usb_host.getUsbTaskState()) { + usb_state = usb_host.getUsbTaskState(); + dprintf("usb_state: %02X\n", usb_state); + + // restore LED state when keyboard comes up + if (usb_state == USB_STATE_RUNNING) { + dprintf("speed: %s\n", usb_host.getVbusState()==FSHOST ? "full" : "low"); + keyboard_set_leds(host_keyboard_leds()); + } + } + return 1; + } + + bool matrix_is_modified(void) { + return matrix_is_mod; + } + + bool matrix_is_on(uint8_t row, uint8_t col) { + uint8_t code = CODE(row, col); + + if (IS_MOD(code)) { + if (local_keyboard_report.mods & ROW_BITS(code)) { + return true; + } + } + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (local_keyboard_report.keys[i] == code) { + return true; + } + } + return false; + } + + matrix_row_t matrix_get_row(uint8_t row) { + uint16_t row_bits = 0; + + if (IS_MOD(CODE(row, 0)) && local_keyboard_report.mods) { + row_bits |= local_keyboard_report.mods; + } + + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(local_keyboard_report.keys[i])) { + if (row == ROW(local_keyboard_report.keys[i])) { + row_bits |= ROW_BITS(local_keyboard_report.keys[i]); + } + } + } + return row_bits; + } + + uint8_t matrix_key_count(void) { + uint8_t count = 0; + + count += bitpop(local_keyboard_report.mods); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(local_keyboard_report.keys[i])) { + count++; + } + } + return count; + } + + void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < matrix_rows(); row++) { + xprintf("%02d: ", row); + print_bin_reverse16(matrix_get_row(row)); + print("\n"); + } + } + + void led_set(uint8_t usb_led) + { + kbd1.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); + led_set_kb(usb_led); + } + +}; diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json new file mode 100644 index 000000000000..142e8f1fadf3 --- /dev/null +++ b/keyboards/sirius/unigo66/info.json @@ -0,0 +1,485 @@ +{ + "keyboard_name": "UniGo66", + "url": "https://discord.gg/GJ8bdM", + "maintainer": "qmk", + "width": 22.5, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"F13", "x":2, "y":0}, + {"label":"F14", "x":3, "y":0}, + {"label":"F15", "x":4, "y":0}, + {"label":"F16", "x":5, "y":0}, + {"label":"F17", "x":6.5, "y":0}, + {"label":"F18", "x":7.5, "y":0}, + {"label":"F19", "x":8.5, "y":0}, + {"label":"F20", "x":9.5, "y":0}, + {"label":"F21", "x":11, "y":0}, + {"label":"F22", "x":12, "y":0}, + {"label":"F23", "x":13, "y":0}, + {"label":"F24", "x":14, "y":0}, + {"label":"Esc", "x":0, "y":1}, + {"label":"F1", "x":2, "y":1}, + {"label":"F2", "x":3, "y":1}, + {"label":"F3", "x":4, "y":1}, + {"label":"F4", "x":5, "y":1}, + {"label":"F5", "x":6.5, "y":1}, + {"label":"F6", "x":7.5, "y":1}, + {"label":"F7", "x":8.5, "y":1}, + {"label":"F8", "x":9.5, "y":1}, + {"label":"F9", "x":11, "y":1}, + {"label":"F10", "x":12, "y":1}, + {"label":"F11", "x":13, "y":1}, + {"label":"F12", "x":14, "y":1}, + {"label":"Print Screen", "x":15.25, "y":1}, + {"label":"Scroll Lock", "x":16.25, "y":1}, + {"label":"Pause", "x":17.25, "y":1}, + {"label":"Volume Down", "x":18.5, "y":1}, + {"label":"Vol Up", "x":19.5, "y":1}, + {"label":"Mute", "x":20.5, "y":1}, + {"label":"Power", "x":21.5, "y":1}, + {"label":"Help", "x":22.75, "y":1}, + {"label":"`", "x":0, "y":2.5}, + {"label":"1", "x":1, "y":2.5}, + {"label":"2", "x":2, "y":2.5}, + {"label":"3", "x":3, "y":2.5}, + {"label":"4", "x":4, "y":2.5}, + {"label":"5", "x":5, "y":2.5}, + {"label":"6", "x":6, "y":2.5}, + {"label":"7", "x":7, "y":2.5}, + {"label":"8", "x":8, "y":2.5}, + {"label":"9", "x":9, "y":2.5}, + {"label":"0", "x":10, "y":2.5}, + {"label":"-", "x":11, "y":2.5}, + {"label":"=", "x":12, "y":2.5}, + {"label":"Yen", "x":13, "y":2.5}, + {"label":"Back Space", "x":14, "y":2.5}, + {"label":"Insert", "x":15.25, "y":2.5}, + {"label":"Home", "x":16.25, "y":2.5}, + {"label":"Page Up", "x":17.25, "y":2.5}, + {"label":"Num Lock", "x":18.5, "y":2.5}, + {"label":"Num /", "x":19.5, "y":2.5}, + {"label":"Num *", "x":20.5, "y":2.5}, + {"label":"Num -", "x":21.5, "y":2.5}, + {"label":"Stop", "x":22.75, "y":2.5}, + {"label":"Again", "x":23.75, "y":2.5}, + {"label":"Tab", "x":0, "y":3.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":3.5}, + {"label":"W", "x":2.5, "y":3.5}, + {"label":"E", "x":3.5, "y":3.5}, + {"label":"R", "x":4.5, "y":3.5}, + {"label":"T", "x":5.5, "y":3.5}, + {"label":"Y", "x":6.5, "y":3.5}, + {"label":"U", "x":7.5, "y":3.5}, + {"label":"I", "x":8.5, "y":3.5}, + {"label":"O", "x":9.5, "y":3.5}, + {"label":"P", "x":10.5, "y":3.5}, + {"label":"[", "x":11.5, "y":3.5}, + {"label":"]", "x":12.5, "y":3.5}, + {"label":"\\", "x":13.5, "y":3.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":3.5}, + {"label":"End", "x":16.25, "y":3.5}, + {"label":"Page Down", "x":17.25, "y":3.5}, + {"label":"Num 7", "x":18.5, "y":3.5}, + {"label":"Num 8", "x":19.5, "y":3.5}, + {"label":"Num 9", "x":20.5, "y":3.5}, + {"label":"Num +", "x":21.5, "y":3.5}, + {"label":"Menu", "x":22.75, "y":3.5}, + {"label":"Undo", "x":23.75, "y":3.5}, + {"label":"Caps Lock", "x":0, "y":4.5, "w":1.75}, + {"label":"A", "x":1.75, "y":4.5}, + {"label":"S", "x":2.75, "y":4.5}, + {"label":"D", "x":3.75, "y":4.5}, + {"label":"F", "x":4.75, "y":4.5}, + {"label":"G", "x":5.75, "y":4.5}, + {"label":"H", "x":6.75, "y":4.5}, + {"label":"J", "x":7.75, "y":4.5}, + {"label":"K", "x":8.75, "y":4.5}, + {"label":"L", "x":9.75, "y":4.5}, + {"label":";", "x":10.75, "y":4.5}, + {"label":"\"", "x":11.75, "y":4.5}, + {"label":"ISO #", "x":12.75, "y":4.5}, + {"label":"Enter", "x":13.75, "y":4.5, "w":1.25}, + {"label":"Num 4", "x":18.5, "y":4.5}, + {"label":"Num 5", "x":19.5, "y":4.5}, + {"label":"Num 6", "x":20.5, "y":4.5}, + {"label":"Num , ", "x":21.5, "y":4.5}, + {"label":"Select", "x":22.75, "y":4.5}, + {"label":"Copy", "x":23.75, "y":4.5}, + {"label":"Shift", "x":0, "y":5.5, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":5.5}, + {"label":"Z", "x":2.25, "y":5.5}, + {"label":"X", "x":3.25, "y":5.5}, + {"label":"C", "x":4.25, "y":5.5}, + {"label":"V", "x":5.25, "y":5.5}, + {"label":"B", "x":6.25, "y":5.5}, + {"label":"N", "x":7.25, "y":5.5}, + {"label":"M", "x":8.25, "y":5.5}, + {"label":",", "x":9.25, "y":5.5}, + {"label":".", "x":10.25, "y":5.5}, + {"label":"/", "x":11.25, "y":5.5}, + {"label":"JIS \\", "x":12.25, "y":5.5}, + {"label":"Shift", "x":13.25, "y":5.5, "w":1.75}, + {"label":"Up", "x":16.25, "y":5.5}, + {"label":"Num 1", "x":18.5, "y":5.5}, + {"label":"Num 2", "x":19.5, "y":5.5}, + {"label":"Num 3", "x":20.5, "y":5.5}, + {"label":"Num =", "x":21.5, "y":5.5}, + {"label":"Exec", "x":22.75, "y":5.5}, + {"label":"Paste", "x":23.75, "y":5.5}, + {"label":"Ctrl", "x":0, "y":6.5}, + {"label":"GUI", "x":1, "y":6.5}, + {"label":"Alt", "x":2, "y":6.5}, + {"label":"JIS Muhenkan", "x":3, "y":6.5}, + {"label":"Hanja", "x":4, "y":6.5}, + {"label":"Space", "x":5, "y":6.5, "w":3}, + {"label":"Hangul/English", "x":8, "y":6.5}, + {"label":"JIS Henkan", "x":9, "y":6.5}, + {"label":"JIS Katakana/Hiragana", "x":10, "y":6.5}, + {"label":"Alt", "x":11, "y":6.5}, + {"label":"GUI", "x":12, "y":6.5}, + {"label":"App", "x":13, "y":6.5}, + {"label":"Ctrl", "x":14, "y":6.5}, + {"label":"Left", "x":15.25, "y":6.5}, + {"label":"Down", "x":16.25, "y":6.5}, + {"label":"Right", "x":17.25, "y":6.5}, + {"label":"Num 0", "x":18.5, "y":6.5, "w":2}, + {"label":"Num .", "x":20.5, "y":6.5}, + {"label":"Num Enter", "x":21.5, "y":6.5}, + {"label":"Find", "x":22.75, "y":6.5}, + {"label":"Cut", "x":23.75, "y":6.5} + ] + }, + "LAYOUT_ansi": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"PrtSc", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"`", "x":0, "y":1.5}, + {"label":"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":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"Num /", "x":19.5, "y":1.5}, + {"label":"Num *", "x":20.5, "y":1.5}, + {"label":"Num -", "x":21.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[", "x":11.5, "y":2.5}, + {"label":"]", "x":12.5, "y":2.5}, + {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + {"label":"Num 7", "x":18.5, "y":2.5}, + {"label":"Num 8", "x":19.5, "y":2.5}, + {"label":"Num 9", "x":20.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":"Num 4", "x":18.5, "y":3.5}, + {"label":"Num 5", "x":19.5, "y":3.5}, + {"label":"Num 6", "x":20.5, "y":3.5}, + {"label":"Num +", "x":21.5, "y":2.5, "h":2}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",", "x":9.25, "y":4.5}, + {"label":".", "x":10.25, "y":4.5}, + {"label":"/", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Num 1", "x":18.5, "y":4.5}, + {"label":"Num 2", "x":19.5, "y":4.5}, + {"label":"Num 3", "x":20.5, "y":4.5}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5}, + {"label":"Num 0", "x":18.5, "y":5.5, "w":2}, + {"label":"Num .", "x":20.5, "y":5.5}, + {"label":"Num Enter", "x":21.5, "y":4.5, "h":2} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Print Screen", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"`", "x":0, "y":1.5}, + {"label":"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":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"Num /", "x":19.5, "y":1.5}, + {"label":"Num *", "x":20.5, "y":1.5}, + {"label":"Num -", "x":21.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"[", "x":11.5, "y":2.5}, + {"label":"]", "x":12.5, "y":2.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + {"label":"Num 7", "x":18.5, "y":2.5}, + {"label":"Num 8", "x":19.5, "y":2.5}, + {"label":"Num 9", "x":20.5, "y":2.5}, + {"label":"Num +", "x":21.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":"ISO #", "x":12.75, "y":3.5}, + {"label":"Num 4", "x":18.5, "y":3.5}, + {"label":"Num 5", "x":19.5, "y":3.5}, + {"label":"Num 6", "x":20.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":4.5}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",", "x":9.25, "y":4.5}, + {"label":".", "x":10.25, "y":4.5}, + {"label":"/", "x":11.25, "y":4.5}, + {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Num 1", "x":18.5, "y":4.5}, + {"label":"Num 2", "x":19.5, "y":4.5}, + {"label":"Num 3", "x":20.5, "y":4.5}, + {"label":"Num Enter", "x":21.5, "y":4.5, "h":2}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, + {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, + {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5}, + {"label":"Num 0", "x":18.5, "y":5.5, "w":2}, + {"label":"Num .", "x":20.5, "y":5.5} + ] + }, + "LAYOUT_jis": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"F1", "x":2, "y":0}, + {"label":"F2", "x":3, "y":0}, + {"label":"F3", "x":4, "y":0}, + {"label":"F4", "x":5, "y":0}, + {"label":"F5", "x":6.5, "y":0}, + {"label":"F6", "x":7.5, "y":0}, + {"label":"F7", "x":8.5, "y":0}, + {"label":"F8", "x":9.5, "y":0}, + {"label":"F9", "x":11, "y":0}, + {"label":"F10", "x":12, "y":0}, + {"label":"F11", "x":13, "y":0}, + {"label":"F12", "x":14, "y":0}, + {"label":"Print Screen", "x":15.25, "y":0}, + {"label":"Scroll Lock", "x":16.25, "y":0}, + {"label":"Pause", "x":17.25, "y":0}, + {"label":"JIS Hankaku / Zenkaku", "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":"JIS Yen", "x":13, "y":1.5}, + {"label":"Back Space", "x":14, "y":1.5}, + {"label":"Insert", "x":15.25, "y":1.5}, + {"label":"Home", "x":16.25, "y":1.5}, + {"label":"Page Up", "x":17.25, "y":1.5}, + {"label":"Num Lock", "x":18.5, "y":1.5}, + {"label":"Num /", "x":19.5, "y":1.5}, + {"label":"Num *", "x":20.5, "y":1.5}, + {"label":"Num -", "x":21.5, "y":1.5}, + {"label":"Tab", "x":0, "y":2.5, "w":1.5}, + {"label":"Q", "x":1.5, "y":2.5}, + {"label":"W", "x":2.5, "y":2.5}, + {"label":"E", "x":3.5, "y":2.5}, + {"label":"R", "x":4.5, "y":2.5}, + {"label":"T", "x":5.5, "y":2.5}, + {"label":"Y", "x":6.5, "y":2.5}, + {"label":"U", "x":7.5, "y":2.5}, + {"label":"I", "x":8.5, "y":2.5}, + {"label":"O", "x":9.5, "y":2.5}, + {"label":"P", "x":10.5, "y":2.5}, + {"label":"@", "x":11.5, "y":2.5}, + {"label":"[", "x":12.5, "y":2.5}, + {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, + {"label":"Delete", "x":15.25, "y":2.5}, + {"label":"End", "x":16.25, "y":2.5}, + {"label":"Page Down", "x":17.25, "y":2.5}, + {"label":"Num 7", "x":18.5, "y":2.5}, + {"label":"Num 8", "x":19.5, "y":2.5}, + {"label":"Num 9", "x":20.5, "y":2.5}, + {"label":"Num +", "x":21.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":"]", "x":12.75, "y":3.5}, + {"label":"Num 4", "x":18.5, "y":3.5}, + {"label":"Num 5", "x":19.5, "y":3.5}, + {"label":"Num 6", "x":20.5, "y":3.5}, + {"label":"Shift", "x":0, "y":4.5, "w":2.25}, + {"label":"Z", "x":2.25, "y":4.5}, + {"label":"X", "x":3.25, "y":4.5}, + {"label":"C", "x":4.25, "y":4.5}, + {"label":"V", "x":5.25, "y":4.5}, + {"label":"B", "x":6.25, "y":4.5}, + {"label":"N", "x":7.25, "y":4.5}, + {"label":"M", "x":8.25, "y":4.5}, + {"label":",", "x":9.25, "y":4.5}, + {"label":".", "x":10.25, "y":4.5}, + {"label":"/", "x":11.25, "y":4.5}, + {"label":"JIS \\", "x":12.25, "y":4.5}, + {"label":"Shift", "x":13.25, "y":4.5, "w":1.75}, + {"label":"Up", "x":16.25, "y":4.5}, + {"label":"Num 1", "x":18.5, "y":4.5}, + {"label":"Num 2", "x":19.5, "y":4.5}, + {"label":"Num 3", "x":20.5, "y":4.5}, + {"label":"Num Enter", "x":21.5, "y":4.5, "h":2}, + {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, + {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, + {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, + {"label":"JIS Muhenkan", "x":3.75, "y":5.5, "w":1.25}, + {"label":"Space", "x":5, "y":5.5, "w":2.5}, + {"label":"JIS Henkan", "x":7.5, "y":5.5, "w":1.25}, + {"label":"JIS Hiragana / Katakana", "x":8.75, "y":5.5, "w":1.25}, + {"label":"Alt", "x":10, "y":5.5, "w":1.25}, + {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, + {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, + {"label":"Left", "x":15.25, "y":5.5}, + {"label":"Down", "x":16.25, "y":5.5}, + {"label":"Right", "x":17.25, "y":5.5}, + {"label":"Num 0", "x":18.5, "y":5.5, "w":2}, + {"label":"Num .", "x":20.5, "y":5.5} + ] + } + } +} diff --git a/keyboards/sirius/unigo66/keymaps/danielhklein/config.h b/keyboards/sirius/unigo66/keymaps/danielhklein/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/danielhklein/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c b/keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c new file mode 100644 index 000000000000..2425572bdc87 --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c @@ -0,0 +1,177 @@ +#include QMK_KEYBOARD_H + +enum layer_number { + _MAC = 0, + _WINDOWS, + _FN, + _ADJ +}; + +enum custom_keycodes { + MAC = SAFE_RANGE, + WINDOWS, + FN, + ADJ +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +/* Mac + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | Enter | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ` | | \ |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Ctrl | Alt | Gui | | Gui | Alt | Ctrl | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | Bspc | FN | | ADJ | Space | + * | | | | | | + * `-------------' `--------------' + */ + [_MAC] = LAYOUT( + 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_DEL, + 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_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT,KC_LGUI, KC_RGUI,KC_RALT, KC_RCTL, + KC_BSPC,FN, ADJ, KC_SPC, + KC_BSPC,FN, ADJ, KC_SPC + ), +/* Windows + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | Enter | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ` | | \ |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Gui | Alt | Ctrl | | Ctrl | Alt | Gui | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | Bspc | FN | | ADJ | Space | + * | | | | | | + * `-------------' `--------------' + */ + [_WINDOWS] = LAYOUT( + 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_DEL, + 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_ENT, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT,KC_LCTL, KC_RCTL,KC_RALT, KC_RGUI, + KC_BSPC,FN, ADJ, KC_SPC, + KC_BSPC,FN, ADJ, KC_SPC + ), +/* FN + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | MAC | | | | | | | | | | PgDn | Up | PgUp | Print| Home | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | WINDOWS| | | | | |------| |------| | Left | Down | Right|Insert| End | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Shift | | | | | | | | | Play | Mute | Vol- | Vol+ | Last | Next | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | |GuiCtl| |GuiCtl| | | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | | | | | | + * | | | | | | + * `-------------' `--------------' + */ + [_FN] = LAYOUT( + RESET, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + MAC, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, + WINDOWS, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, + _______, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, + XXXXXXX, XXXXXXX,_______, _______, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX + ), + +/* ADJ + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | |Nlock | = | / | * | - | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | | | | 7 | 8 | 9 | + | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| 4 | 5 | 6 | Enter| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | 1 | 2 | 3 | Space| | | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | 0 | . | | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | | | | | | + * | | | | | | + * `-------------' `--------------' + */ + [_ADJ] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PENT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_SPC, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX,XXXXXXX, KC_P0, KC_PDOT, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MAC: + if (record->event.pressed) { + set_single_persistent_default_layer(_MAC); + } + return false; + break; + case WINDOWS: + if(record->event.pressed) { + set_single_persistent_default_layer(_WINDOWS); + } + return false; + break; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + break; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + break; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sirius/unigo66/keymaps/default/config.h b/keyboards/sirius/unigo66/keymaps/default/config.h new file mode 100644 index 000000000000..271f48d0011b --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/sirius/unigo66/keymaps/default/keymap.c b/keyboards/sirius/unigo66/keymaps/default/keymap.c new file mode 100644 index 000000000000..d2e0cbfbff5e --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | [ | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| L2 | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Up | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Ctrl | Super| Alt | | Left | Down| Right | + * `--------------------' `--------------------' + * ,------|------. ,---------------. + * | | PgUp | | Home | | + * | Space|------| |------| Enter | + * | | PgDn | | End | | + * `-------------' `---------------' + */ + [0] = LAYOUT( + 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, TG(1), KC_LBRC, 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, TG(2), KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_UP , + KC_LCTL, KC_LGUI,KC_LALT, KC_LEFT,KC_DOWN, KC_RGHT, + KC_SPC, KC_PGUP, KC_HOME, KC_ENT, + KC_SPC, KC_PGDN, KC_END, KC_ENT + ), + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; + +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/sirius/unigo66/main.c b/keyboards/sirius/unigo66/main.c new file mode 100644 index 000000000000..b4a0d97aafc0 --- /dev/null +++ b/keyboards/sirius/unigo66/main.c @@ -0,0 +1,108 @@ +#include +#include +#include +#include + +// LUFA +#include "lufa.h" + +#include "sendchar.h" +#include "debug.h" +#include "keyboard.h" +#include "led.h" + + +/* LED ping configuration */ +#define TMK_LED +//#define LEONARDO_LED +#if defined(TMK_LED) +// For TMK converter and Teensy +#define LED_TX_INIT (DDRD |= (1<<6)) +#define LED_TX_ON (PORTD |= (1<<6)) +#define LED_TX_OFF (PORTD &= ~(1<<6)) +#define LED_TX_TOGGLE (PORTD ^= (1<<6)) +#elif defined(LEONARDO_LED) +// For Leonardo(TX LED) +#define LED_TX_INIT (DDRD |= (1<<5)) +#define LED_TX_ON (PORTD &= ~(1<<5)) +#define LED_TX_OFF (PORTD |= (1<<5)) +#define LED_TX_TOGGLE (PORTD ^= (1<<5)) +#else +#define LED_TX_INIT +#define LED_TX_ON +#define LED_TX_OFF +#define LED_TX_TOGGLE +#endif + + +static void LUFA_setup(void) +{ + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Disable clock division */ +#if (F_CPU == 8000000) + clock_prescale_set(clock_div_2); // 16MHz crystal divided by 2 +#else + clock_prescale_set(clock_div_1); +#endif + + // Leonardo needs. Without this USB device is not recognized. + USB_Disable(); + + USB_Init(); + + // for Console_Task + USB_Device_EnableSOFEvents(); + print_set_sendchar(sendchar); +} + + + +int main(void) +{ + // LED for debug + LED_TX_INIT; + LED_TX_ON; + + debug_enable = true; + debug_keyboard = true; + + host_set_driver(&lufa_driver); + keyboard_init(); + + LUFA_setup(); + + /* NOTE: Don't insert time consuming job here. + * It'll cause unclear initialization failure when DFU reset(worm start). + */ + sei(); + +/* 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 & debug output + uint8_t timeout=255 + while (timeout-- && USB_DeviceState != DEVICE_STATE_Configured) { + wait_ms(4); +*/ + + debug("init: done\n"); + + for (;;) { + keyboard_task(); + +#if !defined(INTERRUPT_CONTROL_ENDPOINT) + // LUFA Task for control request + USB_USBTask(); +#endif + } + + return 0; +} diff --git a/keyboards/sirius/unigo66/matrix.c b/keyboards/sirius/unigo66/matrix.c new file mode 100644 index 000000000000..b077febd74dc --- /dev/null +++ b/keyboards/sirius/unigo66/matrix.c @@ -0,0 +1 @@ +// Intentionally left empty. This file must exist for this board to build. diff --git a/keyboards/sirius/unigo66/readme.md b/keyboards/sirius/unigo66/readme.md new file mode 100644 index 000000000000..78a02ed09e29 --- /dev/null +++ b/keyboards/sirius/unigo66/readme.md @@ -0,0 +1,17 @@ +# 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/rules.mk b/keyboards/sirius/unigo66/rules.mk new file mode 100644 index 000000000000..e716aa86fb2c --- /dev/null +++ b/keyboards/sirius/unigo66/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +F_CPU = 16000000 + +ARCH = AVR8 + +F_USB = $(F_CPU) + +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# 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 = yes # Console for debug(+400) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +# BACKLIGHT_ENABLE = yes +USB_HID_ENABLE = yes + +CUSTOM_MATRIX = yes +SRC = custom_matrix.cpp + +CUSTOM_MATRIX = yes +SRC = custom_matrix.cpp diff --git a/keyboards/sirius/unigo66/unigo66.c b/keyboards/sirius/unigo66/unigo66.c new file mode 100644 index 000000000000..6a2d2632bd6d --- /dev/null +++ b/keyboards/sirius/unigo66/unigo66.c @@ -0,0 +1 @@ +#include "unigo66.h" diff --git a/keyboards/sirius/unigo66/unigo66.h b/keyboards/sirius/unigo66/unigo66.h new file mode 100644 index 000000000000..3215c891bfa7 --- /dev/null +++ b/keyboards/sirius/unigo66/unigo66.h @@ -0,0 +1,103 @@ +#ifndef UNIGO66_H +#define UNIGO66_H + +#include "quantum.h" + +/* ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + + */ +#define LAYOUT_ALL( \ + K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, K76,K7A, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,K85, K77,K7C, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K67, K74,K7D, \ + KE0,KE3,KE2,K8B,K91, K2C, K90,K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, K7E,K7B \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, K66, K67, /* 60-67 */ \ + K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, /* 68-6F */ \ + { K70, K71, K72, K73, K74, K75, K76, K77, /* 70-77 */ \ + K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, /* 78-7F */ \ + { K80, K81, KC_NO, KC_NO, KC_NO, K85, KC_NO, K87, /* 80-87 */ \ + K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { K90, K91, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} + +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | [ | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| L2 | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Up | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Ctrl | Super| Alt | | Left | Down| Right | + * `--------------------' `--------------------' + * ,------|------. ,---------------. + * | | PgUp | | Home | | + * | Space|------| |------| Enter | + * | | PgDn | | End | | + * `-------------' `---------------' + */ +#define LAYOUT( \ + K29,K1E,K1F,K20,K21,K22,K2D, K2E,K23,K24,K25,K26,K27,K2A,\ + K2B,K14,K1A,K08,K15,K17,K4B, K2F,K1C,K18,K0C,K12,K13,K31,\ + K39,K04,K16,K07,K09,K0A, K0B,K0D,K0E,K0F,K33,K34,\ + KE1,K1D,K1B,K06,K19,K05,K4E, K30,K11,K10,K36,K37,K52,KE5,\ + KE0,KE3,KE2, K50,K51,K4F,\ + K2C,K49, K4A,K28, \ + KE6,K4C, K4D,KE4 \ +) 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, 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,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO,K2A, K49,K4A,K4B, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, KC_NO,K28, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + 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 From 287f6766b6e28e150d47a83ad990ff7e52550986 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 27 Jan 2019 00:15:32 -0800 Subject: [PATCH 222/458] [Keymap] Minor updates to my dz60 keymap (#4943) --- keyboards/dz60/keymaps/mechmerlin/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/dz60/keymaps/mechmerlin/keymap.c b/keyboards/dz60/keymaps/mechmerlin/keymap.c index 1a8593ef16d3..f7ad17fd8c14 100644 --- a/keyboards/dz60/keymaps/mechmerlin/keymap.c +++ b/keyboards/dz60/keymaps/mechmerlin/keymap.c @@ -12,7 +12,7 @@ enum keyboard_layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_b_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_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_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_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_RSSH, KC_UP, KC_DEL, From 53d86b2c579b5a5f3488b80f843c274977263ce8 Mon Sep 17 00:00:00 2001 From: Max Rumpf Date: Sun, 27 Jan 2019 09:23:58 +0100 Subject: [PATCH 223/458] [Keymap] Small improvements to Maxr1998's Contra keymap (#4952) Add backslash, disable Super key in "Gaming" mode --- keyboards/contra/keymaps/maxr1998/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 4d731c08b499..48bde833d551 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Numrow layer (special characters with Shift and ISO_L3_Shift) * ,-----------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | | | | | | | | | #' | | * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______} }, [_NUMROW_L3] = { - {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______}, + {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS }, {_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______} @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_SPC, _______, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______} + {KC_SPC, XXXXXXX, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______} } }; From 4d9b11af14fd83c1e6b556165d41ce005abb4a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sun, 27 Jan 2019 09:28:40 +0100 Subject: [PATCH 224/458] Fix Command feature: use get_mods() instead of keyboard_report->mods (#4955) * Remove unnecessary IS_COMMAND definition in clueboard/66/rev4 * Replace keyboard_report->mods with get_mods() in IS_COMMAND definitions * Update docs to use get_mods() instead of keyboard_report->mods * Replace keyboard_report->mods with get_mods() in tmk_core/protocol/usb_hid/test For some reason, this occurrence used KB_LSHIFT and KB_RSHIFT, which don't exist * Replace keyboard_report->mods with get_mods() in Massdrop keyboards (as per @patrickmt) --- docs/config_options.md | 2 +- docs/feature_command.md | 64 +++++++++---------- keyboards/clueboard/66/rev4/config.h | 5 -- keyboards/converter/ibm_terminal/config.h | 4 +- keyboards/converter/m0110_usb/config.h | 4 +- keyboards/converter/palm_usb/config.h | 18 +++--- keyboards/converter/sun_usb/config.h | 6 +- keyboards/converter/xt_usb/config.h | 4 +- keyboards/ergodone/config.h | 4 +- keyboards/ergodox_ez/config.h | 4 +- keyboards/ergodox_infinity/config.h | 4 +- .../keymaps/halfkeyboard/config.h | 4 +- keyboards/gergo/config.h | 10 +-- keyboards/handwired/dactyl/config.h | 4 +- keyboards/handwired/frenchdev/config.h | 4 +- keyboards/handwired/promethium/config.h | 2 +- .../massdrop/alt/keymaps/abishalom/keymap.c | 6 +- .../massdrop/alt/keymaps/default/keymap.c | 6 +- keyboards/massdrop/alt/keymaps/mac/keymap.c | 6 +- .../massdrop/alt/keymaps/reywood/keymap.c | 6 +- .../massdrop/ctrl/keymaps/default/keymap.c | 6 +- keyboards/massdrop/ctrl/keymaps/mac/keymap.c | 6 +- .../ctrl/keymaps/responsive_pattern/keymap.c | 38 +++++------ keyboards/orthodox/keymaps/drashna/config.h | 2 +- keyboards/orthodox/rev1/config.h | 2 +- keyboards/orthodox/rev3/config.h | 2 +- keyboards/orthodox/rev3_teensy/config.h | 2 +- .../whitefox/keymaps/konstantin/config.h | 4 +- .../ergodox/win10_writers-block/config.h | 12 ++-- quantum/template/avr/config.h | 2 +- quantum/template/ps2avrgb/config.h | 2 +- tmk_core/common/command.h | 2 +- tmk_core/protocol/usb_hid/test/config.h | 2 +- 33 files changed, 122 insertions(+), 127 deletions(-) diff --git a/docs/config_options.md b/docs/config_options.md index f5c2e76e7e92..5e2de6d04861 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -87,7 +87,7 @@ This is a C header file that is one of the first things included, and will persi * mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap * `#define LOCKING_RESYNC_ENABLE` * tries to keep switch state consistent with keyboard LED state -* `#define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) )` +* `#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))` * key combination that allows the use of magic commands (useful for debugging) * `#define USB_MAX_POWER_CONSUMPTION` * sets the maximum power (in mA) over USB for the device (default: 500) diff --git a/docs/feature_command.md b/docs/feature_command.md index ca2ecce0dacc..53a140a11682 100644 --- a/docs/feature_command.md +++ b/docs/feature_command.md @@ -16,35 +16,35 @@ To use Command, hold down the key combination defined by the `IS_COMMAND()` macr If you would like to change the key assignments for Command, `#define` these in your `config.h` at either the keyboard or keymap level. All keycode assignments here must omit the `KC_` prefix. -|Define |Default |Description | -|------------------------------------|--------------------------------------------------------------------------------------|------------------------------------------------| -|`IS_COMMAND()` |(keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))|The key combination to activate Command | -|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row | -|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys | -|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` | -|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial | -|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging | -|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging | -|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging | -|`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_LAYER0` |`0` |Make layer 0 the default layer | -|`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 | -|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer | -|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer | -|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer | -|`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_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | -|`MAGIC_KEY_EEPROM` |`E` |Clear the EEPROM | -|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) | -|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping | +|Define |Default |Description | +|------------------------------------|---------------------------------------------------------------------------|------------------------------------------------| +|`IS_COMMAND()` |(get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))|The key combination to activate Command | +|`MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS` |`true` |Set default layer with the Function row | +|`MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS` |`true` |Set default layer with the number keys | +|`MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM`|`false` |Set default layer with `MAGIC_KEY_LAYER0..9` | +|`MAGIC_KEY_DEBUG` |`D` |Toggle debugging over serial | +|`MAGIC_KEY_DEBUG_MATRIX` |`X` |Toggle key matrix debugging | +|`MAGIC_KEY_DEBUG_KBD` |`K` |Toggle keyboard debugging | +|`MAGIC_KEY_DEBUG_MOUSE` |`M` |Toggle mouse debugging | +|`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_LAYER0` |`0` |Make layer 0 the default layer | +|`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 | +|`MAGIC_KEY_LAYER4` |`4` |Make layer 4 the default layer | +|`MAGIC_KEY_LAYER5` |`5` |Make layer 5 the default layer | +|`MAGIC_KEY_LAYER6` |`6` |Make layer 6 the default layer | +|`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_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed | +|`MAGIC_KEY_EEPROM` |`E` |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/clueboard/66/rev4/config.h b/keyboards/clueboard/66/rev4/config.h index 19a9837a32ad..540b38722035 100644 --- a/keyboards/clueboard/66/rev4/config.h +++ b/keyboards/clueboard/66/rev4/config.h @@ -37,11 +37,6 @@ /* 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. diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h index 4dd85f6983a3..ba9ec82fa287 100644 --- a/keyboards/converter/ibm_terminal/config.h +++ b/keyboards/converter/ibm_terminal/config.h @@ -39,11 +39,11 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \ ) -/* +/* * PS/2 USART configuration for ATMega32U4 */ #ifdef PS2_USE_USART diff --git a/keyboards/converter/m0110_usb/config.h b/keyboards/converter/m0110_usb/config.h index 79abb9a889ff..02e4c30fb005 100644 --- a/keyboards/converter/m0110_usb/config.h +++ b/keyboards/converter/m0110_usb/config.h @@ -39,8 +39,8 @@ Ported to QMK by Techsock /* magic key */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \ ) /* boot magic key */ diff --git a/keyboards/converter/palm_usb/config.h b/keyboards/converter/palm_usb/config.h index 4520725a1d65..4233a53ef030 100644 --- a/keyboards/converter/palm_usb/config.h +++ b/keyboards/converter/palm_usb/config.h @@ -34,19 +34,19 @@ along with this program. If not, see . // IO pins to serial // https://deskthority.net/wiki/Arduino_Pro_Micro for pin lookup -#define VCC_PIN D1 // pro micro 2 +#define VCC_PIN D1 // pro micro 2 #define RX_PIN D0 //pro micro 3 , was 8 on cy384 #define RTS_PIN C6 // 5 //[ was D4 // 4 on the cy384 -#define DCD_PIN E6 //7 +#define DCD_PIN E6 //7 // if using the particular arduino pinout of CY384 -#ifdef CY384 +#ifdef CY384 #define GND_PIN D7 //6 #define PULLDOWN_PIN B1 // 15 #endif #ifndef HANDSPRING -// Set to 1 for Handspring or to disable RTS/DCD based handshake. +// Set to 1 for Handspring or to disable RTS/DCD based handshake. #define HANDSPRING 0 #endif @@ -59,9 +59,9 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ - keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + get_mods() == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ + get_mods() == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) @@ -74,10 +74,10 @@ along with this program. If not, see . #define SERIAL_SOFT_BIT_ORDER_LSB #if (HANDSPRING == 0) #define SERIAL_SOFT_LOGIC_NEGATIVE //RS232 logic -#endif +#endif /* RXD Port */ #define SERIAL_SOFT_RXD_ENABLE - + // we are using Pro micro pin 3 / D0 as serial #define SERIAL_SOFT_RXD_DDR DDRD #define SERIAL_SOFT_RXD_PORT PORTD diff --git a/keyboards/converter/sun_usb/config.h b/keyboards/converter/sun_usb/config.h index f7ad41639392..7713e0a915b2 100644 --- a/keyboards/converter/sun_usb/config.h +++ b/keyboards/converter/sun_usb/config.h @@ -33,9 +33,9 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ - keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + get_mods() == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ + get_mods() == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) diff --git a/keyboards/converter/xt_usb/config.h b/keyboards/converter/xt_usb/config.h index 963a3c639673..ecebc123fa19 100644 --- a/keyboards/converter/xt_usb/config.h +++ b/keyboards/converter/xt_usb/config.h @@ -31,8 +31,8 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \ - keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \ + get_mods() == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \ ) diff --git a/keyboards/ergodone/config.h b/keyboards/ergodone/config.h index 2c764d782c10..815af357dea1 100644 --- a/keyboards/ergodone/config.h +++ b/keyboards/ergodone/config.h @@ -37,8 +37,8 @@ /* 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)) \ ) /* number of backlight levels */ diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index ee768853a981..096368f7abce 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -55,8 +55,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)) \ ) /* number of backlight levels */ diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index 0e64897cba5c..a64f3f4a1394 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -47,8 +47,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)) \ ) /* key matrix size */ diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h b/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h index 187ce87034e3..2e83f799c7c2 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h @@ -49,8 +49,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)) \ ) /* key matrix size */ diff --git a/keyboards/gergo/config.h b/keyboards/gergo/config.h index a795f8dba110..e4c61ecb07c7 100644 --- a/keyboards/gergo/config.h +++ b/keyboards/gergo/config.h @@ -24,11 +24,11 @@ along with this program. If not, see . /* Defaults */ #ifndef BALLSTEP #define BALLSTEP 20 -#endif +#endif #ifndef SCROLLSTEP #define SCROLLSTEP 1 -#endif +#endif #define VERBOSE @@ -36,7 +36,7 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1307 #define DEVICE_VER 0x0001 -#define MANUFACTURER g Heavy Industries +#define MANUFACTURER g Heavy Industries #define PRODUCT Gergo #define DESCRIPTION QMK keyboard firmware for Gergo @@ -65,8 +65,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 diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 08931ecd345a..8d42c0ae4781 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -53,8 +53,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)) \ ) /* fix space cadet rollover issue */ diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h index dd386402c8a0..b01eec7aa08c 100644 --- a/keyboards/handwired/frenchdev/config.h +++ b/keyboards/handwired/frenchdev/config.h @@ -59,8 +59,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)) \ ) /* diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index dca0aec2e4e9..b5a0a7f4bace 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -95,7 +95,7 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ ) /* control how magic key switches layers */ diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c index 7ffa53dcaa38..10bc62c1f0e6 100644 --- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c +++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 7ffa53dcaa38..10bc62c1f0e6 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 9fd4816ccfdf..639eb2da75ed 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; diff --git a/keyboards/massdrop/alt/keymaps/reywood/keymap.c b/keyboards/massdrop/alt/keymaps/reywood/keymap.c index 48b804efea12..cf60acfe66c5 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/keymap.c +++ b/keyboards/massdrop/alt/keymaps/reywood/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 11597f987962..cdb627f9c4b5 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -63,9 +63,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index badb566b371b..e41b5eba20ce 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -63,9 +63,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index eabd8d23a920..0bdc15214016 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -37,7 +37,7 @@ enum ctrl_keycodes { DBG_KBD, //DEBUG Toggle Keyboard Prints DBG_MOU, //DEBUG Toggle Mouse Prints MD_BOOT, //Restart into bootloader after hold timeout - + L_SP_PR, //LED Splash Pattern Select Previous L_SP_NE, //LED Splash Pattern Select Next @@ -178,7 +178,7 @@ static void init_distance_map(void){ uint8_t id2 = ktli(KEY_POSITION_MAP[j][i]); if(id1 == id2) continue; - + uint8_t dx = abs(i - x); uint8_t dy = abs(j - y); uint8_t dis = dx + dy; @@ -277,15 +277,15 @@ void led_matrix_run(void) bo = 0; uint8_t led_index = led_cur - led_map; // only this part differs from the original function. - if(led_index < KEY_LED_COUNT){ // + if(led_index < KEY_LED_COUNT){ // user_led_cur = USER_LED[led_index]; // `struct user_led_t USER_LED[]` is stored globally. - } // - // + } // + // if(led_index < KEY_LED_COUNT && user_led_cur.state){ // `user_led_cur` is just for convenience - ro = user_led_cur.r; // - go = user_led_cur.g; // - bo = user_led_cur.b; // - } // + ro = user_led_cur.r; // + go = user_led_cur.g; // + bo = user_led_cur.b; // + } // else if (led_lighting_mode == LED_MODE_KEYS_ONLY && led_cur->scan == 255) { //Do not act on this LED @@ -513,7 +513,7 @@ static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { {181, 181, 181}, {164, 164, 164}, {147, 147, 147}, {128, 128, 128}, {108, 108, 108}, { 88, 88, 88}, { 66, 66, 66}, { 45, 45, 45}, { 23, 23, 23}, - }, + }, }; static const uint8_t COLOR_PATTERNS_COUNT = ( sizeof(COLOR_PATTERNS) / sizeof(COLOR_PATTERNS[0])); @@ -561,7 +561,7 @@ void refresh_color_pattern_indicators(void){ static uint8_t ZXCVBNM_COMM_DOT[] = { KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, }; - + if(layer_state >= 0x04){ uint8_t (*c)[3] = &COLOR_PATTERNS[USER_CONFIG.COLOR_PATTERN_INDEX][0]; for(uint8_t i = 0; i < 9; ++i){ @@ -589,7 +589,7 @@ void matrix_scan_user(void) { calculate_keystroke_distance(); - + #define USE_PATTERN 0 #define BLACK_RGB 1 #define COLOR_RGB 2 @@ -599,7 +599,7 @@ void matrix_scan_user(void) { uint8_t distance; for(uint8_t i = 1; i <= KEY_LED_COUNT; ++i){ if(USER_LED[i-1].state >= 2) continue; - + handle_type = USE_PATTERN; distance = DISTANCE_FROM_LAST_KEYSTROKE[i]; @@ -695,9 +695,9 @@ void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#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; @@ -835,7 +835,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { - + case L_SP_PR: // previous dripple pattern case L_SP_NE: // next dripple pattern if (record->event.pressed) { @@ -880,7 +880,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { USER_CONFIG.WAVE_PERIOD = 10; break; } - + // remove effect after changing pattern for(int i = 0; i < KEY_STROKES_LENGTH; ++i){ KEY_STROKES[i].alive = 0; @@ -903,7 +903,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case L_SP_SL: if(record->event.pressed){ short incre = keycode == L_SP_FA ? -1 : 1; - + USER_CONFIG.WAVE_PERIOD += 10 * incre; if(USER_CONFIG.WAVE_PERIOD < 10){ USER_CONFIG.WAVE_PERIOD = 10; diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 6fca4278dcf3..eed1cbe89fb4 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -34,7 +34,7 @@ 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_LALT)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ ) #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h index 03936e737fd9..f7497c09c5c7 100644 --- a/keyboards/orthodox/rev1/config.h +++ b/keyboards/orthodox/rev1/config.h @@ -65,7 +65,7 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index 2e4018e91bfd..d727ae674b46 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -70,7 +70,7 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h index e2e693079c9d..591827fb9738 100644 --- a/keyboards/orthodox/rev3_teensy/config.h +++ b/keyboards/orthodox/rev3_teensy/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index 85d472165661..99dc6af755a1 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -1,10 +1,10 @@ #pragma once +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) + #define LAYER_FN #define LAYER_NUMPAD -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) - #define MAGIC_KEY_LAYER0_ALT1 BSLS #define MAGIC_KEY_BOOTLOADER ESC diff --git a/layouts/community/ergodox/win10_writers-block/config.h b/layouts/community/ergodox/win10_writers-block/config.h index ed6170369e0a..b0b4a1ebb969 100644 --- a/layouts/community/ergodox/win10_writers-block/config.h +++ b/layouts/community/ergodox/win10_writers-block/config.h @@ -3,10 +3,10 @@ #include QMK_KEYBOARD_CONFIG_H -#undef MOUSEKEY_DELAY -#undef MOUSEKEY_INTERVAL -#undef MOUSEKEY_MAX_SPEED -#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_MAX_SPEED +#undef MOUSEKEY_TIME_TO_MAX #define MOUSEKEY_DELAY 100 #define MOUSEKEY_INTERVAL 20 @@ -28,8 +28,8 @@ /* 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)) \ ) #endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/quantum/template/avr/config.h b/quantum/template/avr/config.h index 3b288c21783d..a31fcf236fbf 100644 --- a/quantum/template/avr/config.h +++ b/quantum/template/avr/config.h @@ -132,7 +132,7 @@ along with this program. If not, see . /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) +// #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 diff --git a/quantum/template/ps2avrgb/config.h b/quantum/template/ps2avrgb/config.h index a05873c34b09..01cdf932ede8 100644 --- a/quantum/template/ps2avrgb/config.h +++ b/quantum/template/ps2avrgb/config.h @@ -44,7 +44,7 @@ along with this program. If not, see . /* key combination for magic key command */ /* defined by default; to change, uncomment and set to the combination you want */ -// #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 diff --git a/tmk_core/common/command.h b/tmk_core/common/command.h index e25b974630a5..052e25184388 100644 --- a/tmk_core/common/command.h +++ b/tmk_core/common/command.h @@ -35,7 +35,7 @@ bool command_proc(uint8_t code); #endif #ifndef IS_COMMAND -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) #endif #ifndef MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS diff --git a/tmk_core/protocol/usb_hid/test/config.h b/tmk_core/protocol/usb_hid/test/config.h index c2230fb57056..a2403fe9c500 100644 --- a/tmk_core/protocol/usb_hid/test/config.h +++ b/tmk_core/protocol/usb_hid/test/config.h @@ -35,6 +35,6 @@ along with this program. If not, see . /* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT))) +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) #endif From 6d2071ad6e9bdeb63126c00c4baea88d597cd7d7 Mon Sep 17 00:00:00 2001 From: James Churchill Date: Sun, 27 Jan 2019 16:30:25 +1000 Subject: [PATCH 225/458] Fix `1 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -134,7 +134,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -138,7 +138,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -124,7 +124,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -124,7 +124,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 ERROR_DISCONNECT_COUNT){ //disconnect half @@ -220,7 +220,7 @@ uint8_t matrix_scan(void) }else{ //no error error_count_right = 0; } - + if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)){ //error has occured for arrow cluster error_count_arrow++; if (error_count_arrow > ERROR_DISCONNECT_COUNT){ //disconnect arrow cluster @@ -258,7 +258,7 @@ bool matrix_is_modified(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -125,7 +125,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1. */ @@ -132,7 +132,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -134,7 +134,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1 Date: Sun, 27 Jan 2019 11:45:30 -0500 Subject: [PATCH 226/458] [Keymap] Layout added for stanrc85 (#4944) * Add files via upload * Changed _____ to _______ as requested to meet QMK standards. * Added readme.md * Removed "PERMISSIVE_HOLD" as it is no longer used. * Additional code changes made per request * Added # to first line and removed redundant line. * Modified Copyright information * Added space after # for proper formatting * Formatting changes and additional details --- .../community/60_ansi/stanrc85-ansi/config.h | 6 ++ .../community/60_ansi/stanrc85-ansi/keymap.c | 70 +++++++++++++++++++ .../community/60_ansi/stanrc85-ansi/readme.md | 14 ++++ .../community/60_ansi/stanrc85-ansi/rules.mk | 1 + 4 files changed, 91 insertions(+) create mode 100644 layouts/community/60_ansi/stanrc85-ansi/config.h create mode 100644 layouts/community/60_ansi/stanrc85-ansi/keymap.c create mode 100644 layouts/community/60_ansi/stanrc85-ansi/readme.md create mode 100644 layouts/community/60_ansi/stanrc85-ansi/rules.mk diff --git a/layouts/community/60_ansi/stanrc85-ansi/config.h b/layouts/community/60_ansi/stanrc85-ansi/config.h new file mode 100644 index 000000000000..77f0b2e7294b --- /dev/null +++ b/layouts/community/60_ansi/stanrc85-ansi/config.h @@ -0,0 +1,6 @@ +#pragma once + +#define TAPPING_TERM 200 +#define RETRO_TAPPING + +//#define IGNORE_MOD_TAP_INTERRUPT diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c new file mode 100644 index 000000000000..e56078a971df --- /dev/null +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -0,0 +1,70 @@ +/* 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 MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define DEFAULT 0 //Custom ANSI +#define LAYER1 1 //Default ANSI (enable with Fn2+D) +#define LAYER2 2 //F keys, arrows, custom shortcuts, volume control +#define LAYER3 3 //Backlight controls and RESET + +#define KC_CAD LALT(LCTL(KC_DEL)) +#define KC_LOCK LGUI(KC_L) + +//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(TD_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, + LT(2, 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_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(2, KC_SPC), KC_RALT, TD(TD_WIN), 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_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, + _______, _______, LCA(KC_QUOT), KC_VOLU, LCA(KC_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( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + KC_CAPS, _______, _______, TG(1), _______, _______, BL_STEP, BL_DEC, BL_INC, BL_TOGG, _______, _______, _______, + _______, _______, _______, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, RGB_MOD, RGB_TOG, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/layouts/community/60_ansi/stanrc85-ansi/readme.md b/layouts/community/60_ansi/stanrc85-ansi/readme.md new file mode 100644 index 000000000000..620d0775a041 --- /dev/null +++ b/layouts/community/60_ansi/stanrc85-ansi/readme.md @@ -0,0 +1,14 @@ +# Stanrc85's Standard ANSI 60% Layout + +Shared keymap between two 60% PCB: +- 1upkeyboards60HSE +- DZ60 (hotswap) + +## Keymap Notes +- Layer 0 is custom ANSI layout with SpaceFN, EscFN 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 backlight control and RESET + +### Build +To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/layouts/community/60_ansi/stanrc85-ansi/rules.mk b/layouts/community/60_ansi/stanrc85-ansi/rules.mk new file mode 100644 index 000000000000..e5ddcae8d927 --- /dev/null +++ b/layouts/community/60_ansi/stanrc85-ansi/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes From 6ba0b818e9ab8830610ab2a74515227884f93abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Sun, 27 Jan 2019 17:46:54 +0100 Subject: [PATCH 227/458] [Keymap] Update personal userspace and keymaps (#4963) * Remove duplicated or unnecessary definitions in config.h and rules.mk * Use IS_HOST_LED_ON() macro * Add mouse acceleration to kbd6x:konstantin keymap * Clear and restore mods when sending macros * Make SEND_STRING_CLEAN a config option * Add NO_ACTION_ONESHOT to userspace config --- keyboards/kbd6x/keymaps/konstantin/config.h | 1 + keyboards/kbd6x/keymaps/konstantin/keymap.c | 4 ++-- .../whitefox/keymaps/konstantin/config.h | 21 ------------------- users/konstantin/config.h | 1 + users/konstantin/konstantin.c | 5 +++-- users/konstantin/konstantin.h | 10 +++++++++ users/konstantin/rules.mk | 1 - 7 files changed, 17 insertions(+), 26 deletions(-) diff --git a/keyboards/kbd6x/keymaps/konstantin/config.h b/keyboards/kbd6x/keymaps/konstantin/config.h index 4b511eb8484f..16387fa2f613 100644 --- a/keyboards/kbd6x/keymaps/konstantin/config.h +++ b/keyboards/kbd6x/keymaps/konstantin/config.h @@ -1,3 +1,4 @@ #pragma once #define LAYER_FN +#define SEND_STRING_CLEAN diff --git a/keyboards/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbd6x/keymaps/konstantin/keymap.c index b400b068107a..fa324be9a116 100644 --- a/keyboards/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/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↓ │ │ │ + * │ │ │ 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, _______, _______, XXXXXXX + XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX ), /* RCtrl layer diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index 99dc6af755a1..1364fe8a28c0 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -4,24 +4,3 @@ #define LAYER_FN #define LAYER_NUMPAD - -#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 NO_ACTION_FUNCTION -#define NO_ACTION_MACRO - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 - -#define UNICODE_CYCLE_PERSIST false -#define UNICODE_SELECTED_MODES UC_WINC, UC_LNX -#define UNICODE_WINC_KEY KC_RGUI diff --git a/users/konstantin/config.h b/users/konstantin/config.h index d03333f05d9c..800b8e49ba0e 100644 --- a/users/konstantin/config.h +++ b/users/konstantin/config.h @@ -14,6 +14,7 @@ #define NO_ACTION_FUNCTION #define NO_ACTION_MACRO +#define NO_ACTION_ONESHOT #define PERMISSIVE_HOLD #define TAPPING_TERM 200 diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 977111c1f9b4..47596279c363 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -3,8 +3,9 @@ #ifdef LAYER_NUMPAD static void toggle_numpad(void) { layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1< Date: Mon, 28 Jan 2019 08:57:50 +0800 Subject: [PATCH 228/458] [Keyboard] add rgb pcb for e6 keyboard (#4928) * add e6_rgb * update according to the reviewer * fixed readme.md * rename 60_split_bs_shift to 60_ansi_split_bs_shift --- keyboards/e6_rgb/config.h | 65 ++++++ keyboards/e6_rgb/e6_rgb.c | 204 ++++++++++++++++++ keyboards/e6_rgb/e6_rgb.h | 83 +++++++ keyboards/e6_rgb/info.json | 21 ++ keyboards/e6_rgb/keymaps/60_ansi/keymap.c | 29 +++ .../keymaps/60_ansi_split_bs_shift/keymap.c | 16 ++ keyboards/e6_rgb/keymaps/60_hhkb/keymap.c | 16 ++ keyboards/e6_rgb/keymaps/60_wkl/keymap.c | 16 ++ .../e6_rgb/keymaps/60_wkl_split_bs/keymap.c | 16 ++ keyboards/e6_rgb/readme.md | 12 ++ keyboards/e6_rgb/rules.mk | 77 +++++++ 11 files changed, 555 insertions(+) create mode 100644 keyboards/e6_rgb/config.h create mode 100644 keyboards/e6_rgb/e6_rgb.c create mode 100644 keyboards/e6_rgb/e6_rgb.h create mode 100644 keyboards/e6_rgb/info.json create mode 100644 keyboards/e6_rgb/keymaps/60_ansi/keymap.c create mode 100644 keyboards/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c create mode 100644 keyboards/e6_rgb/keymaps/60_hhkb/keymap.c create mode 100644 keyboards/e6_rgb/keymaps/60_wkl/keymap.c create mode 100644 keyboards/e6_rgb/keymaps/60_wkl_split_bs/keymap.c create mode 100644 keyboards/e6_rgb/readme.md create mode 100644 keyboards/e6_rgb/rules.mk diff --git a/keyboards/e6_rgb/config.h b/keyboards/e6_rgb/config.h new file mode 100644 index 000000000000..cb213c25e20a --- /dev/null +++ b/keyboards/e6_rgb/config.h @@ -0,0 +1,65 @@ +/** + * config.h + * + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xDEAD +#define PRODUCT_ID 0xFEED +#define DEVICE_VER 0x0062 +#define MANUFACTURER astro +#define PRODUCT e6rgb +#define DESCRIPTION 60% rgb keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, F4, F5, F6, D6 } +#define MATRIX_COL_PINS { D7, B4, B5, B6, C6, C7, F7, F0, B0, B1, D2, D3, B3, B2 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * 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 + +//rgb light setting +#define RGBLED_NUM 6 +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#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 + +// tapping setting +#define TAPPING_TERM 200 +#define RETRO_TAPPING +#define PERMISSIVE_HOLD diff --git a/keyboards/e6_rgb/e6_rgb.c b/keyboards/e6_rgb/e6_rgb.c new file mode 100644 index 000000000000..d50af86b51b9 --- /dev/null +++ b/keyboards/e6_rgb/e6_rgb.c @@ -0,0 +1,204 @@ +/** + * e6_rgb.c + */ + +#include "e6_rgb.h" + +#ifdef RGB_MATRIX_ENABLE +__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) { + setPinOutput(D5); + writePinHigh(D5); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +//cs1 + {0, K_1, J_1, L_1}, + {0, H_1, G_1, I_1}, + {0, E_1, D_1, F_1}, + {0, B_1, A_1, C_1}, + +//cs2 + {0, K_2, J_2, L_2}, + {0, H_2, G_2, I_2}, + {0, E_2, D_2, F_2}, + {0, B_2, A_2, C_2}, +//cs3 + {0, K_3, J_3, L_3}, + {0, H_3, G_3, I_3}, + {0, E_3, D_3, F_3}, + {0, B_3, A_3, C_3}, +//cs4 + {0, K_4, J_4, L_4}, + {0, H_4, G_4, I_4}, + {0, E_4, D_4, F_4}, + {0, B_4, A_4, C_4}, +//cs5 + {0, K_5, J_5, L_5}, + {0, H_5, G_5, I_5}, + {0, E_5, D_5, F_5}, + {0, B_5, A_5, C_5}, +//cs6 + {0, K_6, J_6, L_6}, + {0, H_6, G_6, I_6}, + {0, E_6, D_6, F_6}, + {0, B_6, A_6, C_6}, +//cs7 + {0, K_7, J_7, L_7}, + {0, H_7, G_7, I_7}, + {0, E_7, D_7, F_7}, + {0, B_7, A_7, C_7}, +//cs8 + {0, K_8, J_8, L_8}, + {0, H_8, G_8, I_8}, + {0, E_8, D_8, F_8}, + {0, B_8, A_8, C_8}, +//cs9 + {0, K_9, J_9, L_9}, + {0, H_9, G_9, I_9}, + {0, E_9, D_9, F_9}, + {0, B_9, A_9, C_9}, +//cs10 + {0, K_10, J_10, L_10}, + {0, H_10, G_10, I_10}, + {0, E_10, D_10, F_10}, + {0, B_10, A_10, C_10}, +//cs11 + {0, K_11, J_11, L_11}, + {0, H_11, G_11, I_11}, + {0, E_11, D_11, F_11}, + {0, B_11, A_11, C_11}, +//cs12 + {0, K_12, J_12, L_12}, + {0, H_12, G_12, I_12}, + {0, E_12, D_12, F_12}, + {0, B_12, A_12, C_12}, +//cs13 + {0, K_13, J_13, L_13}, + {0, H_13, G_13, I_13}, + {0, E_13, D_13, F_13}, + {0, B_13, A_13, C_13}, +//cs14 + {0, K_14, J_14, L_14}, + {0, H_14, G_14, I_14}, + {0, E_14, D_14, F_14}, + {0, B_14, A_14, C_14}, +//cs15 + {0, K_15, J_15, L_15}, + + {0, E_15, D_15, F_15}, + {0, B_15, A_15, C_15}, +//cs16 + {0, K_16, J_16, L_16}, + {0, H_16, G_16, I_16}, + {0, E_16, D_16, F_16}, + {0, B_16, A_16, C_16}, +}; +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ +//cs1 + {{0|(0<<4)}, { 0, 0}, 1}, + {{0|(1<<4)}, { 17, 0}, 0}, + {{1|(0<<4)}, { 0, 16}, 1}, + {{2|(0<<4)}, { 0, 32}, 1}, + +//cs2 + {{0|(2<<4)}, { 34, 0}, 0}, + {{0|(3<<4)}, { 51, 0}, 0}, + {{1|(1<<4)}, { 17, 16}, 0}, + {{1|(2<<4)}, { 34, 16}, 0}, +//cs3 + {{2|(1<<4)}, { 17, 32}, 0}, + {{2|(2<<4)}, { 34, 32}, 0}, + {{3|(1<<4)}, { 17, 48}, 0}, + {{3|(2<<4)}, { 34, 48}, 0}, +//cs4 + {{0|(4<<4)}, { 68, 0}, 0}, + {{0|(5<<4)}, { 85, 0}, 0}, + {{1|(3<<4)}, { 51, 16}, 0}, + {{1|(4<<4)}, { 68, 16}, 0}, +//cs5 + {{0|(11<<4)}, {187, 0}, 0}, + {{0|(12<<4)}, {204, 0}, 0}, + {{1|(11<<4)}, {187, 16}, 0}, + {{1|(12<<4)}, {204, 16}, 0}, +//cs6 + {{0|(7<<4)}, {119, 0}, 0}, + {{0|(8<<4)}, {136, 0}, 0}, + {{1|(7<<4)}, {119, 16}, 0}, + {{1|(8<<4)}, {136, 16}, 0}, +//cs7 + {{0|(9<<4)}, {153, 0}, 0}, + {{0|(10<<4)}, {170, 0}, 0}, + {{1|(9<<4)}, {153, 16}, 0}, + {{1|(10<<4)}, {170, 16}, 0}, +//cs8 + {{0|(13<<4)}, {221, 0}, 0}, + {{0|(14<<4)}, {221, 0}, 0}, + {{1|(13<<4)}, {221, 32}, 1}, + {{2|(12<<4)}, {221, 16}, 1}, +//cs9 + {{2|(3<<4)}, { 51, 32}, 0}, + {{2|(4<<4)}, { 68, 32}, 0}, + {{3|(3<<4)}, { 51, 48}, 0}, + {{3|(4<<4)}, { 68, 48}, 0}, +//cs10 + {{0|(6<<4)}, {102, 0}, 0}, + {{1|(5<<4)}, { 85, 16}, 0}, + {{1|(6<<4)}, {102, 16}, 0}, + {{2|(5<<4)}, { 85, 32}, 0}, +//cs11 + {{2|(6<<4)}, {102, 32}, 0}, + {{3|(5<<4)}, { 85, 48}, 0}, + {{3|(6<<4)}, {102, 48}, 0}, + {{4|(5<<4)}, {102, 64}, 0}, +//cs12 + {{2|(7<<4)}, {119, 32}, 0}, + {{2|(8<<4)}, {136, 32}, 0}, + {{3|(7<<4)}, {119, 48}, 0}, + {{3|(8<<4)}, {136, 48}, 0}, +//cs13 + {{2|(9<<4)}, {153, 32}, 0}, + {{2|(10<<4)}, {170, 32}, 0}, + {{3|(9<<4)}, {153, 48}, 0}, + {{4|(6<<4)}, {136, 48}, 1}, +//cs14 + {{2|(11<<4)}, {187, 32}, 0}, + {{3|(10<<4)}, {170, 48}, 0}, + {{3|(11<<4)}, {187, 48}, 1}, + {{4|(7<<4)}, {153, 48}, 1}, +//cs15 + {{3|(12<<4)}, {221, 48}, 1}, + + {{4|(9<<4)}, {221, 64}, 1}, + {{4|(8<<4)}, {204, 64}, 1}, +//cs16 + {{3|(0<<4)}, { 0, 48}, 1}, + {{4|(0<<4)}, { 0, 64}, 1}, + {{4|(1<<4)}, { 17, 64}, 1}, + {{4|(2<<4)}, { 34, 64}, 1}, +}; +#endif diff --git a/keyboards/e6_rgb/e6_rgb.h b/keyboards/e6_rgb/e6_rgb.h new file mode 100644 index 000000000000..01f700c0097c --- /dev/null +++ b/keyboards/e6_rgb/e6_rgb.h @@ -0,0 +1,83 @@ + /** + * e6_rgb.h + * + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_wkl( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#define LAYOUT_60_hhkb( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k42, k43, k47, k49, k4a \ +) \ +{ \ + {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, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ +} +#define LAYOUT_60_wkl_split_bs( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {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, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} +#define LAYOUT_60_ansi_split_bs_shift( \ + 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, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {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, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} diff --git a/keyboards/e6_rgb/info.json b/keyboards/e6_rgb/info.json new file mode 100644 index 000000000000..80f3610029f2 --- /dev/null +++ b/keyboards/e6_rgb/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "e6_rgb", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_wkl": { + "key_count":61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_ansi": { + "key_count":61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"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_hhkb": { + "key_count":60, + "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":"Backspace", "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":"Win", "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":"Win", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/e6_rgb/keymaps/60_ansi/keymap.c b/keyboards/e6_rgb/keymaps/60_ansi/keymap.c new file mode 100644 index 000000000000..0f7f09f55169 --- /dev/null +++ b/keyboards/e6_rgb/keymaps/60_ansi/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [0] = 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_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), + [1] = LAYOUT_60_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,_______,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______), +}; diff --git a/keyboards/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c b/keyboards/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c new file mode 100644 index 000000000000..1ecde0089ce2 --- /dev/null +++ b/keyboards/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_shift( + 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_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_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_END,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, KC_RGUI, TG(1), KC_RCTL), + [1] = LAYOUT_60_ansi_split_bs_shift( + _______, 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,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; diff --git a/keyboards/e6_rgb/keymaps/60_hhkb/keymap.c b/keyboards/e6_rgb/keymaps/60_hhkb/keymap.c new file mode 100644 index 000000000000..e1d2cca37287 --- /dev/null +++ b/keyboards/e6_rgb/keymaps/60_hhkb/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_hhkb( + 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_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_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS,\ + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1)), + [1] = LAYOUT_60_hhkb( + _______, 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,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______, _______, _______,_______), +}; diff --git a/keyboards/e6_rgb/keymaps/60_wkl/keymap.c b/keyboards/e6_rgb/keymaps/60_wkl/keymap.c new file mode 100644 index 000000000000..e149c7f06ba6 --- /dev/null +++ b/keyboards/e6_rgb/keymaps/60_wkl/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl( + 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_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_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_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_DEL,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl( + 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,\ + RESET, RGB_TOG, RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/e6_rgb/keymaps/60_wkl_split_bs/keymap.c b/keyboards/e6_rgb/keymaps/60_wkl_split_bs/keymap.c new file mode 100644 index 000000000000..d9a7885eb8d5 --- /dev/null +++ b/keyboards/e6_rgb/keymaps/60_wkl_split_bs/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl_split_bs( + 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_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_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_END,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl_split_bs( + _______, 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,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/e6_rgb/readme.md b/keyboards/e6_rgb/readme.md new file mode 100644 index 000000000000..6433dd74d010 --- /dev/null +++ b/keyboards/e6_rgb/readme.md @@ -0,0 +1,12 @@ +# e6 pcb with rgb + +A full rgb pcb for exclusive E6V1&V2 + +Keyboard Maintainer: [astro](https://github.com/yulei) +Hardware Supported: E6V1, E6V2 + +Make example for this keyboard (after setting up your build environment): + + make e6_rgb:60_ansi + +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/e6_rgb/rules.mk b/keyboards/e6_rgb/rules.mk new file mode 100644 index 000000000000..9e4e0f58f5f9 --- /dev/null +++ b/keyboards/e6_rgb/rules.mk @@ -0,0 +1,77 @@ +# MCU name +MCU = atmega32u4 + +# project specific files +#SRC = + +# 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 +#OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# 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 yes to no to disable +# +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 = 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 +#RGBLIGHT_ENABLE = yes # Use RGB bottom light +RGB_MATRIX_ENABLE = IS31FL3733# Use RGB matrix +LAYOUTS = 60_ansi 60_hhkb From 0d7631937018306b025cebd09cb33c55f965a5e6 Mon Sep 17 00:00:00 2001 From: Alex Ong Date: Mon, 28 Jan 2019 12:05:34 +1100 Subject: [PATCH 229/458] [Keyboard] Added xealousbrown keyboard (#4945) * Added xealousbrown keyboard. * Changed to pragma once in config.h * Update keyboards/handwired/xealousbrown/rules.mk Added bootloader. Co-Authored-By: alex-ong * Update keyboards/handwired/xealousbrown/config.h Commented out IS_COMMAND() since it is already default value. Co-Authored-By: alex-ong --- keyboards/handwired/xealousbrown/README.md | 11 +++ keyboards/handwired/xealousbrown/config.h | 51 +++++++++++++ keyboards/handwired/xealousbrown/info.json | 74 +++++++++++++++++++ .../xealousbrown/keymaps/default/keymap.c | 18 +++++ keyboards/handwired/xealousbrown/rules.mk | 60 +++++++++++++++ .../handwired/xealousbrown/xealousbrown.c | 8 ++ .../handwired/xealousbrown/xealousbrown.h | 20 +++++ 7 files changed, 242 insertions(+) create mode 100644 keyboards/handwired/xealousbrown/README.md create mode 100644 keyboards/handwired/xealousbrown/config.h create mode 100644 keyboards/handwired/xealousbrown/info.json create mode 100644 keyboards/handwired/xealousbrown/keymaps/default/keymap.c create mode 100644 keyboards/handwired/xealousbrown/rules.mk create mode 100644 keyboards/handwired/xealousbrown/xealousbrown.c create mode 100644 keyboards/handwired/xealousbrown/xealousbrown.h diff --git a/keyboards/handwired/xealousbrown/README.md b/keyboards/handwired/xealousbrown/README.md new file mode 100644 index 000000000000..e6092ebb0590 --- /dev/null +++ b/keyboards/handwired/xealousbrown/README.md @@ -0,0 +1,11 @@ +# XealouS Brown + +My first handwired keyboard. Originally used TMK, now ported in full glory to QMK. + +Build log at: +https://sites.google.com/site/xaelous/keyboards/handwired-keyboard + +Make example for this keyboard (after setting up your build environment): + + make handwired/xealous-brown:default + diff --git a/keyboards/handwired/xealousbrown/config.h b/keyboards/handwired/xealousbrown/config.h new file mode 100644 index 000000000000..53430849f2cc --- /dev/null +++ b/keyboards/handwired/xealousbrown/config.h @@ -0,0 +1,51 @@ +/* +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 0x606A +#define DEVICE_VER 0x0002 +#define MANUFACTURER XeaL +#define PRODUCT XeaLous Brown Keyboard +#define DESCRIPTION XeaLous Brown Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { D3, D2, D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* key combination for magic key command */ +// #define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/handwired/xealousbrown/info.json b/keyboards/handwired/xealousbrown/info.json new file mode 100644 index 000000000000..c39e762178d1 --- /dev/null +++ b/keyboards/handwired/xealousbrown/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "Xealous-Brown", + "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/xealousbrown/keymaps/default/keymap.c b/keyboards/handwired/xealousbrown/keymaps/default/keymap.c new file mode 100644 index 000000000000..6597c56673e5 --- /dev/null +++ b/keyboards/handwired/xealousbrown/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Main layer */ + 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_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_ENTER, \ + 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_BSLS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_BSPC \ + ), + [1] = LAYOUT( /* FN_Layer */ + 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_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK,KC_PAUS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL \ + ) +}; diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk new file mode 100644 index 000000000000..2bad9a1c6ec1 --- /dev/null +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -0,0 +1,60 @@ + +# 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 = caterina +# 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 = 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 + + diff --git a/keyboards/handwired/xealousbrown/xealousbrown.c b/keyboards/handwired/xealousbrown/xealousbrown.c new file mode 100644 index 000000000000..5c8e2fb18a5b --- /dev/null +++ b/keyboards/handwired/xealousbrown/xealousbrown.c @@ -0,0 +1,8 @@ +#include "xealousbrown.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/handwired/xealousbrown/xealousbrown.h b/keyboards/handwired/xealousbrown/xealousbrown.h new file mode 100644 index 000000000000..ff449e43244c --- /dev/null +++ b/keyboards/handwired/xealousbrown/xealousbrown.h @@ -0,0 +1,20 @@ +#ifndef XEALOUSBROWN_H +#define XEALOUSBROWN_H + +#include "quantum.h" + +#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, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K46, K47, K48, K49, K4C \ + ) { \ + { 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, KC_NO, KC_NO, K45, K46, K47, K48, K49, KC_NO, KC_NO, K4C } \ +} + +#endif From 0ea336c03de3ba594ad38cc36c8a34ad1ece65d9 Mon Sep 17 00:00:00 2001 From: VM Date: Sun, 27 Jan 2019 20:34:41 -0500 Subject: [PATCH 230/458] [Keymap] small update to my (omgvee) IRIS keymap (#4969) * moved some stuff around on my iris layout, but don't expect a lot of changes in the future * good working setup --- keyboards/iris/keymaps/omgvee/config.h | 9 ++- keyboards/iris/keymaps/omgvee/keymap.c | 77 ++++++++++++++++++------- keyboards/iris/keymaps/omgvee/readme.md | 2 +- keyboards/iris/keymaps/omgvee/rules.mk | 4 +- 4 files changed, 67 insertions(+), 25 deletions(-) diff --git a/keyboards/iris/keymaps/omgvee/config.h b/keyboards/iris/keymaps/omgvee/config.h index c29201fe1f80..c5899f45f09d 100644 --- a/keyboards/iris/keymaps/omgvee/config.h +++ b/keyboards/iris/keymaps/omgvee/config.h @@ -46,4 +46,11 @@ along with this program. If not, see . #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0 \ No newline at end of file +#define MOUSEKEY_WHEEL_DELAY 0 + +////Leader key timeout +//#define LEADER_TIMEOUT 500 +//#define LEADER_PER_KEY_TIMING 200 + +#undef PRODUCT +#define PRODUCT "Vee's Home IRIS choc keeb" diff --git a/keyboards/iris/keymaps/omgvee/keymap.c b/keyboards/iris/keymaps/omgvee/keymap.c index da76b593b6a9..6f29ccecd34f 100644 --- a/keyboards/iris/keymaps/omgvee/keymap.c +++ b/keyboards/iris/keymaps/omgvee/keymap.c @@ -8,6 +8,7 @@ extern keymap_config_t keymap_config; #define _RAISE 2 #define _MOUSE 3 #define _ADJUST 4 +#define _HWCT 5 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -15,9 +16,11 @@ enum custom_keycodes { RAISE, MOUSE, ADJUST, + HWCT, }; #define KC_MOUS TT(_MOUSE) // double tab toggle mouse layer +#define KC_HWCT TT(_HWCT) // double tab toggle hardware control layer #define MS_L KC_MS_LEFT #define MS_R KC_MS_RIGHT #define MS_U KC_MS_UP @@ -27,7 +30,10 @@ enum custom_keycodes { #define MW_U KC_MS_WH_UP #define MW_D KC_MS_WH_DOWN #define MW_L KC_MS_WH_LEFT -#define MW_R KC_MS_WH_RIGHT +#define MW_R KC_MS_WH_RIGHT + +//// only uncomment the below line when you enable leader key in rules.mk +//LEADER_EXTERNS(); //Tap Dance Declarations enum { @@ -36,13 +42,12 @@ enum { //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { //Tap once for Shift, twice for Caps Lock - [TD_SCL] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) + [TD_SCL] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), }; enum { TD_EBT = 0 }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( @@ -51,37 +56,37 @@ 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_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - TD(TD_SCL), 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_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_MOUS, KC_MOUS, 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_MOUS, KC_HWCT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,TD(TD_SCL), //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - KC_LALT, LOWER, KC_ENT, KC_SPC, RAISE, KC_LGUI + KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, KC_BSPC, + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_PIPE, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, KC_HOME, KC_END, KC_LBRC, KC_RBRC, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LCTL, _______, _______, _______, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + KC_LCTL, _______, _______, KC_LT, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, KC_GT, _______, _______, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, KC_DEL, KC_DEL, _______, _______ + _______, _______, _______, KC_DEL, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_RAISE] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - 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_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_INS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_MOD, KC_MPRV, KC_MNXT, _______, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_ENT, + _______, _______, _______, _______, KC_PGDN, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_MENU, KC_PENT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_MSTP, KC_MPLY, _______, KC_PGDN, KC_MINS, KC_LPRN, KC_RPRN, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, + _______, _______, _______, _______, _______, KC_MINS, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_VOLD, KC_VOLU, KC_PSCR, KC_EJCT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -89,13 +94,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - BL_BRTG, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - BL_TOGG, MS_B1, MS_U, MS_B2, MW_U, _______, _______, MS_B1, MS_B2, _______, _______, _______, + _______, MS_B1, MS_U, MS_B2, MW_U, _______, _______, MS_B1, MS_B2, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, MS_L, MS_D, MS_R, MW_D, _______, MS_L, MS_D , MS_U, MS_R ,_______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - BL_STEP, _______, _______, MW_L, MW_R, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, MW_L, MW_R, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -103,17 +108,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, RESET, + BL_BRTG, _______, _______, _______, DEBUG, RESET, RESET, DEBUG, _______, RGB_HUI, RGB_SAI, RGB_VAI, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, _______, _______, _______, _______, EEP_RST, EEP_RST, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_DEC, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, RGB_MOD, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_HWCT] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + BL_BRTG, _______, _______, _______, _______, RESET, RESET, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + BL_DEC, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, RGB_MOD, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + BL_TOGG, _______, _______, _______, _______, _______, KC_EJCT, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ) + }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -160,6 +180,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case HWCT: + if (record->event.pressed) { + layer_on(_HWCT); + dprintf("Got on layer %s ", HWCT); + update_tri_layer(_LOWER, _RAISE, _MOUSE); + } else { + layer_off(_HWCT); + dprintf("Got off layer %s ", HWCT); + update_tri_layer(_LOWER, _RAISE, _MOUSE); + } + return false; + break; + case ADJUST: if (record->event.pressed) { layer_on(_ADJUST); diff --git a/keyboards/iris/keymaps/omgvee/readme.md b/keyboards/iris/keymaps/omgvee/readme.md index 82a6cd2cf560..275d270fa315 100644 --- a/keyboards/iris/keymaps/omgvee/readme.md +++ b/keyboards/iris/keymaps/omgvee/readme.md @@ -4,7 +4,7 @@ ![My beloved IRIS keeb](https://i.imgur.com/wgsb37e.jpg) -![My beloved choc IRIS keeb](https://imgur.com/a/NDXqLGb) +![My beloved choc IRIS keeb](https://i.imgur.com/BgbxViq.jpg) ======= diff --git a/keyboards/iris/keymaps/omgvee/rules.mk b/keyboards/iris/keymaps/omgvee/rules.mk index 281f64c7eb07..897c6069c5c5 100644 --- a/keyboards/iris/keymaps/omgvee/rules.mk +++ b/keyboards/iris/keymaps/omgvee/rules.mk @@ -2,6 +2,8 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes MOUSEKEY_ENABLE = yes CONSOLE_ENABLE = no -COMMAND_ENABLE = yes +COMMAND_ENABLE = no TAP_DANCE_ENABLE = yes NKRO_ENABLE = yes +LEADER_ENABLE = no +UNICODE_ENABLE = no From 17d3750f13b720b5f57c0c8127b177fe41fafe26 Mon Sep 17 00:00:00 2001 From: CodingDog Date: Sun, 27 Jan 2019 20:35:23 -0500 Subject: [PATCH 231/458] [Keymap] updated zlant default keymap with diagram (#4954) * updated zlant keymap with diagram * made edites to last post * noticed slight error in default keymap due to my own mistake. fixed to be the same as default * fixed spacing in second base layer second row from left --- keyboards/zlant/keymaps/default/keymap.c | 26 +++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/keyboards/zlant/keymaps/default/keymap.c b/keyboards/zlant/keymaps/default/keymap.c index a701a7965a2f..37f031f015a7 100755 --- a/keyboards/zlant/keymaps/default/keymap.c +++ b/keyboards/zlant/keymaps/default/keymap.c @@ -11,12 +11,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ RGB_HUI, RGB_HUD, KC_LGUI, KC_LALT, KC_LSFT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - + /* BASE LAYER + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bspc │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ LCtrl│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ Esc │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Enter│ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴──────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │LED H+│LED H-│ LGUI │ LAlt │LShift│ Space │ Fn │ Left │ Down │ Up │ Right│ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + */ [FN] = LAYOUT( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PGUP, KC_HOME, _______, _______, \ RGB_VAI, RGB_VAD, RESET, KC_PSCR, _______, _______, _______, _______, KC_PGDN, KC_END, _______, KC_DEL \ ) - -}; +}; + /* FN LAYER + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ - │ = │ [ │ ] │ \ │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ PgUp │ Home │ │ │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴──────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │LED V+│LED V-│ Reset│ PScr │ │ │ │ PgDn │ End │ │ Del │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + */ From 795f743c04f6a62056aac9d637f7a5a896d030b8 Mon Sep 17 00:00:00 2001 From: Maxr1998 Date: Mon, 28 Jan 2019 01:59:48 +0100 Subject: [PATCH 232/458] [Keymap] Support FX keys on Maxr1998's Contra Using update_tri_layer() and more manual layer switching, also rename some layers & keycodes --- keyboards/contra/keymaps/maxr1998/keymap.c | 79 ++++++++++++++++------ 1 file changed, 58 insertions(+), 21 deletions(-) diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 48bde833d551..326d5876d0d5 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -19,16 +19,17 @@ enum contra_layers { _QWERTZ, - _FUNC, - _NUMROW, - _NUMROW_L3, + _FN, + _NR, + _NR_L3, + _FX, _GAMING }; -#define KC_I3 LM(_NUMROW, MOD_LALT) -#define KC_NR MO(_NUMROW) -#define NR_L3 SAFE_RANGE -#define FUN MO(_FUNC) +#define KC_I3 LM(_NR, MOD_LALT) +#define KC_NR SAFE_RANGE +#define KC_N3 (SAFE_RANGE + 1) +#define KC_FN MO(_FN) #define G_1 TO(_GAMING) #define G_0 TG(_GAMING) @@ -49,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_PLUS, 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}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, NR_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, KC_N3, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT} }, /* Function layer @@ -60,10 +61,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | ---- | ---- | | | ---- | ---- | Home | PgDn | End | + * | | | | ---- | ---- | | ---- | ---- | Home | PgDn | End | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { +[_FN] = { {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL }, {KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______}, {_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______}, @@ -78,20 +79,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | <> | | | | | | | | | | -_ | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | ---- | ---- | | | ---- | ---- | | | | + * | | | | ---- | ---- | | ---- | ---- | | | | * `-----------------------------------------------------------------------------------' */ -[_NUMROW] = { +[_NR] = { {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______}, {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, - {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______} + {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} }, -[_NUMROW_L3] = { +[_NR_L3] = { {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS }, {_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, - {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______} + {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} +}, + +/* Function keys + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FX] = { + {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, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} }, /* Gaming @@ -102,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Space| | | | | | | | Reset| | | | + * | Space| | | | | | | Leave| | | | * `-----------------------------------------------------------------------------------' */ [_GAMING] = { @@ -113,6 +132,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; +void update_tri_layer_user(void); + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case KC_BSPC: @@ -125,20 +146,36 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(DE_SS); } return true; - case NR_L3: + case KC_NR: if (record->event.pressed) { - register_code(KC_ALGR); - layer_on(_NUMROW_L3); + layer_on(_NR); } else { - layer_off(_NUMROW_L3); - unregister_code(KC_ALGR); + layer_off(_NR); } + update_tri_layer_user(); + return false; + case KC_N3: + if (record->event.pressed) { + layer_on(_NR_L3); + } else { + layer_off(_NR_L3); + } + update_tri_layer_user(); return false; default: return true; } } +void update_tri_layer_user(void) { + update_tri_layer(_NR, _NR_L3, _FX); + if (layer_state_is(_NR_L3) && !layer_state_is(_FX)) { + register_code(KC_ALGR); + } else { + unregister_code(KC_ALGR); + } +} + void led_set_user(uint8_t usb_led) { // Force-enable Numlock if (!(usb_led & (1< Date: Sun, 27 Jan 2019 20:46:06 -0500 Subject: [PATCH 233/458] [Keymap] some mods to my (omgvee) Helidox keymap (#4972) * moved some stuff around on my iris layout, but don't expect a lot of changes in the future * good working setup * [keymap] some mods to my (omgvee) Helidox keymap --- keyboards/crkbd/keymaps/omgvee/config.h | 3 +++ keyboards/crkbd/keymaps/omgvee/keymap.c | 16 ++++++++++------ keyboards/crkbd/keymaps/omgvee/readme.md | 5 ++++- keyboards/crkbd/keymaps/omgvee/rules.mk | 8 ++++---- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/keyboards/crkbd/keymaps/omgvee/config.h b/keyboards/crkbd/keymaps/omgvee/config.h index bed797e92164..95d5328adb8f 100644 --- a/keyboards/crkbd/keymaps/omgvee/config.h +++ b/keyboards/crkbd/keymaps/omgvee/config.h @@ -43,3 +43,6 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 #define BACKLIGHT_LEVELS 10 + +#undef PRODUCT +#define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb" diff --git a/keyboards/crkbd/keymaps/omgvee/keymap.c b/keyboards/crkbd/keymaps/omgvee/keymap.c index fbd29e774f19..5c4dd416e0e3 100644 --- a/keyboards/crkbd/keymaps/omgvee/keymap.c +++ b/keyboards/crkbd/keymaps/omgvee/keymap.c @@ -44,6 +44,7 @@ enum macro_keycodes { #define KC_LOWER LOWER #define KC_RAISE RAISE #define KC_RST RESET +#define KC_ERST EEPROM_RESET #define KC_LRST RGBRST #define KC_LTOG RGB_TOG #define KC_LHUI RGB_HUI @@ -85,11 +86,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| SFCPS, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, BSLS,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, SLSH, RSFT,\ + CTLTB, XXXXX, VOLD, VOLU, MUTE, MPLY, UNDS, PLUS, LBRC, RBRC, SLSH, RSFT,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ //`--------------------' `--------------------' @@ -97,11 +98,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ + LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, BRID, BRIU, VOLD, VOLU, MUTE, XXXXX,\ + LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ //`--------------------' `--------------------' @@ -158,7 +159,10 @@ void matrix_render_user(struct CharacterMatrix *matrix) { //matrix_write_ln(matrix, read_host_led_state()); //matrix_write_ln(matrix, read_timelog()); } else { - matrix_write(matrix, read_logo()); + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write(matrix, read_logo()); } } diff --git a/keyboards/crkbd/keymaps/omgvee/readme.md b/keyboards/crkbd/keymaps/omgvee/readme.md index 707f44a9ca08..bc316c2a351a 100644 --- a/keyboards/crkbd/keymaps/omgvee/readme.md +++ b/keyboards/crkbd/keymaps/omgvee/readme.md @@ -2,7 +2,7 @@ ====================================================== -![My beloved HeliDox keeb](https://imgur.com/a/t5m6rmW) +![My beloved HeliDox keeb](https://i.imgur.com/NbVAB3g.jpg) - media keys and media controls - in-switch LED intensity controls (+/-) @@ -13,3 +13,6 @@ - arrow keys on one layer(most likely on the ADJUST one) See keymap.c for layouts + + +P.S> this lil' keeb is so addictive I have no words, really... diff --git a/keyboards/crkbd/keymaps/omgvee/rules.mk b/keyboards/crkbd/keymaps/omgvee/rules.mk index 21ec12ada184..16deaf45d1de 100644 --- a/keyboards/crkbd/keymaps/omgvee/rules.mk +++ b/keyboards/crkbd/keymaps/omgvee/rules.mk @@ -4,12 +4,12 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = 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 = yes # Enable keyboard backlight functionality +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 From e0e8097162d92d337c0f4c6df50f3f9a7ca8e169 Mon Sep 17 00:00:00 2001 From: f00_B34rd Date: Sun, 27 Jan 2019 19:05:11 -0700 Subject: [PATCH 234/458] [Keyboard] Add Southpole keyboard (#4946) * Added southpole keyboard added southpole keyboard folder and files including keymaps folder. Keymaps have errors and will not compile yet * Add files via upload added manufacturer and product name and description * Update config.h * Add files via upload changed formating added layer * cleaned up files, fixed foobeard keymap, and added maker info * fixed keymap files * Update keyboards/southpole/keymaps/foobeard/keymap.c Co-Authored-By: ericduns * Update keyboards/southpole/keymaps/default/keymap.c Co-Authored-By: ericduns * made changes fixing outdated lines and added readme.md * made requested changes for pr to all files * removed vs code and added new line to southpole.h --- keyboards/southpole/config.h | 46 ++++++++++++ keyboards/southpole/keymaps/default/keymap.c | 26 +++++++ keyboards/southpole/keymaps/foobeard/keymap.c | 72 +++++++++++++++++++ keyboards/southpole/readme.md | 13 ++++ keyboards/southpole/rules.mk | 56 +++++++++++++++ keyboards/southpole/southpole.c | 1 + keyboards/southpole/southpole.h | 18 +++++ 7 files changed, 232 insertions(+) create mode 100644 keyboards/southpole/config.h create mode 100644 keyboards/southpole/keymaps/default/keymap.c create mode 100644 keyboards/southpole/keymaps/foobeard/keymap.c create mode 100644 keyboards/southpole/readme.md create mode 100644 keyboards/southpole/rules.mk create mode 100644 keyboards/southpole/southpole.c create mode 100644 keyboards/southpole/southpole.h diff --git a/keyboards/southpole/config.h b/keyboards/southpole/config.h new file mode 100644 index 000000000000..5992a360f5a5 --- /dev/null +++ b/keyboards/southpole/config.h @@ -0,0 +1,46 @@ +#pragma once + +//#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER u/waxpoetic +#define PRODUCT southpole +#define DESCRIPTION southpaw keyboard, left hand numpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 20 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D2, D3, C6, C7, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4, E6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#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 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif \ No newline at end of file diff --git a/keyboards/southpole/keymaps/default/keymap.c b/keyboards/southpole/keymaps/default/keymap.c new file mode 100644 index 000000000000..78cb81f4ba65 --- /dev/null +++ b/keyboards/southpole/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_NLCK, KC_SLSH, KC_ASTR, KC_MINS, 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_7, KC_8, KC_9, KC_PLUS, 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_4, KC_5, KC_6, 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_ENT, KC_PGDN, \ + KC_1, KC_2, KC_3, 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_0, KC_DOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), \ + + LAYOUT( + 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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} diff --git a/keyboards/southpole/keymaps/foobeard/keymap.c b/keyboards/southpole/keymaps/foobeard/keymap.c new file mode 100644 index 000000000000..ef2710d0a3b3 --- /dev/null +++ b/keyboards/southpole/keymaps/foobeard/keymap.c @@ -0,0 +1,72 @@ +/* +Base Copyright 2017 Luiz Ribeiro +Modified 2017 Andrew Novak +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS 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 { + _QWERTY, + _RAISE +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0, default layer + * ,--------------------------------------------------------------------------------------------------------------------------------------------. + * |NumLck| / | * | - | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ |Delete| Ins | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | 7 | 8 | 9 | + | | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | BkSpc | Vol+ | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | 4 | 5 | 6 | + | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Return | Vol- | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | 1 | 2 | 3 | En | | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | Up | Mute | + * |------+------+------+------+-+----------------------------------------------------------------------------------------------+--------+------| + * | 0 | . | En | | Ctrl | Win | Alt | Space | Fn | | Left | Down | Right| + * `------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------' + */ + [_QWERTY] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DELETE, KC_INS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_VOLU, \ + KC_P4, KC_P5, KC_P6, KC_PENT, 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_VOLD, \ + 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, KC_MUTE, \ + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /*layer 1, function layer + * ,--------------------------------------------------------------------------------------------------------------------------------------------. + * |Reset | | | | | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | |Calc | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | | | | | | | | | | | | | | | | | | | | | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | | | | | | | | | | | | | | | | | | | | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | | | | | | | | | | | | | | | | | | | | + * |------+------+------+------+-+----------------------------------------------------------------------------------------------+--------+------| + * | | | | | | | | | | | | | | + * `------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------' + */ + + [_RAISE] = LAYOUT( + RESET, _______, _______, _______, 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_CALC, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; \ No newline at end of file diff --git a/keyboards/southpole/readme.md b/keyboards/southpole/readme.md new file mode 100644 index 000000000000..4ea99ad349cb --- /dev/null +++ b/keyboards/southpole/readme.md @@ -0,0 +1,13 @@ +# Southpole +[Southpole](https://imgur.com/a/MZ2wdYt) + +PCB designed by u/waxpoetic for a southpaw style board with an hhkb style layout. + +Keyboard Maintainer: ericduns +Hardware Supported: Teensy 2.0 + +Make example for this keyboard (after setting up your build environment): + + make southpole: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/southpole/rules.mk b/keyboards/southpole/rules.mk new file mode 100644 index 000000000000..356b75bb6cba --- /dev/null +++ b/keyboards/southpole/rules.mk @@ -0,0 +1,56 @@ +# 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 = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +#AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no \ No newline at end of file diff --git a/keyboards/southpole/southpole.c b/keyboards/southpole/southpole.c new file mode 100644 index 000000000000..f345893fb500 --- /dev/null +++ b/keyboards/southpole/southpole.c @@ -0,0 +1 @@ +#include "southpole.h" diff --git a/keyboards/southpole/southpole.h b/keyboards/southpole/southpole.h new file mode 100644 index 000000000000..99cf2ce7b557 --- /dev/null +++ b/keyboards/southpole/southpole.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K119, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K219, \ + K300, K301, K302, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K319, \ + K401, K402, K404, K405, K406, K409, K413, K415, K416, K419 \ +) \ + { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, KC_NO, K119 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, KC_NO, KC_NO, K219 }, \ + { K300, K301, K302, KC_NO, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, KC_NO, KC_NO, K319 }, \ + { KC_NO, K401, K402, KC_NO, K404, K405, K406, KC_NO, KC_NO, K409, KC_NO, KC_NO, KC_NO, K413, KC_NO, K415, K416, KC_NO, KC_NO, K419 } \ +} From af04936e1f8d0a2b1932488d679ac313a8b269de Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 27 Jan 2019 21:05:26 -0800 Subject: [PATCH 235/458] Add default layout for e6_rgb (#4973) --- keyboards/e6_rgb/keymaps/default/keymap.c | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 keyboards/e6_rgb/keymaps/default/keymap.c diff --git a/keyboards/e6_rgb/keymaps/default/keymap.c b/keyboards/e6_rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..0f7f09f55169 --- /dev/null +++ b/keyboards/e6_rgb/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [0] = 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_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), + [1] = LAYOUT_60_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,_______,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______), +}; From ad6a7e9cec0d733f86a976439625cf30be7e7af9 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 28 Jan 2019 06:40:13 -0800 Subject: [PATCH 236/458] Alice: refactor and Configurator bugfix (#4979) - layout macro and keymap layers refactored to more closely resemble physical keyboard layout - added layout mockup to alice.h - correct info.json data (was missing a key) --- keyboards/alice/alice.h | 24 ++++++-- keyboards/alice/info.json | 70 +++++++++++++++++++++++- keyboards/alice/keymaps/default/keymap.c | 22 ++++---- keyboards/alice/keymaps/mrkeebs/keymap.c | 22 ++++---- 4 files changed, 107 insertions(+), 31 deletions(-) diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h index a92618593a3e..16460ed701cf 100644 --- a/keyboards/alice/alice.h +++ b/keyboards/alice/alice.h @@ -19,13 +19,25 @@ along with this program. If not, see . #include "quantum.h" +/* LAYOUT + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │63 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │10 │11 │12 │13 │14 │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │64 │ │15 │16 │17 │18 │19 │20 │ │21 │22 │23 │24 │25 │26 │27 │28 │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │65 │ │29 │30 │31 │32 │33 │34 │ │35 │36 │37 │38 │39 │40 │41 │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │42 │43 │44 │45 │46 │47 │ │48 │49 │50 │51 │52 │53 │54 │55 │ + * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + * │56 │ │57 │58 │59 │ │60 │61 │ │62 │ + * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ + */ #define LAYOUT( \ - 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, K64, K65 \ + 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 \ ) \ { \ { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , K13 , K14 }, \ diff --git a/keyboards/alice/info.json b/keyboards/alice/info.json index 5ea1f6756e15..b26209332676 100644 --- a/keyboards/alice/info.json +++ b/keyboards/alice/info.json @@ -6,7 +6,75 @@ "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"_", "x":13.75, "y":0}, {"label":"+", "x":14.75, "y":0}, {"label":"|", "x":15.75, "y":0}, {"label":"~", "x":16.75, "y":0}, {"label":"Insert", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.25, "y":1}, {"label":"U", "x":10.25, "y":1}, {"label":"I", "x":11.25, "y":1}, {"label":"O", "x":12.25, "y":1}, {"label":"P", "x":13.25, "y":1}, {"label":"{", "x":14.25, "y":1}, {"label":"}", "x":15.25, "y":1}, {"label":"Backspace", "x":16.25, "y":1, "w":1.5}, {"label":"Delete", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":9, "y":3}, {"label":"N", "x":10, "y":3}, {"label":"M", "x":11, "y":3}, {"label":"<", "x":12, "y":3}, {"label":">", "x":13, "y":3}, {"label":"?", "x":14, "y":3}, {"label":"Shift", "x":15, "y":3, "w":1.75}, {"label":"Fn", "x":16.75, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Win", "x":7.25, "y":4, "w":1.25}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] + "key_count": 66, + "layout": [ + {"label":"K63", "x":0, "y":0}, + {"label":"K00", "x":1.25, "y":0}, + {"label":"K01", "x":2.25, "y":0}, + {"label":"K02", "x":3.25, "y":0}, + {"label":"K03", "x":4.25, "y":0}, + {"label":"K04", "x":5.25, "y":0}, + {"label":"K05", "x":6.25, "y":0}, + {"label":"K06", "x":7.25, "y":0}, + {"label":"K07", "x":10.25, "y":0}, + {"label":"K08", "x":11.25, "y":0}, + {"label":"K09", "x":12.25, "y":0}, + {"label":"K10", "x":13.25, "y":0}, + {"label":"K11", "x":14.25, "y":0}, + {"label":"K12", "x":15.25, "y":0}, + {"label":"K13", "x":16.25, "y":0}, + {"label":"K14", "x":17.25, "y":0}, + {"label":"K64", "x":0, "y":1}, + {"label":"K15", "x":1.25, "y":1, "w":1.5}, + {"label":"K16", "x":2.75, "y":1}, + {"label":"K17", "x":3.75, "y":1}, + {"label":"K18", "x":4.75, "y":1}, + {"label":"K19", "x":5.75, "y":1}, + {"label":"K20", "x":6.75, "y":1}, + {"label":"K21", "x":9.75, "y":1}, + {"label":"K22", "x":10.75, "y":1}, + {"label":"K23", "x":11.75, "y":1}, + {"label":"K24", "x":12.75, "y":1}, + {"label":"K25", "x":13.75, "y":1}, + {"label":"K26", "x":14.75, "y":1}, + {"label":"K27", "x":15.75, "y":1}, + {"label":"K28", "x":16.75, "y":1, "w":1.5}, + {"label":"K65", "x":0, "y":2}, + {"label":"K29", "x":1.25, "y":2, "w":1.75}, + {"label":"K30", "x":3, "y":2}, + {"label":"K31", "x":4, "y":2}, + {"label":"K32", "x":5, "y":2}, + {"label":"K33", "x":6, "y":2}, + {"label":"K34", "x":7, "y":2}, + {"label":"K35", "x":10, "y":2}, + {"label":"K36", "x":11, "y":2}, + {"label":"K37", "x":12, "y":2}, + {"label":"K38", "x":13, "y":2}, + {"label":"K39", "x":14, "y":2}, + {"label":"K40", "x":15, "y":2}, + {"label":"K41", "x":16, "y":2, "w":2.25}, + {"label":"K42", "x":1.25, "y":3, "w":2.25}, + {"label":"K43", "x":3.5, "y":3}, + {"label":"K44", "x":4.5, "y":3}, + {"label":"K45", "x":5.5, "y":3}, + {"label":"K46", "x":6.5, "y":3}, + {"label":"K47", "x":7.5, "y":3}, + {"label":"K48", "x":9.5, "y":3}, + {"label":"K49", "x":10.5, "y":3}, + {"label":"K50", "x":11.5, "y":3}, + {"label":"K51", "x":12.5, "y":3}, + {"label":"K52", "x":13.5, "y":3}, + {"label":"K53", "x":14.5, "y":3}, + {"label":"K54", "x":15.5, "y":3, "w":1.75}, + {"label":"K55", "x":17.25, "y":3}, + {"label":"K56", "x":1.25, "y":4, "w":1.5}, + {"label":"K57", "x":4.25, "y":4, "w":1.5}, + {"label":"K58", "x":5.75, "y":4, "w":2}, + {"label":"K59", "x":7.75, "y":4, "w":1.25}, + {"label":"K60", "x":9.5, "y":4, "w":2.75}, + {"label":"K61", "x":12.25, "y":4, "w":1.5}, + {"label":"K62", "x":16.75, "y":4, "w":1.5} + ] } } } diff --git a/keyboards/alice/keymaps/default/keymap.c b/keyboards/alice/keymaps/default/keymap.c index a0b6d467d4e9..29fff66183d7 100644 --- a/keyboards/alice/keymaps/default/keymap.c +++ b/keyboards/alice/keymaps/default/keymap.c @@ -19,19 +19,17 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, \ - KC_ESC, KC_PGUP, KC_PGDN \ + KC_ESC, 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_GRV, KC_BSLS, \ + 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_BSPC, \ + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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, MO(1), \ + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL \ ), [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ ), }; diff --git a/keyboards/alice/keymaps/mrkeebs/keymap.c b/keyboards/alice/keymaps/mrkeebs/keymap.c index 6b0133870093..3d8099c41395 100644 --- a/keyboards/alice/keymaps/mrkeebs/keymap.c +++ b/keyboards/alice/keymaps/mrkeebs/keymap.c @@ -19,19 +19,17 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = 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_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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, \ - KC_ESC, KC_PGUP, KC_PGDN \ + KC_ESC, 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_GRV, KC_BSLS, \ + 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_BSPC, \ + KC_PGDN, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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, MO(1), \ + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL \ ), [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_DEL, KC_INS, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_UP , _______, _______, \ - _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, \ - RESET, _______, _______ \ + RESET, KC_GRV , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, \ + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_UP , _______, _______, \ + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ ), }; From 693e1afa59686f9848517a3da895078d51bb6894 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 28 Jan 2019 08:28:47 -0800 Subject: [PATCH 237/458] BDN9 Configurator support (#4978) --- keyboards/bdn9/info.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/keyboards/bdn9/info.json b/keyboards/bdn9/info.json index e69de29bb2d1..a985a05e04d1 100644 --- a/keyboards/bdn9/info.json +++ b/keyboards/bdn9/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "Keeb.io BDN9", + "url": "", + "maintainer": "nooges", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "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} + ] + } + } +} From 5672dc8030e99541e1d71c749916249fb4b2504b Mon Sep 17 00:00:00 2001 From: ai03 Date: Mon, 28 Jan 2019 12:34:42 -0800 Subject: [PATCH 238/458] Add Lunar Keyboard (#4976) * Generate project * Adjust files * Get things working * Update readme * Add VIA configurator compatibility * Grammar * Update keymap * Split lunar info default and VIA keymaps * Copyrights * VIA tuneup * A few missed copyrights * Remove unnecessary junk * Remove unnecessary bits, fix readme --- keyboards/ai03/README.md | 4 + keyboards/ai03/lunar/config.h | 266 ++++++++++++++++++ keyboards/ai03/lunar/info.json | 13 + keyboards/ai03/lunar/keymaps/default/keymap.c | 90 ++++++ .../ai03/lunar/keymaps/default/readme.md | 2 + keyboards/ai03/lunar/keymaps/via/keymap.c | 64 +++++ keyboards/ai03/lunar/keymaps/via/readme.md | 2 + keyboards/ai03/lunar/keymaps/via/rules.mk | 86 ++++++ keyboards/ai03/lunar/lunar.c | 22 ++ keyboards/ai03/lunar/lunar.h | 41 +++ keyboards/ai03/lunar/readme.md | 15 + keyboards/ai03/lunar/rules.mk | 81 ++++++ 12 files changed, 686 insertions(+) create mode 100644 keyboards/ai03/README.md create mode 100644 keyboards/ai03/lunar/config.h create mode 100644 keyboards/ai03/lunar/info.json create mode 100644 keyboards/ai03/lunar/keymaps/default/keymap.c create mode 100644 keyboards/ai03/lunar/keymaps/default/readme.md create mode 100644 keyboards/ai03/lunar/keymaps/via/keymap.c create mode 100644 keyboards/ai03/lunar/keymaps/via/readme.md create mode 100644 keyboards/ai03/lunar/keymaps/via/rules.mk create mode 100644 keyboards/ai03/lunar/lunar.c create mode 100644 keyboards/ai03/lunar/lunar.h create mode 100644 keyboards/ai03/lunar/readme.md create mode 100644 keyboards/ai03/lunar/rules.mk diff --git a/keyboards/ai03/README.md b/keyboards/ai03/README.md new file mode 100644 index 000000000000..90bd219289a0 --- /dev/null +++ b/keyboards/ai03/README.md @@ -0,0 +1,4 @@ +# ai03 +QMK folders for PCB commissions. + +Website: [ai03 Keyboard Designs](https://kb.ai03.me/) \ No newline at end of file diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h new file mode 100644 index 000000000000..4b30ca3094fb --- /dev/null +++ b/keyboards/ai03/lunar/config.h @@ -0,0 +1,266 @@ +/* +Copyright 2019 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 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Switchplate Peripherals +#define PRODUCT Lunar +#define DESCRIPTION 65% AEK 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 { B3, D0, D1, D2, D3 } +#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 */ +#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_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 + +/* VIA Configurator Compatibility */ + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +#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_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/ai03/lunar/info.json b/keyboards/ai03/lunar/info.json new file mode 100644 index 000000000000..c7f6454f0ee3 --- /dev/null +++ b/keyboards/ai03/lunar/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Lunar", + "url": "https://geekhack.org/index.php?topic=96112.0", + "maintainer": "ai03", + "bootloader": "", + "width": 16, + "height": 5, + "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":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":"Insert", "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":"Delete", "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":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":2.25}, {"x":6.5, "y":4, "w":1.5}, {"x":8, "y":4, "w":2.75}, {"label":"Alt", "x":10.75, "y":4, "w":1.25}, {"label":"Win", "x":12, "y":4}, {"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/ai03/lunar/keymaps/default/keymap.c b/keyboards/ai03/lunar/keymaps/default/keymap.c new file mode 100644 index 000000000000..4705d00ec1da --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/default/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2019 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, + SWPLURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + + Layout + + K000 K001 K002 K003 K004 K005 K006 K007 K008 K009 K010 K011 K012 K013 K212 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 K213 K214 + K300 K301 K302 K303 K304 K305 K306 K307 K308 K309 K310 K311 K313 K314 + K400 K401 K402 K403 K405 K407 K409 K410 K411 K413 K414 + + K212 = Split backspace (bound to Del by default) + K403, K407 = Split space (bound to space by default) + K405 = Main space + + */ + + [0] = LAYOUT( /* 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_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, + 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_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_SPC, KC_SPC, MO(1), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* 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_DEL, KC_DEL, MANUAL, + KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, SWPLURL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MANUAL: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("https://kb.ai03.me/redir/lunar/index.html"); + } else { + // when keycode QMKBEST is released + } + break; + case SWPLURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://switchplate.co/collections/lunar-group-buy"); + } 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/ai03/lunar/keymaps/default/readme.md b/keyboards/ai03/lunar/keymaps/default/readme.md new file mode 100644 index 000000000000..8ff536ffc1e1 --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for Lunar +For use without VIA configurator. \ No newline at end of file diff --git a/keyboards/ai03/lunar/keymaps/via/keymap.c b/keyboards/ai03/lunar/keymaps/via/keymap.c new file mode 100644 index 000000000000..b98e6cf0aa7b --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2019 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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + + Layout + + K000 K001 K002 K003 K004 K005 K006 K007 K008 K009 K010 K011 K012 K013 K212 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 K213 K214 + K300 K301 K302 K303 K304 K305 K306 K307 K308 K309 K310 K311 K313 K314 + K400 K401 K402 K403 K405 K407 K409 K410 K411 K413 K414 + + K212 = Split backspace (bound to Del by default) + K403, K407 = Split space (bound to space by default) + K405 = Main space + + */ + + [0] = LAYOUT( /* 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_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, + 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_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_SPC, KC_SPC, MO(1), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* 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_DEL, KC_DEL, _______, + KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT( /* Blank. For VIA compatibility */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( /* Blank. For VIA compatibility */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/lunar/keymaps/via/readme.md b/keyboards/ai03/lunar/keymaps/via/readme.md new file mode 100644 index 000000000000..ff0b73bfcee1 --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA keymap for Lunar +This keymap is for compatibility with the VIA configurator. \ No newline at end of file diff --git a/keyboards/ai03/lunar/keymaps/via/rules.mk b/keyboards/ai03/lunar/keymaps/via/rules.mk new file mode 100644 index 000000000000..7c10c3fbbd17 --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/via/rules.mk @@ -0,0 +1,86 @@ +# 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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 += keyboards/wilba_tech/wt_main.c + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ai03/lunar/lunar.c b/keyboards/ai03/lunar/lunar.c new file mode 100644 index 000000000000..37438c71e61b --- /dev/null +++ b/keyboards/ai03/lunar/lunar.c @@ -0,0 +1,22 @@ +/* Copyright 2019 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 "lunar.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/ai03/lunar/lunar.h b/keyboards/ai03/lunar/lunar.h new file mode 100644 index 000000000000..2e66ecb5c56a --- /dev/null +++ b/keyboards/ai03/lunar/lunar.h @@ -0,0 +1,41 @@ +/* Copyright 2019 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 "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( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, 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, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K403, K405, K407, K409, K410, K411, 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, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, K403, KC_NO, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} diff --git a/keyboards/ai03/lunar/readme.md b/keyboards/ai03/lunar/readme.md new file mode 100644 index 000000000000..585d6454ba58 --- /dev/null +++ b/keyboards/ai03/lunar/readme.md @@ -0,0 +1,15 @@ +# Lunar + +![Photo](https://i.imgur.com/hYoW8IJ.jpg) + +A 65% keyboard made specifically for Alps SKCM/L switches and AEK/M0116 keycaps. + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: Official Lunar PCB +Hardware Availability: [Switchplate Peripherals](https://switchplate.co/) + +Make example for this keyboard (after setting up your build environment): + + make ai03/lunar: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/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk new file mode 100644 index 000000000000..8c2532574a9d --- /dev/null +++ b/keyboards/ai03/lunar/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 = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 12a2572295ae4daa69299941c0fa491bd6e04669 Mon Sep 17 00:00:00 2001 From: mtei <2170248+mtei@users.noreply.github.com> Date: Tue, 29 Jan 2019 03:23:46 +0900 Subject: [PATCH 239/458] Prevent wasteful writing to eeprom. --- quantum/rgblight.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quantum/rgblight.c b/quantum/rgblight.c index 23420ddd87dd..cf2666eb4b65 100644 --- a/quantum/rgblight.c +++ b/quantum/rgblight.c @@ -128,7 +128,9 @@ uint32_t eeconfig_read_rgblight(void) { } void eeconfig_update_rgblight(uint32_t val) { #ifdef __AVR__ + if (eeconfig_read_rgblight() != val) { eeprom_update_dword(EECONFIG_RGBLIGHT, val); + } #endif } void eeconfig_update_rgblight_default(void) { From d9120412d3d81fc688a7e5346711cf716518dc34 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 28 Jan 2019 15:24:34 -0800 Subject: [PATCH 240/458] Fix layouts for S7 Elephant in info.json (#4989) The following layouts were being rendered with 6.75u Spacebars instead of 7u: - LAYOUT_ansi_blocker_7u - LAYOUT_ansi_blocker_7u_small_lshift - LAYOUT_ansi_blocker_7u_small_bspc - LAYOUT_ansi_blocker_7u_small_lshift_small_bspc - LAYOUT_iso_blocker_7u This commit corrects this issue. Flagged by yanfali on QMK Discord. --- keyboards/s7_elephant/info.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/s7_elephant/info.json b/keyboards/s7_elephant/info.json index 972f20ce04e7..3d45f0b094c9 100644 --- a/keyboards/s7_elephant/info.json +++ b/keyboards/s7_elephant/info.json @@ -1322,8 +1322,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -1399,8 +1399,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -1476,8 +1476,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -1554,8 +1554,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -2337,8 +2337,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} From 0f507f01696eae0e8fe808d17a19db3f6d9e2ce4 Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Mon, 28 Jan 2019 19:40:02 -0500 Subject: [PATCH 241/458] Practice60 RGB and PWM Backlight (#4929) * Update Practice60 to enable RGB via SPI DMA and use PWM backlight breathing * Correct stm32f103c8t6 flash size in eeprom definition * Remove unused files and improve ifdef checks * Update quantum/rgblight.c Co-Authored-By: awkannan * Update quantum/rgblight.c Co-Authored-By: awkannan * EEPROM implementation fix and updated p60 code * Update define * Remove dead code * Update keymap to remove test key * Update keymap again --- drivers/avr/ws2812.c | 4 +- .../handwired/practice60/bootloader_defs.h | 2 +- keyboards/handwired/practice60/config.h | 13 +- keyboards/handwired/practice60/halconf.h | 2 +- keyboards/handwired/practice60/hsv2rgb.c | 80 ------- keyboards/handwired/practice60/hsv2rgb.h | 23 -- .../practice60/keymaps/default/keymap.c | 6 +- keyboards/handwired/practice60/led.c | 220 +++++++++++++++++- keyboards/handwired/practice60/led_custom.h | 6 + keyboards/handwired/practice60/mcuconf.h | 2 +- keyboards/handwired/practice60/practice60.c | 15 +- keyboards/handwired/practice60/rules.mk | 4 +- keyboards/handwired/practice60/underglow.h | 10 - .../practice60/{underglow.c => ws2812.c} | 113 ++++----- keyboards/handwired/practice60/ws2812.h | 20 ++ quantum/rgblight.c | 11 +- tmk_core/common/chibios/eeprom_stm32.c | 17 +- 17 files changed, 328 insertions(+), 220 deletions(-) delete mode 100644 keyboards/handwired/practice60/hsv2rgb.c delete mode 100644 keyboards/handwired/practice60/hsv2rgb.h create mode 100644 keyboards/handwired/practice60/led_custom.h delete mode 100644 keyboards/handwired/practice60/underglow.h rename keyboards/handwired/practice60/{underglow.c => ws2812.c} (58%) create mode 100644 keyboards/handwired/practice60/ws2812.h diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c index 59e032bf71c9..5bd837ec7542 100644 --- a/drivers/avr/ws2812.c +++ b/drivers/avr/ws2812.c @@ -128,11 +128,11 @@ unsigned char I2C_Write(unsigned char c) c <<= 1; } - + I2C_WriteBit(0); _delay_us(I2C_DELAY); _delay_us(I2C_DELAY); - + // _delay_us(I2C_DELAY); //return I2C_ReadBit(); return 0; diff --git a/keyboards/handwired/practice60/bootloader_defs.h b/keyboards/handwired/practice60/bootloader_defs.h index 0f45203cb613..6b8fa9f727c9 100644 --- a/keyboards/handwired/practice60/bootloader_defs.h +++ b/keyboards/handwired/practice60/bootloader_defs.h @@ -7,4 +7,4 @@ // STM32F103* does NOT have an USB bootloader in ROM (only serial), // so setting anything here does not make much sense -// #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/handwired/practice60/config.h b/keyboards/handwired/practice60/config.h index 648dd62edcf2..c015bb74652e 100644 --- a/keyboards/handwired/practice60/config.h +++ b/keyboards/handwired/practice60/config.h @@ -35,7 +35,9 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -48,6 +50,15 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 9 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/practice60/halconf.h b/keyboards/handwired/practice60/halconf.h index 5fba285a380d..72879a575b9c 100644 --- a/keyboards/handwired/practice60/halconf.h +++ b/keyboards/handwired/practice60/halconf.h @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM TRUE #endif /** diff --git a/keyboards/handwired/practice60/hsv2rgb.c b/keyboards/handwired/practice60/hsv2rgb.c deleted file mode 100644 index adb7af8fa57e..000000000000 --- a/keyboards/handwired/practice60/hsv2rgb.c +++ /dev/null @@ -1,80 +0,0 @@ -/* hsv2rgb.c - * Integer only conversion functions between HSV and RGB - */ - -#include "hsv2rgb.h" - -// TODO fix these buggy macros -#define max(x,y) ((x>y) ? x:y) -#define min(x,y) ((x>y) ? y:x) -#define min3(x,y,z) (min(min(x,y),z)) -#define max3(x,y,z) (max(max(x,y),z)) - - -rgb_color hsv2rgb(hsv_color hsv) -{ - // From : http://qscribble.blogspot.fr/2008/06/integer-conversion-from-hsl-to-rgb.html - int h = hsv.h; - int s = hsv.s; - int v = hsv.v; - rgb_color rgb = {0, 0, 0}; - - if (v == 0) - return rgb; - - // sextant = 0 .. 5 - int sextant = (h*6)/256; - // f = 0 .. 42 - int f = h - (sextant*256)/6; - - int p = (v * (256 - s))/256; - int q = (v * (256*43 - s*f))/(256*43); - int t = (v * (256*43 - s*(43-f)))/(256*43); - - // Corrige les erreurs dues aux arrondis - p = max(min(p, 255), 0); - q = max(min(q, 255), 0); - t = max(min(t, 255), 0); - - switch(sextant){ - case 0: rgb.r = v; rgb.g = t; rgb.b = p; break; - case 1: rgb.r = q; rgb.g = v; rgb.b = p; break; - case 2: rgb.r = p; rgb.g = v; rgb.b = t; break; - case 3: rgb.r = p; rgb.g = q; rgb.b = v; break; - case 4: rgb.r = t; rgb.g = p; rgb.b = v; break; - default:rgb.r = v; rgb.g = p; rgb.b = q; break; - } - return rgb; -} - - -hsv_color rgb2hsv(rgb_color rgb) -{ - // From : http://www.ruinelli.ch/rgb-to-hsv - hsv_color hsv = {0, 0, 0}; - int min, max, delta; - - min = min3(rgb.r, rgb.g, rgb.b); - max = max3(rgb.r, rgb.g, rgb.b); - - if(max==0) { - hsv.h = 0; - hsv.s = 0; - hsv.v = 0; - return hsv; - } - - hsv.v = max; - delta = max - min; - - hsv.s = (delta)*255 / max; - - if(rgb.r == max) - hsv.h = (rgb.g - rgb.b)*42/delta; // between yellow & magenta - else if(rgb.g == max) - hsv.h = 120 + (rgb.b - rgb.r)*42/delta; // between cyan & yellow - else - hsv.h = 240 + (rgb.r - rgb.g)*42/delta; // between magenta & cyan - - return hsv; -} \ No newline at end of file diff --git a/keyboards/handwired/practice60/hsv2rgb.h b/keyboards/handwired/practice60/hsv2rgb.h deleted file mode 100644 index 99566c32c07e..000000000000 --- a/keyboards/handwired/practice60/hsv2rgb.h +++ /dev/null @@ -1,23 +0,0 @@ -/* hsv2rgb.h - * Convert Hue Saturation Value to Red Green Blue - * - * Programme de convertion d'une information HSV en RGB - */ -#ifndef HSV2RGB_H -#define HSV2RGB_H - -typedef struct { - unsigned char h; - unsigned char s; - unsigned char v; -} hsv_color; - -typedef struct { - unsigned char r; - unsigned char g; - unsigned char b; -} rgb_color; - -rgb_color hsv2rgb(hsv_color hsv); - -#endif \ No newline at end of file diff --git a/keyboards/handwired/practice60/keymaps/default/keymap.c b/keyboards/handwired/practice60/keymaps/default/keymap.c index ac6e75509720..66ebe0646d5d 100644 --- a/keyboards/handwired/practice60/keymaps/default/keymap.c +++ b/keyboards/handwired/practice60/keymaps/default/keymap.c @@ -32,16 +32,16 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = 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, MT(MOD_LSFT, KC_Y), KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, 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_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_60_ansi( - 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_BSPC, \ + 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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_GRV, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/handwired/practice60/led.c b/keyboards/handwired/practice60/led.c index f15baed169d4..a9ede5bbaa85 100644 --- a/keyboards/handwired/practice60/led.c +++ b/keyboards/handwired/practice60/led.c @@ -18,34 +18,240 @@ along with this program. If not, see . #include "hal.h" #include "backlight.h" #include "led.h" +#include "led_custom.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) { printf("backlight_init_ports()\n"); #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(GPIOA, 8); + + palSetPadMode(GPIOA, 8, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + pwmStart(&PWMD1, &pwmCFG); + pwmEnableChannel(&PWMD1, 0, PWM_FRACTION_TO_WIDTH(&PWMD1, 0xFFFF,cie_lightness(0xFFFF))); #endif } void backlight_set(uint8_t level) { printf("backlight_set(%d)\n", level); #ifdef BACKLIGHT_ENABLE + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + printf("duty: (%d)\n", duty); if (level == 0) { // Turn backlight off - palSetPad(GPIOA, 8); + pwmDisableChannel(&PWMD1, 0); } else { - // Turn backlight on - palClearPad(GPIOA, 8); + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD1, 0, PWM_FRACTION_TO_WIDTH(&PWMD1,0xFFFF,duty)); + } } #endif } + +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 PWMD1.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(&PWMD1); + printf("starting with callback\n"); + pwmStart(&PWMD1, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD1); + pwmEnableChannelI( + &PWMD1, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD1, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD1); + printf("starting without callback\n"); + pwmStart(&PWMD1, &pwmCFG); +} + +void breathing_enable(void) +{ + printf("breathing_enable()\n"); + 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( + &PWMD1, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD1, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} + + void led_set(uint8_t usb_led) { if (usb_led & (1< 1tick is 0.32us + PORT_WS2812, + PIN_WS2812, + SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us (2.25 MHz) }; -/* + /* * Function used to initialize the driver. * * Starts by shutting off all the LEDs. @@ -77,21 +60,19 @@ static const SPIConfig spicfg = { * txbuff values) */ void leds_init(void){ + /* MOSI pin*/ + palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_STM32_ALTERNATE_PUSHPULL); for(int i = 0; i < RESET_SIZE; i++) txbuf[DATA_SIZE+i] = 0x00; for (int i=0; i #include #endif +#ifdef STM32_EEPROM_ENABLE + #include "hal.h" + #include "eeprom.h" + #include "eeprom_stm32.h" +#endif #include "wait.h" #include "progmem.h" #include "timer.h" @@ -120,14 +125,14 @@ void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1) { uint32_t eeconfig_read_rgblight(void) { - #ifdef __AVR__ + #if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) return eeprom_read_dword(EECONFIG_RGBLIGHT); #else return 0; #endif } void eeconfig_update_rgblight(uint32_t val) { - #ifdef __AVR__ + #if defined(__AVR__) || defined(STM32_EEPROM_ENABLE) || defined(PROTOCOL_ARM_ATSAM) || defined(EEPROM_SIZE) if (eeconfig_read_rgblight() != val) { eeprom_update_dword(EECONFIG_RGBLIGHT, val); } @@ -333,7 +338,7 @@ void rgblight_disable_noeeprom(void) { #ifdef RGBLIGHT_USE_TIMER rgblight_timer_disable(); #endif - _delay_ms(50); + wait_ms(50); rgblight_set(); } diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c index a15430d676c5..17d38af6a073 100755 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ b/tmk_core/common/chibios/eeprom_stm32.c @@ -75,17 +75,13 @@ uint16_t EEPROM_WriteDataByte (uint16_t Address, uint8_t DataByte) { } // calculate which page is affected (Pagenum1/Pagenum2...PagenumN) - page = (FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address)) & 0x00000FFF; - - if (page % FEE_PAGE_SIZE) page = page + FEE_PAGE_SIZE; - page = (page / FEE_PAGE_SIZE) - 1; + page = FEE_ADDR_OFFSET(Address) / FEE_PAGE_SIZE; // if current data is 0xFF, the byte is empty, just overwrite with the new one if ((*(__IO uint16_t*)(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address))) == FEE_EMPTY_WORD) { FlashStatus = FLASH_ProgramHalfWord(FEE_PAGE_BASE_ADDRESS + FEE_ADDR_OFFSET(Address), (uint16_t)(0x00FF & DataByte)); - } - else { + } else { // Copy Page to a buffer memcpy(DataBuf, (uint8_t*)FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE), FEE_PAGE_SIZE); // !!! Calculate base address for the desired page @@ -96,18 +92,17 @@ uint16_t EEPROM_WriteDataByte (uint16_t Address, uint8_t DataByte) { } // manipulate desired data byte in temp data array if new byte is differ to the current - DataBuf[FEE_ADDR_OFFSET(Address)] = DataByte; + DataBuf[FEE_ADDR_OFFSET(Address) % FEE_PAGE_SIZE] = DataByte; //Erase Page - FlashStatus = FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + page); + FlashStatus = FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE)); - // Write new data (whole page) to flash if data has beed changed + // Write new data (whole page) to flash if data has been changed for(i = 0; i < (FEE_PAGE_SIZE / 2); i++) { if ((__IO uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)]) != 0xFFFF) { FlashStatus = FLASH_ProgramHalfWord((FEE_PAGE_BASE_ADDRESS + (page * FEE_PAGE_SIZE)) + (i * 2), (uint16_t)(0xFF00 | DataBuf[FEE_ADDR_OFFSET(i)])); } } - } return FlashStatus; } @@ -168,7 +163,7 @@ void eeprom_update_word (uint16_t *Address, uint16_t Value) uint32_t eeprom_read_dword (const uint32_t *Address) { const uint16_t p = (const uint32_t) Address; - return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8) + return EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8) | (EEPROM_ReadDataByte(p+2) << 16) | (EEPROM_ReadDataByte(p+3) << 24); } From df251d7a1387390383f12b3ff31d71d7e3de5a42 Mon Sep 17 00:00:00 2001 From: Rockman18 Date: Tue, 29 Jan 2019 01:57:56 +0100 Subject: [PATCH 242/458] Backlight - New option : BACKLIGHT_CAPS_LOCK (#4769) * [BACKLIGHT_CAPS_LOCK_INDICATOR] Use backlight toggling as Caps Lock LED I've implemented this feature because S65-X doesn't have LED indicators and the existing led_set_kb(usb_led) function try to use backlight as indicator but that creates an inconsistency with backlight_config state. - define `BACKLIGHT_CAPS_LOCK_INDICATOR` to enable Caps Lock indicator using backlight (for keyboards without dedicated LED) - Don't turn off LED indicators when suspend because backlight is already turned off. Else led_set(0) will turn back on backlight. - Documentation has been updated * [BACKLIGHT_CAPS_LOCK_INDICATOR] Turn off all LED indicators except Caps Lock if BACKLIGHT_CAPS_LOCK_INDICATOR * [BACKLIGHT_CAPS_LOCK] Rename BACKLIGHT_CAPS_LOCK_INDICATOR * [BACKLIGHT_CAPS_LOCK] Use new IS_LED_ON method --- docs/feature_backlight.md | 1 + quantum/quantum.c | 18 +++++++++++ tmk_core/common/avr/suspend.c | 57 ++++++++++++++++++++--------------- 3 files changed, 51 insertions(+), 25 deletions(-) diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index f7a35406c7a0..c7a1f131ed71 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -40,6 +40,7 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`: |---------------------|-------------|-------------------------------------------------------------------------------------------------------------| |`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this| |`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) | +|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) | |`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used | |`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds | diff --git a/quantum/quantum.c b/quantum/quantum.c index 5d8ffe34eb8f..c1829c7685cb 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -1448,6 +1448,24 @@ void led_set(uint8_t usb_led) // PORTE &= ~(1<<6); // } +#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) + // Use backlight as Caps Lock indicator + uint8_t bl_toggle_lvl = 0; + + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) && !backlight_config.enable) { + // Turning Caps Lock ON and backlight is disabled in config + // Toggling backlight to the brightest level + bl_toggle_lvl = BACKLIGHT_LEVELS; + } else if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK) && backlight_config.enable) { + // Turning Caps Lock OFF and backlight is enabled in config + // Toggling backlight and restoring config level + bl_toggle_lvl = backlight_config.level; + } + + // Set level without modify backlight_config to keep ability to restore state + backlight_set(bl_toggle_lvl); +#endif + led_set_kb(usb_led); } diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c index 28219f4ddd7b..1194a040ee77 100644 --- a/tmk_core/common/avr/suspend.c +++ b/tmk_core/common/avr/suspend.c @@ -102,24 +102,31 @@ static uint8_t wdt_timeout = 0; */ static void power_down(uint8_t wdto) { #ifdef PROTOCOL_LUFA - if (USB_DeviceState == DEVICE_STATE_Configured) return; + if (USB_DeviceState == DEVICE_STATE_Configured) return; #endif - wdt_timeout = wdto; + wdt_timeout = wdto; - // Watchdog Interrupt Mode - wdt_intr_enable(wdto); + // Watchdog Interrupt Mode + wdt_intr_enable(wdto); #ifdef BACKLIGHT_ENABLE - backlight_set(0); + backlight_set(0); #endif - // Turn off LED indicators - led_set(0); + // Turn off LED indicators + uint8_t leds_off = 0; +#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) + if (is_backlight_enabled()) { + // Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off + leds_off |= (1< Date: Tue, 29 Jan 2019 02:05:43 +0100 Subject: [PATCH 243/458] [Keyboard] E7-V1 keyboard support (#4965) * Add the e7-v1 keyboard The e7-v1 is a 75% keyboard made by Exclusive based on an Atmega32u4 pub with RGB lights on top and backlighting. This PR add supports for the regular ANSI layout and ANSI split backspace layout. No ISO yet :( * My e7-v1 keymap Difference from base layout: * split backspace * Home & End on last keys of row 0 instead of Insert/Del * Fn is on the End key when hold * supports both a windows/linux keymap and osx keymap * layer change is reflected in the rgb leds of the logo --- keyboards/e7v1/config.h | 47 ++++++ keyboards/e7v1/e7v1.c | 25 ++++ keyboards/e7v1/e7v1.h | 103 +++++++++++++ keyboards/e7v1/keymaps/ansi_splitbs/keymap.c | 37 +++++ keyboards/e7v1/keymaps/ansi_splitbs/readme.md | 5 + keyboards/e7v1/keymaps/default/keymap.c | 37 +++++ keyboards/e7v1/keymaps/default/readme.md | 5 + keyboards/e7v1/keymaps/masterzen/keymap.c | 138 ++++++++++++++++++ keyboards/e7v1/keymaps/masterzen/readme.md | 14 ++ keyboards/e7v1/readme.md | 15 ++ keyboards/e7v1/rules.mk | 54 +++++++ 11 files changed, 480 insertions(+) create mode 100644 keyboards/e7v1/config.h create mode 100644 keyboards/e7v1/e7v1.c create mode 100644 keyboards/e7v1/e7v1.h create mode 100644 keyboards/e7v1/keymaps/ansi_splitbs/keymap.c create mode 100644 keyboards/e7v1/keymaps/ansi_splitbs/readme.md create mode 100644 keyboards/e7v1/keymaps/default/keymap.c create mode 100644 keyboards/e7v1/keymaps/default/readme.md create mode 100644 keyboards/e7v1/keymaps/masterzen/keymap.c create mode 100644 keyboards/e7v1/keymaps/masterzen/readme.md create mode 100644 keyboards/e7v1/readme.md create mode 100644 keyboards/e7v1/rules.mk diff --git a/keyboards/e7v1/config.h b/keyboards/e7v1/config.h new file mode 100644 index 000000000000..653d8740418b --- /dev/null +++ b/keyboards/e7v1/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7050 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Exclusive / E - Team +#define PRODUCT E7 - V1 +#define DESCRIPTION E7 - V1 QMK PCB(LED) + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#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 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/e7v1/e7v1.c b/keyboards/e7v1/e7v1.c new file mode 100644 index 000000000000..381585e6cfba --- /dev/null +++ b/keyboards/e7v1/e7v1.c @@ -0,0 +1,25 @@ +#include "e7v1.h" + +void matrix_init_kb(void) { + setPinOutput(F0); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + writePinHigh(F0); + } else { + writePinLow(F0); + } + + led_set_user(usb_led); +} + diff --git a/keyboards/e7v1/e7v1.h b/keyboards/e7v1/e7v1.h new file mode 100644 index 000000000000..45ef519cd084 --- /dev/null +++ b/keyboards/e7v1/e7v1.h @@ -0,0 +1,103 @@ +#pragma once + +#include "quantum.h" + +// layout with all the switches supported by the PCB +#define LAYOUT_all( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K511, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +#define LAYOUT_75_ansi( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +// Ansi layout with a 7u space bar +#define LAYOUT_75_ansi_7u( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +// ANSI layout with split backspace +#define LAYOUT_75_ansi_splitbs( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400 , K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +// ANSI layout with split backspace +#define LAYOUT_75_ansi_7u_splitbs( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400 , K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +#define LAYOUT_75_iso( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} diff --git a/keyboards/e7v1/keymaps/ansi_splitbs/keymap.c b/keyboards/e7v1/keymaps/ansi_splitbs/keymap.c new file mode 100644 index 000000000000..242020b20a51 --- /dev/null +++ b/keyboards/e7v1/keymaps/ansi_splitbs/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Del|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc|▓PgDn| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_75_ansi_splitbs( + 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_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_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_BSPC, 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_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_75_ansi_splitbs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD), + + +}; diff --git a/keyboards/e7v1/keymaps/ansi_splitbs/readme.md b/keyboards/e7v1/keymaps/ansi_splitbs/readme.md new file mode 100644 index 000000000000..be9f4c312e23 --- /dev/null +++ b/keyboards/e7v1/keymaps/ansi_splitbs/readme.md @@ -0,0 +1,5 @@ +# ANSI split backspace Keymap + +Split backspace ANSI keymap with a base layer and an adjust layer. + +Keymap Maintainer: [masterzen](https://github.com/amnesia0287) diff --git a/keyboards/e7v1/keymaps/default/keymap.c b/keyboards/e7v1/keymaps/default/keymap.c new file mode 100644 index 000000000000..189c01eca294 --- /dev/null +++ b/keyboards/e7v1/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +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_INS, 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_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_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_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD), + + +}; diff --git a/keyboards/e7v1/keymaps/default/readme.md b/keyboards/e7v1/keymaps/default/readme.md new file mode 100644 index 000000000000..a6fc70a6aa8b --- /dev/null +++ b/keyboards/e7v1/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Keymap + +Default ANSI keymap with a base layer and an adjust layer. + +Keymap Maintainer: [masterzen](https://github.com/amnesia0287) diff --git a/keyboards/e7v1/keymaps/masterzen/keymap.c b/keyboards/e7v1/keymaps/masterzen/keymap.c new file mode 100644 index 000000000000..61a41f629cae --- /dev/null +++ b/keyboards/e7v1/keymaps/masterzen/keymap.c @@ -0,0 +1,138 @@ +#include QMK_KEYBOARD_H + +enum layers { + BASE, // qwerty linux + OSX, // qwerty osx + + _ADJUST, // function key layer +}; + +enum keycodes { + // default layout switcher + LAY_LIN = SAFE_RANGE, + LAY_OSX +}; + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Hom|▓|End| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Del|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc|▓PgDn| + * |---------------------------------------------------------------------| + * |LCTRL |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_75_ansi_splitbs( + 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_HOME, LT(_ADJUST,KC_END), + 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_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_BSPC, KC_PGDN, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + + [OSX] = LAYOUT_75_ansi_splitbs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LGUI, KC_RALT, _______, _______, _______), + + [_ADJUST] = LAYOUT_75_ansi_splitbs( + RESET, LAY_LIN, LAY_OSX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_ADJUST), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_HUD), + + +}; + +extern rgblight_config_t rgblight_config; + +bool edit = false; +uint32_t mode; +uint16_t hue; +uint8_t sat; +uint8_t val; + +void matrix_init_user(void) +{ + mode = rgblight_config.mode; +} + + +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) + { + /* layout switcher */ + case LAY_LIN: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << BASE); + } + return false; + break; + case LAY_OSX: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << OSX); + } + return false; + break; + case RGB_MOD: + // allows to set the rgb mode while in the ADJUST layer which uses + // its own mode + if (record->event.pressed) + { + rgblight_mode(mode); + rgblight_step(); + mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) +{ + if (state == BASE && edit == true) + { + hue = rgblight_get_hue(); + sat = rgblight_get_sat(); + val = rgblight_get_val(); + edit = false; + } + + switch (biton32(state)) + { + case _ADJUST: + mode = rgblight_get_mode(); + rgblight_mode_noeeprom(1); + rgblight_setrgb(0xD3, 0x7F, 0xED); + edit = true; + break; + default: + rgblight_mode(mode); + rgblight_sethsv(hue, sat, val); + break; + } + return state; +} diff --git a/keyboards/e7v1/keymaps/masterzen/readme.md b/keyboards/e7v1/keymaps/masterzen/readme.md new file mode 100644 index 000000000000..ee4f2a531f5b --- /dev/null +++ b/keyboards/e7v1/keymaps/masterzen/readme.md @@ -0,0 +1,14 @@ +# masterzen's Keymap + +![masterzen keymap Layout Image](https://imgur.com/SF4UP2j) + +Keymap Maintainer: [masterzen](https://github.com/masterzen) + + +Difference from base layout: + * split backspace + * Home & End on last keys of row 0 instead of Insert/Del + * Fn is on the End key when hold + * supports both a windows/linux keymap and osx keymap + * layer change is reflected in the rgb leds of the logo + diff --git a/keyboards/e7v1/readme.md b/keyboards/e7v1/readme.md new file mode 100644 index 000000000000..6224694b4ff1 --- /dev/null +++ b/keyboards/e7v1/readme.md @@ -0,0 +1,15 @@ +# E7-V1 + +![E7-V1](https://imgur.com/a/5v5pV9U) + +A 75% keyboard made by Exclusive and run in a Geekhack group buy. + +Keyboard Maintainer: [masterzen](https://github.com/masterzen) +Hardware Supported: E7 - V1 QMK PCB LED +Hardware Availability: [https://geekhack.org/index.php?topic=97182.msg2654226#msg2654226](https://geekhack.org/index.php?topic=97182.msg2654226#msg2654226) + +Make example for this keyboard (after setting up your build environment): + + make e7v1: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/e7v1/rules.mk b/keyboards/e7v1/rules.mk new file mode 100644 index 000000000000..f903df7de52f --- /dev/null +++ b/keyboards/e7v1/rules.mk @@ -0,0 +1,54 @@ +# 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 +BOOTLOADER = atmel-dfu + +# 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 = yes # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes From 02180c87f2618d6be33f0c171b48418e2b88c800 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 28 Jan 2019 17:09:58 -0800 Subject: [PATCH 244/458] handwired/space_oddity: refactor, Configurator support and readme cleanup (#4977) * handwired/space_oddity: refactor - config.h: updated to use #pragma once include guard - rules.mk: replace `?=` with `=` - space_oddity.h: - updated to use #pragma once include guard - layout macro KEYMAP renamed to LAYOUT - default keymap: - updated to use #include QMK_KEYBOARD_H - replace references to Planck keycodes - replace fn_actions-powered layer switch keycode - rebuild keymap block comments - keymap layers now use short-form keycodes - refactor action_get_macro keycodes into process_record_user * handwired/space_oddity: Configurator support * handwired/space_oddity: readme cleanup - update readme to better conform with QMK template - fixed the make command. --- keyboards/handwired/space_oddity/config.h | 5 +- keyboards/handwired/space_oddity/info.json | 78 ++++ .../space_oddity/keymaps/default/keymap.c | 334 +++++++++--------- keyboards/handwired/space_oddity/readme.md | 23 +- keyboards/handwired/space_oddity/rules.mk | 22 +- .../handwired/space_oddity/space_oddity.h | 7 +- 6 files changed, 273 insertions(+), 196 deletions(-) create mode 100644 keyboards/handwired/space_oddity/info.json diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h index aae53e98108c..832216423223 100644 --- a/keyboards/handwired/space_oddity/config.h +++ b/keyboards/handwired/space_oddity/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -51,5 +50,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/handwired/space_oddity/info.json b/keyboards/handwired/space_oddity/info.json new file mode 100644 index 000000000000..37e24b33c48b --- /dev/null +++ b/keyboards/handwired/space_oddity/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "Space Oddity", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Macro 0", "x":0, "y":0, "w":2}, + {"label":"Macro 1", "x":2, "y":0, "w":2}, + {"label":"Macro 2", "x":4, "y":0, "w":2}, + {"label":"Macro 3", "x":6, "y":0, "w":2}, + {"label":"Macro 4", "x":8, "y":0, "w":2}, + {"label":"Dynamic Macro 1", "x":10, "y":0, "w":2}, + {"label":"Dynamic Macro 2", "x":12, "y":0, "w":2}, + {"label":"~", "x":0, "y":1, "w":2}, + {"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":"Backspace", "x":12, "y":1, "w":2}, + {"label":"Tab", "x":0, "y":2, "w":2}, + {"label":"Q", "x":2, "y":2}, + {"label":"W", "x":3, "y":2}, + {"label":"E", "x":4, "y":2}, + {"label":"R", "x":5, "y":2}, + {"label":"T", "x":6, "y":2}, + {"label":"Y", "x":7, "y":2}, + {"label":"U", "x":8, "y":2}, + {"label":"I", "x":9, "y":2}, + {"label":"O", "x":10, "y":2}, + {"label":"P", "x":11, "y":2}, + {"label":"_", "x":12, "y":2, "w":2}, + {"label":"Esc (Ctrl)", "x":0, "y":3, "w":2}, + {"label":"A", "x":2, "y":3}, + {"label":"S", "x":3, "y":3}, + {"label":"D", "x":4, "y":3}, + {"label":"F", "x":5, "y":3}, + {"label":"G", "x":6, "y":3}, + {"label":"H", "x":7, "y":3}, + {"label":"J", "x":8, "y":3}, + {"label":"K", "x":9, "y":3}, + {"label":"L", "x":10, "y":3}, + {"label":":", "x":11, "y":3}, + {"label":"\"", "x":12, "y":3, "w":2}, + {"label":"Caps Lock (Shift)", "x":0.25, "y":4, "w":1.75}, + {"label":"Z", "x":2, "y":4}, + {"label":"X", "x":3, "y":4}, + {"label":"C", "x":4, "y":4}, + {"label":"V", "x":5, "y":4}, + {"label":"B", "x":6, "y":4}, + {"label":"N", "x":7, "y":4}, + {"label":"M", "x":8, "y":4}, + {"label":"<", "x":9, "y":4}, + {"label":">", "x":10, "y":4}, + {"label":"?", "x":11, "y":4}, + {"label":"Enter (Shift)", "x":12, "y":4, "w":1.75}, + {"label":"MO(2)", "x":1, "y":5}, + {"label":"MO(1)", "x":2, "y":5}, + {"label":"GUI", "x":3, "y":5}, + {"label":"Alt", "x":4, "y":5}, + {"label":"Ctrl", "x":5, "y":5, "w":2}, + {"label":"Space", "x":7, "y":5, "w":2}, + {"label":"Left (Alt)", "x":9, "y":5}, + {"label":"Right (Hyper)", "x":10, "y":5}, + {"label":"Up (MO(1))", "x":11, "y":5}, + {"label":"Down (MO(2))", "x":12, "y":5} + ] + } + } +} diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index 4230cdf8dbd8..6e42a2815154 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -15,12 +15,16 @@ along with this program. If not, see . */ -#include "space_oddity.h" +#include QMK_KEYBOARD_H -// Planck keycodes needed for dynamic macros. -enum planck_keycodes { +// Custom keycodes needed for dynamic macros. +enum custom_keycodes { QWERTY = SAFE_RANGE, + PAIR_PR, + PAIR_BR, + PAIR_CB, + LAMBDA, DYNAMIC_MACRO_RANGE, }; @@ -36,13 +40,6 @@ enum { #define MOUSE_LAYER 2 -// Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions. -const uint16_t PROGMEM fn_actions[] = { - - [2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER), - -}; - // Tap dance actions - double tap for Caps Lock. qk_tap_dance_action_t tap_dance_actions[] = { @@ -52,141 +49,105 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. - - ___________________________________________________________________________________ - | | | | | | Dynamic | Dynamic | - | Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 | - |___________|___________|___________|___________|___________|___________|___________| - | | | | | | | | | | | | | - | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | TAB | Q | W | E | R | T | Y | U | I | O | P | - | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| - |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| - | | | | | | | ALT | HYP | LT 1| LT 2| - | M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| - |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| - */ - - KEYMAP( - M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, - 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_MINS, - 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_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), - MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)), - - /* Function layer. - Blank keys correspond to the KC_TRNS keycode. - - ___________________________________________________________________________________ - | | | | | | DYN REC | DYN REC | - | Macro 7 | | | | | 1 | 2 | - |___________|___________|___________|___________|___________|___________|___________| - | DYN REC | | | | | | | | | | | | - | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | - |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| - | | | | | | | | | | | - | | | | | | | | | | | - |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| - + /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. + * + * ___________________________________________________________________________________ + * | | | | | | Dynamic | Dynamic | + * | () | [] | {} | NO OP | NO OP | Macro 1 | Macro 2 | + * |___________|___________|___________|___________|___________|___________|___________| + * | | | | | | | | | | | | | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | TAB | Q | W | E | R | T | Y | U | I | O | P | - | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| + * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + * | | | | | | | ALT | HYP | LT 1| LT 2| + * |MO(2)|MO(1)| GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| + * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| */ - - KEYMAP( - M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, - DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, - KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, - KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - /* Mouse layer. - - ___________________________________________________________________________________ - | | | | | | | | - | | | | | | | | - |___________|___________|___________|___________|___________|___________|___________| - | | | | MS | | | | | | | | | - | | | | UP | | | | | | | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | MS | MS | MS | | | | | | | | - | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | | | | | | | | | | | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | |RESET| | | | | | | | | | | - |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| - | | | | | | | | | | | - | | | | | | | | | | F(2)| - |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + [0] = LAYOUT( \ + PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \ + 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_MINS, \ + 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_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN) \ + ), + + /* Function layer. + * Blank keys correspond to the KC_TRNS keycode. + * + * ___________________________________________________________________________________ + * | | | | | | DYN REC | DYN REC | + * | LAMBDA | | | | | 1 | 2 | + * |___________|___________|___________|___________|___________|___________|___________| + * | DYN REC | | | | | | | | | | | | + * | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | + * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + * | | | | | | | | | | | + * | | | | | | | | | | | + * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + * */ - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_TRNS, KC_TRNS, - KC_TRNS, 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, F(2)) -}; -// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of -// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, -// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for -// LaTeX editing. -// -// Customize to your heart's content! -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING("()"SS_TAP(X_LEFT)); - } - break; - - case 1: - if (record->event.pressed) { - SEND_STRING("[]"SS_TAP(X_LEFT)); - } - break; - - case 2: - if (record->event.pressed) { - SEND_STRING("{}"SS_TAP(X_LEFT)); - } - break; - - // Probably something only Lisp users will appreciate... - case 7: - if (record->event.pressed) { - SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); - } - break; - } + [1] = LAYOUT( \ + LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \ + DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \ + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \ + KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \ + _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Mouse layer. + * + * ___________________________________________________________________________________ + * | | | | | | | | + * | | | | | | | | + * |___________|___________|___________|___________|___________|___________|___________| + * | | | | MS | | | | | | | | | + * | | | | UP | | | | | | | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | MS | MS | MS | | | | | | | | + * | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | |RESET| | | | | | | | | | | + * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + * | | | | | | | | | | | + * | | | | | | | | | | F(2)| + * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + * + */ - return MACRO_NONE; - -} + [2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(2) \ + ) +}; void matrix_init_user(void) { } @@ -194,44 +155,79 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } +// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of +// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, +// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for +// LaTeX editing. +// +// Customize to your heart's content! bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (!process_record_dynamic_macro(keycode, record)) { return false; } + + switch (keycode) { + + case PAIR_PR: + if (record->event.pressed) { + SEND_STRING("()"SS_TAP(X_LEFT)); + } + return false; + + case PAIR_BR: + if (record->event.pressed) { + SEND_STRING("[]"SS_TAP(X_LEFT)); + } + return false; + + case PAIR_CB: + if (record->event.pressed) { + SEND_STRING("{}"SS_TAP(X_LEFT)); + } + return false; + + // Probably something only Lisp users will appreciate... + case LAMBDA: + if (record->event.pressed) { + SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); + } + return false; + } + return true; } void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } } diff --git a/keyboards/handwired/space_oddity/readme.md b/keyboards/handwired/space_oddity/readme.md index 07ec957faf44..2997833f098a 100644 --- a/keyboards/handwired/space_oddity/readme.md +++ b/keyboards/handwired/space_oddity/readme.md @@ -1,5 +1,6 @@ -Space Oddity Keyboard -===================== +# Space Oddity Keyboard + +![Space Oddity](https://i.imgur.com/dE9Y4XK.jpg) This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro. @@ -7,7 +8,10 @@ As originally designed, the top row consists of 2u keys which are used for user- Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section. -A picture of the finished product can be found here: https://imgur.com/dE9Y4XK +This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! + +Keyboard Maintainer: [James Taylor](https://github.com/broken-username) +Hardware Supported: Arduino Pro Micro ## Pinout @@ -15,11 +19,16 @@ The following pins are used: - Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 - Rows 1-6: F4, F5, F6, F7, B1, B3 -## Compiling and loading the firmware +## Flashing + +Make example for this keyboard (after setting up your build environment): -To build the firmware, run `make handwired/space_oddity` from the toplevel directory. + make handwired/space_oddity:default -On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different. +On GNU/Linux, you can flash the default layout onto the microcontroller by using + avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex + +Note that the device name under `/dev` may be different. -This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! \ 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/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index 4dc93fad9e32..b597ef2b0951 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -35,7 +35,7 @@ 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 +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina @@ -45,14 +45,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/space_oddity/space_oddity.h b/keyboards/handwired/space_oddity/space_oddity.h index e9270d044e9a..d35bfea58777 100644 --- a/keyboards/handwired/space_oddity/space_oddity.h +++ b/keyboards/handwired/space_oddity/space_oddity.h @@ -1,9 +1,8 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K000, K002, K004, K006, K008, K010, K011, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ @@ -18,5 +17,3 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \ } - -#endif \ No newline at end of file From 9e784841c026d3f05df9a5e58668b4244885386f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C4=ABls=20Delle?= Date: Tue, 29 Jan 2019 03:10:43 +0200 Subject: [PATCH 245/458] [Keyboard] Additional info about TMO50 (#4980) * Create ISO HHKB keymapping for GH60 * Add media controls to Fn layer * Use M(x) instead of F(x), add Copyright text * Add README for additional information about TMO50 features/quirks --- keyboards/tmo50/keymaps/default/readme.md | 46 +++++++++++++++++++++++ keyboards/tmo50/readme.md | 2 +- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 keyboards/tmo50/keymaps/default/readme.md diff --git a/keyboards/tmo50/keymaps/default/readme.md b/keyboards/tmo50/keymaps/default/readme.md new file mode 100644 index 000000000000..e3b0e0e6aee1 --- /dev/null +++ b/keyboards/tmo50/keymaps/default/readme.md @@ -0,0 +1,46 @@ +# Additional info + +## Matrix + +You probably tried or will try to configure the keymapping to your liking. To make it easier configuring your layouts, photo of keyboards matrix will help. + +![TMO50 matrix](https://i.imgur.com/ud7RB8d.png) + +As you can see here matrix consists of 4 rows and 14 columns. But the tricky part is that topmost left key (Tab/Esc) is connected to row 3 - this is done so there's no 15th column that would connect only one key to seperate pin. This also poses an thread that you will configure your layout incorrectly because KC_TAB is not in the correct place *[visually](https://i.imgur.com/RtoD9F6.png)* in *keymap.c* file. Please take this into account when making changes and double-check this. + +## Pinout + +Most of the pinout can be found in *config.h* but there's here's a table of all the used pins for TMO50 (including indicator LED pins) + +| Pin | Assigned to | +|---|---| +| D5 | Row 0 | +| D3 | Row 1 | +| D2 | Row 2 | +| D0 | Row 3 | +| | | +| D1 | Col 0 | +| D4 | Col 1 | +| F0 | Col 2 | +| F1 | Col 3 | +| F4 | Col 4 | +| F5 | Col 5 | +| F6 | Col 6 | +| F7 | Col 7 | +| D6 | Col 8 | +| D7 | Col 9 | +| B4 | Col 10 | +| B5 | Col 11 | +| B6 | Col 12 | +| C6 | Col 13 | +| | | +| B7 | Backlight | +| C7 | RGB LEDs | +| B0 | LED 4 (L4) | +| B1 | LED 3 (L3) | +| B2 | LED 2 (L2) | +| B3 | LED 1 (L1) | + +## Indicator LEDs + +Their size is 2×3×4mm. The THT hole without a circle on the pcb is VCC(+) and the other one is connect to their corresponding pin. diff --git a/keyboards/tmo50/readme.md b/keyboards/tmo50/readme.md index 2af282d15070..f4275a978733 100644 --- a/keyboards/tmo50/readme.md +++ b/keyboards/tmo50/readme.md @@ -1,6 +1,6 @@ # tmo50 -![tmo50](https://imgur.com/BhRYzl6.jpg) +![TMO50](https://imgur.com/BhRYzl6.jpg) TMO50 is a 50% mechanical keyboard with macro column on the left side. Sub60% board without compromises. From 60ae309ced682edd659a4e1479c176625136db53 Mon Sep 17 00:00:00 2001 From: patrickmt <40182064+patrickmt@users.noreply.github.com> Date: Mon, 28 Jan 2019 13:07:22 -0500 Subject: [PATCH 246/458] arm_atsam ADC0 factory calibration correction Factory calibration data was not being loaded properly for ADC0, which affects the accuracy of 5V readings. --- tmk_core/protocol/arm_atsam/adc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/protocol/arm_atsam/adc.c b/tmk_core/protocol/arm_atsam/adc.c index ab77f92402eb..cb5c349b7305 100644 --- a/tmk_core/protocol/arm_atsam/adc.c +++ b/tmk_core/protocol/arm_atsam/adc.c @@ -74,9 +74,9 @@ void ADC0_init(void) while (ADC0->SYNCBUSY.bit.SAMPCTRL) { DBGC(DC_ADC0_SAMPCTRL_SYNCING_1); } //Load factory calibration data - ADC0->CALIB.bit.BIASCOMP = (ADC0_FUSES_BIASCOMP_ADDR >> ADC0_FUSES_BIASCOMP_Pos) & ADC0_FUSES_BIASCOMP_Msk; - ADC0->CALIB.bit.BIASR2R = (ADC0_FUSES_BIASR2R_ADDR >> ADC0_FUSES_BIASR2R_Pos) & ADC0_FUSES_BIASR2R_Msk; - ADC0->CALIB.bit.BIASREFBUF = (ADC0_FUSES_BIASREFBUF_ADDR >> ADC0_FUSES_BIASREFBUF_Pos) & ADC0_FUSES_BIASREFBUF_Msk; + ADC0->CALIB.bit.BIASCOMP = ((*(uint32_t *)ADC0_FUSES_BIASCOMP_ADDR) & ADC0_FUSES_BIASCOMP_Msk) >> ADC0_FUSES_BIASCOMP_Pos; + ADC0->CALIB.bit.BIASR2R = ((*(uint32_t *)ADC0_FUSES_BIASR2R_ADDR) & ADC0_FUSES_BIASR2R_Msk) >> ADC0_FUSES_BIASR2R_Pos; + ADC0->CALIB.bit.BIASREFBUF = ((*(uint32_t *)ADC0_FUSES_BIASREFBUF_ADDR) & ADC0_FUSES_BIASREFBUF_Msk) >> ADC0_FUSES_BIASREFBUF_Pos; //Enable ADC0->CTRLA.bit.ENABLE = 1; From c30155343fbdd0ef1d1fc07a60ddbaee668fab80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Mon, 28 Jan 2019 22:32:23 +0100 Subject: [PATCH 247/458] Remove #define IS_COMMAND line in keyboards/handwired/xealousbrown/config.h --- keyboards/handwired/xealousbrown/config.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/handwired/xealousbrown/config.h b/keyboards/handwired/xealousbrown/config.h index 53430849f2cc..17aa6c94ee59 100644 --- a/keyboards/handwired/xealousbrown/config.h +++ b/keyboards/handwired/xealousbrown/config.h @@ -46,6 +46,3 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - -/* key combination for magic key command */ -// #define IS_COMMAND() ( keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) From efe360464d0df68e5096d7339e2279b4c77685fd Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 28 Jan 2019 17:31:33 -0800 Subject: [PATCH 248/458] Contribute the MechMerlin QMK Configurator docs (#4986) * first pass at configurator docs * edit existing docs to make reference to QMK Configurator * contribute my own newb guide to QMK officially from https://github.com/mechmerlin/qmk_setup/blob/master/qmk_configurator.md * Update docs/newbs_building_firmware_configurator.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update docs/newbs_building_firmware_configurator.md Big red box! Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update docs/newbs_building_firmware_configurator.md Big red box Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update docs/newbs_building_firmware_configurator.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update docs/newbs_building_firmware_configurator.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update docs/newbs_building_firmware_configurator.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * Update docs/newbs_building_firmware_configurator.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> --- docs/newbs.md | 5 +- docs/newbs_building_firmware_configurator.md | 105 +++++++++++++++++++ docs/newbs_getting_started.md | 5 +- 3 files changed, 112 insertions(+), 3 deletions(-) create mode 100644 docs/newbs_building_firmware_configurator.md diff --git a/docs/newbs.md b/docs/newbs.md index 4f115c3c781a..904a52945513 100644 --- a/docs/newbs.md +++ b/docs/newbs.md @@ -6,10 +6,11 @@ Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built y ## Overview -There are 6 main sections to this guide: +There are 7 main sections to this guide: * [Getting Started](newbs_getting_started.md) -* [Building Your First Firmware](newbs_building_firmware.md) +* [Building Your First Firmware using the command line](newbs_building_firmware.md) +* [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md) * [Flashing Firmware](newbs_flashing.md) * [Testing and Debugging](newbs_testing_debugging.md) * [Git Best Practices](newbs_best_practices.md) diff --git a/docs/newbs_building_firmware_configurator.md b/docs/newbs_building_firmware_configurator.md new file mode 100644 index 000000000000..0ad609304a4a --- /dev/null +++ b/docs/newbs_building_firmware_configurator.md @@ -0,0 +1,105 @@ +# QMK Configurator + +The [QMK Configurator](https://config.qmk.fm) is an online graphical user interface that generates QMK Firmware hex files. + +?> **Please follow these steps in order.** + +Watch the [Video Tutorial](https://youtu.be/7RH-1pAbjvw) + +The QMK Configurator works best with Chrome/Firefox. + + +!> **Files from other tools such as KLE, or kbfirmware will not be compatible with QMK Configurator. Do not load them, do not import them. QMK Configurator is a DIFFERENT tool. ** + +## Selecting your keyboard + +Click the drop down box and select the keyboard you want to create a keymap for. + +?> If your keyboard has several versions, make sure you select the correct one.** + +I'll say that again because it's important + +!> **MAKE SURE YOU SELECT THE RIGHT VERSION!** + +If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own github accounts. Double check for that as well. + +## Selecting your keyboard layout + +Choose the layout that best represents the keymap you want to create. Some keyboards do not have enough layouts or correct layouts defined yet. They will be supported in the future. + +## Keymap Name + +Call this keymap what you want. + +?> If you are running into issues when compiling, it may be worth changing this name, as it may already exist in the QMK Firmware repo. + +## Creating Your Keymap + +Keycode Entry is accomplished in 3 ways. +1. Drag and dropping +2. Clicking on an empty spot on the layout and clicking the keycode you desire +3. Clicking on an empty spot on the layout, pressing the physical key on your keyboard. + +Hover your mouse over a key and a short blurb will tell you what that keycode does. For a more verbose description please see + +[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) +[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) + +In the event that you can't find a layout that supports your keymap, for example three spots for spacebar, or two spots for backspace, or 2 spots for shift etc etc, Fill them ALL up. + +### Example: + +3 spots for spacebar: Fill them ALL with spacebar + +2 spots for backspace: Fill them BOTH with backspace + +2 spots for right shift: Fill them BOTH with right shift + +1 spot for left shift and 1 spot for iso support: Fill them both with left shift + +5 spots, but only 4 keys: Guess and check or ask someone who has done it before. + +## Saving Your Keymap for Future Edits + +When you're satisfied with your keymap or just want to work on it later, press the `Export Keymap` button. It will save your keymap as the name you chose above appended with .json. + +You can then load this .json file in the future by pressing the `Import Keymap` button. + +!> **CAUTION:** This is not the same type of .json file used for kbfirmware.com or any other tool. If you try to use this for those tools, or the .json from those tools with QMK Configurator, there is a chance your keyboard will **explode**. + +## Generating your firmware file + +Press the green `Compile` button. + +When the compilation is done, you will be able to press the green `Download Firmware` button. + +## Flashing Your Keyboard + +Please refer to [Flashing Firmware](newbs_flashing.md) + +## Troubleshooting + +#### My .json file is not working + +If the .json file was generated with QMK Configurator, congratulations you have stumbled upon a bug. File an issue at [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) + +If not....how did you miss my big bold message at the top saying not to use other .json files? + +#### There are extra spaces in my layout? What do I do? + +If you're referring to having three spots for space bar, the best course of action is to just fill them all with space bar. The same can be done for backspace and shifts + +#### What is the keycode for....... + +Please see + +[Basic Keycode Reference](https://docs.qmk.fm/#/keycodes_basic) +[Advanced Keycode Reference](https://docs.qmk.fm/#/feature_advanced_keycodes) + +#### It won't compile + +Please double check the other layers of your keymap to make sure there are no random keys present. + +## Problems and Bugs + +We are always accepting customer requests and bug reports. Please file them at [qmk_configurator](https://github.com/qmk/qmk_configurator/issues) diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md index 276c7fec327f..aefa1b73850c 100644 --- a/docs/newbs_getting_started.md +++ b/docs/newbs_getting_started.md @@ -6,7 +6,10 @@ QMK tries to put a lot of power into your hands by making easy things easy, and # Getting Started -Before you can build keymaps, you need to install some software and set up your build environment. This only has to be done once no matter how many keyboards you plan to compile firmware for. +Before you can build keymaps, you need to install some software and set up your build environment. This only has to be done once no matter how many keyboards you plan to compile firmware for. + +If you would prefer a more graphical user interface approach, please consider using the online [QMK Configurator](https://config.qmk.fm). Please refer to [Building Your First Firmware using the online GUI](newbs_building_firmware_configurator.md). + ## Download Software From f0e0a67ea56e1830e3b89382e4739a9fcbfac509 Mon Sep 17 00:00:00 2001 From: Daniel H Klein Date: Tue, 29 Jan 2019 09:52:20 -0800 Subject: [PATCH 249/458] [Keyboard] Bug Fix To Unigo66 (#4995) * 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 --- keyboards/sirius/unigo66/main.c | 8 +------- keyboards/sirius/unigo66/rules.mk | 6 ++---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/keyboards/sirius/unigo66/main.c b/keyboards/sirius/unigo66/main.c index b4a0d97aafc0..76e88922cb41 100644 --- a/keyboards/sirius/unigo66/main.c +++ b/keyboards/sirius/unigo66/main.c @@ -79,18 +79,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 & debug output - uint8_t timeout=255 - while (timeout-- && USB_DeviceState != DEVICE_STATE_Configured) { - wait_ms(4); */ debug("init: done\n"); diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index e716aa86fb2c..562b2b694eb7 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -26,7 +26,5 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) USB_HID_ENABLE = yes CUSTOM_MATRIX = yes -SRC = custom_matrix.cpp - -CUSTOM_MATRIX = yes -SRC = custom_matrix.cpp +SRC += custom_matrix.cpp \ + main.c From d0a7e96d1e300fd722b9c5f93056d58867116bc4 Mon Sep 17 00:00:00 2001 From: Geoff Lane Date: Tue, 29 Jan 2019 18:28:37 -0500 Subject: [PATCH 250/458] S60x Make Default standard layout and have separate Mac OS one (#4964) * Make Default standard layout Move Mac OS layout to a separate layout. Basically Mac has the Alt and GUI keys swapped * Fix typos * Use Bootmagic keys instead of separate MacOS keymap --- keyboards/s65_x/keymaps/default/keymap.c | 8 ++++---- keyboards/s65_x/keymaps/default/readme.md | 11 ++++++++--- keyboards/s65_x/rules.mk | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/keyboards/s65_x/keymaps/default/keymap.c b/keyboards/s65_x/keymaps/default/keymap.c index a2fd12ed60f8..00ae4d0a202f 100644 --- a/keyboards/s65_x/keymaps/default/keymap.c +++ b/keyboards/s65_x/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctrl│Alt │GUI │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * │Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ @@ -28,7 +28,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_END, \ FL_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ + * │ │Swp │Nrm │ │ │ │ │ │ │ │ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, AG_SWAP, AG_NORM, _______, _______, _______, _______, _______, _______, _______ \ ), diff --git a/keyboards/s65_x/keymaps/default/readme.md b/keyboards/s65_x/keymaps/default/readme.md index 213cbe49e5c6..5e53af701df3 100644 --- a/keyboards/s65_x/keymaps/default/readme.md +++ b/keyboards/s65_x/keymaps/default/readme.md @@ -1,5 +1,5 @@ ### 1 ANSI -A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys. +An ANSI layout that assumes standard sized shifts, enter, and backspace keys. #### 1.0 Default layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -11,7 +11,7 @@ A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys. ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ + │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │RCTRL│LEFT │DOWN │RIGHT│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ #### 1.1 Fn layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -23,5 +23,10 @@ A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys. ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│▒▒▒▒▒│Vol+ │ │ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ + │ │AG_SW│AG_NR│█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + +#### MacOS + +This keymap supports swapping the GUI and ALT keys using the Fn layer. See the +AG_SWAP and AG_NORM bindings to swap the two keys. diff --git a/keyboards/s65_x/rules.mk b/keyboards/s65_x/rules.mk index c97f7323e271..598e269cbfee 100644 --- a/keyboards/s65_x/rules.mk +++ b/keyboards/s65_x/rules.mk @@ -53,7 +53,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE From 74fcfd533508d5743a20a7cd7faba404f8fc7cd3 Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 29 Jan 2019 23:31:46 +0000 Subject: [PATCH 251/458] convert to unix line-endings [skip ci] --- keyboards/s65_x/keymaps/default/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/s65_x/keymaps/default/readme.md b/keyboards/s65_x/keymaps/default/readme.md index 5e53af701df3..96fa2ff53e53 100644 --- a/keyboards/s65_x/keymaps/default/readme.md +++ b/keyboards/s65_x/keymaps/default/readme.md @@ -1,4 +1,4 @@ -### 1 ANSI +### 1 ANSI An ANSI layout that assumes standard sized shifts, enter, and backspace keys. #### 1.0 Default layer From 7186d1581abbd97d7c76626ae83fc866e85d217c Mon Sep 17 00:00:00 2001 From: Andrew Kannan Date: Tue, 29 Jan 2019 23:04:20 -0500 Subject: [PATCH 252/458] Moving cannonkeys boards to one place, eeprom fix (#4999) * Move boards to cannonkeys and share resources * Share common files between cannonkey boards * Fix ortho60 keymap * update LED numbers * Add RGB keys to Ortho60 and Ortho48 * Add Backlight control to default layout Ortho60 and 48 * Remove unnecessary ws2812.c SRC from rules.mk --- .../bluepill/keyboard.c} | 7 +- .../practice60 => cannonkeys/bluepill}/led.c | 0 .../bluepill}/led_custom.h | 0 .../bluepill}/ws2812.c | 0 .../bluepill}/ws2812.h | 0 .../boards/GENERIC_STM32_F103/board.c | 0 .../boards/GENERIC_STM32_F103/board.h | 0 .../boards/GENERIC_STM32_F103/board.mk | 0 .../ortho48}/bootloader_defs.h | 0 .../ortho60 => cannonkeys/ortho48}/chconf.h | 0 keyboards/cannonkeys/ortho48/config.h | 80 +++ .../ortho48}/halconf.h | 0 keyboards/cannonkeys/ortho48/info.json | 112 ++++ .../ortho48/keymaps/default/keymap.c | 89 +++ .../ortho48}/ld/MKL26Z64.ld | 0 .../ld/STM32F103x8_stm32duino_bootloader.ld | 0 .../ortho48}/mcuconf.h | 0 keyboards/cannonkeys/ortho48/ortho48.c | 3 + keyboards/cannonkeys/ortho48/ortho48.h | 29 + keyboards/cannonkeys/ortho48/readme.md | 12 + .../ortho48}/rules.mk | 7 +- .../boards/GENERIC_STM32_F103/board.c | 0 .../boards/GENERIC_STM32_F103/board.h | 0 .../boards/GENERIC_STM32_F103/board.mk | 0 .../ortho60/bootloader_defs.h | 2 +- .../ortho60}/chconf.h | 0 .../ortho60/config.h | 13 +- .../ortho60/halconf.h | 2 +- .../ortho60/info.json | 0 .../ortho60/keymaps/default/keymap.c | 6 +- .../ortho60}/ld/MKL26Z64.ld | 0 .../ld/STM32F103x8_stm32duino_bootloader.ld | 0 .../ortho60/mcuconf.h | 2 +- keyboards/cannonkeys/ortho60/ortho60.c | 3 + .../ortho60/ortho60.h | 0 .../ortho60/readme.md | 2 +- .../ortho60/rules.mk | 5 +- .../boards/GENERIC_STM32_F103/board.c | 56 ++ .../boards/GENERIC_STM32_F103/board.h | 166 ++++++ .../boards/GENERIC_STM32_F103/board.mk | 5 + .../cannonkeys/practice60/bootloader_defs.h | 10 + keyboards/cannonkeys/practice60/chconf.h | 524 ++++++++++++++++++ .../practice60/config.h | 0 keyboards/cannonkeys/practice60/halconf.h | 353 ++++++++++++ .../practice60/info.json | 0 .../practice60/keymaps/default/keymap.c | 0 .../cannonkeys/practice60/ld/MKL26Z64.ld | 105 ++++ .../ld/STM32F103x8_stm32duino_bootloader.ld | 88 +++ keyboards/cannonkeys/practice60/mcuconf.h | 209 +++++++ keyboards/cannonkeys/practice60/practice60.c | 2 + .../practice60/practice60.h | 0 keyboards/cannonkeys/practice60/readme.md | 12 + keyboards/cannonkeys/practice60/rules.mk | 57 ++ keyboards/handwired/ortho60/hsv2rgb.c | 80 --- keyboards/handwired/ortho60/hsv2rgb.h | 23 - keyboards/handwired/ortho60/led.c | 51 -- keyboards/handwired/ortho60/ortho60.c | 32 -- keyboards/handwired/ortho60/underglow.c | 157 ------ keyboards/handwired/ortho60/underglow.h | 10 - keyboards/handwired/practice60/readme.md | 3 - tmk_core/common/chibios/eeprom_stm32.c | 12 +- 61 files changed, 1949 insertions(+), 380 deletions(-) rename keyboards/{handwired/practice60/practice60.c => cannonkeys/bluepill/keyboard.c} (85%) rename keyboards/{handwired/practice60 => cannonkeys/bluepill}/led.c (100%) rename keyboards/{handwired/practice60 => cannonkeys/bluepill}/led_custom.h (100%) rename keyboards/{handwired/practice60 => cannonkeys/bluepill}/ws2812.c (100%) rename keyboards/{handwired/practice60 => cannonkeys/bluepill}/ws2812.h (100%) rename keyboards/{handwired/ortho60 => cannonkeys/ortho48}/boards/GENERIC_STM32_F103/board.c (100%) rename keyboards/{handwired/ortho60 => cannonkeys/ortho48}/boards/GENERIC_STM32_F103/board.h (100%) rename keyboards/{handwired/ortho60 => cannonkeys/ortho48}/boards/GENERIC_STM32_F103/board.mk (100%) rename keyboards/{handwired/practice60 => cannonkeys/ortho48}/bootloader_defs.h (100%) rename keyboards/{handwired/ortho60 => cannonkeys/ortho48}/chconf.h (100%) create mode 100644 keyboards/cannonkeys/ortho48/config.h rename keyboards/{handwired/practice60 => cannonkeys/ortho48}/halconf.h (100%) create mode 100644 keyboards/cannonkeys/ortho48/info.json create mode 100644 keyboards/cannonkeys/ortho48/keymaps/default/keymap.c rename keyboards/{handwired/ortho60 => cannonkeys/ortho48}/ld/MKL26Z64.ld (100%) rename keyboards/{handwired/ortho60 => cannonkeys/ortho48}/ld/STM32F103x8_stm32duino_bootloader.ld (100%) rename keyboards/{handwired/practice60 => cannonkeys/ortho48}/mcuconf.h (100%) create mode 100644 keyboards/cannonkeys/ortho48/ortho48.c create mode 100644 keyboards/cannonkeys/ortho48/ortho48.h create mode 100644 keyboards/cannonkeys/ortho48/readme.md rename keyboards/{handwired/practice60 => cannonkeys/ortho48}/rules.mk (96%) rename keyboards/{handwired/practice60 => cannonkeys/ortho60}/boards/GENERIC_STM32_F103/board.c (100%) rename keyboards/{handwired/practice60 => cannonkeys/ortho60}/boards/GENERIC_STM32_F103/board.h (100%) rename keyboards/{handwired/practice60 => cannonkeys/ortho60}/boards/GENERIC_STM32_F103/board.mk (100%) rename keyboards/{handwired => cannonkeys}/ortho60/bootloader_defs.h (90%) rename keyboards/{handwired/practice60 => cannonkeys/ortho60}/chconf.h (100%) rename keyboards/{handwired => cannonkeys}/ortho60/config.h (88%) rename keyboards/{handwired => cannonkeys}/ortho60/halconf.h (99%) rename keyboards/{handwired => cannonkeys}/ortho60/info.json (100%) rename keyboards/{handwired => cannonkeys}/ortho60/keymaps/default/keymap.c (95%) rename keyboards/{handwired/practice60 => cannonkeys/ortho60}/ld/MKL26Z64.ld (100%) rename keyboards/{handwired/practice60 => cannonkeys/ortho60}/ld/STM32F103x8_stm32duino_bootloader.ld (100%) rename keyboards/{handwired => cannonkeys}/ortho60/mcuconf.h (99%) create mode 100644 keyboards/cannonkeys/ortho60/ortho60.c rename keyboards/{handwired => cannonkeys}/ortho60/ortho60.h (100%) rename keyboards/{handwired => cannonkeys}/ortho60/readme.md (93%) rename keyboards/{handwired => cannonkeys}/ortho60/rules.mk (96%) create mode 100644 keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c create mode 100644 keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h create mode 100644 keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk create mode 100644 keyboards/cannonkeys/practice60/bootloader_defs.h create mode 100644 keyboards/cannonkeys/practice60/chconf.h rename keyboards/{handwired => cannonkeys}/practice60/config.h (100%) create mode 100644 keyboards/cannonkeys/practice60/halconf.h rename keyboards/{handwired => cannonkeys}/practice60/info.json (100%) rename keyboards/{handwired => cannonkeys}/practice60/keymaps/default/keymap.c (100%) create mode 100644 keyboards/cannonkeys/practice60/ld/MKL26Z64.ld create mode 100644 keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld create mode 100644 keyboards/cannonkeys/practice60/mcuconf.h create mode 100644 keyboards/cannonkeys/practice60/practice60.c rename keyboards/{handwired => cannonkeys}/practice60/practice60.h (100%) create mode 100644 keyboards/cannonkeys/practice60/readme.md create mode 100644 keyboards/cannonkeys/practice60/rules.mk delete mode 100644 keyboards/handwired/ortho60/hsv2rgb.c delete mode 100644 keyboards/handwired/ortho60/hsv2rgb.h delete mode 100644 keyboards/handwired/ortho60/led.c delete mode 100644 keyboards/handwired/ortho60/ortho60.c delete mode 100644 keyboards/handwired/ortho60/underglow.c delete mode 100644 keyboards/handwired/ortho60/underglow.h delete mode 100644 keyboards/handwired/practice60/readme.md diff --git a/keyboards/handwired/practice60/practice60.c b/keyboards/cannonkeys/bluepill/keyboard.c similarity index 85% rename from keyboards/handwired/practice60/practice60.c rename to keyboards/cannonkeys/bluepill/keyboard.c index acc0f00e530c..865628eccdea 100644 --- a/keyboards/handwired/practice60/practice60.c +++ b/keyboards/cannonkeys/bluepill/keyboard.c @@ -1,14 +1,9 @@ - -#include "practice60.h" - #include "ch.h" #include "hal.h" #include "led_custom.h" -#include "print.h" -#include "debug.h" #include "util.h" +#include "quantum.h" -/* generic STM32F103C8T6 board */ #ifdef BOARD_GENERIC_STM32_F103 #define LED_ON() do { palClearPad(GPIOC, 13) ;} while (0) #define LED_OFF() do { palSetPad(GPIOC, 13); } while (0) diff --git a/keyboards/handwired/practice60/led.c b/keyboards/cannonkeys/bluepill/led.c similarity index 100% rename from keyboards/handwired/practice60/led.c rename to keyboards/cannonkeys/bluepill/led.c diff --git a/keyboards/handwired/practice60/led_custom.h b/keyboards/cannonkeys/bluepill/led_custom.h similarity index 100% rename from keyboards/handwired/practice60/led_custom.h rename to keyboards/cannonkeys/bluepill/led_custom.h diff --git a/keyboards/handwired/practice60/ws2812.c b/keyboards/cannonkeys/bluepill/ws2812.c similarity index 100% rename from keyboards/handwired/practice60/ws2812.c rename to keyboards/cannonkeys/bluepill/ws2812.c diff --git a/keyboards/handwired/practice60/ws2812.h b/keyboards/cannonkeys/bluepill/ws2812.h similarity index 100% rename from keyboards/handwired/practice60/ws2812.h rename to keyboards/cannonkeys/bluepill/ws2812.h diff --git a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c similarity index 100% rename from keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.c rename to keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c diff --git a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h similarity index 100% rename from keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.h rename to keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h diff --git a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk similarity index 100% rename from keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.mk rename to keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk diff --git a/keyboards/handwired/practice60/bootloader_defs.h b/keyboards/cannonkeys/ortho48/bootloader_defs.h similarity index 100% rename from keyboards/handwired/practice60/bootloader_defs.h rename to keyboards/cannonkeys/ortho48/bootloader_defs.h diff --git a/keyboards/handwired/ortho60/chconf.h b/keyboards/cannonkeys/ortho48/chconf.h similarity index 100% rename from keyboards/handwired/ortho60/chconf.h rename to keyboards/cannonkeys/ortho48/chconf.h diff --git a/keyboards/cannonkeys/ortho48/config.h b/keyboards/cannonkeys/ortho48/config.h new file mode 100644 index 000000000000..497e08bcf5e5 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/config.h @@ -0,0 +1,80 @@ +/* +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 0x0248 +#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 Ortho48 +#define DESCRIPTION Ortho48 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, B14, A15, A0, C15, C14} +#define MATRIX_ROW_PINS { B12, C13, A2, A1 } +#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 9 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + + + +/* + * 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/practice60/halconf.h b/keyboards/cannonkeys/ortho48/halconf.h similarity index 100% rename from keyboards/handwired/practice60/halconf.h rename to keyboards/cannonkeys/ortho48/halconf.h diff --git a/keyboards/cannonkeys/ortho48/info.json b/keyboards/cannonkeys/ortho48/info.json new file mode 100644 index 000000000000..0e834245a119 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/info.json @@ -0,0 +1,112 @@ +{ + "keyboard_name": "Ortho48", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "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":"Delete", "x":11, "y":0}, + {"label":"Esc", "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":"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":"Enter", "x":11, "y":2}, + {"label":"Fn", "x":0, "y":3}, + {"label":"Ctrl", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Meta", "x":3, "y":3}, + {"label":"Lower", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3}, + {"label":"Space", "x":6, "y":3}, + {"label":"Raise", "x":7, "y":3}, + {"label":"Left", "x":8, "y":3}, + {"label":"Down", "x":9, "y":3}, + {"label":"Up", "x":10, "y":3}, + {"label":"Right", "x":11, "y":3} + ] + }, + "LAYOUT_1x2uC": { + "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":"Delete", "x":11, "y":0}, + {"label":"Esc", "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":"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":"Enter", "x":11, "y":2}, + {"label":"Fn", "x":0, "y":3}, + {"label":"Ctrl", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Meta", "x":3, "y":3}, + {"label":"Lower", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3, "w":2}, + {"label":"Raise", "x":7, "y":3}, + {"label":"Left", "x":8, "y":3}, + {"label":"Down", "x":9, "y":3}, + {"label":"Up", "x":10, "y":3}, + {"label":"Right", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c new file mode 100644 index 000000000000..2c3bc80c5d49 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c @@ -0,0 +1,89 @@ +/* +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 _RAISE 1 +#define _LOWER 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = 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 , + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_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_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, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, 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_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_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +}; diff --git a/keyboards/handwired/ortho60/ld/MKL26Z64.ld b/keyboards/cannonkeys/ortho48/ld/MKL26Z64.ld similarity index 100% rename from keyboards/handwired/ortho60/ld/MKL26Z64.ld rename to keyboards/cannonkeys/ortho48/ld/MKL26Z64.ld diff --git a/keyboards/handwired/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho48/ld/STM32F103x8_stm32duino_bootloader.ld similarity index 100% rename from keyboards/handwired/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld rename to keyboards/cannonkeys/ortho48/ld/STM32F103x8_stm32duino_bootloader.ld diff --git a/keyboards/handwired/practice60/mcuconf.h b/keyboards/cannonkeys/ortho48/mcuconf.h similarity index 100% rename from keyboards/handwired/practice60/mcuconf.h rename to keyboards/cannonkeys/ortho48/mcuconf.h diff --git a/keyboards/cannonkeys/ortho48/ortho48.c b/keyboards/cannonkeys/ortho48/ortho48.c new file mode 100644 index 000000000000..fe38f020071f --- /dev/null +++ b/keyboards/cannonkeys/ortho48/ortho48.c @@ -0,0 +1,3 @@ + +#include "ortho48.h" + diff --git a/keyboards/cannonkeys/ortho48/ortho48.h b/keyboards/cannonkeys/ortho48/ortho48.h new file mode 100644 index 000000000000..1e51c37af7ee --- /dev/null +++ b/keyboards/cannonkeys/ortho48/ortho48.h @@ -0,0 +1,29 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_1x2uC( \ + 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, KC_NO, k37, k38, k39, k3a, k3b } \ +} + +#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, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/cannonkeys/ortho48/readme.md b/keyboards/cannonkeys/ortho48/readme.md new file mode 100644 index 000000000000..ba5516a34137 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/readme.md @@ -0,0 +1,12 @@ +# Ortho 48 + +A Blue Pill STM32F103C8T6-based 12x4 ortholinear keyboard. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/ortho48: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/practice60/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk similarity index 96% rename from keyboards/handwired/practice60/rules.mk rename to keyboards/cannonkeys/ortho48/rules.mk index e417c91ee87b..2e483a8c2cc0 100644 --- a/keyboards/handwired/practice60/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -1,6 +1,7 @@ # project specific files +VPATH += keyboards/cannonkeys/bluepill SRC = led.c \ - ws2812.c + keyboard.c # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 @@ -51,6 +52,4 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes -LAYOUTS = 60_ansi - -DEFAULT_FOLDER = handwired/practice60 +LAYOUTS = ortho_4x12 diff --git a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c similarity index 100% rename from keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.c rename to keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c diff --git a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h similarity index 100% rename from keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.h rename to keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h diff --git a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk similarity index 100% rename from keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.mk rename to keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk diff --git a/keyboards/handwired/ortho60/bootloader_defs.h b/keyboards/cannonkeys/ortho60/bootloader_defs.h similarity index 90% rename from keyboards/handwired/ortho60/bootloader_defs.h rename to keyboards/cannonkeys/ortho60/bootloader_defs.h index 0f45203cb613..6b8fa9f727c9 100644 --- a/keyboards/handwired/ortho60/bootloader_defs.h +++ b/keyboards/cannonkeys/ortho60/bootloader_defs.h @@ -7,4 +7,4 @@ // STM32F103* does NOT have an USB bootloader in ROM (only serial), // so setting anything here does not make much sense -// #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/handwired/practice60/chconf.h b/keyboards/cannonkeys/ortho60/chconf.h similarity index 100% rename from keyboards/handwired/practice60/chconf.h rename to keyboards/cannonkeys/ortho60/chconf.h diff --git a/keyboards/handwired/ortho60/config.h b/keyboards/cannonkeys/ortho60/config.h similarity index 88% rename from keyboards/handwired/ortho60/config.h rename to keyboards/cannonkeys/ortho60/config.h index 7234b54af1b4..9b85952d789b 100644 --- a/keyboards/handwired/ortho60/config.h +++ b/keyboards/cannonkeys/ortho60/config.h @@ -35,7 +35,9 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -48,6 +50,15 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 16 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/ortho60/halconf.h b/keyboards/cannonkeys/ortho60/halconf.h similarity index 99% rename from keyboards/handwired/ortho60/halconf.h rename to keyboards/cannonkeys/ortho60/halconf.h index 5fba285a380d..72879a575b9c 100644 --- a/keyboards/handwired/ortho60/halconf.h +++ b/keyboards/cannonkeys/ortho60/halconf.h @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM TRUE #endif /** diff --git a/keyboards/handwired/ortho60/info.json b/keyboards/cannonkeys/ortho60/info.json similarity index 100% rename from keyboards/handwired/ortho60/info.json rename to keyboards/cannonkeys/ortho60/info.json diff --git a/keyboards/handwired/ortho60/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c similarity index 95% rename from keyboards/handwired/ortho60/keymaps/default/keymap.c rename to keyboards/cannonkeys/ortho60/keymaps/default/keymap.c index 8617b6341aa9..56caa4dc84f4 100644 --- a/keyboards/handwired/ortho60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c @@ -52,7 +52,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_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, \ - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_HOME, KC_END, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise @@ -93,6 +93,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_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 \ + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ) }; diff --git a/keyboards/handwired/practice60/ld/MKL26Z64.ld b/keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld similarity index 100% rename from keyboards/handwired/practice60/ld/MKL26Z64.ld rename to keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld diff --git a/keyboards/handwired/practice60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld similarity index 100% rename from keyboards/handwired/practice60/ld/STM32F103x8_stm32duino_bootloader.ld rename to keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld diff --git a/keyboards/handwired/ortho60/mcuconf.h b/keyboards/cannonkeys/ortho60/mcuconf.h similarity index 99% rename from keyboards/handwired/ortho60/mcuconf.h rename to keyboards/cannonkeys/ortho60/mcuconf.h index 9945e7408d12..fced27289e0d 100644 --- a/keyboards/handwired/ortho60/mcuconf.h +++ b/keyboards/cannonkeys/ortho60/mcuconf.h @@ -132,7 +132,7 @@ * PWM driver system settings. */ #define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM1 TRUE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE diff --git a/keyboards/cannonkeys/ortho60/ortho60.c b/keyboards/cannonkeys/ortho60/ortho60.c new file mode 100644 index 000000000000..f917ef96f944 --- /dev/null +++ b/keyboards/cannonkeys/ortho60/ortho60.c @@ -0,0 +1,3 @@ + +#include "ortho60.h" + diff --git a/keyboards/handwired/ortho60/ortho60.h b/keyboards/cannonkeys/ortho60/ortho60.h similarity index 100% rename from keyboards/handwired/ortho60/ortho60.h rename to keyboards/cannonkeys/ortho60/ortho60.h diff --git a/keyboards/handwired/ortho60/readme.md b/keyboards/cannonkeys/ortho60/readme.md similarity index 93% rename from keyboards/handwired/ortho60/readme.md rename to keyboards/cannonkeys/ortho60/readme.md index be2a027c4f30..c3fdbccc5d32 100644 --- a/keyboards/handwired/ortho60/readme.md +++ b/keyboards/cannonkeys/ortho60/readme.md @@ -7,6 +7,6 @@ Hardware Supported: Blue Pill STM32F103C8T6 Make example for this keyboard (after setting up your build environment): - make handwired/ortho60:default + make cannonkeys/ortho60: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/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk similarity index 96% rename from keyboards/handwired/ortho60/rules.mk rename to keyboards/cannonkeys/ortho60/rules.mk index 91acb3c5c655..359f447a9cfc 100644 --- a/keyboards/handwired/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -1,7 +1,7 @@ # project specific files +VPATH += keyboards/cannonkeys/bluepill SRC = led.c \ - underglow.c \ - hsv2rgb.c + keyboard.c # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 @@ -50,5 +50,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes LAYOUTS = ortho_5x12 diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c new file mode 100644 index 000000000000..8c5a87f35f8b --- /dev/null +++ b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c @@ -0,0 +1,56 @@ +/* + 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. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @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. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h new file mode 100644 index 000000000000..9427adabf11d --- /dev/null +++ b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h @@ -0,0 +1,166 @@ +/* + 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 _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#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/practice60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk new file mode 100644 index 000000000000..6b8b312fd9fd --- /dev/null +++ b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/practice60/bootloader_defs.h b/keyboards/cannonkeys/practice60/bootloader_defs.h new file mode 100644 index 000000000000..6b8fa9f727c9 --- /dev/null +++ b/keyboards/cannonkeys/practice60/bootloader_defs.h @@ -0,0 +1,10 @@ +/* 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 + */ + +// STM32F103* does NOT have an USB bootloader in ROM (only serial), +// so setting anything here does not make much sense +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/practice60/chconf.h b/keyboards/cannonkeys/practice60/chconf.h new file mode 100644 index 000000000000..bbd9b2da62d2 --- /dev/null +++ b/keyboards/cannonkeys/practice60/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 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 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @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 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 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 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 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/practice60/config.h b/keyboards/cannonkeys/practice60/config.h similarity index 100% rename from keyboards/handwired/practice60/config.h rename to keyboards/cannonkeys/practice60/config.h diff --git a/keyboards/cannonkeys/practice60/halconf.h b/keyboards/cannonkeys/practice60/halconf.h new file mode 100644 index 000000000000..72879a575b9c --- /dev/null +++ b/keyboards/cannonkeys/practice60/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 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/handwired/practice60/info.json b/keyboards/cannonkeys/practice60/info.json similarity index 100% rename from keyboards/handwired/practice60/info.json rename to keyboards/cannonkeys/practice60/info.json diff --git a/keyboards/handwired/practice60/keymaps/default/keymap.c b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c similarity index 100% rename from keyboards/handwired/practice60/keymaps/default/keymap.c rename to keyboards/cannonkeys/practice60/keymaps/default/keymap.c diff --git a/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld b/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld new file mode 100644 index 000000000000..c4ca8b874cca --- /dev/null +++ b/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast + * + * 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. + */ + +/* + * KL26Z64 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x100 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 62k - 0x410 + flash3 : org = 0x0000F800, len = 2k + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +__eeprom_workarea_start__ = ORIGIN(flash3); +__eeprom_workarea_size__ = LENGTH(flash3); +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000000..d0688ef60164 --- /dev/null +++ b/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,88 @@ +/* + 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. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 64k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice60/mcuconf.h b/keyboards/cannonkeys/practice60/mcuconf.h new file mode 100644 index 000000000000..fced27289e0d --- /dev/null +++ b/keyboards/cannonkeys/practice60/mcuconf.h @@ -0,0 +1,209 @@ +/* + 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_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 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. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#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_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * 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 + +/* + * 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_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#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_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * 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 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#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_TIM5 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_TIM5_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 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 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_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * 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 TRUE +#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 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/practice60/practice60.c b/keyboards/cannonkeys/practice60/practice60.c new file mode 100644 index 000000000000..d2cf47deb840 --- /dev/null +++ b/keyboards/cannonkeys/practice60/practice60.c @@ -0,0 +1,2 @@ + +#include "practice60.h" diff --git a/keyboards/handwired/practice60/practice60.h b/keyboards/cannonkeys/practice60/practice60.h similarity index 100% rename from keyboards/handwired/practice60/practice60.h rename to keyboards/cannonkeys/practice60/practice60.h diff --git a/keyboards/cannonkeys/practice60/readme.md b/keyboards/cannonkeys/practice60/readme.md new file mode 100644 index 000000000000..044aadf6e98d --- /dev/null +++ b/keyboards/cannonkeys/practice60/readme.md @@ -0,0 +1,12 @@ +# Practice 60 + +A Blue Pill STM32F103C8T6-based 60% ANSI board. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/practice60: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/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk new file mode 100644 index 000000000000..cf8554c0c6ff --- /dev/null +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -0,0 +1,57 @@ +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in /os/hal/boards/ +# or /boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# 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 + + +#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 +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes + +LAYOUTS = 60_ansi + +DEFAULT_FOLDER = cannonkeys/practice60 diff --git a/keyboards/handwired/ortho60/hsv2rgb.c b/keyboards/handwired/ortho60/hsv2rgb.c deleted file mode 100644 index adb7af8fa57e..000000000000 --- a/keyboards/handwired/ortho60/hsv2rgb.c +++ /dev/null @@ -1,80 +0,0 @@ -/* hsv2rgb.c - * Integer only conversion functions between HSV and RGB - */ - -#include "hsv2rgb.h" - -// TODO fix these buggy macros -#define max(x,y) ((x>y) ? x:y) -#define min(x,y) ((x>y) ? y:x) -#define min3(x,y,z) (min(min(x,y),z)) -#define max3(x,y,z) (max(max(x,y),z)) - - -rgb_color hsv2rgb(hsv_color hsv) -{ - // From : http://qscribble.blogspot.fr/2008/06/integer-conversion-from-hsl-to-rgb.html - int h = hsv.h; - int s = hsv.s; - int v = hsv.v; - rgb_color rgb = {0, 0, 0}; - - if (v == 0) - return rgb; - - // sextant = 0 .. 5 - int sextant = (h*6)/256; - // f = 0 .. 42 - int f = h - (sextant*256)/6; - - int p = (v * (256 - s))/256; - int q = (v * (256*43 - s*f))/(256*43); - int t = (v * (256*43 - s*(43-f)))/(256*43); - - // Corrige les erreurs dues aux arrondis - p = max(min(p, 255), 0); - q = max(min(q, 255), 0); - t = max(min(t, 255), 0); - - switch(sextant){ - case 0: rgb.r = v; rgb.g = t; rgb.b = p; break; - case 1: rgb.r = q; rgb.g = v; rgb.b = p; break; - case 2: rgb.r = p; rgb.g = v; rgb.b = t; break; - case 3: rgb.r = p; rgb.g = q; rgb.b = v; break; - case 4: rgb.r = t; rgb.g = p; rgb.b = v; break; - default:rgb.r = v; rgb.g = p; rgb.b = q; break; - } - return rgb; -} - - -hsv_color rgb2hsv(rgb_color rgb) -{ - // From : http://www.ruinelli.ch/rgb-to-hsv - hsv_color hsv = {0, 0, 0}; - int min, max, delta; - - min = min3(rgb.r, rgb.g, rgb.b); - max = max3(rgb.r, rgb.g, rgb.b); - - if(max==0) { - hsv.h = 0; - hsv.s = 0; - hsv.v = 0; - return hsv; - } - - hsv.v = max; - delta = max - min; - - hsv.s = (delta)*255 / max; - - if(rgb.r == max) - hsv.h = (rgb.g - rgb.b)*42/delta; // between yellow & magenta - else if(rgb.g == max) - hsv.h = 120 + (rgb.b - rgb.r)*42/delta; // between cyan & yellow - else - hsv.h = 240 + (rgb.r - rgb.g)*42/delta; // between magenta & cyan - - return hsv; -} \ No newline at end of file diff --git a/keyboards/handwired/ortho60/hsv2rgb.h b/keyboards/handwired/ortho60/hsv2rgb.h deleted file mode 100644 index 99566c32c07e..000000000000 --- a/keyboards/handwired/ortho60/hsv2rgb.h +++ /dev/null @@ -1,23 +0,0 @@ -/* hsv2rgb.h - * Convert Hue Saturation Value to Red Green Blue - * - * Programme de convertion d'une information HSV en RGB - */ -#ifndef HSV2RGB_H -#define HSV2RGB_H - -typedef struct { - unsigned char h; - unsigned char s; - unsigned char v; -} hsv_color; - -typedef struct { - unsigned char r; - unsigned char g; - unsigned char b; -} rgb_color; - -rgb_color hsv2rgb(hsv_color hsv); - -#endif \ No newline at end of file diff --git a/keyboards/handwired/ortho60/led.c b/keyboards/handwired/ortho60/led.c deleted file mode 100644 index f15baed169d4..000000000000 --- a/keyboards/handwired/ortho60/led.c +++ /dev/null @@ -1,51 +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 . -*/ - -#include "hal.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -void backlight_init_ports(void) { - printf("backlight_init_ports()\n"); - #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(GPIOA, 8); - #endif -} - -void backlight_set(uint8_t level) { - printf("backlight_set(%d)\n", level); - #ifdef BACKLIGHT_ENABLE - if (level == 0) { - // Turn backlight off - palSetPad(GPIOA, 8); - } else { - // Turn backlight on - palClearPad(GPIOA, 8); - } - #endif -} - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1< 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; - for (int i=0; i> 8)); - EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16)); - EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24)); + uint32_t existingValue = EEPROM_ReadDataByte(p) | (EEPROM_ReadDataByte(p+1) << 8) + | (EEPROM_ReadDataByte(p+2) << 16) | (EEPROM_ReadDataByte(p+3) << 24); + if(Value != existingValue){ + EEPROM_WriteDataByte(p, (uint8_t) Value); + EEPROM_WriteDataByte(p+1, (uint8_t) (Value >> 8)); + EEPROM_WriteDataByte(p+2, (uint8_t) (Value >> 16)); + EEPROM_WriteDataByte(p+3, (uint8_t) (Value >> 24)); + } } void eeprom_read_block(void *buf, const void *addr, uint32_t len) { From 3d338f2555f4ceab3c4ca06d70076c663d937d63 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 29 Jan 2019 21:23:03 -0800 Subject: [PATCH 253/458] [Keyboard] Gray Studio Space 65 Support (#5001) * initial commit * get rid of vanilla code, and fix formatting * write up a nice looking readme * add in pins and enable features * define keymap and switch/physical matrix * add QMK Configurator support * switch to bootmagic lite to decrease file size --- keyboards/gray_studio/space65/config.h | 244 ++++++++++++++++++ keyboards/gray_studio/space65/info.json | 12 + .../space65/keymaps/default/config.h | 19 ++ .../space65/keymaps/default/keymap.c | 73 ++++++ .../space65/keymaps/default/readme.md | 1 + keyboards/gray_studio/space65/readme.md | 13 + keyboards/gray_studio/space65/rules.mk | 80 ++++++ keyboards/gray_studio/space65/space65.c | 43 +++ keyboards/gray_studio/space65/space65.h | 44 ++++ 9 files changed, 529 insertions(+) create mode 100644 keyboards/gray_studio/space65/config.h create mode 100644 keyboards/gray_studio/space65/info.json create mode 100644 keyboards/gray_studio/space65/keymaps/default/config.h create mode 100644 keyboards/gray_studio/space65/keymaps/default/keymap.c create mode 100644 keyboards/gray_studio/space65/keymaps/default/readme.md create mode 100644 keyboards/gray_studio/space65/readme.md create mode 100644 keyboards/gray_studio/space65/rules.mk create mode 100644 keyboards/gray_studio/space65/space65.c create mode 100644 keyboards/gray_studio/space65/space65.h diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h new file mode 100644 index 000000000000..cb8ee3c01983 --- /dev/null +++ b/keyboards/gray_studio/space65/config.h @@ -0,0 +1,244 @@ +/* +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 Gray Studio +#define PRODUCT Space65 +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, F0, F4, F1 } +#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 */ +#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 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 5 + #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/gray_studio/space65/info.json b/keyboards/gray_studio/space65/info.json new file mode 100644 index 000000000000..aafae5b08ad1 --- /dev/null +++ b/keyboards/gray_studio/space65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Gray Studio Space65", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "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":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":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":15, "y":1}, {"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":15, "y":2}, {"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":15, "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/gray_studio/space65/keymaps/default/config.h b/keyboards/gray_studio/space65/keymaps/default/config.h new file mode 100644 index 000000000000..26c6d6ade101 --- /dev/null +++ b/keyboards/gray_studio/space65/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/gray_studio/space65/keymaps/default/keymap.c b/keyboards/gray_studio/space65/keymaps/default/keymap.c new file mode 100644 index 000000000000..c42bbe0f0474 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* 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_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_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_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_SPC, KC_SPC, KC_RALT, MO(1), 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, \ + KC_TRNS, KC_TRNS, KC_TRNS, 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_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + ), +}; + +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/gray_studio/space65/keymaps/default/readme.md b/keyboards/gray_studio/space65/keymaps/default/readme.md new file mode 100644 index 000000000000..944c1e8a0f5b --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for space65 diff --git a/keyboards/gray_studio/space65/readme.md b/keyboards/gray_studio/space65/readme.md new file mode 100644 index 000000000000..9f3b3c1629bf --- /dev/null +++ b/keyboards/gray_studio/space65/readme.md @@ -0,0 +1,13 @@ +# Gray Studio Space65 + +A 65% keyboard with RGB Underglow, Backlight, USB C. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Gray Studio Space 65 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97216.0) + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/space65: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/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk new file mode 100644 index 000000000000..0ede67719f76 --- /dev/null +++ b/keyboards/gray_studio/space65/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 = 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 = 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/gray_studio/space65/space65.c b/keyboards/gray_studio/space65/space65.c new file mode 100644 index 000000000000..26d80e00ec93 --- /dev/null +++ b/keyboards/gray_studio/space65/space65.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 "space65.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/gray_studio/space65/space65.h b/keyboards/gray_studio/space65/space65.h new file mode 100644 index 000000000000..c2158fd92843 --- /dev/null +++ b/keyboards/gray_studio/space65/space65.h @@ -0,0 +1,44 @@ +/* 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 XXX 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( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, k3F, \ + k40, k41, k43, k45, k47, k48, k4A, k4B, k4D, k4E, k4F \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E, k3F }, \ + { k40, k41, KC_NO, k43, KC_NO, k45, KC_NO, k47, k48, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \ +} + From d192fd00cd50256e50692f0295a1070d7fe4f26b Mon Sep 17 00:00:00 2001 From: Logan Bussell <36081148+lbussell@users.noreply.github.com> Date: Wed, 30 Jan 2019 08:56:25 -0800 Subject: [PATCH 254/458] [Keymap] Updates to ortho_4x12/buswerks keymap (#4996) * Added buswerks keymap * cleaned up comments on buswerks keymap * Added buswerks keymap readme.md * Fixed spelling in buswerks readme.md * Removed unnecessary includes, changed process_record_user to now use set_single_persistent_default_layer(), removed deprecated functions, and moved the audio ifdef block to config.h * Changed buswerks ortho_4x12 layout to accommodate 'MIT' layout * Updated README.md to reflect layout changes * update buswerks keymap * add buswerks tragicforce68 keymap * add rotary encoder support * update readme * fix image link in readme * fix KC_NO shorthand --- .../community/ortho_4x12/buswerks/config.h | 11 +- .../community/ortho_4x12/buswerks/keymap.c | 327 +++++++++--------- .../community/ortho_4x12/buswerks/readme.md | 35 +- 3 files changed, 176 insertions(+), 197 deletions(-) diff --git a/layouts/community/ortho_4x12/buswerks/config.h b/layouts/community/ortho_4x12/buswerks/config.h index 1498cae744c1..8d6e26287e05 100644 --- a/layouts/community/ortho_4x12/buswerks/config.h +++ b/layouts/community/ortho_4x12/buswerks/config.h @@ -13,10 +13,15 @@ #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) - + // #define STARTUP_SONG SONG(NO_SOUND) #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ SONG(COLEMAK_SOUND), \ SONG(DVORAK_SOUND) \ } -#endif \ No newline at end of file +#endif + +// MIDI notes can be sent when in Music mode +#define MIDI_BASIC + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/layouts/community/ortho_4x12/buswerks/keymap.c b/layouts/community/ortho_4x12/buswerks/keymap.c index 72c592a0c3f3..bea18f8f488e 100644 --- a/layouts/community/ortho_4x12/buswerks/keymap.c +++ b/layouts/community/ortho_4x12/buswerks/keymap.c @@ -2,183 +2,174 @@ extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _MOUSE 5 -#define _ADJUST 16 +enum layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _GAME, + _ADJUST +}; enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - MOUSE, - ADJUST, + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + GAME, + ADJUST }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define KC_ KC_TRNS -#define XXXXXXX KC_NO - -#define ESC_CMD MT(MOD_LGUI, KC_ESC) +#define GAME TG(_GAME) #define RSE_ENT LT(_RAISE, KC_ENT) -#define KC_LOWR LOWER -#define KC_RASE RAISE -#define KC_ADJ ADJUST -#define MOUSE TG(_MOUSE) - -#define DESK_L LCTL(KC_LEFT) -#define DESK_R LCTL(KC_RGHT) -#define MSN_CTL LCTL(KC_UP) -#define APP_WND LCTL(KC_DOWN) -#define SWITCHR LGUI(KC_TAB) - -#define WORD_L LALT(KC_LEFT) -#define WORD_R LALT(KC_RGHT) -#define LINE_L LGUI(KC_LEFT) -#define LINE_R LGUI(KC_RGHT) - -#define COPY LGUI(KC_C) -#define CUT LGUI(KC_X) -#define PASTE LGUI(KC_V) +#define ESC_CTL LCTL_T(KC_ESC) // for Linux +#define ESC_CMD LGUI_T(KC_ESC) // for macOS -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Use these to switch desktops on macOS +#define DESK_L LCTL(KC_LEFT) +#define DESK_R LCTL(KC_RGHT) -[_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, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - ESC_CMD, 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_HYPR, MOUSE , KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ - // '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' -), - -[_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, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - 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_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_HYPR, MOUSE , KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ - // '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' -), - -[_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, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - ESC_CMD, 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_HYPR, MOUSE , KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ - // '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' -), - -[_LOWER] = LAYOUT_ortho_4x12( \ - // .--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. - SWITCHR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_MINS, _______, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_PLUS, KC_PIPE, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, KC_UNDS, KC_EQL, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_COMM, _______, _______ \ - // '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' -), - -[_RAISE] = LAYOUT_ortho_4x12( \ - // .--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_UNDS, KC_EQL, KC_DEL, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_BSLS, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, LINE_L, WORD_L, WORD_R, LINE_R, _______, _______, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT \ - // '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' -), - -[_MOUSE] = LAYOUT_ortho_4x12( \ - // .--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------. - SWITCHR, _______, _______, KC_MS_U, _______, _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, _______, _______, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, _______, _______, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, _______, KC_WH_U, KC_WH_D, COPY, PASTE, KC_BTN4, KC_BTN5, _______, _______, _______, \ - // |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - _______, _______, MOUSE , _______, _______, KC_SPC, KC_SPC, KC_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ - // '--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------' -), - -[_ADJUST] = LAYOUT_ortho_4x12( \ - _______, QWERTY, COLEMAK, DVORAK, RESET, _______, _______, _______, _______, AG_NORM, AG_SWAP, _______, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, AU_OFF , AU_ON , _______, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) +// Use these to switch desktops on Gnome +#define DESK_UP LGUI(KC_PGUP) +#define DESK_DN LGUI(KC_PGDN) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Use QWERTY on macOS (Colemak mapped using software) + [_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, \ + ESC_CMD, 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, \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ + ), + + // Use Colemak on Linux (No native Colemak mapping) + [_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, \ + ESC_CTL, 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, \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ + ), + + [_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, \ + ESC_CTL, 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 , \ + XXXXXXX, KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , RSE_ENT, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT \ + ), + + [_LOWER] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_7, KC_8, KC_9, KC_MINS, _______, \ + KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_4, KC_5, KC_6, KC_PLUS, KC_PIPE, \ + _______, _______, _______, KC_UNDS, KC_EQL, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_COMM, _______, _______ \ + ), + + [_RAISE] = LAYOUT_ortho_4x12( \ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, _______, KC_INS, KC_DEL, \ + KC_TILD, _______, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_BSLS, \ + _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, DESK_R, DESK_DN, DESK_UP, DESK_L \ + ), + + [_GAME] = 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, \ + 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 \ + ), + + [_ADJUST] = LAYOUT_planck_grid( + _______, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; 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; -} \ No newline at end of file + 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; +} + +void encoder_update(bool clockwise) { + if (IS_LAYER_ON(_RAISE) || IS_LAYER_ON(_LOWER)) { + if (clockwise) { + register_code(KC_VOLU); + unregister_code(KC_VOLU); + } else { + register_code(KC_VOLD); + register_code(KC_VOLD); + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_DOWN); + unregister_code(KC_MS_WH_DOWN); + #else + register_code(KC_PGDN); + unregister_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + register_code(KC_MS_WH_UP); + unregister_code(KC_MS_WH_UP); + #else + register_code(KC_PGUP); + unregister_code(KC_PGUP); + #endif + } + } +} + + diff --git a/layouts/community/ortho_4x12/buswerks/readme.md b/layouts/community/ortho_4x12/buswerks/readme.md index 43c1aaf93b6c..e469d6a50f99 100644 --- a/layouts/community/ortho_4x12/buswerks/readme.md +++ b/layouts/community/ortho_4x12/buswerks/readme.md @@ -1,29 +1,12 @@ -Buswerks' 4x12 Ortholinear Layout -============================ -For use on Planck, Let's Split, and similar keyboards +![Imgur](https://i.imgur.com/yx9tFUq.png) -### Layout Overview +# Logan's Ortho 4x12 Layout -- Main Layer - - Enter is located on the Raise key (layer-tap) - - Space Cadet shift keys - - Lower + shift keys = Brackets[] - - Raise + shift keys = Braces{} - - The bottom left key is the Adjust modifier - - Escape is in the traditional Caps Lock position - - Holding down the escape key acts as LGUI (intended for macOS use) -- Lower - - There is a numpad on the right hand (4, 5, and 6 are located under JKL/NEI/HTN) - - Plus and minus keys are located to the right of the numpad - - There are macOS desktop navigation keys and volume controls under the left hand +This layout is what I use on my Planck. Some features of the layout: -- Raise - - Vim-style arrow keys - - Below the arrow keys are home, end, pgup, and pgdn - - Symbols are located on the right side of the keyboard, in a somewhat logical order - - Symbols from the number row are in order, starting on the left pinky. - - Equals and underscore are in easily accessible spots, since they're commonly used in programming - - The ampersand is less common, so it's to the right of the equals symbol - -- Adjust - - Function keys are located along the top row (reset is moved to the Colemak 'R' position) \ No newline at end of file +- Rotary encoder support (no function for clicking yet) +- Numpad under right hand (I find this much more comfortable than touch-typing the number row) +- Space cadet shift +- Curly braces are under the home row (makes programming much more comfortable) + +Also, another note: the QWERTY layout uses `LGUI_T(KC_ESC)` and the COLEMAK/DVORAK layouts use `LCTL_T(KC_ESC)`. This is because I use the QWERTY layout on my Mac laptop so that I don't have to change the software remapping every time I dock my laptop. This also allows a convenient remapping of the modifier keys. I use the hardware mapped COLEMAK layout on Linux. From fb49a882b10909546aab0190f08b707c17f49452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 30 Jan 2019 18:08:30 +0100 Subject: [PATCH 255/458] Fix link and name spelling in Space65's readme (#5004) --- keyboards/gray_studio/space65/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/gray_studio/space65/readme.md b/keyboards/gray_studio/space65/readme.md index 9f3b3c1629bf..83387d4b4cb2 100644 --- a/keyboards/gray_studio/space65/readme.md +++ b/keyboards/gray_studio/space65/readme.md @@ -1,10 +1,10 @@ # Gray Studio Space65 -A 65% keyboard with RGB Underglow, Backlight, USB C. +A 65% keyboard with RGB underglow, backlighting and USB C, whose design was inspired by the Voyager I space probe and Apple II home computer. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: Gray Studio Space 65 -Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=97216.0) +Hardware Supported: Gray Studio Space65 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=98768.0) Make example for this keyboard (after setting up your build environment): From 4c155559d5e4680af6fc4eec99aa5dc2841bc429 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 30 Jan 2019 09:09:27 -0800 Subject: [PATCH 256/458] [Keyboard] Gray Studio Directory (#5002) * move cod67 into the gray_studio directory * modify readmes --- keyboards/{ => gray_studio}/cod67/cod67.c | 0 keyboards/{ => gray_studio}/cod67/cod67.h | 0 keyboards/{ => gray_studio}/cod67/config.h | 0 keyboards/{ => gray_studio}/cod67/info.json | 0 .../{ => gray_studio}/cod67/keymaps/default/keymap.c | 0 .../{ => gray_studio}/cod67/keymaps/default/readme.md | 0 keyboards/{ => gray_studio}/cod67/readme.md | 8 +++----- keyboards/{ => gray_studio}/cod67/rules.mk | 0 keyboards/gray_studio/readme.md | 1 + 9 files changed, 4 insertions(+), 5 deletions(-) rename keyboards/{ => gray_studio}/cod67/cod67.c (100%) rename keyboards/{ => gray_studio}/cod67/cod67.h (100%) rename keyboards/{ => gray_studio}/cod67/config.h (100%) rename keyboards/{ => gray_studio}/cod67/info.json (100%) rename keyboards/{ => gray_studio}/cod67/keymaps/default/keymap.c (100%) rename keyboards/{ => gray_studio}/cod67/keymaps/default/readme.md (100%) rename keyboards/{ => gray_studio}/cod67/readme.md (75%) rename keyboards/{ => gray_studio}/cod67/rules.mk (100%) create mode 100644 keyboards/gray_studio/readme.md diff --git a/keyboards/cod67/cod67.c b/keyboards/gray_studio/cod67/cod67.c similarity index 100% rename from keyboards/cod67/cod67.c rename to keyboards/gray_studio/cod67/cod67.c diff --git a/keyboards/cod67/cod67.h b/keyboards/gray_studio/cod67/cod67.h similarity index 100% rename from keyboards/cod67/cod67.h rename to keyboards/gray_studio/cod67/cod67.h diff --git a/keyboards/cod67/config.h b/keyboards/gray_studio/cod67/config.h similarity index 100% rename from keyboards/cod67/config.h rename to keyboards/gray_studio/cod67/config.h diff --git a/keyboards/cod67/info.json b/keyboards/gray_studio/cod67/info.json similarity index 100% rename from keyboards/cod67/info.json rename to keyboards/gray_studio/cod67/info.json diff --git a/keyboards/cod67/keymaps/default/keymap.c b/keyboards/gray_studio/cod67/keymaps/default/keymap.c similarity index 100% rename from keyboards/cod67/keymaps/default/keymap.c rename to keyboards/gray_studio/cod67/keymaps/default/keymap.c diff --git a/keyboards/cod67/keymaps/default/readme.md b/keyboards/gray_studio/cod67/keymaps/default/readme.md similarity index 100% rename from keyboards/cod67/keymaps/default/readme.md rename to keyboards/gray_studio/cod67/keymaps/default/readme.md diff --git a/keyboards/cod67/readme.md b/keyboards/gray_studio/cod67/readme.md similarity index 75% rename from keyboards/cod67/readme.md rename to keyboards/gray_studio/cod67/readme.md index 5e64ff7588a8..7f91cf30d1e5 100644 --- a/keyboards/cod67/readme.md +++ b/keyboards/gray_studio/cod67/readme.md @@ -1,13 +1,11 @@ # Gray COD67 -![cod67](imgur.com image replace me!) - The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port. There were only 75 units made worldwide. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: Gray COD67 +Hardware Supported: Gray COD67 Hardware Availability: [Zfrontier](https://en.zfrontier.com/products/cod67) At this time, flashing ONLY works on Windows systems. @@ -18,9 +16,9 @@ The COD67 will show up as a drive. Make example for this keyboard (after setting up your build environment): - make cod67:default:bin + make gray_studio/cod67:default:bin -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). Rename the resulting `.bin` file to `cod67.bin`. diff --git a/keyboards/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk similarity index 100% rename from keyboards/cod67/rules.mk rename to keyboards/gray_studio/cod67/rules.mk diff --git a/keyboards/gray_studio/readme.md b/keyboards/gray_studio/readme.md new file mode 100644 index 000000000000..dc1baa516308 --- /dev/null +++ b/keyboards/gray_studio/readme.md @@ -0,0 +1 @@ +# Gray Studio From d7ebdfb490f6872589aa02a3d6fe601fcdac5ca4 Mon Sep 17 00:00:00 2001 From: Spaceman Date: Wed, 30 Jan 2019 12:10:31 -0500 Subject: [PATCH 257/458] Sweet16 Keymap by Spaceman added (#5003) * Create keymap.c * Update keymap.c * Changed a few things * Update keymap.c * fixed something i broke --- .../sweet16/keymaps/sebas/keymap.c | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c diff --git a/keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c new file mode 100644 index 000000000000..a7e587426b32 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H +#define ALT TG(_FUNC) + +enum layers { + _KEYP, + _FUNC +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_KEYP]=LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, ALT, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PENT, KC_PPLS +), +[_FUNC]=LAYOUT_ortho_4x4( + KC_MPRV, KC_MPLY, KC_MNXT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, + KC_INS, KC_HOME, KC_PGUP, XXXXXXX, + KC_DEL, KC_END, KC_PGDN, XXXXXXX +) +}; From 71164eee6abe3c998227670aebe5020973a577ad Mon Sep 17 00:00:00 2001 From: Max <17062872+westfoxtrot@users.noreply.github.com> Date: Wed, 30 Jan 2019 19:51:32 +0100 Subject: [PATCH 258/458] added aanzee pcb support (#4962) * added aanzee pcb support * Update keyboards/westfoxtrot/aanzee/config.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/config.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/config.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/config.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/aanzee.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/aanzee.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/aanzee.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/aanzee.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/aanzee.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/config.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/aanzee.h Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * Update keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c Co-Authored-By: westfoxtrot <17062872+westfoxtrot@users.noreply.github.com> * refactored keymaps * fixed typo --- keyboards/westfoxtrot/aanzee/aanzee.c | 52 +++++++ keyboards/westfoxtrot/aanzee/aanzee.h | 65 ++++++++ keyboards/westfoxtrot/aanzee/config.h | 142 ++++++++++++++++++ keyboards/westfoxtrot/aanzee/info.json | 18 +++ .../aanzee/keymaps/default/config.h | 19 +++ .../aanzee/keymaps/default/keymap.c | 48 ++++++ .../aanzee/keymaps/default/readme.md | 1 + .../aanzee/keymaps/iso-default/config.h | 19 +++ .../aanzee/keymaps/iso-default/keymap.c | 48 ++++++ .../aanzee/keymaps/iso-default/readme.md | 1 + .../westfoxtrot/aanzee/keymaps/via/config.h | 19 +++ .../westfoxtrot/aanzee/keymaps/via/keymap.c | 48 ++++++ .../westfoxtrot/aanzee/keymaps/via/readme.md | 1 + .../westfoxtrot/aanzee/keymaps/via/rules.mk | 70 +++++++++ keyboards/westfoxtrot/aanzee/readme.md | 15 ++ keyboards/westfoxtrot/aanzee/rules.mk | 65 ++++++++ 16 files changed, 631 insertions(+) create mode 100644 keyboards/westfoxtrot/aanzee/aanzee.c create mode 100644 keyboards/westfoxtrot/aanzee/aanzee.h create mode 100644 keyboards/westfoxtrot/aanzee/config.h create mode 100644 keyboards/westfoxtrot/aanzee/info.json create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/default/config.h create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/default/readme.md create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/iso-default/readme.md create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/via/config.h create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/via/readme.md create mode 100644 keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk create mode 100644 keyboards/westfoxtrot/aanzee/readme.md create mode 100644 keyboards/westfoxtrot/aanzee/rules.mk diff --git a/keyboards/westfoxtrot/aanzee/aanzee.c b/keyboards/westfoxtrot/aanzee/aanzee.c new file mode 100644 index 000000000000..0dc1199be9fa --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/aanzee.c @@ -0,0 +1,52 @@ +/* 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 "aanzee.h" + + +void led_set_kb(uint8_t usb_led) { + +if (usb_led & (1<. +*/ +#ifndef AANZEE_H +#define AANZEE_H + +#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. +*/ +// readability + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0F, 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, K2C, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ + {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, ___, K2C, K2D, K2E, ___}, \ + {K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, 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, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, 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, ___, K1D, K1E, ___}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, ___}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D, K4E, ___} \ +} + +void matrix_init_user(void); +void matrix_scan_user(void); + +#endif diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h new file mode 100644 index 000000000000..3959066b2222 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -0,0 +1,142 @@ +/* +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 0xAA01 +#define DEVICE_VER 0x0001 +#define MANUFACTURER westfoxtrot +#define PRODUCT aanzee +#define DESCRIPTION QMK Firmware for the Aanzee PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B4,D7,D6,D4,B3} +#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 9 + #define RGBLIGHT_HUE_STEP 12 + #define RGBLIGHT_SAT_STEP 25 + #define RGBLIGHT_VAL_STEP 12 + #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 +#define RGBW + +/* 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. + * + */ + + +//dynamic keymap and via support + +#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*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/westfoxtrot/aanzee/info.json b/keyboards/westfoxtrot/aanzee/info.json new file mode 100644 index 000000000000..d6734d620b42 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "aanzee", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "key_count": 68, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"\u21e7 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":"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}] + }, + "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}] + }, + } +} +} diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/config.h b/keyboards/westfoxtrot/aanzee/keymaps/default/config.h new file mode 100644 index 000000000000..35ebb6871d62 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* 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 + +// place overrides here diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c new file mode 100644 index 000000000000..4b7a9f208090 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* 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( + 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_HOME,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_END, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_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_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + + [_F1] = LAYOUT_ansi( + 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_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,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; + } diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/readme.md b/keyboards/westfoxtrot/aanzee/keymaps/default/readme.md new file mode 100644 index 000000000000..77137f2f0040 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for aanzee \ No newline at end of file diff --git a/keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h new file mode 100644 index 000000000000..386a2fd57de4 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-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/aanzee/keymaps/iso-default/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c new file mode 100644 index 000000000000..79628eb9012a --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c @@ -0,0 +1,48 @@ +/* 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( + 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_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_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_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_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + + [_F1] = LAYOUT_iso( + 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,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______,_______) + }; + + 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/aanzee/keymaps/iso-default/readme.md b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/readme.md new file mode 100644 index 000000000000..77137f2f0040 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/readme.md @@ -0,0 +1 @@ +# The default keymap for aanzee \ No newline at end of file diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/config.h b/keyboards/westfoxtrot/aanzee/keymaps/via/config.h new file mode 100644 index 000000000000..35ebb6871d62 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* 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 + +// place overrides here diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c new file mode 100644 index 000000000000..4b7a9f208090 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* 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( + 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_HOME,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_END, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_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_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + + [_F1] = LAYOUT_ansi( + 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_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,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; + } diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/readme.md b/keyboards/westfoxtrot/aanzee/keymaps/via/readme.md new file mode 100644 index 000000000000..d5c8b708defb --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default keymap for aanzee with via support diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk new file mode 100644 index 000000000000..efd8bd14ded9 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk @@ -0,0 +1,70 @@ +# 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 + +# 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 +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +#add files needed for via + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/westfoxtrot/aanzee/readme.md b/keyboards/westfoxtrot/aanzee/readme.md new file mode 100644 index 000000000000..b97f458639bd --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/readme.md @@ -0,0 +1,15 @@ +# aanzee + +![aanzee](https://cablecardesigns.co/portfolio-posts/aanzee) + +custom pcb for the aanzee keyboard + + Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) + Hardware Supported: aanzee PCB + Hardware Availability: with group buy + +Make example for this keyboard (after setting up your build environment): + + make westfoxtrot/aanzee: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/aanzee/rules.mk b/keyboards/westfoxtrot/aanzee/rules.mk new file mode 100644 index 000000000000..cdea2a265736 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/rules.mk @@ -0,0 +1,65 @@ +# 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 + +# 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 +# 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + From 6a63b67cde63fc994a7adcd5be0dfd3d5733aaa9 Mon Sep 17 00:00:00 2001 From: Mattia Dal Ben Date: Wed, 30 Jan 2019 20:02:05 +0100 Subject: [PATCH 259/458] [Keyboard] Redox Wireless configurator bugfix (#4961) * Fixed wrong build instruction * Updated info.json file --- keyboards/redox_w/info.json | 86 ++++++++++++++++++++++++++++++++++++- keyboards/redox_w/readme.md | 2 +- 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/keyboards/redox_w/info.json b/keyboards/redox_w/info.json index 5bc65b5d98de..b7694a2bbd5e 100644 --- a/keyboards/redox_w/info.json +++ b/keyboards/redox_w/info.json @@ -6,7 +6,91 @@ "height": 6.25, "layouts": { "LAYOUT": { - "layout": [{"label":"[L2] `", "x":0, "y":0.375, "w":1.25}, {"label":"!", "x":1.25, "y":0.375}, {"label":"@", "x":2.25, "y":0.125}, {"label":"#", "x":3.25, "y":0}, {"label":"$", "x":4.25, "y":0.125}, {"label":"%", "x":5.25, "y":0.25}, {"label":"[L1]", "x":6.25, "y":0.75}, {"label":"[L1]", "x":11.25, "y":0.75}, {"label":"^", "x":12.25, "y":0.25}, {"label":"&", "x":13.25, "y":0.125}, {"label":"*", "x":14.25, "y":0}, {"label":"(", "x":15.25, "y":0.125}, {"label":")", "x":16.25, "y":0.375}, {"label":"[L2] -", "x":17.25, "y":0.375, "w":1.25}, {"label":"Tab", "x":0, "y":1.375, "w":1.25}, {"label":"Q", "x":1.25, "y":1.375}, {"label":"W", "x":2.25, "y":1.125}, {"label":"E", "x":3.25, "y":1}, {"label":"R", "x":4.25, "y":1.125}, {"label":"T", "x":5.25, "y":1.25}, {"label":"[", "x":6.25, "y":1.75, "h":1.5}, {"label":"]", "x":11.25, "y":1.75, "h":1.5}, {"label":"Y", "x":12.25, "y":1.25}, {"label":"U", "x":13.25, "y":1.125}, {"label":"I", "x":14.25, "y":1}, {"label":"O", "x":15.25, "y":1.125}, {"label":"P", "x":16.25, "y":1.375}, {"label":"=", "x":17.25, "y":1.375, "w":1.25}, {"label":"Esc", "x":0, "y":2.375, "w":1.25}, {"label":"A", "x":1.25, "y":2.375}, {"label":"S", "x":2.25, "y":2.125}, {"label":"D", "x":3.25, "y":2}, {"label":"F", "x":4.25, "y":2.125}, {"label":"G", "x":5.25, "y":2.25}, {"label":"PgUp", "x":6.75, "y":3.75}, {"label":"End", "x":10.75, "y":3.75}, {"label":"H", "x":12.25, "y":2.25}, {"label":"J", "x":13.25, "y":2.125}, {"label":"K", "x":14.25, "y":2}, {"label":"L", "x":15.25, "y":2.125}, {"label":":", "x":16.25, "y":2.375}, {"label":"'", "x":17.25, "y":2.375, "w":1.25}, {"label":"Shift", "x":0, "y":3.375, "w":1.25}, {"label":"Z", "x":1.25, "y":3.375}, {"label":"X", "x":2.25, "y":3.125}, {"label":"C", "x":3.25, "y":3}, {"label":"V", "x":4.25, "y":3.125}, {"label":"B", "x":5.25, "y":3.25}, {"label":"PgDn", "x":7.75, "y":3.75}, {"label":"Home", "x":9.75, "y":3.75}, {"label":"N", "x":12.25, "y":3.25}, {"label":"M", "x":13.25, "y":3.125}, {"label":"<", "x":14.25, "y":3}, {"label":">", "x":15.25, "y":3.125}, {"label":"?", "x":16.25, "y":3.375}, {"label":"Shift", "x":17.25, "y":3.375, "w":1.25}, {"label":"GUI", "x":0.25, "y":4.375}, {"label":"+", "x":1.25, "y":4.375}, {"label":"-", "x":2.25, "y":4.125}, {"label":"[Alt] *", "x":3.25, "y":4}, {"label":"[Ctrl] /", "x":5.5, "y":5.25, "w":1.25}, {"label":"Backspace", "x":6.75, "y":4.75, "h":1.5}, {"label":"Del", "x":7.75, "y":4.75, "h":1.5}, {"label":"Enter", "x":9.75, "y":4.75, "h":1.5}, {"label":"Space", "x":10.75, "y":4.75, "h":1.5}, {"label":"Alt", "x":11.75, "y":5.25, "w":1.25}, {"label":"Left", "x":14.25, "y":4}, {"label":"Down", "x":15.25, "y":4.125}, {"label":"Up", "x":16.25, "y":4.375}, {"label":"Right", "x":17.25, "y":4.375}] + "layout": [ + {"label":"_Nav || `", "x":0, "y":0.375, "w":1.25}, + {"label":"1", "x":1.25, "y":0.375}, + {"label":"2", "x":2.25, "y":0.125}, + {"label":"3", "x":3.25, "y":0}, + {"label":"4", "x":4.25, "y":0.125}, + {"label":"5", "x":5.25, "y":0.25}, + + {"label":"6", "x":12.25, "y":0.25}, + {"label":"7", "x":13.25, "y":0.125}, + {"label":"8", "x":14.25, "y":0}, + {"label":"9", "x":15.25, "y":0.125}, + {"label":"0", "x":16.25, "y":0.375}, + {"label":"_Nav || -", "x":17.25, "y":0.375, "w":1.25}, + + {"label":"Tab", "x":0, "y":1.375, "w":1.25}, + {"label":"Q", "x":1.25, "y":1.375}, + {"label":"W", "x":2.25, "y":1.125}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1.125}, + {"label":"T", "x":5.25, "y":1.25}, + {"label":"MO(_SYMB)", "x":6.25, "y":0.75}, + + {"label":"MO(_SYMB)", "x":11.25, "y":0.75}, + {"label":"Y", "x":12.25, "y":1.25}, + {"label":"U", "x":13.25, "y":1.125}, + {"label":"I", "x":14.25, "y":1}, + {"label":"O", "x":15.25, "y":1.125}, + {"label":"P", "x":16.25, "y":1.375}, + {"label":"=", "x":17.25, "y":1.375, "w":1.25}, + + {"label":"Esc", "x":0, "y":2.375, "w":1.25}, + {"label":"A", "x":1.25, "y":2.375}, + {"label":"S", "x":2.25, "y":2.125}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2.125}, + {"label":"G", "x":5.25, "y":2.25}, + {"label":"[", "x":6.25, "y":1.75, "h":1.5}, + + {"label":"]", "x":11.25, "y":1.75, "h":1.5}, + {"label":"H", "x":12.25, "y":2.25}, + {"label":"J", "x":13.25, "y":2.125}, + {"label":"K", "x":14.25, "y":2}, + {"label":"L", "x":15.25, "y":2.125}, + {"label":";", "x":16.25, "y":2.375}, + {"label":"'", "x":17.25, "y":2.375, "w":1.25}, + + {"label":"Shift", "x":0, "y":3.375, "w":1.25}, + {"label":"Z", "x":1.25, "y":3.375}, + {"label":"X", "x":2.25, "y":3.125}, + {"label":"C", "x":3.25, "y":3}, + {"label":"V", "x":4.25, "y":3.125}, + {"label":"B", "x":5.25, "y":3.25}, + + {"label":"_Adjust/Page Up", "x":6.75, "y":3.75}, + {"label":"Page Down", "x":7.75, "y":3.75}, + + {"label":"Home", "x":9.75, "y":3.75}, + {"label":"_Adjust/End", "x":10.75, "y":3.75}, + + {"label":"N", "x":12.25, "y":3.25}, + {"label":"M", "x":13.25, "y":3.125}, + {"label":",", "x":14.25, "y":3}, + {"label":",", "x":15.25, "y":3.125}, + {"label":"\\", "x":16.25, "y":3.375}, + {"label":"Shift", "x":17.25, "y":3.375, "w":1.25}, + + {"label":"LGUI", "x":0.25, "y":4.375}, + {"label":"P+", "x":1.25, "y":4.375}, + {"label":"P-", "x":2.25, "y":4.125}, + {"label":"LAlt || P*", "x":3.25, "y":4}, + + {"label":"LCtrl || P/", "x":5.5, "y":5.25, "w":1.25}, + {"label":"Backspace", "x":6.75, "y":4.75, "h":1.5}, + {"label":"Delete", "x":7.75, "y":4.75, "h":1.5}, + + {"label":"Enter", "x":9.75, "y":4.75, "h":1.5}, + {"label":"Space", "x":10.75, "y":4.75, "h":1.5}, + {"label":"RAlt", "x":11.75, "y":5.25, "w":1.25}, + + {"label":"Left", "x":14.25, "y":4}, + {"label":"Down", "x":15.25, "y":4.125}, + {"label":"Up", "x":16.25, "y":4.375}, + {"label":"Right", "x":17.25, "y":4.375} + ] } } } diff --git a/keyboards/redox_w/readme.md b/keyboards/redox_w/readme.md index 83544a9fc274..a47fc2eadd8b 100644 --- a/keyboards/redox_w/readme.md +++ b/keyboards/redox_w/readme.md @@ -22,7 +22,7 @@ make redox_w:default Example of flashing this keyboard: ```sh -make redox_w/rev1:default:avrdude +make redox_w: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). From 58f3ce5254b7649774963d9f8d91816d165037c8 Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Wed, 30 Jan 2019 11:03:04 -0800 Subject: [PATCH 260/458] [Keyboard] Jj40 doc (#4914) * Update README.md * Update README.md * Update README.md * Update README.md --- keyboards/jj40/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md index 26d551cf7247..ed1ea90fe7c4 100644 --- a/keyboards/jj40/README.md +++ b/keyboards/jj40/README.md @@ -69,3 +69,16 @@ Windows sometimes doesn't recognize the jj40. The easiest way of flashing a new 3. If you get an error such as "Resource Unavailable" when attemting to flash on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` for more info. + +## Recovery +If you flash a bad hex (e.g. you have a V1 board without RGB and compile/flash blindly without editing your rules.mk), your jj40 is now semi-bricked and you're stuck unless you have access to an ISP. The [ISP Flashing Guide](https://docs.qmk.fm/#/isp_flashing_guide) contains very good (but somewhat generalized) information. However, the instructions below should get you up and running provided you have an Arduino or clone. + +### Arduino Setup +1. Upload the ArduinoISP sketch onto your Arduino board (https://www.arduino.cc/en/Tutorial/ArduinoISP). +2. Wire the Arduino to the jj40. Match the data pins on the Arduino to those on the jj40. "RST" usually goes to D10 on the Arduino. I didn't need a capacitor when using my Uno. +![Imgur](https://i.imgur.com/oLWJOkQ.jpg) +3. Get a working bootloader from https://blog.winkeyless.kr/m/152. The file is called "main.hex" from the archive called "ps2avrGB_bootloader_161215.zip" Copy "main.hex" to your qmk folder. +4. Burn the bootloader with the following command +` avrdude -b 19200 -c avrisp -p atmega32 -v -e -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m -U flash:w:main.hex:i -P comPORT` +Change `comPORT` to whatever port is used by the Arduino (e.g. `com11` in Windows or `/dev/ttyACM0` in Linux). Use Device Manager in Windows to find the port being used. Use `ls /dev/tty*` in Linux. +5. If this process is successful, you should now be able to upload normally. From 19c504662efd1139ffbf2aa05ce93ee73e121738 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Thu, 31 Jan 2019 04:18:35 +0800 Subject: [PATCH 261/458] [Keyboard] add dz60rgb keyboard (#4992) * 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 --- .../boards/GENERIC_STM32_F303XC/board.c | 126 ++ .../boards/GENERIC_STM32_F303XC/board.h | 1187 +++++++++++++++++ .../boards/GENERIC_STM32_F303XC/board.mk | 5 + keyboards/dztech/dz60rgb/bootloader_defs.h | 7 + keyboards/dztech/dz60rgb/chconf.h | 520 ++++++++ keyboards/dztech/dz60rgb/config.h | 36 + keyboards/dztech/dz60rgb/dz60rgb.c | 172 +++ keyboards/dztech/dz60rgb/dz60rgb.h | 16 + keyboards/dztech/dz60rgb/halconf.h | 388 ++++++ keyboards/dztech/dz60rgb/info.json | 16 + .../dztech/dz60rgb/keymaps/default/keymap.c | 165 +++ keyboards/dztech/dz60rgb/mcuconf.h | 257 ++++ keyboards/dztech/dz60rgb/readme.md | 15 + keyboards/dztech/dz60rgb/rules.mk | 57 + 14 files changed, 2967 insertions(+) create mode 100644 keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c create mode 100644 keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h create mode 100644 keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk create mode 100644 keyboards/dztech/dz60rgb/bootloader_defs.h create mode 100644 keyboards/dztech/dz60rgb/chconf.h create mode 100644 keyboards/dztech/dz60rgb/config.h create mode 100644 keyboards/dztech/dz60rgb/dz60rgb.c create mode 100644 keyboards/dztech/dz60rgb/dz60rgb.h create mode 100644 keyboards/dztech/dz60rgb/halconf.h create mode 100644 keyboards/dztech/dz60rgb/info.json create mode 100644 keyboards/dztech/dz60rgb/keymaps/default/keymap.c create mode 100644 keyboards/dztech/dz60rgb/mcuconf.h create mode 100644 keyboards/dztech/dz60rgb/readme.md create mode 100644 keyboards/dztech/dz60rgb/rules.mk diff --git a/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c new file mode 100644 index 000000000000..4331155df4b6 --- /dev/null +++ b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c @@ -0,0 +1,126 @@ +/* + 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. +*/ + +#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_SDC || defined(__DOXYGEN__) +/** + * @brief SDC card detection. + */ +bool sdc_lld_is_card_inserted(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief SDC card write protection detection. + */ +bool sdc_lld_is_write_protected(SDCDriver *sdcp) { + + (void)sdcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif /* HAL_USE_SDC */ + +#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/dztech/boards/GENERIC_STM32_F303XC/board.h b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h new file mode 100644 index 000000000000..988e6af34745 --- /dev/null +++ b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h @@ -0,0 +1,1187 @@ +/* + 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 _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for Clueboard 60% Keyboard + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F303XC +#define BOARD_NAME "DZ60RGB PCB" + +/* + * Board oscillators-related settings. + * NOTE: LSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 0U +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 8000000U +#endif + +// #define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F303xC + +/* + * IO pins assignments. + */ +#define GPIOA_PIN0 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_PIN13 13U +#define GPIOB_PIN14 14U +#define GPIOB_PIN15 15U + +#define GPIOC_PIN0 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_PIN6 6U +#define GPIOC_PIN7 7U +#define GPIOC_PIN8 8U +#define GPIOC_PIN9 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_PIN14 14U +#define GPIOC_PIN15 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_I2C2_SDA 0U +#define GPIOF_I2C2_SCL 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 + +#define GPIOG_PIN0 0U +#define GPIOG_PIN1 1U +#define GPIOG_PIN2 2U +#define GPIOG_PIN3 3U +#define GPIOG_PIN4 4U +#define GPIOG_PIN5 5U +#define GPIOG_PIN6 6U +#define GPIOG_PIN7 7U +#define GPIOG_PIN8 8U +#define GPIOG_PIN9 9U +#define GPIOG_PIN10 10U +#define GPIOG_PIN11 11U +#define GPIOG_PIN12 12U +#define GPIOG_PIN13 13U +#define GPIOG_PIN14 14U +#define GPIOG_PIN15 15U + +#define GPIOH_PIN0 0U +#define GPIOH_PIN1 1U +#define GPIOH_PIN2 2U +#define GPIOH_PIN3 3U +#define GPIOH_PIN4 4U +#define GPIOH_PIN5 5U +#define GPIOH_PIN6 6U +#define GPIOH_PIN7 7U +#define GPIOH_PIN8 8U +#define GPIOH_PIN9 9U +#define GPIOH_PIN10 10U +#define GPIOH_PIN11 11U +#define GPIOH_PIN12 12U +#define GPIOH_PIN13 13U +#define GPIOH_PIN14 14U +#define GPIOH_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_L3GD20_SDI PAL_LINE(GPIOA, 7U) +#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_PIN6 PAL_LINE(GPIOF, 0U) +#define LINE_PIN7 PAL_LINE(GPIOF, 1U) + +#define LINE_CAPS_LOCK PAL_LINE(GPIOB, 7U) + + +/* + * 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 - NC + * PA1 - NC + * PA2 - COL1 + * PA3 - COL2 + * PA4 - SPEAKER1 + * PA5 - SPEAKER2 + * PA6 - COL3 + * PA7 - COL8 + * PA8 - COL6 + * PA9 - COL7 + * PA10 - ROW5 + * PA11 - USB_DM (alternate 14). + * PA12 - USB_DP (alternate 14). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - ROW4 + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_PIN0) | \ + PIN_MODE_ALTERNATE(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_ALTERNATE(GPIOA_USB_DM) | \ + PIN_MODE_ALTERNATE(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_PIN0) | \ + 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_PIN0) | \ + PIN_OSPEED_HIGH(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_HIGH(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_PIN0) | \ + PIN_PUPDR_FLOATING(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_FLOATING(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_PIN0) | \ + 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_PIN0, 0) | \ + PIN_AFIO_AF(GPIOA_PIN1, 1) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0) | \ + PIN_AFIO_AF(GPIOA_PIN5, 5) | \ + PIN_AFIO_AF(GPIOA_PIN6, 5) | \ + PIN_AFIO_AF(GPIOA_PIN7, 5)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 14) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 14) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (alternate 0). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 LSM303DLHC_SCL (alternate 4). + * PB7 - PIN7 LSM303DLHC_SDA (alternate 4). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - PIN13 (input pullup). + * PB14 - PIN14 (input pullup). + * PB15 - PIN15 (input pullup). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_ALTERNATE(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_ALTERNATE(GPIOB_PIN6) | \ + PIN_MODE_OUTPUT(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_INPUT(GPIOB_PIN13) | \ + PIN_MODE_INPUT(GPIOB_PIN14) | \ + PIN_MODE_INPUT(GPIOB_PIN15)) +#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_OPENDRAIN(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_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN15)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_HIGH(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_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN15)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOB_PIN6) | \ + PIN_PUPDR_PULLDOWN(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_PULLUP(GPIOB_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN15)) +#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_LOW(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_PIN13) | \ + PIN_ODR_HIGH(GPIOB_PIN14) | \ + PIN_ODR_HIGH(GPIOB_PIN15)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0) | \ + PIN_AFIO_AF(GPIOB_PIN6, 4) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0) | \ + PIN_AFIO_AF(GPIOB_PIN13, 0) | \ + PIN_AFIO_AF(GPIOB_PIN14, 0) | \ + PIN_AFIO_AF(GPIOB_PIN15, 0)) + +/* + * GPIOC setup: + * + * PC0 - PIN0 (input pullup). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - PIN6 (input pullup). + * PC7 - PIN7 (input pullup). + * PC8 - PIN8 (input pullup). + * PC9 - PIN9 (input pullup). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - PIN14 (input floating). + * PC15 - PIN15 (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_INPUT(GPIOC_PIN0) | \ + 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_INPUT(GPIOC_PIN6) | \ + PIN_MODE_INPUT(GPIOC_PIN7) | \ + PIN_MODE_INPUT(GPIOC_PIN8) | \ + PIN_MODE_INPUT(GPIOC_PIN9) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_PIN14) | \ + PIN_MODE_INPUT(GPIOC_PIN15)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_PIN0) | \ + 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_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN15)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOC_PIN0) | \ + 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_VERYLOW(GPIOC_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_PIN14) | \ + PIN_OSPEED_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_PULLUP(GPIOC_PIN0) | \ + 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_PULLUP(GPIOC_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_PIN14) | \ + PIN_PUPDR_FLOATING(GPIOC_PIN15)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_PIN0) | \ + 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_HIGH(GPIOC_PIN6) | \ + PIN_ODR_HIGH(GPIOC_PIN7) | \ + PIN_ODR_HIGH(GPIOC_PIN8) | \ + PIN_ODR_HIGH(GPIOC_PIN9) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_PIN14) | \ + PIN_ODR_HIGH(GPIOC_PIN15)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_PIN0, 0) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0) | \ + PIN_AFIO_AF(GPIOC_PIN6, 0) | \ + PIN_AFIO_AF(GPIOC_PIN7, 0)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_PIN8, 0) | \ + PIN_AFIO_AF(GPIOC_PIN9, 0) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0) | \ + PIN_AFIO_AF(GPIOC_PIN14, 0) | \ + PIN_AFIO_AF(GPIOC_PIN15, 0)) + +/* + * 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). + * PD11 - 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, 0) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 L3GD20_CS (output pushpull maximum). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (output pushpull maximum). + * PE9 - PIN9 (output pushpull maximum). + * PE10 - PIN10 (output pushpull maximum). + * PE11 - PIN11 (output pushpull maximum). + * PE12 - PIN12 (output pushpull maximum). + * PE13 - PIN13 (output pushpull maximum). + * PE14 - PIN14 (output pushpull maximum). + * PE15 - PIN15 (output pushpull maximum). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) |\ + PIN_MODE_OUTPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) |\ + PIN_MODE_INPUT(GPIOE_PIN5) |\ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_OUTPUT(GPIOE_PIN8) | \ + PIN_MODE_OUTPUT(GPIOE_PIN9) | \ + PIN_MODE_OUTPUT(GPIOE_PIN10) | \ + PIN_MODE_OUTPUT(GPIOE_PIN11) | \ + PIN_MODE_OUTPUT(GPIOE_PIN12) | \ + PIN_MODE_OUTPUT(GPIOE_PIN13) | \ + PIN_MODE_OUTPUT(GPIOE_PIN14) | \ + PIN_MODE_OUTPUT(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_HIGH(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) |\ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_HIGH(GPIOE_PIN8) | \ + PIN_OSPEED_HIGH(GPIOE_PIN9) | \ + PIN_OSPEED_HIGH(GPIOE_PIN10) | \ + PIN_OSPEED_HIGH(GPIOE_PIN11) | \ + PIN_OSPEED_HIGH(GPIOE_PIN12) | \ + PIN_OSPEED_HIGH(GPIOE_PIN13) | \ + PIN_OSPEED_HIGH(GPIOE_PIN14) | \ + PIN_OSPEED_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) |\ + PIN_PUPDR_FLOATING(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_FLOATING(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOE_PIN14) |\ + PIN_PUPDR_FLOATING(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_LOW(GPIOE_PIN8) | \ + PIN_ODR_LOW(GPIOE_PIN9) | \ + PIN_ODR_LOW(GPIOE_PIN10) | \ + PIN_ODR_LOW(GPIOE_PIN11) | \ + PIN_ODR_LOW(GPIOE_PIN12) | \ + PIN_ODR_LOW(GPIOE_PIN13) | \ + PIN_ODR_LOW(GPIOE_PIN14) | \ + PIN_ODR_LOW(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0) |\ + PIN_AFIO_AF(GPIOE_PIN3, 0) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0) |\ + PIN_AFIO_AF(GPIOE_PIN5, 0) |\ + PIN_AFIO_AF(GPIOE_PIN6, 0) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0)) + +/* + * GPIOF setup: + * + * PF0 - I2C2_SDA (input floating). + * PF1 - I2C2_SCL (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_I2C2_SDA) | \ + PIN_MODE_INPUT(GPIOF_I2C2_SCL) | \ + 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_I2C2_SDA) | \ + PIN_OTYPE_PUSHPULL(GPIOF_I2C2_SCL) | \ + 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_HIGH(GPIOF_I2C2_SDA) | \ + PIN_OSPEED_HIGH(GPIOF_I2C2_SCL) | \ + 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_I2C2_SDA) | \ + PIN_PUPDR_FLOATING(GPIOF_I2C2_SCL) | \ + 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_I2C2_SDA) | \ + PIN_ODR_HIGH(GPIOF_I2C2_SCL) | \ + 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_I2C2_SDA, 0) | \ + PIN_AFIO_AF(GPIOF_I2C2_SCL, 0) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0)) + +/* + * GPIOG setup: + * + * PG0 - PIN0 (input pullup). + * PG1 - PIN1 (input pullup). + * PG2 - PIN2 (input pullup). + * PG3 - PIN3 (input pullup). + * PG4 - PIN4 (input pullup). + * PG5 - PIN5 (input pullup). + * PG6 - PIN6 (input pullup). + * PG7 - PIN7 (input pullup). + * PG8 - PIN8 (input pullup). + * PG9 - PIN9 (input pullup). + * PG10 - PIN10 (input pullup). + * PG11 - PIN11 (input pullup). + * PG12 - PIN12 (input pullup). + * PG13 - PIN13 (input pullup). + * PG14 - PIN14 (input pullup). + * PG15 - PIN15 (input pullup). + */ +#define VAL_GPIOG_MODER (PIN_MODE_INPUT(GPIOG_PIN0) | \ + PIN_MODE_INPUT(GPIOG_PIN1) | \ + PIN_MODE_INPUT(GPIOG_PIN2) | \ + PIN_MODE_INPUT(GPIOG_PIN3) | \ + PIN_MODE_INPUT(GPIOG_PIN4) | \ + PIN_MODE_INPUT(GPIOG_PIN5) | \ + PIN_MODE_INPUT(GPIOG_PIN6) | \ + PIN_MODE_INPUT(GPIOG_PIN7) | \ + PIN_MODE_INPUT(GPIOG_PIN8) | \ + PIN_MODE_INPUT(GPIOG_PIN9) | \ + PIN_MODE_INPUT(GPIOG_PIN10) | \ + PIN_MODE_INPUT(GPIOG_PIN11) | \ + PIN_MODE_INPUT(GPIOG_PIN12) | \ + PIN_MODE_INPUT(GPIOG_PIN13) | \ + PIN_MODE_INPUT(GPIOG_PIN14) | \ + PIN_MODE_INPUT(GPIOG_PIN15)) +#define VAL_GPIOG_OTYPER (PIN_OTYPE_PUSHPULL(GPIOG_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOG_PIN15)) +#define VAL_GPIOG_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOG_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOG_PIN15)) +#define VAL_GPIOG_PUPDR (PIN_PUPDR_PULLUP(GPIOG_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOG_PIN15)) +#define VAL_GPIOG_ODR (PIN_ODR_HIGH(GPIOG_PIN0) | \ + PIN_ODR_HIGH(GPIOG_PIN1) | \ + PIN_ODR_HIGH(GPIOG_PIN2) | \ + PIN_ODR_HIGH(GPIOG_PIN3) | \ + PIN_ODR_HIGH(GPIOG_PIN4) | \ + PIN_ODR_HIGH(GPIOG_PIN5) | \ + PIN_ODR_HIGH(GPIOG_PIN6) | \ + PIN_ODR_HIGH(GPIOG_PIN7) | \ + PIN_ODR_HIGH(GPIOG_PIN8) | \ + PIN_ODR_HIGH(GPIOG_PIN9) | \ + PIN_ODR_HIGH(GPIOG_PIN10) | \ + PIN_ODR_HIGH(GPIOG_PIN11) | \ + PIN_ODR_HIGH(GPIOG_PIN12) | \ + PIN_ODR_HIGH(GPIOG_PIN13) | \ + PIN_ODR_HIGH(GPIOG_PIN14) | \ + PIN_ODR_HIGH(GPIOG_PIN15)) +#define VAL_GPIOG_AFRL (PIN_AFIO_AF(GPIOG_PIN0, 0) | \ + PIN_AFIO_AF(GPIOG_PIN1, 0) | \ + PIN_AFIO_AF(GPIOG_PIN2, 0) | \ + PIN_AFIO_AF(GPIOG_PIN3, 0) | \ + PIN_AFIO_AF(GPIOG_PIN4, 0) | \ + PIN_AFIO_AF(GPIOG_PIN5, 0) | \ + PIN_AFIO_AF(GPIOG_PIN6, 0) | \ + PIN_AFIO_AF(GPIOG_PIN7, 0)) +#define VAL_GPIOG_AFRH (PIN_AFIO_AF(GPIOG_PIN8, 0) | \ + PIN_AFIO_AF(GPIOG_PIN9, 0) | \ + PIN_AFIO_AF(GPIOG_PIN10, 0) | \ + PIN_AFIO_AF(GPIOG_PIN11, 0) | \ + PIN_AFIO_AF(GPIOG_PIN12, 0) | \ + PIN_AFIO_AF(GPIOG_PIN13, 0) | \ + PIN_AFIO_AF(GPIOG_PIN14, 0) | \ + PIN_AFIO_AF(GPIOG_PIN15, 0)) + +/* + * GPIOH setup: + * + * PH0 - PIN0 (input pullup). + * PH1 - PIN1 (input pullup). + * PH2 - PIN2 (input pullup). + * PH3 - PIN3 (input pullup). + * PH4 - PIN4 (input pullup). + * PH5 - PIN5 (input pullup). + * PH6 - PIN6 (input pullup). + * PH7 - PIN7 (input pullup). + * PH8 - PIN8 (input pullup). + * PH9 - PIN9 (input pullup). + * PH10 - PIN10 (input pullup). + * PH11 - PIN11 (input pullup). + * PH12 - PIN12 (input pullup). + * PH13 - PIN13 (input pullup). + * PH14 - PIN14 (input pullup). + * PH15 - PIN15 (input pullup). + */ +#define VAL_GPIOH_MODER (PIN_MODE_INPUT(GPIOH_PIN0) | \ + PIN_MODE_INPUT(GPIOH_PIN1) | \ + PIN_MODE_INPUT(GPIOH_PIN2) | \ + PIN_MODE_INPUT(GPIOH_PIN3) | \ + PIN_MODE_INPUT(GPIOH_PIN4) | \ + PIN_MODE_INPUT(GPIOH_PIN5) | \ + PIN_MODE_INPUT(GPIOH_PIN6) | \ + PIN_MODE_INPUT(GPIOH_PIN7) | \ + PIN_MODE_INPUT(GPIOH_PIN8) | \ + PIN_MODE_INPUT(GPIOH_PIN9) | \ + PIN_MODE_INPUT(GPIOH_PIN10) | \ + PIN_MODE_INPUT(GPIOH_PIN11) | \ + PIN_MODE_INPUT(GPIOH_PIN12) | \ + PIN_MODE_INPUT(GPIOH_PIN13) | \ + PIN_MODE_INPUT(GPIOH_PIN14) | \ + PIN_MODE_INPUT(GPIOH_PIN15)) +#define VAL_GPIOH_OTYPER (PIN_OTYPE_PUSHPULL(GPIOH_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOH_PIN15)) +#define VAL_GPIOH_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOH_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOH_PIN15)) +#define VAL_GPIOH_PUPDR (PIN_PUPDR_PULLUP(GPIOH_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOH_PIN15)) +#define VAL_GPIOH_ODR (PIN_ODR_HIGH(GPIOH_PIN0) | \ + PIN_ODR_HIGH(GPIOH_PIN1) | \ + PIN_ODR_HIGH(GPIOH_PIN2) | \ + PIN_ODR_HIGH(GPIOH_PIN3) | \ + PIN_ODR_HIGH(GPIOH_PIN4) | \ + PIN_ODR_HIGH(GPIOH_PIN5) | \ + PIN_ODR_HIGH(GPIOH_PIN6) | \ + PIN_ODR_HIGH(GPIOH_PIN7) | \ + PIN_ODR_HIGH(GPIOH_PIN8) | \ + PIN_ODR_HIGH(GPIOH_PIN9) | \ + PIN_ODR_HIGH(GPIOH_PIN10) | \ + PIN_ODR_HIGH(GPIOH_PIN11) | \ + PIN_ODR_HIGH(GPIOH_PIN12) | \ + PIN_ODR_HIGH(GPIOH_PIN13) | \ + PIN_ODR_HIGH(GPIOH_PIN14) | \ + PIN_ODR_HIGH(GPIOH_PIN15)) +#define VAL_GPIOH_AFRL (PIN_AFIO_AF(GPIOH_PIN0, 0) | \ + PIN_AFIO_AF(GPIOH_PIN1, 0) | \ + PIN_AFIO_AF(GPIOH_PIN2, 0) | \ + PIN_AFIO_AF(GPIOH_PIN3, 0) | \ + PIN_AFIO_AF(GPIOH_PIN4, 0) | \ + PIN_AFIO_AF(GPIOH_PIN5, 0) | \ + PIN_AFIO_AF(GPIOH_PIN6, 0) | \ + PIN_AFIO_AF(GPIOH_PIN7, 0)) +#define VAL_GPIOH_AFRH (PIN_AFIO_AF(GPIOH_PIN8, 0) | \ + PIN_AFIO_AF(GPIOH_PIN9, 0) | \ + PIN_AFIO_AF(GPIOH_PIN10, 0) | \ + PIN_AFIO_AF(GPIOH_PIN11, 0) | \ + PIN_AFIO_AF(GPIOH_PIN12, 0) | \ + PIN_AFIO_AF(GPIOH_PIN13, 0) | \ + PIN_AFIO_AF(GPIOH_PIN14, 0) | \ + PIN_AFIO_AF(GPIOH_PIN15, 0)) + + +/* + * USB bus activation macro, required by the USB driver. + */ +// #define usb_lld_connect_bus(usbp) +#define usb_lld_connect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_ALTERNATE(14))) +// #define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT) +/* + * USB bus de-activation macro, required by the USB driver. + */ +// #define usb_lld_disconnect_bus(usbp) +#define usb_lld_disconnect_bus(usbp) (palSetPadMode(GPIOA, GPIOA_USB_DP, PAL_MODE_OUTPUT_PUSHPULL)); palClearPad(GPIOA, GPIOA_USB_DP) +// #define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12) + +#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/dztech/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk new file mode 100644 index 000000000000..43377629a3cc --- /dev/null +++ b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F303XC diff --git a/keyboards/dztech/dz60rgb/bootloader_defs.h b/keyboards/dztech/dz60rgb/bootloader_defs.h new file mode 100644 index 000000000000..3b0e9d20a6ab --- /dev/null +++ b/keyboards/dztech/dz60rgb/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/dz60rgb/chconf.h b/keyboards/dztech/dz60rgb/chconf.h new file mode 100644 index 000000000000..1d9f12ff1f8b --- /dev/null +++ b/keyboards/dztech/dz60rgb/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/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h new file mode 100644 index 000000000000..167b67a87d58 --- /dev/null +++ b/keyboards/dztech/dz60rgb/config.h @@ -0,0 +1,36 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1219 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DOU +#define PRODUCT DZ60RGB +#define DESCRIPTION DZ60 ARM RGB keyboard +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } +#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } + +/* #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 +#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 new file mode 100644 index 000000000000..4a4893b8e41b --- /dev/null +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -0,0 +1,172 @@ +#include "dz60rgb.h" +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_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, E_15, D_15, F_15}, + {0, H_15, G_15, I_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)}, {17.23*13, 0}, 1}, + {{0|(12<<4)}, {17.23*12, 0}, 1}, + {{0|(11<<4)}, {17.23*11, 0}, 1}, + {{0|(10<<4)}, {17.23*10, 0}, 1}, + {{0|(9<<4)}, {17.23*9, 0}, 1}, + {{0|(8<<4)}, {17.23*8, 0}, 1}, + {{0|(7<<4)}, {17.23*7, 0}, 1}, + {{0|(6<<4)}, { 17.23*6, 0}, 1}, + {{0|(5<<4)}, { 17.23*5, 0}, 1}, + {{0|(4<<4)}, { 17.23*4, 0}, 1}, + {{0|(3<<4)}, { 17.23*3, 0}, 1}, + {{0|(2<<4)}, { 17.23*2, 0}, 1}, + {{0|(1<<4)}, { 17.23*1, 0}, 1}, + {{0|(0<<4)}, { 17.23*0, 0}, 1}, + + {{1|(13<<4)}, {17.23*13, 16}, 1}, + {{1|(12<<4)}, {17.23*12, 16}, 0}, + {{1|(11<<4)}, {17.23*11, 16}, 0}, + {{1|(10<<4)}, {17.23*10, 16}, 0}, + {{1|(9<<4)}, {17.23*9, 16}, 0}, + {{1|(8<<4)}, {17.23*8, 16}, 0}, + {{1|(7<<4)}, {17.23*7, 16}, 0}, + {{1|(6<<4)}, { 17.23*6, 16}, 0}, + {{1|(5<<4)}, { 17.23*5, 16}, 0}, + {{1|(4<<4)}, { 17.23*4, 16}, 0}, + {{1|(3<<4)}, { 17.23*3, 16}, 0}, + {{1|(2<<4)}, { 17.23*2, 16}, 0}, + {{1|(1<<4)}, { 17.23*1, 16}, 0}, + {{1|(0<<4)}, { 17.23*0, 16}, 1}, + + {{2|(13<<4)}, {17.23*13, 32}, 1}, + {{2|(11<<4)}, {17.23*11, 32}, 0}, + {{2|(10<<4)}, {17.23*10, 32}, 0}, + {{2|(9<<4)}, {17.23*9, 32}, 0}, + {{2|(8<<4)}, {17.23*8, 32}, 0}, + {{2|(7<<4)}, {17.23*7, 32}, 0}, + {{2|(6<<4)}, { 17.23*6, 32}, 0}, + {{2|(5<<4)}, { 17.23*5, 32}, 0}, + {{2|(4<<4)}, { 17.23*4, 32}, 0}, + {{2|(3<<4)}, { 17.23*3, 32}, 0}, + {{2|(2<<4)}, { 17.23*2, 32}, 0}, + {{2|(1<<4)}, { 17.23*1, 32}, 0}, + {{2|(0<<4)}, { 17.23*0, 32}, 1}, + + {{3|(13<<4)}, {17.23*13, 48}, 1}, + {{3|(11<<4)}, {17.23*11, 48}, 0}, + {{3|(10<<4)}, {17.23*10, 48}, 0}, + {{3|(9<<4)}, {17.23*9, 48}, 0}, + {{3|(8<<4)}, {17.23*8, 48}, 0}, + {{3|(7<<4)}, {17.23*7, 48}, 0}, + {{3|(6<<4)}, { 17.23*6, 48}, 0}, + {{3|(5<<4)}, { 17.23*5, 48}, 0}, + {{3|(4<<4)}, { 17.23*4, 48}, 0}, + {{3|(3<<4)}, { 17.23*3, 48}, 0}, + {{3|(2<<4)}, { 17.23*2, 48}, 0}, + {{3|(1<<4)}, { 17.23*1, 48}, 0}, + {{3|(0<<4)}, { 17.23*0, 48}, 1}, + + {{4|(13<<4)}, {17.23*13, 64}, 1}, + {{4|(11<<4)}, {17.23*11, 64}, 1}, + {{4|(10<<4)}, {17.23*10, 64}, 1}, + {{4|(9<<4)}, {17.23*9, 64}, 1}, + {{4|(8<<4)}, {17.23*8, 64}, 1}, + {{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}, + +}; + +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/dz60rgb/dz60rgb.h b/keyboards/dztech/dz60rgb/dz60rgb.h new file mode 100644 index 000000000000..a029933f1fff --- /dev/null +++ b/keyboards/dztech/dz60rgb/dz60rgb.h @@ -0,0 +1,16 @@ +#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, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K48, 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, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/dztech/dz60rgb/halconf.h b/keyboards/dztech/dz60rgb/halconf.h new file mode 100644 index 000000000000..eda293c49b8b --- /dev/null +++ b/keyboards/dztech/dz60rgb/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/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json new file mode 100644 index 000000000000..47e705d5a2f8 --- /dev/null +++ b/keyboards/dztech/dz60rgb/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "dz60rgb", + "url": "", + "maintainer": "dz", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"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":6.25}, {"label":"Alt", "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/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c new file mode 100644 index 000000000000..8de71848d5e3 --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c @@ -0,0 +1,165 @@ +#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_LGUI, LM(1, MOD_LALT), 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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(5) , KC_LEFT, KC_DOWN, KC_RIGHT), + }; + + + +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</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 in From 1d49f76f15c9940dd1dce580c19bfda62548c980 Mon Sep 17 00:00:00 2001 From: Othi Date: Wed, 30 Jan 2019 21:01:18 +0000 Subject: [PATCH 262/458] space65-5001 init, small corrections to the total number of leds (#5006) --- keyboards/gray_studio/space65/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h index cb8ee3c01983..356e6a8cd809 100644 --- a/keyboards/gray_studio/space65/config.h +++ b/keyboards/gray_studio/space65/config.h @@ -59,7 +59,7 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN - #define RGBLED_NUM 5 + #define RGBLED_NUM 6 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 From c2080d3b0a56dc8c1678077ccaf84cd447fe2773 Mon Sep 17 00:00:00 2001 From: Rockman18 Date: Thu, 31 Jan 2019 00:42:30 +0100 Subject: [PATCH 263/458] [Keyboard][S65-X] BACKLIGHT_CAPS_LOCK (#4770) Replace buggy Caps Lock indicator implementation with new BACKLIGHT_CAPS_LOCK_INDICATOR feature. --- keyboards/s65_x/config.h | 6 ++++-- keyboards/s65_x/s65_x.c | 10 ++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/keyboards/s65_x/config.h b/keyboards/s65_x/config.h index 66bbd6a35920..486765273057 100644 --- a/keyboards/s65_x/config.h +++ b/keyboards/s65_x/config.h @@ -4,7 +4,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT S65-X-RGB +#define PRODUCT S65-X RGB #define DESCRIPTION QMK keyboard firmware for S65-X RGB #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 @@ -22,7 +22,8 @@ /* number of backlight levels */ #define BACKLIGHT_PIN B7 -#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_CAPS_LOCK #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS @@ -31,6 +32,7 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20 +#define RGBLIGHT_SLEEP /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/s65_x/s65_x.c b/keyboards/s65_x/s65_x.c index 29073750c167..844f5cf28bb8 100644 --- a/keyboards/s65_x/s65_x.c +++ b/keyboards/s65_x/s65_x.c @@ -1,5 +1,4 @@ #include "s65_x.h" -#include "led.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -14,11 +13,6 @@ void matrix_scan_kb(void) { }; void led_set_kb(uint8_t usb_led) { - if (usb_led & (1< Date: Thu, 31 Jan 2019 09:12:43 +0700 Subject: [PATCH 264/458] update canoe/readme (#5014) fix command, pyusb is installed with pip, not brew. remove extra ` in command --- keyboards/canoe/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md index b8ddadea78f6..729ab1a0faa1 100644 --- a/keyboards/canoe/readme.md +++ b/keyboards/canoe/readme.md @@ -34,8 +34,8 @@ macOS: 3. Install the following packages: ``` brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + pip 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. From 8f6285d3b3fec9a5f68b15970dbbf644e97b12ec Mon Sep 17 00:00:00 2001 From: Boy_314 <32818287+Boy-314@users.noreply.github.com> Date: Wed, 30 Jan 2019 21:14:27 -0500 Subject: [PATCH 265/458] [Keyboard] 40percent.club's Half 'n' half keyboard port (#5005) * fixed arrow keys and left control * added right shift * latest version * reverted arrow keys * edited readme * added osu layer * updated osu layout * updated osu layout * added full arrow keys to osu layout * in case i mess up creating macros * added the best meme key in the world * added plover steno layer * updated boy314 layout * removed unused layers * added boy314 xd75 layout, inspired by preonic layout * added boy314 xd75 layout, inspired by preonic layout * version 2 of boy314's xd75 layout * added readme notes * updated readme for boy314 xd75 layout * qwerty support, brackets on bottom row, caps lock underglow * fixed readme/ * small changes to allow merging * minor changes to format * fixed up default readme * added numpad and tweaked bottom row * updated xd75 and preonic rev3 keymaps * added initial half n half files * fixed .h file * updated names * fixed layout in halfnhalf.h * fixed manu name, changed bootloader in rules.mk * removed redundancies in preonic and xd75 layouts * readme updated --- keyboards/40percentclub/half_n_half/config.h | 244 ++++++++++++++++++ .../40percentclub/half_n_half/half_n_half.c | 43 +++ .../40percentclub/half_n_half/half_n_half.h | 43 +++ keyboards/40percentclub/half_n_half/info.json | 0 .../half_n_half/keymaps/default/config.h | 19 ++ .../half_n_half/keymaps/default/keymap.c | 65 +++++ .../half_n_half/keymaps/default/readme.md | 1 + keyboards/40percentclub/half_n_half/readme.md | 14 + keyboards/40percentclub/half_n_half/rules.mk | 81 ++++++ keyboards/preonic/keymaps/boy314/keymap.c | 52 ++-- keyboards/xd75/keymaps/boy_314/keymap.c | 17 +- 11 files changed, 551 insertions(+), 28 deletions(-) create mode 100644 keyboards/40percentclub/half_n_half/config.h create mode 100644 keyboards/40percentclub/half_n_half/half_n_half.c create mode 100644 keyboards/40percentclub/half_n_half/half_n_half.h create mode 100644 keyboards/40percentclub/half_n_half/info.json create mode 100644 keyboards/40percentclub/half_n_half/keymaps/default/config.h create mode 100644 keyboards/40percentclub/half_n_half/keymaps/default/keymap.c create mode 100644 keyboards/40percentclub/half_n_half/keymaps/default/readme.md create mode 100644 keyboards/40percentclub/half_n_half/readme.md create mode 100644 keyboards/40percentclub/half_n_half/rules.mk diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h new file mode 100644 index 000000000000..1c4298bc3894 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/config.h @@ -0,0 +1,244 @@ +/* +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x4A1F +#define MANUFACTURER di0ib +#define PRODUCT half_n_half +#define DESCRIPTION A small split ortholinear custom keyboard with 2 thumb buttons + +/* key matrix size */ +#define MATRIX_ROWS 4*2 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* + * 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_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/40percentclub/half_n_half/half_n_half.c b/keyboards/40percentclub/half_n_half/half_n_half.c new file mode 100644 index 000000000000..c4e6a4ce0798 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/half_n_half.c @@ -0,0 +1,43 @@ +/* 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 "half_n_half.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/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h new file mode 100644 index 000000000000..6cec5992908c --- /dev/null +++ b/keyboards/40percentclub/half_n_half/half_n_half.h @@ -0,0 +1,43 @@ +/* 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 + +#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, 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 \ +) { \ + { 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 }, \ +\ + { 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 } \ +} diff --git a/keyboards/40percentclub/half_n_half/info.json b/keyboards/40percentclub/half_n_half/info.json new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/40percentclub/half_n_half/keymaps/default/config.h b/keyboards/40percentclub/half_n_half/keymaps/default/config.h new file mode 100644 index 000000000000..c8e4334124ef --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 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/40percentclub/half_n_half/keymaps/default/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/default/keymap.c new file mode 100644 index 000000000000..2ab9a8c982fc --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* 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 + +// 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_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, KC_RCTL, 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_LALT, KC_RALT, 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_LGUI, KC_APP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_SPC, KC_SPC + ), +}; + +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/40percentclub/half_n_half/keymaps/default/readme.md b/keyboards/40percentclub/half_n_half/keymaps/default/readme.md new file mode 100644 index 000000000000..58a457f1bc84 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for half_n_half \ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/readme.md b/keyboards/40percentclub/half_n_half/readme.md new file mode 100644 index 000000000000..689b6fe816e8 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/readme.md @@ -0,0 +1,14 @@ +# half_n_half + +![half_n_half](https://2.bp.blogspot.com/-akouSRzGKQw/WutIH4qV0nI/AAAAAAACRqA/D1Gx3i1UWlccMCd0VS8td0ckWjCixrSuQCLcBGAs/s1600/b.jpg) + +A small split ortho board with two thumb keys + +Keyboard Maintainer: [Boy_314](https://github.com/boy-314) +Hardware Availability: http://www.40percent.club/2018/07/half-n-half.html + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/half_n_half: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/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk new file mode 100644 index 000000000000..bd0d8f808cd4 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/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 = 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) diff --git a/keyboards/preonic/keymaps/boy314/keymap.c b/keyboards/preonic/keymaps/boy314/keymap.c index 67292bdb3e35..04404f69f9a0 100644 --- a/keyboards/preonic/keymaps/boy314/keymap.c +++ b/keyboards/preonic/keymaps/boy314/keymap.c @@ -21,7 +21,7 @@ // define layers #define _QWERTY 0 #define _DVORAK 1 -#define _OSU 2 +#define _ARROWS 2 #define _LOWER 10 #define _RAISE 11 #define _ADJUST 12 @@ -29,12 +29,9 @@ // macro shortcuts #define QWERTY TO(_QWERTY) #define DVORAK TO(_DVORAK) -#define OSU TO(_OSU) #define LOWER M(_LOWER) #define RAISE M(_RAISE) - -#define _______ KC_TRNS -#define XXXXXXX KC_NO +#define ARROWS TO(_ARROWS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -48,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | Del | Alt | GUI |Lower | Raise| Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ @@ -57,7 +54,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_ENT, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ 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_DEL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ ), /* Dvorak @@ -70,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | Del | Alt | GUI |Lower | Raise| Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ @@ -79,7 +76,29 @@ 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_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, 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_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, \ - KC_LCTL, KC_DEL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +/* ARROWS + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_ARROWS] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Lower @@ -117,13 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = { - {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_UP, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, [_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, \ @@ -143,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff|Dvorak| | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | OSU | | | | | | | | | | + * | |ARROWS| | | | | | | | | | * `-----------------------------------------------------------------------------------' */ @@ -152,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, 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, DVORAK, _______, _______, _______, _______, \ - _______, OSU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, ARROWS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; @@ -175,10 +187,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) } return false; break; - case OSU: + case ARROWS: if (record->event.pressed) { - set_single_persistent_default_layer(_OSU); + set_single_persistent_default_layer(_ARROWS); } return false; break; diff --git a/keyboards/xd75/keymaps/boy_314/keymap.c b/keyboards/xd75/keymaps/boy_314/keymap.c index 1de733f0f6ef..71c72514a143 100644 --- a/keyboards/xd75/keymaps/boy_314/keymap.c +++ b/keyboards/xd75/keymaps/boy_314/keymap.c @@ -17,11 +17,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .--------------------------------------------------------------------------------------------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | ' | . | . | P | Y | [ | \ | ] | F | G | C | R | L | / | + * | TAB | ' | . | . | P | Y | [ | UP | ] | F | G | C | R | L | / | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | O | E | U | I | HOME | DEL | PG UP | D | H | T | N | S | ENTER | + * | CAP LK | A | O | E | U | I | LEFT | DOWN | RIGHT | D | H | T | N | S | ENTER | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | ; | Q | J | K | X | END | UP | PG DN | M | W | W | V | Z | RSHIFT | + * | LSHIFT | ; | Q | J | K | X | PG DN | UP | PG UP | M | W | W | V | Z | RSHIFT | * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| * | LCTRL | DEL | LALT | WIN | FN1 | SPACE | LEFT | DOWN | RIGHT | SPACE | FN2 | LEFT | DOWN | UP | RIGHT | * '--------------------------------------------------------------------------------------------------------------------------------------' @@ -29,9 +29,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DV] = { /* DVORAK */ { 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRC, KC_BSLS, KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_HOME, KC_DEL, KC_PGUP, 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_END, KC_UP, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC }, + { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRC, KC_UP, KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, + { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LEFT, KC_DOWN, KC_RGHT, 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_PGDN, KC_UP, KC_PGUP, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC }, { KC_LCTL, KC_DEL, KC_LALT, KC_LGUI, MO(_FN1),KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(_FN2),KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT }, }, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | | | | | | 1 | 2 | 3 | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | + | 0 | . | | | | | | | + * | | | | | | | 0 | + | . | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, KC_PLUS, KC_0, KC_DOT, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, KC_0, KC_PLUS, KC_DOT, _______, _______, _______, _______, _______, _______ }, }, /* FUNCTION1 @@ -125,6 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function From 4082d880bcf5b4dacafa688fefc4f1288c3046be Mon Sep 17 00:00:00 2001 From: zvecr Date: Thu, 31 Jan 2019 02:20:13 +0000 Subject: [PATCH 266/458] Fix file size check for parallel make (#5012) --- build_keyboard.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/build_keyboard.mk b/build_keyboard.mk index 1d60f3ad7984..0239a58b79b4 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -369,5 +369,6 @@ $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) # Default target. all: build check-size build: elf cpfirmware +check-size: build include $(TMK_PATH)/rules.mk From 9f63cd0d1de5c5ece532bdd343f8cf810ac36432 Mon Sep 17 00:00:00 2001 From: zvecr Date: Sat, 26 Jan 2019 18:03:58 +0000 Subject: [PATCH 267/458] Remove duplicate make invocations --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 45e47c003710..dd33357112d7 100644 --- a/Makefile +++ b/Makefile @@ -548,9 +548,10 @@ endif # it has to be there to allow parallel execution of the submake # This always tries to compile everything, even if error occurs in the middle # But we return the error code at the end, to trigger travis failures - $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) + # The sort at this point is to remove duplicates + $(foreach COMMAND,$(sort $(COMMANDS)),$(RUN_COMMAND)) if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; - $(foreach TEST,$(TESTS),$(RUN_TEST)) + $(foreach TEST,$(sort $(TESTS)),$(RUN_TEST)) if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi; # These no longer work because of the colon system From 87cbb1c552934de5573334ff56544137a37fcb2e Mon Sep 17 00:00:00 2001 From: Fredric Silberberg Date: Wed, 30 Jan 2019 22:27:46 -0800 Subject: [PATCH 268/458] Generalized nyquist layout for 5x12 boards. Removed duplicate readme.md that was cased the same and caused issues. --- keyboards/sirius/unigo66/readme.md | 17 ------------- .../community/ortho_5x12}/333fred/README.md | 8 +++--- .../community/ortho_5x12}/333fred/config.h | 1 - .../community/ortho_5x12}/333fred/keymap.c | 25 ++++++++----------- .../community/ortho_5x12}/333fred/rules.mk | 0 5 files changed, 14 insertions(+), 37 deletions(-) delete mode 100644 keyboards/sirius/unigo66/readme.md rename {keyboards/nyquist/keymaps => layouts/community/ortho_5x12}/333fred/README.md (92%) rename {keyboards/nyquist/keymaps => layouts/community/ortho_5x12}/333fred/config.h (83%) rename {keyboards/nyquist/keymaps => layouts/community/ortho_5x12}/333fred/keymap.c (88%) rename {keyboards/nyquist/keymaps => layouts/community/ortho_5x12}/333fred/rules.mk (100%) 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/nyquist/keymaps/333fred/README.md b/layouts/community/ortho_5x12/333fred/README.md similarity index 92% rename from keyboards/nyquist/keymaps/333fred/README.md rename to layouts/community/ortho_5x12/333fred/README.md index fa354bb4d3d3..f619effc6105 100644 --- a/keyboards/nyquist/keymaps/333fred/README.md +++ b/layouts/community/ortho_5x12/333fred/README.md @@ -1,6 +1,6 @@ -# 333fred's Nyquist Layout +# 333fred's 5x12 Layout -This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../../../../layouts/community/ergodox/333fred/README.md). It doesn't have all of my VS extensions, as I have my nyquist at home, not at work. +This 5x12 layout is based on my Ergodox Infinity Layout, which is [here](../../ergodox/333fred/README.md). It doesn't have all of my VS extensions. ## Layers @@ -18,7 +18,7 @@ Qwerty |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| |------+------+------+------+------+------+------+------+------+------+------+------| -| Ctrl | Alt | F4 | GUI |LwrVIM| Bksp | Spc | Ent | Lock | = | RAlt | Del | +| Ctrl | Alt | F4 | GUI | Bksp |LwrVIM| Spc | Ent | Lock | = | RAlt | Del | `-----------------------------------------------------------------------------------' ``` @@ -66,7 +66,7 @@ Gaming mode (Raise) |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| -| CTRL | | | | F | | | | | | | | +| CTRL | | | | | | | | | | | | |------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | | | | | | | | | | GUI | |------+------+------+------+------+------+------+------+------+------+------+------| diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/layouts/community/ortho_5x12/333fred/config.h similarity index 83% rename from keyboards/nyquist/keymaps/333fred/config.h rename to layouts/community/ortho_5x12/333fred/config.h index 575ec9ac528c..7835fa1f07d9 100644 --- a/keyboards/nyquist/keymaps/333fred/config.h +++ b/layouts/community/ortho_5x12/333fred/config.h @@ -1,6 +1,5 @@ #pragma once -#include "../../config.h" #include "333fred_config.h" #define USE_SERIAL diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/layouts/community/ortho_5x12/333fred/keymap.c similarity index 88% rename from keyboards/nyquist/keymaps/333fred/keymap.c rename to layouts/community/ortho_5x12/333fred/keymap.c index c25bf1c5ff6d..cc699dfc5438 100644 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ b/layouts/community/ortho_5x12/333fred/keymap.c @@ -9,11 +9,6 @@ enum custom_macros { PSCREEN_APP }; -// Tap dance for layer transitions -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty @@ -26,15 +21,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | F4 | GUI |Lwr/VM| Bksp | Spc | Ent | Lock | = | Alt | Del | + * | Ctrl | Alt | F4 | GUI | Bksp |Lwr/VM| Spc | Ent | Lock | = | Alt | Del | * `-----------------------------------------------------------------------------------' */ -[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_MINUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ - 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), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ - KC_LCTL, KC_LALT, KC_F4, KC_LGUI, TD(TD_SYM_VIM), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, KC_RALT, KC_DEL \ +[BASE] = LAYOUT_ortho_5x12( \ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ + 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), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ + KC_LCTL, KC_LALT, KC_F4, KC_LGUI, KC_BSPC, TD(TD_SYM_VIM), KC_SPC, KC_ENT, KC_LOCK, KC_EQL, KC_RALT, KC_DEL \ ), /* Symbols @@ -50,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play | * `-----------------------------------------------------------------------------------' */ -[SYMB] = LAYOUT( \ +[SYMB] = LAYOUT_ortho_5x12( \ KC_CAPS, 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_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ @@ -71,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[VIM] = LAYOUT( \ +[VIM] = LAYOUT_ortho_5x12( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ @@ -93,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| * `-----------------------------------------------------------------------------------' */ -[GAME] = LAYOUT( \ +[GAME] = LAYOUT_ortho_5x12( \ KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/nyquist/keymaps/333fred/rules.mk b/layouts/community/ortho_5x12/333fred/rules.mk similarity index 100% rename from keyboards/nyquist/keymaps/333fred/rules.mk rename to layouts/community/ortho_5x12/333fred/rules.mk From e2411b0d4c248ee89e70b5b1549e1f98d4bd1abe Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Thu, 31 Jan 2019 13:42:12 -0200 Subject: [PATCH 269/458] Fixed TGR Alice pinout and number of LEDs (#5018) --- keyboards/alice/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboards/alice/config.h b/keyboards/alice/config.h index 34412a7e7060..07b9599f58e2 100644 --- a/keyboards/alice/config.h +++ b/keyboards/alice/config.h @@ -29,10 +29,10 @@ along with this program. If not, see . #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#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 20 +#define RGBLED_NUM 18 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 From 4d88c716b4b2ad85c6ea1880d5f30ac3944c6589 Mon Sep 17 00:00:00 2001 From: moyi4681 Date: Fri, 1 Feb 2019 03:36:59 +0800 Subject: [PATCH 270/458] Update info.json (#5015) --- keyboards/dztech/dz60rgb/info.json | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json index 47e705d5a2f8..4615706c69a6 100644 --- a/keyboards/dztech/dz60rgb/info.json +++ b/keyboards/dztech/dz60rgb/info.json @@ -1,16 +1,12 @@ { "keyboard_name": "dz60rgb", "url": "", - "maintainer": "dz", + "maintainer": "dztch", "width": 14, "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, - {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, - {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, - {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"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":6.25}, {"label":"Alt", "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},] + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "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":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] } } } From aa6cc28d431f2659a1a531bd7467011aa6713d03 Mon Sep 17 00:00:00 2001 From: Braydon Bubnick Date: Thu, 31 Jan 2019 18:31:22 -0600 Subject: [PATCH 271/458] [Keyboard] Add 1upkeyboards 1up80hte (Tsangan style PCB) (#4988) * Support for 1upkeyboards Tsangan style PCB * Suggested changes to config.h, keymap.c, rules.mk, 1up60hte.h, 1up60hte.c * Update keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c Fix for misnamed const Co-Authored-By: bubnick --- keyboards/1upkeyboards/1up60hte/1up60hte.c | 18 +++++ keyboards/1upkeyboards/1up60hte/1up60hte.h | 36 +++++++++ keyboards/1upkeyboards/1up60hte/config.h | 67 ++++++++++++++++ .../1up60hte/keymaps/default/keymap.c | 80 +++++++++++++++++++ keyboards/1upkeyboards/1up60hte/rules.mk | 56 +++++++++++++ 5 files changed, 257 insertions(+) create mode 100644 keyboards/1upkeyboards/1up60hte/1up60hte.c create mode 100644 keyboards/1upkeyboards/1up60hte/1up60hte.h create mode 100644 keyboards/1upkeyboards/1up60hte/config.h create mode 100644 keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c create mode 100644 keyboards/1upkeyboards/1up60hte/rules.mk diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.c b/keyboards/1upkeyboards/1up60hte/1up60hte.c new file mode 100644 index 000000000000..460e42a0e576 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.c @@ -0,0 +1,18 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "1up60hte.h" diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h new file mode 100644 index 000000000000..1103df6f7e89 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h @@ -0,0 +1,36 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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, K013, \ + 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 \ +) { \ + { 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 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ +} + + diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h new file mode 100644 index 000000000000..eb61a363ff75 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x0001 +#define MANUFACTURER 1upkeyboards +#define PRODUCT 1up60hte +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2, B1, B0, D4 } +#define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D6, D7, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#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 F0 +#ifdef RGB_DI_PIN +#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/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c new file mode 100644 index 000000000000..d9cd8aebbfd4 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -0,0 +1,80 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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_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_NO), + + [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) + +}; + +void matrix_init_user(void) { + setPinOutput(B6); +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + 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 new file mode 100644 index 000000000000..c77cac8a1784 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -0,0 +1,56 @@ +# 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 = 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 From 8c5c1fd7fe8866f61081ec4cf953f48352d7c088 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 31 Jan 2019 16:37:13 -0800 Subject: [PATCH 272/458] Space65 Updates (#5008) * update reset sequence info * fix my rgb underglow led number flub * add a more sensible keymap * add caps lock led support * remove unused #define * swap the spacebar sizes around to match the space65 * use vomindoraan's suggestion in PR to use IS_LED_ON --- keyboards/gray_studio/space65/info.json | 2 +- keyboards/gray_studio/space65/keymaps/default/keymap.c | 6 +++--- keyboards/gray_studio/space65/readme.md | 4 +++- keyboards/gray_studio/space65/space65.c | 5 +++++ keyboards/gray_studio/space65/space65.h | 2 -- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/keyboards/gray_studio/space65/info.json b/keyboards/gray_studio/space65/info.json index aafae5b08ad1..9c1d439b4179 100644 --- a/keyboards/gray_studio/space65/info.json +++ b/keyboards/gray_studio/space65/info.json @@ -6,7 +6,7 @@ "height": 5, "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":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":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":15, "y":1}, {"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":15, "y":2}, {"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":15, "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":2.75}, {"x":6.5, "y":4, "w":1.25}, {"x":7.75, "y":4, "w":2.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + "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":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":15, "y":1}, {"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":15, "y":2}, {"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":15, "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] } } } \ No newline at end of file diff --git a/keyboards/gray_studio/space65/keymaps/default/keymap.c b/keyboards/gray_studio/space65/keymaps/default/keymap.c index c42bbe0f0474..229a0c574bb4 100644 --- a/keyboards/gray_studio/space65/keymaps/default/keymap.c +++ b/keyboards/gray_studio/space65/keymaps/default/keymap.c @@ -23,10 +23,10 @@ enum custom_keycodes { 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_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_BSPC, KC_DEL, \ + 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_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_INS, \ 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_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_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_PGDN, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( \ diff --git a/keyboards/gray_studio/space65/readme.md b/keyboards/gray_studio/space65/readme.md index 83387d4b4cb2..00d289e3bb74 100644 --- a/keyboards/gray_studio/space65/readme.md +++ b/keyboards/gray_studio/space65/readme.md @@ -1,11 +1,13 @@ # Gray Studio Space65 -A 65% keyboard with RGB underglow, backlighting and USB C, whose design was inspired by the Voyager I space probe and Apple II home computer. +A 65% keyboard with RGB underglow, backlighting, and USB C. Its design was inspired by the Voyager I space probe and Apple II home computer. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) Hardware Supported: Gray Studio Space65 Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=98768.0) +**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. + Make example for this keyboard (after setting up your build environment): make gray_studio/space65:default diff --git a/keyboards/gray_studio/space65/space65.c b/keyboards/gray_studio/space65/space65.c index 26d80e00ec93..f9f2224ab810 100644 --- a/keyboards/gray_studio/space65/space65.c +++ b/keyboards/gray_studio/space65/space65.c @@ -38,6 +38,11 @@ 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); + } led_set_user(usb_led); } diff --git a/keyboards/gray_studio/space65/space65.h b/keyboards/gray_studio/space65/space65.h index c2158fd92843..b7d8580c06c7 100644 --- a/keyboards/gray_studio/space65/space65.h +++ b/keyboards/gray_studio/space65/space65.h @@ -17,8 +17,6 @@ #include "quantum.h" -#define XXX KC_NO - /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical From d8e9a0f7a319e27c8dbb4e5a1131bc02b365da76 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Fri, 1 Feb 2019 11:40:12 +1100 Subject: [PATCH 273/458] Change return type of layer_switch_get_layer() to uint8_t (#5011) * Change return type of layer_switch_get_layer() to uint8_t * Keep loop index signed so we don't wrap around --- tmk_core/common/action_layer.c | 4 ++-- tmk_core/common/action_layer.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c index 6ff8c5549b5a..47cad996a3de 100644 --- a/tmk_core/common/action_layer.c +++ b/tmk_core/common/action_layer.c @@ -296,7 +296,7 @@ action_t store_or_get_action(bool pressed, keypos_t key) { * * Gets the layer based on key info */ -int8_t layer_switch_get_layer(keypos_t key) { +uint8_t layer_switch_get_layer(keypos_t key) { #ifndef NO_ACTION_LAYER action_t action; action.code = ACTION_TRANSPARENT; @@ -304,7 +304,7 @@ int8_t layer_switch_get_layer(keypos_t key) { uint32_t layers = layer_state | default_layer_state; /* check top layer first */ for (int8_t i = 31; i >= 0; i--) { - if (layers & (1UL< Date: Fri, 1 Feb 2019 20:44:57 +0000 Subject: [PATCH 274/458] [Keymap] Adds Preonic keymap for muzfuz. Small Planck addition. (#5019) * Adds keymaps for muzfuz * Remove unused keys from adjust layer * Bring in line with current QMK standards. * Adds Preonic and adjusted Planck keymaps * Make changes per review request --- keyboards/planck/keymaps/muzfuz/keymap.c | 24 +- keyboards/planck/keymaps/muzfuz/readme.md | 5 +- keyboards/preonic/keymaps/muzfuz/config.h | 37 +++ keyboards/preonic/keymaps/muzfuz/keymap.c | 271 +++++++++++++++++++++ keyboards/preonic/keymaps/muzfuz/readme.md | 5 + keyboards/preonic/keymaps/muzfuz/rules.mk | 1 + 6 files changed, 327 insertions(+), 16 deletions(-) create mode 100644 keyboards/preonic/keymaps/muzfuz/config.h create mode 100644 keyboards/preonic/keymaps/muzfuz/keymap.c create mode 100644 keyboards/preonic/keymaps/muzfuz/readme.md create mode 100644 keyboards/preonic/keymaps/muzfuz/rules.mk diff --git a/keyboards/planck/keymaps/muzfuz/keymap.c b/keyboards/planck/keymaps/muzfuz/keymap.c index 16994a57629e..84452a3f1785 100644 --- a/keyboards/planck/keymaps/muzfuz/keymap.c +++ b/keyboards/planck/keymaps/muzfuz/keymap.c @@ -36,8 +36,8 @@ enum planck_keycodes CLNEQLS }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) +#define RSE_ENT LT(_RAISE, KC_ENT) +#define LWR_SPC LT(_LOWER, KC_SPC) #define ESC_CTL CTL_T(KC_ESCAPE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,14 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Enter|Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI | Enter | Space | 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, ESC_CTL, 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, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, RSE_ENT, KC_NO, LWR_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), /* Lower * ,-----------------------------------------------------------------------------------. @@ -67,12 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | => | | [ | ] | | | _ | + | | | Home | End | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, ESC_CTL, CLNEQLS, _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_RGUI, _______, HASHRKT, _______, KC_LBRC, KC_RBRC, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), @@ -85,14 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_planck_grid( - KC_GRV, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, _______, KC_RGUI, - _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + KC_GRV, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, _______, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( diff --git a/keyboards/planck/keymaps/muzfuz/readme.md b/keyboards/planck/keymaps/muzfuz/readme.md index 78153fb324a8..6f78284d70d7 100644 --- a/keyboards/planck/keymaps/muzfuz/readme.md +++ b/keyboards/planck/keymaps/muzfuz/readme.md @@ -1,8 +1,5 @@ # The muzfuz Planck Layout ```shell -docker run -e KEYMAP=muzfuz -e KEYBOARD=planck --rm -v $('pwd'):/qmk:rw qmk_firmware -dfu-programmer atmega32u4 erase -dfu-programmer atmega32u4 flash .build/planck_rev6_muzfuz.hex -dfu-programmer atmega32u4 launch +make planck/rev6:muzfuz:dfu-util ``` diff --git a/keyboards/preonic/keymaps/muzfuz/config.h b/keyboards/preonic/keymaps/muzfuz/config.h new file mode 100644 index 000000000000..40a9524b469d --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/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 diff --git a/keyboards/preonic/keymaps/muzfuz/keymap.c b/keyboards/preonic/keymaps/muzfuz/keymap.c new file mode 100644 index 000000000000..a0a4b34fa94f --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/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 +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes +{ + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT, + HASHRKT, + CLNEQLS +}; + +#define RSE_ENT LT(_RAISE, KC_ENT) +#define LWR_SPC LT(_LOWER, KC_SPC) +#define ESC_CTL CTL_T(KC_ESCAPE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESCCTL | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Enter|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_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, + ESC_CTL, 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, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, RSE_ENT, KC_NO, LWR_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * ,-----------------------------------------------------------------------------------. + * | | => | | [ | ] | | | _ | + | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |ESCCTL| := | | { | } | ( | ) | - | = | \ | ~ | GUI | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | [ | ] | | | | | | Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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, _______, + _______, HASHRKT, _______, KC_LBRC, KC_RBRC, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, + ESC_CTL, CLNEQLS, _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * ,-----------------------------------------------------------------------------------. + * | | | | Up | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |ESCCTL| | Left | Down | Right | | | | | | | GUI | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_UP, _______, _______, _______, _______, _______, _______, _______, _______, + ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, 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|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_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, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case HASHRKT: + if (record->event.pressed) + { + SEND_STRING("=>"); + } + break; + case CLNEQLS: + if (record->event.pressed) + { + SEND_STRING(":="); + } + break; + 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(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/muzfuz/readme.md b/keyboards/preonic/keymaps/muzfuz/readme.md new file mode 100644 index 000000000000..a709d5c946e3 --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/readme.md @@ -0,0 +1,5 @@ +# The muzfuz Preonic layout - largely based on the Planck's + +```shell +make preonic/rev3:muzfuz:dfu-util +``` diff --git a/keyboards/preonic/keymaps/muzfuz/rules.mk b/keyboards/preonic/keymaps/muzfuz/rules.mk new file mode 100644 index 000000000000..dcf16bef3994 --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/rules.mk @@ -0,0 +1 @@ +SRC += muse.c From fd9967dd8ed503c9125e8eb4c0e66c8f0c9fd295 Mon Sep 17 00:00:00 2001 From: Fang Date: Sat, 2 Feb 2019 03:48:40 +0100 Subject: [PATCH 275/458] Add hand-swap config to Gergo layout (#5033) --- keyboards/gergo/gergo.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/keyboards/gergo/gergo.c b/keyboards/gergo/gergo.c index c6ba91bb284d..d32792e2a8c9 100644 --- a/keyboards/gergo/gergo.c +++ b/keyboards/gergo/gergo.c @@ -64,3 +64,21 @@ uint8_t init_mcp23018(void) { //uprintf("Init %x\n", mcp23018_status); return mcp23018_status; } + +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + { {0,0}, {0,7}, {2,7}, {3,7} }, + { {0,8}, {1,8}, {2,8}, {3,8} }, + { {0,9}, {1,9}, {2,9}, {3,9} }, + { {0,10}, {1,10}, {2,10}, {3,10} }, + { {0,11}, {1,11}, {2,11}, {3,11} }, + { {0,12}, {1,12}, {2,12}, {0,0} }, + { {0,13}, {1,13}, {2,13}, {0,0} }, + + { {1,0}, {0,0}, {2,0}, {3,0} }, + { {0,1}, {1,1}, {2,1}, {3,1} }, + { {0,2}, {1,2}, {2,2}, {3,2} }, + { {0,3}, {1,3}, {2,3}, {3,3} }, + { {0,4}, {1,4}, {2,4}, {3,4} }, + { {0,5}, {1,5}, {2,5}, {3,5} }, + { {0,6}, {1,6}, {2,6}, {3,6} } +}; From 34a11d7bac425fef2e4ba011abe7422e8e5ac4cf Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Fri, 1 Feb 2019 21:49:37 -0500 Subject: [PATCH 276/458] Stanrc85 layout update/cleanup (#5029) * Remove unused options * COMMAND disabled since it is unused * COMMAND shortcut removed * Fix some spacing for better readability. --- .../community/60_ansi/stanrc85-ansi/config.h | 2 - .../community/60_ansi/stanrc85-ansi/keymap.c | 45 +++++++++---------- .../community/60_ansi/stanrc85-ansi/rules.mk | 1 + 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/layouts/community/60_ansi/stanrc85-ansi/config.h b/layouts/community/60_ansi/stanrc85-ansi/config.h index 77f0b2e7294b..904a7f524e16 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/config.h +++ b/layouts/community/60_ansi/stanrc85-ansi/config.h @@ -2,5 +2,3 @@ #define TAPPING_TERM 200 #define RETRO_TAPPING - -//#define IGNORE_MOD_TAP_INTERRUPT diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index e56078a971df..796882bea332 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -15,11 +15,10 @@ */ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define DEFAULT 0 //Custom ANSI -#define LAYER1 1 //Default ANSI (enable with Fn2+D) -#define LAYER2 2 //F keys, arrows, custom shortcuts, volume control -#define LAYER3 3 //Backlight controls and RESET +#define LAYER1 1 //Default ANSI (enable with Fn2+D) +#define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control +#define LAYER3 3 //Backlight controls and RESET #define KC_CAD LALT(LCTL(KC_DEL)) #define KC_LOCK LGUI(KC_L) @@ -31,38 +30,38 @@ enum { }; qk_tap_dance_action_t tap_dance_actions[] = { - [TD_WIN] = ACTION_TAP_DANCE_DOUBLE(KC_CAD, KC_LOCK), + [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(TD_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, - LT(2, 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_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(2, KC_SPC), KC_RALT, TD(TD_WIN), MO(3), KC_RCTL), + TD(TD_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, + LT(2, 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_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(2, KC_SPC), KC_RALT, TD(TD_WIN), 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_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), + 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_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, - _______, _______, LCA(KC_QUOT), KC_VOLU, LCA(KC_SCLN), _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, RESET, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______), + 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, + _______, _______, LCA(KC_QUOT), KC_VOLU, LCA(KC_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( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - KC_CAPS, _______, _______, TG(1), _______, _______, BL_STEP, BL_DEC, BL_INC, BL_TOGG, _______, _______, _______, + KC_CAPS, _______, _______, TG(1), _______, _______, BL_STEP, BL_DEC, BL_INC, BL_TOGG, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, RGB_MOD, RGB_TOG, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______) + _______, _______, _______, _______, _______, _______, _______, _______) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/layouts/community/60_ansi/stanrc85-ansi/rules.mk b/layouts/community/60_ansi/stanrc85-ansi/rules.mk index e5ddcae8d927..d58c21f2b915 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/rules.mk +++ b/layouts/community/60_ansi/stanrc85-ansi/rules.mk @@ -1 +1,2 @@ TAP_DANCE_ENABLE = yes +COMMAND_ENABLE = no From 4e2007b855ab32923b2f85cd1ff5222b8bad7804 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Sat, 2 Feb 2019 15:21:32 -0500 Subject: [PATCH 277/458] [Keymap] Added , to fix errors (#5034) * Added , to fix errors * Added aliases to clean up keymaps * Additional formatting changes --- .../community/60_ansi/stanrc85-ansi/keymap.c | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index 796882bea332..f6a5f4c9838b 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -20,8 +20,15 @@ #define LAYER2 2 //Function keys, arrows, custom shortcuts, volume control #define LAYER3 3 //Backlight 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 CA_ESC LT(2, KC_ESC) +#define CA_SPCF LT(2, KC_SPC) +#define CA_TESC TD(TD_ESC) +#define CA_TWIN TD(TD_WIN) //Tap Dance Declarations enum { @@ -36,25 +43,25 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( - TD(TD_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, - LT(2, 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_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(2, KC_SPC), KC_RALT, TD(TD_WIN), MO(3), KC_RCTL), + CA_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, + CA_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_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, CA_SPCF, KC_RALT, CA_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_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), + 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_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, - _______, _______, LCA(KC_QUOT), KC_VOLU, LCA(KC_SCLN), _______, _______, KC_HOME, KC_UP, KC_END, _______, _______, _______, RESET, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_MPLY, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______) + 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( RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, From e9c9c3a4fa1f9a3d948b58315b5d85369392fa6a Mon Sep 17 00:00:00 2001 From: Peter Roe Date: Sat, 2 Feb 2019 14:43:58 -0600 Subject: [PATCH 278/458] [Keyboard] ADB converter lock LED fix (#5035) * Enabled ADB lock LEDs * Updated converter/adb_usb/README.md Fixed a typo in the readme title. Added the lock LED fix to the changelog. --- keyboards/converter/adb_usb/README.md | 3 ++- keyboards/converter/adb_usb/led.c | 2 +- keyboards/converter/adb_usb/matrix.c | 10 ++-------- keyboards/converter/adb_usb/rules.mk | 3 ++- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/keyboards/converter/adb_usb/README.md b/keyboards/converter/adb_usb/README.md index ed7175008075..8de9b9ad46d1 100644 --- a/keyboards/converter/adb_usb/README.md +++ b/keyboards/converter/adb_usb/README.md @@ -1,4 +1,4 @@ -ADB-to USB Keyboard Converter +ADB-to-USB Keyboard Converter ============================= This firmware converts Apple Desktop Bus (ADB) keyboard protocol to USB so that you can use an ADB keyboard on a modern computer. It works on the PJRC Teensy 2.0 and other USB AVR MCUs (ATMega32U4, AT90USB64/128, etc) and needs at least 10KB of flash memory. @@ -81,3 +81,4 @@ though the ADB protocol itself supports it. See protocol/adb.c for more info. QMK Port Changelog --------- - 2018/09/16 - Initial release. +- 2018/12/23 - Fixed lock LED support. diff --git a/keyboards/converter/adb_usb/led.c b/keyboards/converter/adb_usb/led.c index ea9bf77b5c1e..3ee64a8e7d31 100644 --- a/keyboards/converter/adb_usb/led.c +++ b/keyboards/converter/adb_usb/led.c @@ -23,5 +23,5 @@ along with this program. If not, see . void led_set(uint8_t usb_led) { - adb_host_kbd_led(ADB_ADDR_KEYBOARD, ~usb_led); + adb_host_kbd_led(~usb_led); } diff --git a/keyboards/converter/adb_usb/matrix.c b/keyboards/converter/adb_usb/matrix.c index 8ee48bf23f2c..4a70eb502137 100644 --- a/keyboards/converter/adb_usb/matrix.c +++ b/keyboards/converter/adb_usb/matrix.c @@ -58,26 +58,20 @@ void matrix_scan_user(void) { void matrix_init(void) { - // LED on - DDRD |= (1<<6); PORTD |= (1<<6); - adb_host_init(); + // wait for keyboard to boot up and receive command _delay_ms(2000); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; - led_set(host_keyboard_leds()); - - // debug_enable = false; + // debug_enable = true; // debug_matrix = true; // debug_keyboard = true; // debug_mouse = true; // print("debug enabled.\n"); - // LED off - DDRD |= (1<<6); PORTD &= ~(1<<6); matrix_init_quantum(); } diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 3a9b6dedcca5..4743b6b08f12 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -70,4 +70,5 @@ BACKLIGHT_ENABLE = no CUSTOM_MATRIX = yes SRC = matrix.c \ - adb.c + adb.c \ + led.c From c4ce613bff87eaf40c8ddd76383e3cc468e6e2a6 Mon Sep 17 00:00:00 2001 From: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Sun, 3 Feb 2019 16:59:39 -0800 Subject: [PATCH 279/458] ergodash Keyboard readme documentation (#5046) * Update readme.md Added reminder/example on how to install * Update readme.md Added note about rev2 and PCB versions * Update readme.md format --- keyboards/ergodash/readme.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/keyboards/ergodash/readme.md b/keyboards/ergodash/readme.md index 7fa76344f1d7..1545b44624e0 100644 --- a/keyboards/ergodash/readme.md +++ b/keyboards/ergodash/readme.md @@ -13,6 +13,13 @@ Make example for this keyboard (after setting up your build environment): 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. +Install Example: (for pro micro) + `make ergodash/rev2:default:avrdude` + +Note: + "rev2" is for PCB ver 1.1,1.2 + "rev1" is from earlier pcb + # Layout ![layout](https://github.com/omkbd/picture/blob/master/ergodash-layout.png) ![PCB](https://github.com/omkbd/picture/blob/master/Ergodash_PCB.jpg) From b6fbcd9d6210524fe73921db12209e8703c74d2d Mon Sep 17 00:00:00 2001 From: Nicholas Shaff Date: Sun, 3 Feb 2019 21:40:42 -0600 Subject: [PATCH 280/458] New Keyboard: Sentraq Number Pad RGB DIY Kit (#5047) * Added QMK Config for Sentraq Number Pad keyboard. * Sentraq Number Pad documentation cleanup. * mend * Added json for configurator. * Small documentation tweaks. * Updated the layouts to use the default layouts that match. * Uncommended user level functions in keymap, left custom keycode/macro code commented but documented why. * Switched to #pragma once from #ifndef structure in header file. * Moved Sentraq number pad to sentraq creator directory. * Renamed sentraq_number_pad to number_pad now that it's nested in the sentraq directory. * Updated references inside the files for the keyboard rename and nesting. --- keyboards/sentraq/number_pad/config.h | 83 ++++++++++++++ keyboards/sentraq/number_pad/info.json | 29 +++++ .../number_pad/keymaps/default/keymap.c | 105 ++++++++++++++++++ .../number_pad/keymaps/default/readme.md | 1 + keyboards/sentraq/number_pad/number_pad.c | 43 +++++++ keyboards/sentraq/number_pad/number_pad.h | 56 ++++++++++ keyboards/sentraq/number_pad/readme.md | 13 +++ keyboards/sentraq/number_pad/rules.mk | 80 +++++++++++++ 8 files changed, 410 insertions(+) create mode 100644 keyboards/sentraq/number_pad/config.h create mode 100644 keyboards/sentraq/number_pad/info.json create mode 100644 keyboards/sentraq/number_pad/keymaps/default/keymap.c create mode 100644 keyboards/sentraq/number_pad/keymaps/default/readme.md create mode 100644 keyboards/sentraq/number_pad/number_pad.c create mode 100644 keyboards/sentraq/number_pad/number_pad.h create mode 100644 keyboards/sentraq/number_pad/readme.md create mode 100644 keyboards/sentraq/number_pad/rules.mk diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h new file mode 100644 index 000000000000..d52670c7dacb --- /dev/null +++ b/keyboards/sentraq/number_pad/config.h @@ -0,0 +1,83 @@ +/* +Copyright 2019 QMK Community + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 Sentraq +#define PRODUCT Sentraq Number Pad +#define DESCRIPTION RBG backlit number pad kit + +/* key matrix size */ +#define MATRIX_ROWS 5 +#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 { F5, F0, B5, D6, D4 } +#define MATRIX_COL_PINS { C7, D5, D1, D0 } +#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 B0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 13 + #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 + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) diff --git a/keyboards/sentraq/number_pad/info.json b/keyboards/sentraq/number_pad/info.json new file mode 100644 index 000000000000..1c6e3f53ca89 --- /dev/null +++ b/keyboards/sentraq/number_pad/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "Sentraq Number Pad", + "maintainer": "qmk", + "url": "https://sentraq.com/collections/kits/products/number-pad-rgb-kit", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "keycount": 17, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, + {"x":0, "y":4, "w":2}, {"x":2, "y":4} + ] + }, + "LAYOUT_ortho_5x4": { + "keycount": 20, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4} + ] + } + } +} diff --git a/keyboards/sentraq/number_pad/keymaps/default/keymap.c b/keyboards/sentraq/number_pad/keymaps/default/keymap.c new file mode 100644 index 000000000000..90c806a917bc --- /dev/null +++ b/keyboards/sentraq/number_pad/keymaps/default/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2019 QMK Community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FN 1 + +// Defines the keycodes used by our macros in process_record_user. +// Disabled as it isn't used in this keymap, but available for modification. +// enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_numpad_5x4( + /* Base Layer: Number Pad + * ,---------------. + * |FN | / | * | - | + * |---+---+---|---| + * | 7 | 8 | 9 | | + * |---+---+---| + | + * | 4 | 5 | 6 | | + * |---+---+---|---| + * | 1 | 2 | 3 | | + * |---+---+---|Ent| + * | 0 | . | | + * `---------------' + */ + MO(_FN), KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, KC_PDOT, KC_PENT + ), + /* Function Layer: RGB Controls and Numlock + * ,---------------. + * |FN |TOG|M+ |M- | Mode + * |---+---+---|---| + * | |H- |H+ | | Hue + * |---+---+---| | + * | |S- |S+ | | Saturation + * |---+---+---|---| + * | |B- |B+ |NUM| Brightness + * |---+---+---| | + * | | |LCK| + * `---------------' + */ + [_FN] = LAYOUT_numpad_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, \ + KC_NO, RGB_HUD, RGB_HUI, \ + KC_NO, RGB_SAD, RGB_SAI, KC_NO, \ + KC_NO, RGB_VAD, RGB_VAI, \ + KC_NO, KC_NO, KC_NLCK + ), +}; + +// Handles macros for keycodes defined above. +// Disabled as it isn't used in this keymap, but available for modification. +// 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/sentraq/number_pad/keymaps/default/readme.md b/keyboards/sentraq/number_pad/keymaps/default/readme.md new file mode 100644 index 000000000000..a2c0e7567621 --- /dev/null +++ b/keyboards/sentraq/number_pad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Sentraq Number Pad RGB DIY Kit diff --git a/keyboards/sentraq/number_pad/number_pad.c b/keyboards/sentraq/number_pad/number_pad.c new file mode 100644 index 000000000000..8c39efac58ca --- /dev/null +++ b/keyboards/sentraq/number_pad/number_pad.c @@ -0,0 +1,43 @@ +/* Copyright 2019 QMK Community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "number_pad.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/sentraq/number_pad/number_pad.h b/keyboards/sentraq/number_pad/number_pad.h new file mode 100644 index 000000000000..05bcd527cd06 --- /dev/null +++ b/keyboards/sentraq/number_pad/number_pad.h @@ -0,0 +1,56 @@ +/* Copyright 2019 QMK Community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K43 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, KC_NO }, \ + { K40, KC_NO, K42, K43 } \ +} + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} diff --git a/keyboards/sentraq/number_pad/readme.md b/keyboards/sentraq/number_pad/readme.md new file mode 100644 index 000000000000..ce9bfe4357c0 --- /dev/null +++ b/keyboards/sentraq/number_pad/readme.md @@ -0,0 +1,13 @@ +# Sentraq Number Pad RGB DIY Kit + +Sentraq Number Pad RGB DIY Kit. + +Keyboard Maintainer: QMK Community\ +Hardware Supported: Sentraq Number Pad PCB\ +Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/number-pad-rgb-kit) + +Make example for this keyboard (after setting up your build environment): + + make sentraq/number_pad: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/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk new file mode 100644 index 000000000000..8678b7f886ec --- /dev/null +++ b/keyboards/sentraq/number_pad/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 = 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 = 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) From d26e73756ff47cf6025c474917a41581494141c7 Mon Sep 17 00:00:00 2001 From: Nicholas Shaff Date: Mon, 4 Feb 2019 08:15:32 -0600 Subject: [PATCH 281/458] Fixed the key_count attribute name and numpad_5x4 layout in the info.json. (#5049) --- keyboards/sentraq/number_pad/info.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/sentraq/number_pad/info.json b/keyboards/sentraq/number_pad/info.json index 1c6e3f53ca89..3e17835d590e 100644 --- a/keyboards/sentraq/number_pad/info.json +++ b/keyboards/sentraq/number_pad/info.json @@ -6,17 +6,17 @@ "height": 5, "layouts": { "LAYOUT_numpad_5x4": { - "keycount": 17, + "key_count": 17, "layout": [ {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, - {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, - {"x":0, "y":4, "w":2}, {"x":2, "y":4} + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":1, "h":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, + {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":3, "y":3, "h":2} ] }, "LAYOUT_ortho_5x4": { - "keycount": 20, + "key_count": 20, "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}, From b49dbf9b19264e7558253a34ca737dcd301487b1 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 4 Feb 2019 10:29:04 -0800 Subject: [PATCH 282/458] [Keyboard] Create KBDFans directory (#5025) * move over kbd19x into the kbdfans directory * move over kbd4x into the kbdfans directory * move kbd66 into the kbdfans directory * move the kbd6x into the kbdfans directory * move kbd8x into the kbdfans directory * move kbd75 into the kbdfans directory * move kbd67 into kbdfans directory * add a fairly sparse readme for kbdfans directory * update make instructions for keyboards and add the Complete Newbs Guide to readmes that was missing it * get kbd75 compiling again * remove repetitive #defines of KC_NO and KC_TRNS when QMK_KEYBOARD_H is already included in KBD75 * add links to kbdfans readme * fix some readme formatting * there is no reason to have two different keymaps with such a small difference, condensing to one * turning on backlights by default * enable backlight by default for kbd66 * noticed that the kbd75 had caps lock led code in every keymap. Moved it out to the keyboard.c so everyone can partake. * Update keyboards/kbdfans/kbd66/readme.md Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com> * update readme link ordering --- keyboards/kbd75/rev1/rev1.c | 1 - keyboards/kbd75/rev2/rev2.c | 1 - keyboards/kbd75/rules.mk | 1 - .../keymaps/default_backlighting/rules.mk | 17 --------- keyboards/{ => kbdfans}/kbd19x/config.h | 0 keyboards/{ => kbdfans}/kbd19x/info.json | 0 keyboards/{ => kbdfans}/kbd19x/kbd19x.c | 0 keyboards/{ => kbdfans}/kbd19x/kbd19x.h | 0 .../kbd19x/keymaps/default/config.h | 0 .../kbd19x/keymaps/default/keymap.c | 0 .../kbd19x/keymaps/default/readme.md | 0 keyboards/{ => kbdfans}/kbd19x/readme.md | 4 +-- keyboards/{ => kbdfans}/kbd19x/rules.mk | 0 keyboards/{ => kbdfans}/kbd4x/config.h | 0 keyboards/{ => kbdfans}/kbd4x/info.json | 0 keyboards/{ => kbdfans}/kbd4x/kbd4x.c | 0 keyboards/{ => kbdfans}/kbd4x/kbd4x.h | 0 .../kbd4x/keymaps/default/config.h | 0 .../kbd4x/keymaps/default/keymap.c | 0 .../kbd4x/keymaps/default/readme.md | 0 keyboards/{ => kbdfans}/kbd4x/readme.md | 2 +- keyboards/{ => kbdfans}/kbd4x/rules.mk | 0 keyboards/{ => kbdfans}/kbd66/config.h | 0 keyboards/{ => kbdfans}/kbd66/info.json | 0 keyboards/{ => kbdfans}/kbd66/kbd66.c | 0 keyboards/{ => kbdfans}/kbd66/kbd66.h | 0 .../{ => kbdfans}/kbd66/keymaps/ansi/config.h | 0 .../{ => kbdfans}/kbd66/keymaps/ansi/keymap.c | 0 .../kbd66/keymaps/ansi/readme.md | 0 .../kbd66/keymaps/default/config.h | 0 .../kbd66/keymaps/default/keymap.c | 0 .../kbd66/keymaps/default/readme.md | 0 .../{ => kbdfans}/kbd66/keymaps/iso/config.h | 0 .../{ => kbdfans}/kbd66/keymaps/iso/keymap.c | 0 .../{ => kbdfans}/kbd66/keymaps/iso/readme.md | 0 .../kbd66/keymaps/maartenwut/config.h | 0 .../kbd66/keymaps/maartenwut/keymap.c | 0 .../kbd66/keymaps/maartenwut/readme.md | 0 keyboards/{ => kbdfans}/kbd66/readme.md | 4 +-- keyboards/{ => kbdfans}/kbd66/rules.mk | 2 +- .../{ => kbdfans}/kbd67/hotswap/config.h | 0 .../{ => kbdfans}/kbd67/hotswap/hotswap.c | 0 .../{ => kbdfans}/kbd67/hotswap/hotswap.h | 0 .../{ => kbdfans}/kbd67/hotswap/info.json | 0 .../kbd67/hotswap/keymaps/default/config.h | 0 .../kbd67/hotswap/keymaps/default/keymap.c | 0 .../kbd67/hotswap/keymaps/default/readme.md | 0 .../kbd67/hotswap/keymaps/zunger/config.h | 0 .../kbd67/hotswap/keymaps/zunger/keymap.c | 0 .../kbd67/hotswap/keymaps/zunger/readme.md | 0 .../kbd67/hotswap/keymaps/zunger/rules.mk | 0 .../{ => kbdfans}/kbd67/hotswap/readme.md | 0 .../{ => kbdfans}/kbd67/hotswap/rules.mk | 0 keyboards/{ => kbdfans}/kbd67/readme.md | 4 +-- keyboards/{ => kbdfans}/kbd67/rev1/config.h | 0 keyboards/{ => kbdfans}/kbd67/rev1/info.json | 0 .../kbd67/rev1/keymaps/default/config.h | 0 .../kbd67/rev1/keymaps/default/keymap.c | 0 .../kbd67/rev1/keymaps/default/readme.md | 0 keyboards/{ => kbdfans}/kbd67/rev1/readme.md | 0 keyboards/{ => kbdfans}/kbd67/rev1/rev1.c | 0 keyboards/{ => kbdfans}/kbd67/rev1/rev1.h | 0 keyboards/{ => kbdfans}/kbd67/rev1/rules.mk | 0 keyboards/{ => kbdfans}/kbd6x/config.h | 0 keyboards/{ => kbdfans}/kbd6x/info.json | 0 keyboards/{ => kbdfans}/kbd6x/kbd6x.c | 0 keyboards/{ => kbdfans}/kbd6x/kbd6x.h | 0 .../kbd6x/keymaps/default/keymap.c | 0 .../kbd6x/keymaps/default/readme.md | 0 .../keymaps/hhkb-default-improved/keymap.c | 0 .../keymaps/hhkb-default-improved/readme.md | 0 .../kbd6x/keymaps/hhkb-default/keymap.c | 0 .../kbd6x/keymaps/hhkb-default/readme.md | 0 .../kbd6x/keymaps/konstantin/config.h | 0 .../kbd6x/keymaps/konstantin/keymap.c | 0 .../kbd6x/keymaps/konstantin/rules.mk | 0 .../{ => kbdfans}/kbd6x/keymaps/othi/config.h | 0 .../{ => kbdfans}/kbd6x/keymaps/othi/keymap.c | 0 .../kbd6x/keymaps/othi/readme.md | 0 .../{ => kbdfans}/kbd6x/keymaps/othi/rules.mk | 0 keyboards/{ => kbdfans}/kbd6x/readme.md | 4 +-- keyboards/{ => kbdfans}/kbd6x/rules.mk | 0 keyboards/{ => kbdfans}/kbd75/config.h | 0 keyboards/{ => kbdfans}/kbd75/kbd75.c | 0 keyboards/{ => kbdfans}/kbd75/kbd75.h | 4 +-- .../{ => kbdfans}/kbd75/keymaps/adit/keymap.c | 36 ------------------- .../kbd75/keymaps/default/keymap.c | 11 ------ .../kbd75/keymaps/edulpn/README.md | 0 .../kbd75/keymaps/edulpn/keymap.c | 0 .../{ => kbdfans}/kbd75/keymaps/iso/keymap.c | 10 ------ .../{ => kbdfans}/kbd75/keymaps/smt/keymap.c | 4 --- .../kbd75/keymaps/spacemanspiff/keymap.c | 9 ----- .../kbd75/keymaps/spacemanspiff/readme.md | 0 keyboards/{ => kbdfans}/kbd75/readme.md | 11 +++--- keyboards/{ => kbdfans}/kbd75/rev1/info.json | 0 keyboards/kbdfans/kbd75/rev1/rev1.c | 12 +++++++ keyboards/{ => kbdfans}/kbd75/rev1/rev1.h | 0 keyboards/{ => kbdfans}/kbd75/rev1/rules.mk | 0 keyboards/{ => kbdfans}/kbd75/rev2/info.json | 0 keyboards/kbdfans/kbd75/rev2/rev2.c | 12 +++++++ keyboards/{ => kbdfans}/kbd75/rev2/rev2.h | 0 keyboards/{ => kbdfans}/kbd75/rev2/rules.mk | 0 keyboards/kbdfans/kbd75/rules.mk | 1 + keyboards/{ => kbdfans}/kbd8x/config.h | 0 keyboards/{ => kbdfans}/kbd8x/info.json | 0 keyboards/{ => kbdfans}/kbd8x/kbd8x.c | 0 keyboards/{ => kbdfans}/kbd8x/kbd8x.h | 0 .../kbd8x/keymaps/default/config.h | 0 .../kbd8x/keymaps/default/keymap.c | 8 +++++ .../kbd8x/keymaps/default/readme.md | 0 .../keymaps/default_backlighting/config.h | 0 .../keymaps/default_backlighting/keymap.c | 0 .../keymaps/default_backlighting/readme.md | 0 .../keymaps/default_backlighting/rules.mk | 1 + keyboards/{ => kbdfans}/kbd8x/readme.md | 6 ++-- keyboards/{ => kbdfans}/kbd8x/rules.mk | 4 +-- keyboards/kbdfans/readme.md | 17 +++++++++ 117 files changed, 73 insertions(+), 113 deletions(-) delete mode 100644 keyboards/kbd75/rev1/rev1.c delete mode 100644 keyboards/kbd75/rev2/rev2.c delete mode 100644 keyboards/kbd75/rules.mk delete mode 100644 keyboards/kbd8x/keymaps/default_backlighting/rules.mk rename keyboards/{ => kbdfans}/kbd19x/config.h (100%) rename keyboards/{ => kbdfans}/kbd19x/info.json (100%) rename keyboards/{ => kbdfans}/kbd19x/kbd19x.c (100%) rename keyboards/{ => kbdfans}/kbd19x/kbd19x.h (100%) rename keyboards/{ => kbdfans}/kbd19x/keymaps/default/config.h (100%) rename keyboards/{ => kbdfans}/kbd19x/keymaps/default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd19x/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd19x/readme.md (94%) rename keyboards/{ => kbdfans}/kbd19x/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd4x/config.h (100%) rename keyboards/{ => kbdfans}/kbd4x/info.json (100%) rename keyboards/{ => kbdfans}/kbd4x/kbd4x.c (100%) rename keyboards/{ => kbdfans}/kbd4x/kbd4x.h (100%) rename keyboards/{ => kbdfans}/kbd4x/keymaps/default/config.h (100%) rename keyboards/{ => kbdfans}/kbd4x/keymaps/default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd4x/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd4x/readme.md (96%) rename keyboards/{ => kbdfans}/kbd4x/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd66/config.h (100%) rename keyboards/{ => kbdfans}/kbd66/info.json (100%) rename keyboards/{ => kbdfans}/kbd66/kbd66.c (100%) rename keyboards/{ => kbdfans}/kbd66/kbd66.h (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/ansi/config.h (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/ansi/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/ansi/readme.md (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/default/config.h (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/iso/config.h (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/iso/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/iso/readme.md (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/maartenwut/config.h (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/maartenwut/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd66/keymaps/maartenwut/readme.md (100%) rename keyboards/{ => kbdfans}/kbd66/readme.md (57%) rename keyboards/{ => kbdfans}/kbd66/rules.mk (97%) rename keyboards/{ => kbdfans}/kbd67/hotswap/config.h (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/hotswap.c (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/hotswap.h (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/info.json (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/default/config.h (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/zunger/config.h (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/zunger/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/zunger/readme.md (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/keymaps/zunger/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/readme.md (100%) rename keyboards/{ => kbdfans}/kbd67/hotswap/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd67/readme.md (91%) rename keyboards/{ => kbdfans}/kbd67/rev1/config.h (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/info.json (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/keymaps/default/config.h (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/keymaps/default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/readme.md (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/rev1.c (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/rev1.h (100%) rename keyboards/{ => kbdfans}/kbd67/rev1/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd6x/config.h (100%) rename keyboards/{ => kbdfans}/kbd6x/info.json (100%) rename keyboards/{ => kbdfans}/kbd6x/kbd6x.c (100%) rename keyboards/{ => kbdfans}/kbd6x/kbd6x.h (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/hhkb-default-improved/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/hhkb-default-improved/readme.md (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/hhkb-default/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/hhkb-default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/konstantin/config.h (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/konstantin/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/konstantin/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/othi/config.h (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/othi/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/othi/readme.md (100%) rename keyboards/{ => kbdfans}/kbd6x/keymaps/othi/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd6x/readme.md (51%) rename keyboards/{ => kbdfans}/kbd6x/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd75/config.h (100%) rename keyboards/{ => kbdfans}/kbd75/kbd75.c (100%) rename keyboards/{ => kbdfans}/kbd75/kbd75.h (68%) rename keyboards/{ => kbdfans}/kbd75/keymaps/adit/keymap.c (88%) rename keyboards/{ => kbdfans}/kbd75/keymaps/default/keymap.c (90%) rename keyboards/{ => kbdfans}/kbd75/keymaps/edulpn/README.md (100%) rename keyboards/{ => kbdfans}/kbd75/keymaps/edulpn/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd75/keymaps/iso/keymap.c (91%) rename keyboards/{ => kbdfans}/kbd75/keymaps/smt/keymap.c (99%) rename keyboards/{ => kbdfans}/kbd75/keymaps/spacemanspiff/keymap.c (95%) rename keyboards/{ => kbdfans}/kbd75/keymaps/spacemanspiff/readme.md (100%) rename keyboards/{ => kbdfans}/kbd75/readme.md (58%) rename keyboards/{ => kbdfans}/kbd75/rev1/info.json (100%) create mode 100644 keyboards/kbdfans/kbd75/rev1/rev1.c rename keyboards/{ => kbdfans}/kbd75/rev1/rev1.h (100%) rename keyboards/{ => kbdfans}/kbd75/rev1/rules.mk (100%) rename keyboards/{ => kbdfans}/kbd75/rev2/info.json (100%) create mode 100644 keyboards/kbdfans/kbd75/rev2/rev2.c rename keyboards/{ => kbdfans}/kbd75/rev2/rev2.h (100%) rename keyboards/{ => kbdfans}/kbd75/rev2/rules.mk (100%) create mode 100644 keyboards/kbdfans/kbd75/rules.mk rename keyboards/{ => kbdfans}/kbd8x/config.h (100%) rename keyboards/{ => kbdfans}/kbd8x/info.json (100%) rename keyboards/{ => kbdfans}/kbd8x/kbd8x.c (100%) rename keyboards/{ => kbdfans}/kbd8x/kbd8x.h (100%) rename keyboards/{ => kbdfans}/kbd8x/keymaps/default/config.h (100%) rename keyboards/{ => kbdfans}/kbd8x/keymaps/default/keymap.c (69%) rename keyboards/{ => kbdfans}/kbd8x/keymaps/default/readme.md (100%) rename keyboards/{ => kbdfans}/kbd8x/keymaps/default_backlighting/config.h (100%) rename keyboards/{ => kbdfans}/kbd8x/keymaps/default_backlighting/keymap.c (100%) rename keyboards/{ => kbdfans}/kbd8x/keymaps/default_backlighting/readme.md (100%) create mode 100644 keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk rename keyboards/{ => kbdfans}/kbd8x/readme.md (51%) rename keyboards/{ => kbdfans}/kbd8x/rules.mk (95%) create mode 100644 keyboards/kbdfans/readme.md diff --git a/keyboards/kbd75/rev1/rev1.c b/keyboards/kbd75/rev1/rev1.c deleted file mode 100644 index 520a869e57ba..000000000000 --- a/keyboards/kbd75/rev1/rev1.c +++ /dev/null @@ -1 +0,0 @@ -#include "rev1.h" diff --git a/keyboards/kbd75/rev2/rev2.c b/keyboards/kbd75/rev2/rev2.c deleted file mode 100644 index b1af81707d29..000000000000 --- a/keyboards/kbd75/rev2/rev2.c +++ /dev/null @@ -1 +0,0 @@ -#include "rev2.h" diff --git a/keyboards/kbd75/rules.mk b/keyboards/kbd75/rules.mk deleted file mode 100644 index ae49271ab369..000000000000 --- a/keyboards/kbd75/rules.mk +++ /dev/null @@ -1 +0,0 @@ -DEFAULT_FOLDER = kbd75/rev1 diff --git a/keyboards/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbd8x/keymaps/default_backlighting/rules.mk deleted file mode 100644 index 07b9f81fd058..000000000000 --- a/keyboards/kbd8x/keymaps/default_backlighting/rules.mk +++ /dev/null @@ -1,17 +0,0 @@ -#Build 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) -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 -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/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h similarity index 100% rename from keyboards/kbd19x/config.h rename to keyboards/kbdfans/kbd19x/config.h diff --git a/keyboards/kbd19x/info.json b/keyboards/kbdfans/kbd19x/info.json similarity index 100% rename from keyboards/kbd19x/info.json rename to keyboards/kbdfans/kbd19x/info.json diff --git a/keyboards/kbd19x/kbd19x.c b/keyboards/kbdfans/kbd19x/kbd19x.c similarity index 100% rename from keyboards/kbd19x/kbd19x.c rename to keyboards/kbdfans/kbd19x/kbd19x.c diff --git a/keyboards/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h similarity index 100% rename from keyboards/kbd19x/kbd19x.h rename to keyboards/kbdfans/kbd19x/kbd19x.h diff --git a/keyboards/kbd19x/keymaps/default/config.h b/keyboards/kbdfans/kbd19x/keymaps/default/config.h similarity index 100% rename from keyboards/kbd19x/keymaps/default/config.h rename to keyboards/kbdfans/kbd19x/keymaps/default/config.h diff --git a/keyboards/kbd19x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd19x/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd19x/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd19x/keymaps/default/keymap.c diff --git a/keyboards/kbd19x/keymaps/default/readme.md b/keyboards/kbdfans/kbd19x/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd19x/keymaps/default/readme.md rename to keyboards/kbdfans/kbd19x/keymaps/default/readme.md diff --git a/keyboards/kbd19x/readme.md b/keyboards/kbdfans/kbd19x/readme.md similarity index 94% rename from keyboards/kbd19x/readme.md rename to keyboards/kbdfans/kbd19x/readme.md index ee4969b00d5b..80b84b5f75f5 100644 --- a/keyboards/kbd19x/readme.md +++ b/keyboards/kbdfans/kbd19x/readme.md @@ -1,4 +1,4 @@ -# kbd19x +# KBD19x ![kbd19x](https://i.imgur.com/0hWTEnh.jpg) @@ -14,6 +14,6 @@ Hardware Availability: [KBDfans](https://kbdfans.cn) Make example for this keyboard (after setting up your build environment): - make kbd19x:default + make kbdfans/kbd19x: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/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk similarity index 100% rename from keyboards/kbd19x/rules.mk rename to keyboards/kbdfans/kbd19x/rules.mk diff --git a/keyboards/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h similarity index 100% rename from keyboards/kbd4x/config.h rename to keyboards/kbdfans/kbd4x/config.h diff --git a/keyboards/kbd4x/info.json b/keyboards/kbdfans/kbd4x/info.json similarity index 100% rename from keyboards/kbd4x/info.json rename to keyboards/kbdfans/kbd4x/info.json diff --git a/keyboards/kbd4x/kbd4x.c b/keyboards/kbdfans/kbd4x/kbd4x.c similarity index 100% rename from keyboards/kbd4x/kbd4x.c rename to keyboards/kbdfans/kbd4x/kbd4x.c diff --git a/keyboards/kbd4x/kbd4x.h b/keyboards/kbdfans/kbd4x/kbd4x.h similarity index 100% rename from keyboards/kbd4x/kbd4x.h rename to keyboards/kbdfans/kbd4x/kbd4x.h diff --git a/keyboards/kbd4x/keymaps/default/config.h b/keyboards/kbdfans/kbd4x/keymaps/default/config.h similarity index 100% rename from keyboards/kbd4x/keymaps/default/config.h rename to keyboards/kbdfans/kbd4x/keymaps/default/config.h diff --git a/keyboards/kbd4x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd4x/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd4x/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd4x/keymaps/default/keymap.c diff --git a/keyboards/kbd4x/keymaps/default/readme.md b/keyboards/kbdfans/kbd4x/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd4x/keymaps/default/readme.md rename to keyboards/kbdfans/kbd4x/keymaps/default/readme.md diff --git a/keyboards/kbd4x/readme.md b/keyboards/kbdfans/kbd4x/readme.md similarity index 96% rename from keyboards/kbd4x/readme.md rename to keyboards/kbdfans/kbd4x/readme.md index 42dc450248c1..2e2a29290fa5 100644 --- a/keyboards/kbd4x/readme.md +++ b/keyboards/kbdfans/kbd4x/readme.md @@ -10,6 +10,6 @@ Hardware Availability: https://kbdfans.cn/collections/diy-kit/products/kbd4x-cus Make example for this keyboard (after setting up your build environment): - make kbd4x:default + make kbdfans/kbd4x: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/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk similarity index 100% rename from keyboards/kbd4x/rules.mk rename to keyboards/kbdfans/kbd4x/rules.mk diff --git a/keyboards/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h similarity index 100% rename from keyboards/kbd66/config.h rename to keyboards/kbdfans/kbd66/config.h diff --git a/keyboards/kbd66/info.json b/keyboards/kbdfans/kbd66/info.json similarity index 100% rename from keyboards/kbd66/info.json rename to keyboards/kbdfans/kbd66/info.json diff --git a/keyboards/kbd66/kbd66.c b/keyboards/kbdfans/kbd66/kbd66.c similarity index 100% rename from keyboards/kbd66/kbd66.c rename to keyboards/kbdfans/kbd66/kbd66.c diff --git a/keyboards/kbd66/kbd66.h b/keyboards/kbdfans/kbd66/kbd66.h similarity index 100% rename from keyboards/kbd66/kbd66.h rename to keyboards/kbdfans/kbd66/kbd66.h diff --git a/keyboards/kbd66/keymaps/ansi/config.h b/keyboards/kbdfans/kbd66/keymaps/ansi/config.h similarity index 100% rename from keyboards/kbd66/keymaps/ansi/config.h rename to keyboards/kbdfans/kbd66/keymaps/ansi/config.h diff --git a/keyboards/kbd66/keymaps/ansi/keymap.c b/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c similarity index 100% rename from keyboards/kbd66/keymaps/ansi/keymap.c rename to keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c diff --git a/keyboards/kbd66/keymaps/ansi/readme.md b/keyboards/kbdfans/kbd66/keymaps/ansi/readme.md similarity index 100% rename from keyboards/kbd66/keymaps/ansi/readme.md rename to keyboards/kbdfans/kbd66/keymaps/ansi/readme.md diff --git a/keyboards/kbd66/keymaps/default/config.h b/keyboards/kbdfans/kbd66/keymaps/default/config.h similarity index 100% rename from keyboards/kbd66/keymaps/default/config.h rename to keyboards/kbdfans/kbd66/keymaps/default/config.h diff --git a/keyboards/kbd66/keymaps/default/keymap.c b/keyboards/kbdfans/kbd66/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd66/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd66/keymaps/default/keymap.c diff --git a/keyboards/kbd66/keymaps/default/readme.md b/keyboards/kbdfans/kbd66/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd66/keymaps/default/readme.md rename to keyboards/kbdfans/kbd66/keymaps/default/readme.md diff --git a/keyboards/kbd66/keymaps/iso/config.h b/keyboards/kbdfans/kbd66/keymaps/iso/config.h similarity index 100% rename from keyboards/kbd66/keymaps/iso/config.h rename to keyboards/kbdfans/kbd66/keymaps/iso/config.h diff --git a/keyboards/kbd66/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c similarity index 100% rename from keyboards/kbd66/keymaps/iso/keymap.c rename to keyboards/kbdfans/kbd66/keymaps/iso/keymap.c diff --git a/keyboards/kbd66/keymaps/iso/readme.md b/keyboards/kbdfans/kbd66/keymaps/iso/readme.md similarity index 100% rename from keyboards/kbd66/keymaps/iso/readme.md rename to keyboards/kbdfans/kbd66/keymaps/iso/readme.md diff --git a/keyboards/kbd66/keymaps/maartenwut/config.h b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h similarity index 100% rename from keyboards/kbd66/keymaps/maartenwut/config.h rename to keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h diff --git a/keyboards/kbd66/keymaps/maartenwut/keymap.c b/keyboards/kbdfans/kbd66/keymaps/maartenwut/keymap.c similarity index 100% rename from keyboards/kbd66/keymaps/maartenwut/keymap.c rename to keyboards/kbdfans/kbd66/keymaps/maartenwut/keymap.c diff --git a/keyboards/kbd66/keymaps/maartenwut/readme.md b/keyboards/kbdfans/kbd66/keymaps/maartenwut/readme.md similarity index 100% rename from keyboards/kbd66/keymaps/maartenwut/readme.md rename to keyboards/kbdfans/kbd66/keymaps/maartenwut/readme.md diff --git a/keyboards/kbd66/readme.md b/keyboards/kbdfans/kbd66/readme.md similarity index 57% rename from keyboards/kbd66/readme.md rename to keyboards/kbdfans/kbd66/readme.md index 2ac5555711d8..a2e5de0157f5 100644 --- a/keyboards/kbd66/readme.md +++ b/keyboards/kbdfans/kbd66/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn), [Massdrop](https://www.mas Make example for this keyboard (after setting up your build environment): - make kbd66:default + make kbdfans/kbd66: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/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk similarity index 97% rename from keyboards/kbd66/rules.mk rename to keyboards/kbdfans/kbd66/rules.mk index 45eb6ee3766f..dcc9b5bbd65f 100644 --- a/keyboards/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -60,7 +60,7 @@ COMMAND_ENABLE = yes # 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 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 diff --git a/keyboards/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h similarity index 100% rename from keyboards/kbd67/hotswap/config.h rename to keyboards/kbdfans/kbd67/hotswap/config.h diff --git a/keyboards/kbd67/hotswap/hotswap.c b/keyboards/kbdfans/kbd67/hotswap/hotswap.c similarity index 100% rename from keyboards/kbd67/hotswap/hotswap.c rename to keyboards/kbdfans/kbd67/hotswap/hotswap.c diff --git a/keyboards/kbd67/hotswap/hotswap.h b/keyboards/kbdfans/kbd67/hotswap/hotswap.h similarity index 100% rename from keyboards/kbd67/hotswap/hotswap.h rename to keyboards/kbdfans/kbd67/hotswap/hotswap.h diff --git a/keyboards/kbd67/hotswap/info.json b/keyboards/kbdfans/kbd67/hotswap/info.json similarity index 100% rename from keyboards/kbd67/hotswap/info.json rename to keyboards/kbdfans/kbd67/hotswap/info.json diff --git a/keyboards/kbd67/hotswap/keymaps/default/config.h b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/config.h similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/default/config.h rename to keyboards/kbdfans/kbd67/hotswap/keymaps/default/config.h diff --git a/keyboards/kbd67/hotswap/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd67/hotswap/keymaps/default/keymap.c diff --git a/keyboards/kbd67/hotswap/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/default/readme.md rename to keyboards/kbdfans/kbd67/hotswap/keymaps/default/readme.md diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/config.h b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/config.h similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/zunger/config.h rename to keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/config.h diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/zunger/keymap.c rename to keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/readme.md similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/zunger/readme.md rename to keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/readme.md diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/rules.mk similarity index 100% rename from keyboards/kbd67/hotswap/keymaps/zunger/rules.mk rename to keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/rules.mk diff --git a/keyboards/kbd67/hotswap/readme.md b/keyboards/kbdfans/kbd67/hotswap/readme.md similarity index 100% rename from keyboards/kbd67/hotswap/readme.md rename to keyboards/kbdfans/kbd67/hotswap/readme.md diff --git a/keyboards/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk similarity index 100% rename from keyboards/kbd67/hotswap/rules.mk rename to keyboards/kbdfans/kbd67/hotswap/rules.mk diff --git a/keyboards/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md similarity index 91% rename from keyboards/kbd67/readme.md rename to keyboards/kbdfans/kbd67/readme.md index cdaf7e922dbc..7ee3c6adbb13 100644 --- a/keyboards/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -9,7 +9,7 @@ Hardware Availability: KBDFans Make example for this keyboard (after setting up your build environment): - make kbd67/rev1:default - make kbd67/hotswap:default + make kbdfans/kbd67/rev1:default + make kbdfans/kbd67/hotswap: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/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h similarity index 100% rename from keyboards/kbd67/rev1/config.h rename to keyboards/kbdfans/kbd67/rev1/config.h diff --git a/keyboards/kbd67/rev1/info.json b/keyboards/kbdfans/kbd67/rev1/info.json similarity index 100% rename from keyboards/kbd67/rev1/info.json rename to keyboards/kbdfans/kbd67/rev1/info.json diff --git a/keyboards/kbd67/rev1/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h similarity index 100% rename from keyboards/kbd67/rev1/keymaps/default/config.h rename to keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h diff --git a/keyboards/kbd67/rev1/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd67/rev1/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c diff --git a/keyboards/kbd67/rev1/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd67/rev1/keymaps/default/readme.md rename to keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md diff --git a/keyboards/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md similarity index 100% rename from keyboards/kbd67/rev1/readme.md rename to keyboards/kbdfans/kbd67/rev1/readme.md diff --git a/keyboards/kbd67/rev1/rev1.c b/keyboards/kbdfans/kbd67/rev1/rev1.c similarity index 100% rename from keyboards/kbd67/rev1/rev1.c rename to keyboards/kbdfans/kbd67/rev1/rev1.c diff --git a/keyboards/kbd67/rev1/rev1.h b/keyboards/kbdfans/kbd67/rev1/rev1.h similarity index 100% rename from keyboards/kbd67/rev1/rev1.h rename to keyboards/kbdfans/kbd67/rev1/rev1.h diff --git a/keyboards/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk similarity index 100% rename from keyboards/kbd67/rev1/rules.mk rename to keyboards/kbdfans/kbd67/rev1/rules.mk diff --git a/keyboards/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h similarity index 100% rename from keyboards/kbd6x/config.h rename to keyboards/kbdfans/kbd6x/config.h diff --git a/keyboards/kbd6x/info.json b/keyboards/kbdfans/kbd6x/info.json similarity index 100% rename from keyboards/kbd6x/info.json rename to keyboards/kbdfans/kbd6x/info.json diff --git a/keyboards/kbd6x/kbd6x.c b/keyboards/kbdfans/kbd6x/kbd6x.c similarity index 100% rename from keyboards/kbd6x/kbd6x.c rename to keyboards/kbdfans/kbd6x/kbd6x.c diff --git a/keyboards/kbd6x/kbd6x.h b/keyboards/kbdfans/kbd6x/kbd6x.h similarity index 100% rename from keyboards/kbd6x/kbd6x.h rename to keyboards/kbdfans/kbd6x/kbd6x.h diff --git a/keyboards/kbd6x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/default/keymap.c similarity index 100% rename from keyboards/kbd6x/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd6x/keymaps/default/keymap.c diff --git a/keyboards/kbd6x/keymaps/default/readme.md b/keyboards/kbdfans/kbd6x/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd6x/keymaps/default/readme.md rename to keyboards/kbdfans/kbd6x/keymaps/default/readme.md diff --git a/keyboards/kbd6x/keymaps/hhkb-default-improved/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/keymap.c similarity index 100% rename from keyboards/kbd6x/keymaps/hhkb-default-improved/keymap.c rename to keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/keymap.c diff --git a/keyboards/kbd6x/keymaps/hhkb-default-improved/readme.md b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/readme.md similarity index 100% rename from keyboards/kbd6x/keymaps/hhkb-default-improved/readme.md rename to keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/readme.md diff --git a/keyboards/kbd6x/keymaps/hhkb-default/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default/keymap.c similarity index 100% rename from keyboards/kbd6x/keymaps/hhkb-default/keymap.c rename to keyboards/kbdfans/kbd6x/keymaps/hhkb-default/keymap.c diff --git a/keyboards/kbd6x/keymaps/hhkb-default/readme.md b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default/readme.md similarity index 100% rename from keyboards/kbd6x/keymaps/hhkb-default/readme.md rename to keyboards/kbdfans/kbd6x/keymaps/hhkb-default/readme.md diff --git a/keyboards/kbd6x/keymaps/konstantin/config.h b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h similarity index 100% rename from keyboards/kbd6x/keymaps/konstantin/config.h rename to keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h diff --git a/keyboards/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c similarity index 100% rename from keyboards/kbd6x/keymaps/konstantin/keymap.c rename to keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c diff --git a/keyboards/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk similarity index 100% rename from keyboards/kbd6x/keymaps/konstantin/rules.mk rename to keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk diff --git a/keyboards/kbd6x/keymaps/othi/config.h b/keyboards/kbdfans/kbd6x/keymaps/othi/config.h similarity index 100% rename from keyboards/kbd6x/keymaps/othi/config.h rename to keyboards/kbdfans/kbd6x/keymaps/othi/config.h diff --git a/keyboards/kbd6x/keymaps/othi/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c similarity index 100% rename from keyboards/kbd6x/keymaps/othi/keymap.c rename to keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c diff --git a/keyboards/kbd6x/keymaps/othi/readme.md b/keyboards/kbdfans/kbd6x/keymaps/othi/readme.md similarity index 100% rename from keyboards/kbd6x/keymaps/othi/readme.md rename to keyboards/kbdfans/kbd6x/keymaps/othi/readme.md diff --git a/keyboards/kbd6x/keymaps/othi/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk similarity index 100% rename from keyboards/kbd6x/keymaps/othi/rules.mk rename to keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk diff --git a/keyboards/kbd6x/readme.md b/keyboards/kbdfans/kbd6x/readme.md similarity index 51% rename from keyboards/kbd6x/readme.md rename to keyboards/kbdfans/kbd6x/readme.md index 0e8e865621b5..1728c8c21bfc 100644 --- a/keyboards/kbd6x/readme.md +++ b/keyboards/kbdfans/kbd6x/readme.md @@ -8,6 +8,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/products/kbd6x-wkl-hot-swap- Make example for this keyboard (after setting up your build environment): - make kbd6x:default + make kbdfans/kbd6x: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/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk similarity index 100% rename from keyboards/kbd6x/rules.mk rename to keyboards/kbdfans/kbd6x/rules.mk diff --git a/keyboards/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h similarity index 100% rename from keyboards/kbd75/config.h rename to keyboards/kbdfans/kbd75/config.h diff --git a/keyboards/kbd75/kbd75.c b/keyboards/kbdfans/kbd75/kbd75.c similarity index 100% rename from keyboards/kbd75/kbd75.c rename to keyboards/kbdfans/kbd75/kbd75.c diff --git a/keyboards/kbd75/kbd75.h b/keyboards/kbdfans/kbd75/kbd75.h similarity index 68% rename from keyboards/kbd75/kbd75.h rename to keyboards/kbdfans/kbd75/kbd75.h index 0798ad0996ce..8e6f094500bf 100644 --- a/keyboards/kbd75/kbd75.h +++ b/keyboards/kbdfans/kbd75/kbd75.h @@ -3,11 +3,11 @@ #include "quantum.h" -#ifdef KEYBOARD_kbd75_rev1 +#ifdef KEYBOARD_kbdfans_kbd75_rev1 #include "rev1.h" #endif -#ifdef KEYBOARD_kbd75_rev2 +#ifdef KEYBOARD_kbdfans_kbd75_rev2 #include "../rev1/rev1.h" #include "rev2.h" #endif diff --git a/keyboards/kbd75/keymaps/adit/keymap.c b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c similarity index 88% rename from keyboards/kbd75/keymaps/adit/keymap.c rename to keyboards/kbdfans/kbd75/keymaps/adit/keymap.c index 3c70d97864c8..b7cae4810b58 100644 --- a/keyboards/kbd75/keymaps/adit/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c @@ -2,8 +2,6 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -45,40 +43,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } - - 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 { - - } - -} - enum function_id { SHIFT_ESC, }; diff --git a/keyboards/kbd75/keymaps/default/keymap.c b/keyboards/kbdfans/kbd75/keymaps/default/keymap.c similarity index 90% rename from keyboards/kbd75/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd75/keymaps/default/keymap.c index 3074d869278a..839030aaa9aa 100644 --- a/keyboards/kbd75/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd75/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( @@ -22,12 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } -} - diff --git a/keyboards/kbd75/keymaps/edulpn/README.md b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md similarity index 100% rename from keyboards/kbd75/keymaps/edulpn/README.md rename to keyboards/kbdfans/kbd75/keymaps/edulpn/README.md diff --git a/keyboards/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c similarity index 100% rename from keyboards/kbd75/keymaps/edulpn/keymap.c rename to keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c diff --git a/keyboards/kbd75/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd75/keymaps/iso/keymap.c similarity index 91% rename from keyboards/kbd75/keymaps/iso/keymap.c rename to keyboards/kbdfans/kbd75/keymaps/iso/keymap.c index 230f1dd73a1d..0b7c701a30d5 100644 --- a/keyboards/kbd75/keymaps/iso/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/iso/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -22,11 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } -} diff --git a/keyboards/kbd75/keymaps/smt/keymap.c b/keyboards/kbdfans/kbd75/keymaps/smt/keymap.c similarity index 99% rename from keyboards/kbd75/keymaps/smt/keymap.c rename to keyboards/kbdfans/kbd75/keymaps/smt/keymap.c index a29a7e8a9fa6..edf01c854edd 100644 --- a/keyboards/kbd75/keymaps/smt/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/smt/keymap.c @@ -12,10 +12,6 @@ enum planck_keycodes { DVORAK }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) diff --git a/keyboards/kbd75/keymaps/spacemanspiff/keymap.c b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/keymap.c similarity index 95% rename from keyboards/kbd75/keymaps/spacemanspiff/keymap.c rename to keyboards/kbdfans/kbd75/keymaps/spacemanspiff/keymap.c index 82a2ad9bec7d..05e7c5671350 100644 --- a/keyboards/kbd75/keymaps/spacemanspiff/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/keymap.c @@ -39,12 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } -} - diff --git a/keyboards/kbd75/keymaps/spacemanspiff/readme.md b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/readme.md similarity index 100% rename from keyboards/kbd75/keymaps/spacemanspiff/readme.md rename to keyboards/kbdfans/kbd75/keymaps/spacemanspiff/readme.md diff --git a/keyboards/kbd75/readme.md b/keyboards/kbdfans/kbd75/readme.md similarity index 58% rename from keyboards/kbd75/readme.md rename to keyboards/kbdfans/kbd75/readme.md index 4c93a8fbefe2..89fe2741618c 100644 --- a/keyboards/kbd75/readme.md +++ b/keyboards/kbdfans/kbd75/readme.md @@ -1,8 +1,7 @@ -KBD75 -=== +# KBD75 Keyboard Maintainer: QMK Community -Hardware Supported: KBD75 PCB rev 1 and 2 +Hardware Supported: KBD75 PCB rev 1 and 2 Hardware Availability: https://kbdfans.myshopify.com/products/kbd75-keyboard-set?variant=35638534029 The KBD75 has two revisions. Revision 2 has a USB C port and allows a numpad layout. `.hex` files made @@ -12,7 +11,7 @@ different areas. Make example for this keyboard (after setting up your build environment): - make kbd75/rev1:default - make kbd75/rev2:default + make kbdfans/kbd75/rev1:default + make kbdfans/kbd75/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. +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/kbd75/rev1/info.json b/keyboards/kbdfans/kbd75/rev1/info.json similarity index 100% rename from keyboards/kbd75/rev1/info.json rename to keyboards/kbdfans/kbd75/rev1/info.json diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c new file mode 100644 index 000000000000..9ed08602a477 --- /dev/null +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -0,0 +1,12 @@ +#include "rev1.h" + +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(B2); + } else { + writePinLow(B2); + } + + led_set_user(usb_led); +} diff --git a/keyboards/kbd75/rev1/rev1.h b/keyboards/kbdfans/kbd75/rev1/rev1.h similarity index 100% rename from keyboards/kbd75/rev1/rev1.h rename to keyboards/kbdfans/kbd75/rev1/rev1.h diff --git a/keyboards/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk similarity index 100% rename from keyboards/kbd75/rev1/rules.mk rename to keyboards/kbdfans/kbd75/rev1/rules.mk diff --git a/keyboards/kbd75/rev2/info.json b/keyboards/kbdfans/kbd75/rev2/info.json similarity index 100% rename from keyboards/kbd75/rev2/info.json rename to keyboards/kbdfans/kbd75/rev2/info.json diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c new file mode 100644 index 000000000000..bec65d6a6c30 --- /dev/null +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -0,0 +1,12 @@ +#include "rev2.h" + +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(B2); + } else { + writePinLow(B2); + } + + led_set_user(usb_led); +} diff --git a/keyboards/kbd75/rev2/rev2.h b/keyboards/kbdfans/kbd75/rev2/rev2.h similarity index 100% rename from keyboards/kbd75/rev2/rev2.h rename to keyboards/kbdfans/kbd75/rev2/rev2.h diff --git a/keyboards/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk similarity index 100% rename from keyboards/kbd75/rev2/rules.mk rename to keyboards/kbdfans/kbd75/rev2/rules.mk diff --git a/keyboards/kbdfans/kbd75/rules.mk b/keyboards/kbdfans/kbd75/rules.mk new file mode 100644 index 000000000000..5c4617131612 --- /dev/null +++ b/keyboards/kbdfans/kbd75/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = kbdfans/kbd75/rev1 diff --git a/keyboards/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h similarity index 100% rename from keyboards/kbd8x/config.h rename to keyboards/kbdfans/kbd8x/config.h diff --git a/keyboards/kbd8x/info.json b/keyboards/kbdfans/kbd8x/info.json similarity index 100% rename from keyboards/kbd8x/info.json rename to keyboards/kbdfans/kbd8x/info.json diff --git a/keyboards/kbd8x/kbd8x.c b/keyboards/kbdfans/kbd8x/kbd8x.c similarity index 100% rename from keyboards/kbd8x/kbd8x.c rename to keyboards/kbdfans/kbd8x/kbd8x.c diff --git a/keyboards/kbd8x/kbd8x.h b/keyboards/kbdfans/kbd8x/kbd8x.h similarity index 100% rename from keyboards/kbd8x/kbd8x.h rename to keyboards/kbdfans/kbd8x/kbd8x.h diff --git a/keyboards/kbd8x/keymaps/default/config.h b/keyboards/kbdfans/kbd8x/keymaps/default/config.h similarity index 100% rename from keyboards/kbd8x/keymaps/default/config.h rename to keyboards/kbdfans/kbd8x/keymaps/default/config.h diff --git a/keyboards/kbd8x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c similarity index 69% rename from keyboards/kbd8x/keymaps/default/keymap.c rename to keyboards/kbdfans/kbd8x/keymaps/default/keymap.c index 3d315035beec..a7dcd5518c13 100644 --- a/keyboards/kbd8x/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c @@ -25,6 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RSFT, KC_UP, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, 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, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, 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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, 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, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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 macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/kbd8x/keymaps/default/readme.md b/keyboards/kbdfans/kbd8x/keymaps/default/readme.md similarity index 100% rename from keyboards/kbd8x/keymaps/default/readme.md rename to keyboards/kbdfans/kbd8x/keymaps/default/readme.md diff --git a/keyboards/kbd8x/keymaps/default_backlighting/config.h b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/config.h similarity index 100% rename from keyboards/kbd8x/keymaps/default_backlighting/config.h rename to keyboards/kbdfans/kbd8x/keymaps/default_backlighting/config.h diff --git a/keyboards/kbd8x/keymaps/default_backlighting/keymap.c b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c similarity index 100% rename from keyboards/kbd8x/keymaps/default_backlighting/keymap.c rename to keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c diff --git a/keyboards/kbd8x/keymaps/default_backlighting/readme.md b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/readme.md similarity index 100% rename from keyboards/kbd8x/keymaps/default_backlighting/readme.md rename to keyboards/kbdfans/kbd8x/keymaps/default_backlighting/readme.md diff --git a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk new file mode 100644 index 000000000000..d98bb1cb1778 --- /dev/null +++ b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk @@ -0,0 +1 @@ +#Build Options diff --git a/keyboards/kbd8x/readme.md b/keyboards/kbdfans/kbd8x/readme.md similarity index 51% rename from keyboards/kbd8x/readme.md rename to keyboards/kbdfans/kbd8x/readme.md index 8c50af68f683..9f8555560abc 100644 --- a/keyboards/kbd8x/readme.md +++ b/keyboards/kbdfans/kbd8x/readme.md @@ -1,4 +1,4 @@ -# KBD 8X +# KBD8X ![kbd8x](imgur.com image replace me!) @@ -10,6 +10,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/blogs/updates/kbd-8x-update- Make example for this keyboard (after setting up your build environment): - make kbd8x:default + make kbdfans/kbd8x: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/kbd8x/rules.mk b/keyboards/kbdfans/kbd8x/rules.mk similarity index 95% rename from keyboards/kbd8x/rules.mk rename to keyboards/kbdfans/kbd8x/rules.mk index e5925463ec5c..be757756415c 100644 --- a/keyboards/kbd8x/rules.mk +++ b/keyboards/kbdfans/kbd8x/rules.mk @@ -60,8 +60,8 @@ COMMAND_ENABLE = yes # 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 -RGBLIGHT_ENABLE ?= yes # Enable keyboard RGB underglow +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 diff --git a/keyboards/kbdfans/readme.md b/keyboards/kbdfans/readme.md new file mode 100644 index 000000000000..1ba5ed3d1156 --- /dev/null +++ b/keyboards/kbdfans/readme.md @@ -0,0 +1,17 @@ +# KBDFans + +KBDfans is a keyboard retailer located in China. + +## Online Stores + +**Website:** https://kbdfans.cn/ +**AliExpress:** https://kbdfans.aliexpress.com/ +**eBay:** https://www.ebay.com/str/KBDfans/ +**Taobao:** https://yikewaishe.taobao.com/ + +## Social Media + +**Discord:** https://discord.gg/HMZKDhn +**Facebook:** https://www.facebook.com/KBDfanskeyboard/ +**Instagram:** https://www.instagram.com/kbdfans.cn/ + From ff893bf17c454f28a8a00f9bf27d4ec4a72727e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Em=C4=ABls=20Delle?= Date: Tue, 5 Feb 2019 00:12:23 +0200 Subject: [PATCH 283/458] Tmo50 indicators (#5044) * Create ISO HHKB keymapping for GH60 * Add media controls to Fn layer * Use M(x) instead of F(x), add Copyright text * Add README for additional information about TMO50 features/quirks * Add indicator LED code * Move indicator code to tmo50.c --- keyboards/tmo50/keymaps/default/keymap.c | 1 - keyboards/tmo50/tmo50.c | 41 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/keyboards/tmo50/keymaps/default/keymap.c b/keyboards/tmo50/keymaps/default/keymap.c index 419893f1a684..7b8b644cc6ec 100644 --- a/keyboards/tmo50/keymaps/default/keymap.c +++ b/keyboards/tmo50/keymaps/default/keymap.c @@ -48,4 +48,3 @@ 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 ), }; - diff --git a/keyboards/tmo50/tmo50.c b/keyboards/tmo50/tmo50.c index a42ab4720af2..4f6288133da3 100644 --- a/keyboards/tmo50/tmo50.c +++ b/keyboards/tmo50/tmo50.c @@ -19,6 +19,15 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up + DDRB |= (1 << PB0); //init B0 + PORTB &= ~(1 << PB0); //turn on B0 + DDRB |= (1 << PB1); + PORTB |= (1< Date: Mon, 4 Feb 2019 16:57:45 -0600 Subject: [PATCH 284/458] 1up60hte hhkb layout support (#5050) * 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 --- keyboards/1upkeyboards/1up60hte/1up60hte.h | 16 +++- keyboards/1upkeyboards/1up60hte/config.h | 2 - .../1up60hte/keymaps/default/keymap.c | 8 +- .../1up60hte/keymaps/hhkb/keymap.c | 79 +++++++++++++++++++ keyboards/1upkeyboards/1up60hte/readme.md | 13 +++ keyboards/1upkeyboards/1up60hte/rules.mk | 2 + 6 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c create mode 100644 keyboards/1upkeyboards/1up60hte/readme.md diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h index 1103df6f7e89..eb4082f1ae75 100644 --- a/keyboards/1upkeyboards/1up60hte/1up60hte.h +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_all( \ 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, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ @@ -33,4 +33,18 @@ along with this program. If not, see . { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ } +/* HHKB Variant */ +#define LAYOUT_60_hhkb( \ + 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, \ + 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 \ +) { \ + { 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 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO }, \ + { 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 eb61a363ff75..c7e023a5edcb 100644 --- a/keyboards/1upkeyboards/1up60hte/config.h +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -55,8 +55,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - - #define RGB_DI_PIN F0 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c index d9cd8aebbfd4..396b660803a2 100644 --- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -18,14 +18,14 @@ along with this program. If not, see . 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_GRV, + [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_NO), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), - [1] = LAYOUT( + [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, diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c new file mode 100644 index 000000000000..1b06739b68f4 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c @@ -0,0 +1,79 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + 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) +}; + +void matrix_init_user(void) { + setPinOutput(B6); +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + 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/readme.md b/keyboards/1upkeyboards/1up60hte/readme.md new file mode 100644 index 000000000000..a5278788b713 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/readme.md @@ -0,0 +1,13 @@ +# 1up60hte (Hot Swap Edition - Tsangan) + +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/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/1up60hte: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/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index c77cac8a1784..b8b5582991ba 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -54,3 +54,5 @@ 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 + +LAYOUTS = 60_hhkb From e9c3e041460fa82addc67c194b9a881b3ee967e6 Mon Sep 17 00:00:00 2001 From: Flugschwein Date: Sat, 2 Feb 2019 23:32:26 +0100 Subject: [PATCH 285/458] Fix QWERTZ <> QWERTY issue in sendstring_german.h Small mistake that caused sendstring commands to exchange y with z. --- quantum/keymap_extras/sendstring_german.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quantum/keymap_extras/sendstring_german.h b/quantum/keymap_extras/sendstring_german.h index 1eaafee31737..f20fab77d185 100644 --- a/quantum/keymap_extras/sendstring_german.h +++ b/quantum/keymap_extras/sendstring_german.h @@ -67,7 +67,7 @@ const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { /* P Q R S T U V W */ KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, /* X Y Z [ \ ] ^ _ */ - KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, DE_CIRC, DE_MINS, + KC_X, DE_Y, DE_Z, KC_LBRC, KC_BSLS, KC_RBRC, DE_CIRC, DE_MINS, /* ` a b c d e f g */ DE_ACUT, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, /* h i j k l m n o */ @@ -75,7 +75,7 @@ const uint8_t ascii_to_keycode_lut[0x80] PROGMEM = { /* p q r s t u v w */ KC_P, KC_Q, KC_R, KC_S, KC_T, KC_U, KC_V, KC_W, /* x y z { | } ~ DELETE */ - KC_X, KC_Y, KC_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL + KC_X, DE_Y, DE_Z, KC_LBRC, KC_BSLS, KC_RBRC, KC_GRV, KC_DEL }; #endif From 80d427a2035afdc57b850381a36e4dd9d2c179ea Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Mon, 4 Feb 2019 15:08:37 -0800 Subject: [PATCH 286/458] [Keyboard] New Macropad: 1upkeyboards super16 (#5039) * initial commit * Do a nice write up for readme * establish switch matrix and physical layout * Put in the pins that are used * QMK configurator support and keymap * set bootloader to caterina because pro micro boohoo * add ortho_4x4 support for user spaces * got the columns reversed lol --- keyboards/1upkeyboards/super16/config.h | 244 ++++++++++++++++++ keyboards/1upkeyboards/super16/info.json | 12 + .../super16/keymaps/default/config.h | 19 ++ .../super16/keymaps/default/keymap.c | 65 +++++ .../super16/keymaps/default/readme.md | 1 + keyboards/1upkeyboards/super16/readme.md | 13 + keyboards/1upkeyboards/super16/rules.mk | 83 ++++++ keyboards/1upkeyboards/super16/super16.c | 43 +++ keyboards/1upkeyboards/super16/super16.h | 39 +++ 9 files changed, 519 insertions(+) create mode 100644 keyboards/1upkeyboards/super16/config.h create mode 100644 keyboards/1upkeyboards/super16/info.json create mode 100644 keyboards/1upkeyboards/super16/keymaps/default/config.h create mode 100644 keyboards/1upkeyboards/super16/keymaps/default/keymap.c create mode 100644 keyboards/1upkeyboards/super16/keymaps/default/readme.md create mode 100644 keyboards/1upkeyboards/super16/readme.md create mode 100644 keyboards/1upkeyboards/super16/rules.mk create mode 100644 keyboards/1upkeyboards/super16/super16.c create mode 100644 keyboards/1upkeyboards/super16/super16.h diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h new file mode 100644 index 000000000000..1f97c6fea90b --- /dev/null +++ b/keyboards/1upkeyboards/super16/config.h @@ -0,0 +1,244 @@ +/* +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 1upkeyboards +#define PRODUCT super16 +#define DESCRIPTION A 4x4 custom macropad + +/* 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 { D1, D0, F4, F5 } +#define MATRIX_COL_PINS { D4, C6, F6, F7 } +#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 D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 // Add 12 if attaching the RGB LED ring + #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/1upkeyboards/super16/info.json b/keyboards/1upkeyboards/super16/info.json new file mode 100644 index 000000000000..e8f4faa23d4a --- /dev/null +++ b/keyboards/1upkeyboards/super16/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "super16", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "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/1upkeyboards/super16/keymaps/default/config.h b/keyboards/1upkeyboards/super16/keymaps/default/config.h new file mode 100644 index 000000000000..16fc8b974680 --- /dev/null +++ b/keyboards/1upkeyboards/super16/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/1upkeyboards/super16/keymaps/default/keymap.c b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c new file mode 100644 index 000000000000..36ad3f2839af --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* 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_ortho_4x4( /* Base */ + KC_A, KC_1, KC_2, KC_4, \ + KC_A, KC_1, KC_2, KC_4, \ + KC_A, KC_1, KC_2, KC_4, \ + KC_A, KC_1, KC_2, KC_4 \ + ), +}; + +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/1upkeyboards/super16/keymaps/default/readme.md b/keyboards/1upkeyboards/super16/keymaps/default/readme.md new file mode 100644 index 000000000000..814f15c005a0 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for super16 diff --git a/keyboards/1upkeyboards/super16/readme.md b/keyboards/1upkeyboards/super16/readme.md new file mode 100644 index 000000000000..61b92ff85e92 --- /dev/null +++ b/keyboards/1upkeyboards/super16/readme.md @@ -0,0 +1,13 @@ +# Super 16 Macro Pad + +A 4x4 macropad with RGB underglow. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Super 16 Macropad +Hardware Availability: [1upkeyboards](https://www.1upkeyboards.com/shop/keyboard-kits/super-16-macro-pad/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/super16: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/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk new file mode 100644 index 000000000000..efcde883428f --- /dev/null +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -0,0 +1,83 @@ +# 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 = 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 = 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 \ No newline at end of file diff --git a/keyboards/1upkeyboards/super16/super16.c b/keyboards/1upkeyboards/super16/super16.c new file mode 100644 index 000000000000..cf33cab92698 --- /dev/null +++ b/keyboards/1upkeyboards/super16/super16.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 "super16.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/1upkeyboards/super16/super16.h b/keyboards/1upkeyboards/super16/super16.h new file mode 100644 index 000000000000..a95f687b164a --- /dev/null +++ b/keyboards/1upkeyboards/super16/super16.h @@ -0,0 +1,39 @@ +/* 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_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 }, \ +} From e4ff07aff06dcdc45859bfc1e5106069fb65020b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Tue, 5 Feb 2019 00:10:11 +0100 Subject: [PATCH 287/458] Fix mixed tabs/spaces and typos in keyboards/converter makefiles (#5041) * Fix mixed tabs and spaces in adb_usb and m0110_usb makefiles * Fix typos in converter build options * Tweak ordering and spacing in converter makefiles --- keyboards/converter/adb_usb/rules.mk | 34 +++++++++++----------- keyboards/converter/hp_46010a/rules.mk | 16 +++++------ keyboards/converter/ibm_5291/rules.mk | 12 ++++---- keyboards/converter/ibm_terminal/rules.mk | 16 +++++------ keyboards/converter/m0110_usb/rules.mk | 35 +++++++++++------------ keyboards/converter/palm_usb/rules.mk | 30 +++++++++---------- keyboards/converter/sun_usb/rules.mk | 23 +++++++-------- keyboards/converter/usb_usb/rules.mk | 26 ++++++++--------- keyboards/converter/xt_usb/rules.mk | 21 ++++++-------- 9 files changed, 96 insertions(+), 117 deletions(-) diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 4743b6b08f12..7901898c7c38 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -1,7 +1,7 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 +# atmega32u4 Teensy2.0 +# atemga32u4 TMK Converter rev.1 +# atemga32u2 TMK Converter rev.2 MCU = atmega32u4 # Processor frequency. @@ -50,25 +50,23 @@ BOOTLOADER = caterina # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 +# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 # LUFA bootloader 4096 # USBaspLoader 2048 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -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 = no # USB Nkey Rollover - not yet supported in LUFA -EXTRAKEY_ENABLE = yes -USB_HID_ENABLE = yes -BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +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 = no # USB Nkey Rollover - not yet supported in LUFA +EXTRAKEY_ENABLE = yes +USB_HID_ENABLE = yes +BACKLIGHT_ENABLE = no +#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +CUSTOM_MATRIX = yes -CUSTOM_MATRIX = yes -SRC = matrix.c \ - adb.c \ - led.c +SRC = matrix.c adb.c led.c diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index ddd2d593bd21..25be649995ca 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -39,7 +39,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = halfkay @@ -48,8 +48,8 @@ BOOTLOADER = halfkay # 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) +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 @@ -62,11 +62,9 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes - +LAYOUTS_HAS_RGB = 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_HAS_RGB = NO - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes -SRC = matrix.c \ No newline at end of file + +SRC = matrix.c diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk index ca0c850c0bab..57e385f0a9a1 100644 --- a/keyboards/converter/ibm_5291/rules.mk +++ b/keyboards/converter/ibm_5291/rules.mk @@ -39,7 +39,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = halfkay @@ -62,11 +62,9 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes - +LAYOUTS_HAS_RGB = 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_HAS_RGB = NO - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes -SRC = matrix.c \ No newline at end of file + +SRC = matrix.c diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 77b3a6f3f75f..3fa8792464c8 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -36,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 @@ -46,11 +45,11 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # 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) -MOUSEKEY_ENABLE = yes # 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 = no # Commands for debug and configuration @@ -61,12 +60,11 @@ 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 = n -CUSTOM_MATRIX = yes - +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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +CUSTOM_MATRIX = yes -SRC = matrix.c led.c \ No newline at end of file +SRC = matrix.c led.c diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index 3b4ca83b750b..bffee05fde21 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -1,7 +1,7 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 +# atmega32u4 Teensy2.0 +# atemga32u4 TMK Converter rev.1 +# atemga32u2 TMK Converter rev.2 MCU = atmega32u4 # Processor frequency. @@ -43,31 +43,30 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 +# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 # LUFA bootloader 4096 # USBaspLoader 2048 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA -EXTRAKEY_ENABLE = yes -USB_HID_ENABLE = yes -BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA +EXTRAKEY_ENABLE = yes +USB_HID_ENABLE = yes +BACKLIGHT_ENABLE = no +#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +CUSTOM_MATRIX = yes -CUSTOM_MATRIX = yes -SRC = matrix.c \ - m0110.c +SRC = matrix.c m0110.c diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 35ea3995e65f..8dfc2ca4d719 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -9,38 +9,34 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTLOADER = caterina # 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) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # 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 +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # 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 -UNICODEMAP_ENABLE = no +UNICODEMAP_ENABLE = no BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -CUSTOM_MATRIX = 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 - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #HARDWARE_SERIAL = yes +CUSTOM_MATRIX = yes SRC += matrix.c - ifdef HARDWARE_SERIAL - # untested with palm_usb - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL + # Untested with palm_usb + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL else - SRC += protocol/serial_soft.c + SRC += protocol/serial_soft.c endif DEFAULT_FOLDER = converter/palm_usb/stowaway - diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 3cf503b1d25f..22311c3d4c73 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -9,14 +9,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTLOADER = lufa-dfu # 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) -MOUSEKEY_ENABLE = yes # 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 = yes # Commands for debug and configuration +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls @@ -24,21 +24,18 @@ 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. -CUSTOM_MATRIX = 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 - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #HARDWARE_SERIAL = yes +CUSTOM_MATRIX = yes SRC += matrix.c led.c - ifdef HARDWARE_SERIAL - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL else - SRC += protocol/serial_soft.c + SRC += protocol/serial_soft.c endif DEFAULT_FOLDER = converter/sun_usb/type5 diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk index 7a8f24bb49ab..dfe89ee7d945 100644 --- a/keyboards/converter/usb_usb/rules.mk +++ b/keyboards/converter/usb_usb/rules.mk @@ -1,7 +1,6 @@ # 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 @@ -23,7 +22,6 @@ F_CPU ?= 16000000 DEFAULT_FOLDER = converter/usb_usb/hasu - # # LUFA specific # @@ -45,7 +43,7 @@ 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 +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina @@ -55,15 +53,15 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # 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 = yes # Console for debug(+400) -# COMMAND_ENABLE = yes # Commands for debug and configuration -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -# BACKLIGHT_ENABLE = yes -USB_HID_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 = yes # Console for debug(+400) +#COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +#BACKLIGHT_ENABLE = yes +USB_HID_ENABLE = yes +CUSTOM_MATRIX = yes -CUSTOM_MATRIX = yes -SRC = custom_matrix.cpp \ No newline at end of file +SRC = custom_matrix.cpp diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 0b8731f32635..1f96251830fe 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -14,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -42,21 +41,19 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # BOOTLOADER = caterina # Pro Micro BOOTLOADER = halfkay # Teensy - # Build Options # comment out to disable the options. # -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 -NKRO_ENABLE = yes # USB Nkey Rollover -XT_ENABLE = yes -CUSTOM_MATRIX = yes +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 +NKRO_ENABLE = yes # USB Nkey Rollover +XT_ENABLE = yes +CUSTOM_MATRIX = yes +SRC = matrix.c led.c # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax - -SRC = matrix.c led.c From ab579650b69f3080acc6cda62202605605a909bd Mon Sep 17 00:00:00 2001 From: Josh Forisha Date: Mon, 4 Feb 2019 17:29:44 -0600 Subject: [PATCH 288/458] Fix XD87 ANSI layout values (#5031) The tkl_ansi layout had an incorrect value for the grave/tilde key, and number row keys were misnumbered. This fix removes the typo and adds the missing K1C key. --- keyboards/xd87/xd87.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboards/xd87/xd87.h b/keyboards/xd87/xd87.h index c4df290a3be1..2ed47fe97673 100644 --- a/keyboards/xd87/xd87.h +++ b/keyboards/xd87/xd87.h @@ -37,14 +37,14 @@ #define LAYOUT_tkl_ansi( \ K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ ) LAYOUT_all( \ K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, K1D, KC_NO, K1E, K1F, K1G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1E, K1F, K1G, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, \ K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO, \ @@ -67,4 +67,4 @@ K50, K51, K52, KC_NO, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ ) -#endif \ No newline at end of file +#endif From 33526778209f9de570edd0b7af1a42eed8fffdc2 Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Tue, 5 Feb 2019 00:31:59 +0100 Subject: [PATCH 289/458] Make QMK Configurator work with e7-v1 (#5007) * Make QMK Configurator work with e7-v1 This adds the missing info.json file for the e7-v1 keyboard which I forgot to add to the original PR. This allows to see the correct layout in QMK Configurator. * Fix the ISO layout The ISO layout has one extra key (hash/tilde) on row 3 right before the enter key. The e7-v1 PCB has this key wired at the same switch as the ANSI backslash (since this switch is not used in ISO). --- keyboards/e7v1/config.h | 6 +++--- keyboards/e7v1/e7v1.h | 8 ++++---- keyboards/e7v1/info.json | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 keyboards/e7v1/info.json diff --git a/keyboards/e7v1/config.h b/keyboards/e7v1/config.h index 653d8740418b..eacb3ba312bf 100644 --- a/keyboards/e7v1/config.h +++ b/keyboards/e7v1/config.h @@ -6,9 +6,9 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x7050 #define DEVICE_VER 0x0001 -#define MANUFACTURER Exclusive / E - Team -#define PRODUCT E7 - V1 -#define DESCRIPTION E7 - V1 QMK PCB(LED) +#define MANUFACTURER Exclusive / E-Team +#define PRODUCT E7-V1 +#define DESCRIPTION E7-V1 QMK PCB(LED) /* key matrix size */ #define MATRIX_ROWS 6 diff --git a/keyboards/e7v1/e7v1.h b/keyboards/e7v1/e7v1.h index 45ef519cd084..2fc7acb3bab9 100644 --- a/keyboards/e7v1/e7v1.h +++ b/keyboards/e7v1/e7v1.h @@ -15,8 +15,8 @@ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ - { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ - { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ } #define LAYOUT_75_ansi( \ @@ -90,13 +90,13 @@ K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K313, \ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ K500, K501, K502, K505, K510, K512, K513, K514, K515 \ ) { \ { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ diff --git a/keyboards/e7v1/info.json b/keyboards/e7v1/info.json new file mode 100644 index 000000000000..e675e661fa46 --- /dev/null +++ b/keyboards/e7v1/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "E7-V1", + "url": "", + "maintainer": "masterzen", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"label":"Backspace", "x":14, "y":1.5}, {"label":"Page Up", "x":15.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":"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":"Page down", "x":15.25, "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":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"Z", "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":"\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, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5}, {"label":"Win", "x":11, "y":5.5}, {"x":12, "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}] + }, + "LAYOUT_75_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Page Up", "x":15.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":"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":"Page down", "x":15.25, "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":"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":"\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, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.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}] + }, + "LAYOUT_75_ansi_7u": { + "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":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5, "w":2}, {"label":"Page Up", "x":15.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":"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":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "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":"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":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5, "w":1.5}, {"x":3, "y":5.5, "w":7}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.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}] }, + "LAYOUT_75_ansi_7u_splitbs": { + "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":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"Del", "x":14, "y":1.5}, {"label":"Page Up", "x":15.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":"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":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "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":"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":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5, "w":1.5}, {"x":3, "y":5.5, "w":7}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.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}] + }, + "LAYOUT_75_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Page Up", "x":15.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":"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":"Page down", "x":15.25, "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}, {"x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"Z", "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":"\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, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.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}]}, + "LAYOUT_75_ansi_splitbs": { + "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":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"Del", "x":14, "y":1.5}, {"label":"Page Up", "x":15.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":"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":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "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":"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":"\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, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.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}] + } + } +} From 9b232a7f885e320061aae994713acd31297eac5c Mon Sep 17 00:00:00 2001 From: Nicholas Shaff Date: Tue, 5 Feb 2019 08:36:49 -0600 Subject: [PATCH 290/458] Keyboards: Move the other Sentraq keyboards into the sentraq vendor directory (#5052) * Moving sentraq keyboards to sentraq subdirectory. * Updating readme markdown to correct make commands. * Updating s60_x references to point to the new vendor subdirectory. * Fixed stripped spaces in markdown. * Updated help information in s60_x readme and linked to additional documentation. --- keyboards/{ => sentraq}/s60_x/config.h | 0 keyboards/{ => sentraq}/s60_x/default/config.h | 0 keyboards/{ => sentraq}/s60_x/default/default.c | 0 keyboards/{ => sentraq}/s60_x/default/default.h | 0 keyboards/{ => sentraq}/s60_x/default/info.json | 0 keyboards/{ => sentraq}/s60_x/default/rules.mk | 0 .../{ => sentraq}/s60_x/keymaps/amnesia0287/keymap.c | 0 .../{ => sentraq}/s60_x/keymaps/amnesia0287/readme.md | 0 .../{ => sentraq}/s60_x/keymaps/ansi_qwertz/config.h | 0 .../ansi_qwertz/docs/KB_US-International-Alternative.svg | 0 ...nternational-Alternative.svg.2016_08_18_09_06_36.0.svg | 0 .../keymaps/ansi_qwertz/docs/KB_US-International.svg | 0 .../{ => sentraq}/s60_x/keymaps/ansi_qwertz/keymap.c | 0 .../{ => sentraq}/s60_x/keymaps/ansi_qwertz/readme.md | 0 .../{ => sentraq}/s60_x/keymaps/ansi_qwertz/rules.mk | 0 keyboards/{ => sentraq}/s60_x/keymaps/bluebear/config.h | 0 keyboards/{ => sentraq}/s60_x/keymaps/bluebear/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/bluebear/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/bluebear/rules.mk | 0 keyboards/{ => sentraq}/s60_x/keymaps/custom/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/custom/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/dbroqua/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/default/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/default/readme.md | 0 .../{ => sentraq}/s60_x/keymaps/default_rgb/keymap.c | 0 .../{ => sentraq}/s60_x/keymaps/default_rgb/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/hasu/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/hasu/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/hhkb/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/hhkb/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/iso/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/iso/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/iso_rgb/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/iso_rgb/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/jpec/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/jpec/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/plain/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/plain/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/poker/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/poker/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/poker_bit/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/poker_bit/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/poker_set/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/poker_set/readme.md | 0 keyboards/{ => sentraq}/s60_x/keymaps/spacefn/keymap.c | 0 keyboards/{ => sentraq}/s60_x/keymaps/spacefn/readme.md | 0 keyboards/{ => sentraq}/s60_x/readme.md | 8 ++++---- keyboards/{ => sentraq}/s60_x/rgb/config.h | 0 keyboards/{ => sentraq}/s60_x/rgb/info.json | 0 keyboards/{ => sentraq}/s60_x/rgb/rgb.c | 0 keyboards/{ => sentraq}/s60_x/rgb/rgb.h | 0 keyboards/{ => sentraq}/s60_x/rgb/rules.mk | 0 keyboards/{ => sentraq}/s60_x/rules.mk | 2 +- keyboards/{ => sentraq}/s60_x/s60_x.c | 0 keyboards/{ => sentraq}/s60_x/s60_x.h | 4 ++-- keyboards/{ => sentraq}/s65_plus/config.h | 0 keyboards/{ => sentraq}/s65_plus/info.json | 0 keyboards/{ => sentraq}/s65_plus/keymaps/default/keymap.c | 0 keyboards/{ => sentraq}/s65_plus/keymaps/iso/keymap.c | 0 keyboards/{ => sentraq}/s65_plus/keymaps/iso/readme.md | 0 keyboards/{ => sentraq}/s65_plus/readme.md | 2 +- keyboards/{ => sentraq}/s65_plus/rules.mk | 0 keyboards/{ => sentraq}/s65_plus/s65_plus.c | 0 keyboards/{ => sentraq}/s65_plus/s65_plus.h | 0 keyboards/{ => sentraq}/s65_x/config.h | 0 keyboards/{ => sentraq}/s65_x/info.json | 0 keyboards/{ => sentraq}/s65_x/keymaps/default/keymap.c | 0 keyboards/{ => sentraq}/s65_x/keymaps/default/readme.md | 0 keyboards/{ => sentraq}/s65_x/keymaps/iso/keymap.c | 0 keyboards/{ => sentraq}/s65_x/keymaps/iso/readme.md | 0 keyboards/{ => sentraq}/s65_x/keymaps/kelorean/keymap.c | 0 keyboards/{ => sentraq}/s65_x/keymaps/kelorean/readme.md | 0 keyboards/{ => sentraq}/s65_x/keymaps/nall/keymap.c | 0 keyboards/{ => sentraq}/s65_x/keymaps/smt/keymap.c | 0 keyboards/{ => sentraq}/s65_x/readme.md | 2 +- keyboards/{ => sentraq}/s65_x/rules.mk | 0 keyboards/{ => sentraq}/s65_x/s65_x.c | 0 keyboards/{ => sentraq}/s65_x/s65_x.h | 0 78 files changed, 9 insertions(+), 9 deletions(-) rename keyboards/{ => sentraq}/s60_x/config.h (100%) rename keyboards/{ => sentraq}/s60_x/default/config.h (100%) rename keyboards/{ => sentraq}/s60_x/default/default.c (100%) rename keyboards/{ => sentraq}/s60_x/default/default.h (100%) rename keyboards/{ => sentraq}/s60_x/default/info.json (100%) rename keyboards/{ => sentraq}/s60_x/default/rules.mk (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/amnesia0287/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/amnesia0287/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/config.h (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/ansi_qwertz/rules.mk (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/bluebear/config.h (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/bluebear/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/bluebear/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/bluebear/rules.mk (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/custom/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/custom/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/dbroqua/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/default/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/default/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/default_rgb/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/default_rgb/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/hasu/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/hasu/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/hhkb/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/hhkb/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/iso/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/iso/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/iso_rgb/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/iso_rgb/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/jpec/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/jpec/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/plain/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/plain/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/poker/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/poker/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/poker_bit/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/poker_bit/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/poker_set/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/poker_set/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/spacefn/keymap.c (100%) rename keyboards/{ => sentraq}/s60_x/keymaps/spacefn/readme.md (100%) rename keyboards/{ => sentraq}/s60_x/readme.md (63%) rename keyboards/{ => sentraq}/s60_x/rgb/config.h (100%) rename keyboards/{ => sentraq}/s60_x/rgb/info.json (100%) rename keyboards/{ => sentraq}/s60_x/rgb/rgb.c (100%) rename keyboards/{ => sentraq}/s60_x/rgb/rgb.h (100%) rename keyboards/{ => sentraq}/s60_x/rgb/rules.mk (100%) rename keyboards/{ => sentraq}/s60_x/rules.mk (98%) rename keyboards/{ => sentraq}/s60_x/s60_x.c (100%) rename keyboards/{ => sentraq}/s60_x/s60_x.h (62%) rename keyboards/{ => sentraq}/s65_plus/config.h (100%) rename keyboards/{ => sentraq}/s65_plus/info.json (100%) rename keyboards/{ => sentraq}/s65_plus/keymaps/default/keymap.c (100%) rename keyboards/{ => sentraq}/s65_plus/keymaps/iso/keymap.c (100%) rename keyboards/{ => sentraq}/s65_plus/keymaps/iso/readme.md (100%) rename keyboards/{ => sentraq}/s65_plus/readme.md (94%) rename keyboards/{ => sentraq}/s65_plus/rules.mk (100%) rename keyboards/{ => sentraq}/s65_plus/s65_plus.c (100%) rename keyboards/{ => sentraq}/s65_plus/s65_plus.h (100%) rename keyboards/{ => sentraq}/s65_x/config.h (100%) rename keyboards/{ => sentraq}/s65_x/info.json (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/default/keymap.c (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/default/readme.md (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/iso/keymap.c (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/iso/readme.md (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/kelorean/keymap.c (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/kelorean/readme.md (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/nall/keymap.c (100%) rename keyboards/{ => sentraq}/s65_x/keymaps/smt/keymap.c (100%) rename keyboards/{ => sentraq}/s65_x/readme.md (94%) rename keyboards/{ => sentraq}/s65_x/rules.mk (100%) rename keyboards/{ => sentraq}/s65_x/s65_x.c (100%) rename keyboards/{ => sentraq}/s65_x/s65_x.h (100%) diff --git a/keyboards/s60_x/config.h b/keyboards/sentraq/s60_x/config.h similarity index 100% rename from keyboards/s60_x/config.h rename to keyboards/sentraq/s60_x/config.h diff --git a/keyboards/s60_x/default/config.h b/keyboards/sentraq/s60_x/default/config.h similarity index 100% rename from keyboards/s60_x/default/config.h rename to keyboards/sentraq/s60_x/default/config.h diff --git a/keyboards/s60_x/default/default.c b/keyboards/sentraq/s60_x/default/default.c similarity index 100% rename from keyboards/s60_x/default/default.c rename to keyboards/sentraq/s60_x/default/default.c diff --git a/keyboards/s60_x/default/default.h b/keyboards/sentraq/s60_x/default/default.h similarity index 100% rename from keyboards/s60_x/default/default.h rename to keyboards/sentraq/s60_x/default/default.h diff --git a/keyboards/s60_x/default/info.json b/keyboards/sentraq/s60_x/default/info.json similarity index 100% rename from keyboards/s60_x/default/info.json rename to keyboards/sentraq/s60_x/default/info.json diff --git a/keyboards/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk similarity index 100% rename from keyboards/s60_x/default/rules.mk rename to keyboards/sentraq/s60_x/default/rules.mk diff --git a/keyboards/s60_x/keymaps/amnesia0287/keymap.c b/keyboards/sentraq/s60_x/keymaps/amnesia0287/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/amnesia0287/keymap.c rename to keyboards/sentraq/s60_x/keymaps/amnesia0287/keymap.c diff --git a/keyboards/s60_x/keymaps/amnesia0287/readme.md b/keyboards/sentraq/s60_x/keymaps/amnesia0287/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/amnesia0287/readme.md rename to keyboards/sentraq/s60_x/keymaps/amnesia0287/readme.md diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/config.h b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/config.h rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/keymap.c rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/readme.md b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/readme.md rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/readme.md diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk similarity index 100% rename from keyboards/s60_x/keymaps/ansi_qwertz/rules.mk rename to keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk diff --git a/keyboards/s60_x/keymaps/bluebear/config.h b/keyboards/sentraq/s60_x/keymaps/bluebear/config.h similarity index 100% rename from keyboards/s60_x/keymaps/bluebear/config.h rename to keyboards/sentraq/s60_x/keymaps/bluebear/config.h diff --git a/keyboards/s60_x/keymaps/bluebear/keymap.c b/keyboards/sentraq/s60_x/keymaps/bluebear/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/bluebear/keymap.c rename to keyboards/sentraq/s60_x/keymaps/bluebear/keymap.c diff --git a/keyboards/s60_x/keymaps/bluebear/readme.md b/keyboards/sentraq/s60_x/keymaps/bluebear/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/bluebear/readme.md rename to keyboards/sentraq/s60_x/keymaps/bluebear/readme.md diff --git a/keyboards/s60_x/keymaps/bluebear/rules.mk b/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk similarity index 100% rename from keyboards/s60_x/keymaps/bluebear/rules.mk rename to keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk diff --git a/keyboards/s60_x/keymaps/custom/keymap.c b/keyboards/sentraq/s60_x/keymaps/custom/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/custom/keymap.c rename to keyboards/sentraq/s60_x/keymaps/custom/keymap.c diff --git a/keyboards/s60_x/keymaps/custom/readme.md b/keyboards/sentraq/s60_x/keymaps/custom/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/custom/readme.md rename to keyboards/sentraq/s60_x/keymaps/custom/readme.md diff --git a/keyboards/s60_x/keymaps/dbroqua/keymap.c b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/dbroqua/keymap.c rename to keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c diff --git a/keyboards/s60_x/keymaps/default/keymap.c b/keyboards/sentraq/s60_x/keymaps/default/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/default/keymap.c rename to keyboards/sentraq/s60_x/keymaps/default/keymap.c diff --git a/keyboards/s60_x/keymaps/default/readme.md b/keyboards/sentraq/s60_x/keymaps/default/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/default/readme.md rename to keyboards/sentraq/s60_x/keymaps/default/readme.md diff --git a/keyboards/s60_x/keymaps/default_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/default_rgb/keymap.c rename to keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c diff --git a/keyboards/s60_x/keymaps/default_rgb/readme.md b/keyboards/sentraq/s60_x/keymaps/default_rgb/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/default_rgb/readme.md rename to keyboards/sentraq/s60_x/keymaps/default_rgb/readme.md diff --git a/keyboards/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/hasu/keymap.c rename to keyboards/sentraq/s60_x/keymaps/hasu/keymap.c diff --git a/keyboards/s60_x/keymaps/hasu/readme.md b/keyboards/sentraq/s60_x/keymaps/hasu/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/hasu/readme.md rename to keyboards/sentraq/s60_x/keymaps/hasu/readme.md diff --git a/keyboards/s60_x/keymaps/hhkb/keymap.c b/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/hhkb/keymap.c rename to keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c diff --git a/keyboards/s60_x/keymaps/hhkb/readme.md b/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/hhkb/readme.md rename to keyboards/sentraq/s60_x/keymaps/hhkb/readme.md diff --git a/keyboards/s60_x/keymaps/iso/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/iso/keymap.c rename to keyboards/sentraq/s60_x/keymaps/iso/keymap.c diff --git a/keyboards/s60_x/keymaps/iso/readme.md b/keyboards/sentraq/s60_x/keymaps/iso/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/iso/readme.md rename to keyboards/sentraq/s60_x/keymaps/iso/readme.md diff --git a/keyboards/s60_x/keymaps/iso_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/iso_rgb/keymap.c rename to keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c diff --git a/keyboards/s60_x/keymaps/iso_rgb/readme.md b/keyboards/sentraq/s60_x/keymaps/iso_rgb/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/iso_rgb/readme.md rename to keyboards/sentraq/s60_x/keymaps/iso_rgb/readme.md diff --git a/keyboards/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/jpec/keymap.c rename to keyboards/sentraq/s60_x/keymaps/jpec/keymap.c diff --git a/keyboards/s60_x/keymaps/jpec/readme.md b/keyboards/sentraq/s60_x/keymaps/jpec/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/jpec/readme.md rename to keyboards/sentraq/s60_x/keymaps/jpec/readme.md diff --git a/keyboards/s60_x/keymaps/plain/keymap.c b/keyboards/sentraq/s60_x/keymaps/plain/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/plain/keymap.c rename to keyboards/sentraq/s60_x/keymaps/plain/keymap.c diff --git a/keyboards/s60_x/keymaps/plain/readme.md b/keyboards/sentraq/s60_x/keymaps/plain/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/plain/readme.md rename to keyboards/sentraq/s60_x/keymaps/plain/readme.md diff --git a/keyboards/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/poker/keymap.c rename to keyboards/sentraq/s60_x/keymaps/poker/keymap.c diff --git a/keyboards/s60_x/keymaps/poker/readme.md b/keyboards/sentraq/s60_x/keymaps/poker/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/poker/readme.md rename to keyboards/sentraq/s60_x/keymaps/poker/readme.md diff --git a/keyboards/s60_x/keymaps/poker_bit/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/poker_bit/keymap.c rename to keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c diff --git a/keyboards/s60_x/keymaps/poker_bit/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/poker_bit/readme.md rename to keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md diff --git a/keyboards/s60_x/keymaps/poker_set/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/poker_set/keymap.c rename to keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c diff --git a/keyboards/s60_x/keymaps/poker_set/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/poker_set/readme.md rename to keyboards/sentraq/s60_x/keymaps/poker_set/readme.md diff --git a/keyboards/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c similarity index 100% rename from keyboards/s60_x/keymaps/spacefn/keymap.c rename to keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c diff --git a/keyboards/s60_x/keymaps/spacefn/readme.md b/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md similarity index 100% rename from keyboards/s60_x/keymaps/spacefn/readme.md rename to keyboards/sentraq/s60_x/keymaps/spacefn/readme.md diff --git a/keyboards/s60_x/readme.md b/keyboards/sentraq/s60_x/readme.md similarity index 63% rename from keyboards/s60_x/readme.md rename to keyboards/sentraq/s60_x/readme.md index 1e4b4cc3165d..09ad068e7386 100644 --- a/keyboards/s60_x/readme.md +++ b/keyboards/sentraq/s60_x/readme.md @@ -6,14 +6,14 @@ Keyboard Maintainer: QMK Community Hardware Supported: S60-x PCB Hardware Availability: https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open -There are two versions of this keyboard, an RGB and a non RGB one. +There are two versions of this keyboard, an RGB and a non RGB one. Make example for this keyboard (after setting up your build environment): - make s60_x:default + make sentraq/s60_x:default Make example for rgb version of this keyboard: - make s60_x/rgb:default + make sentraq/s60_x/rgb: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/s60_x/rgb/config.h b/keyboards/sentraq/s60_x/rgb/config.h similarity index 100% rename from keyboards/s60_x/rgb/config.h rename to keyboards/sentraq/s60_x/rgb/config.h diff --git a/keyboards/s60_x/rgb/info.json b/keyboards/sentraq/s60_x/rgb/info.json similarity index 100% rename from keyboards/s60_x/rgb/info.json rename to keyboards/sentraq/s60_x/rgb/info.json diff --git a/keyboards/s60_x/rgb/rgb.c b/keyboards/sentraq/s60_x/rgb/rgb.c similarity index 100% rename from keyboards/s60_x/rgb/rgb.c rename to keyboards/sentraq/s60_x/rgb/rgb.c diff --git a/keyboards/s60_x/rgb/rgb.h b/keyboards/sentraq/s60_x/rgb/rgb.h similarity index 100% rename from keyboards/s60_x/rgb/rgb.h rename to keyboards/sentraq/s60_x/rgb/rgb.h diff --git a/keyboards/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk similarity index 100% rename from keyboards/s60_x/rgb/rules.mk rename to keyboards/sentraq/s60_x/rgb/rules.mk diff --git a/keyboards/s60_x/rules.mk b/keyboards/sentraq/s60_x/rules.mk similarity index 98% rename from keyboards/s60_x/rules.mk rename to keyboards/sentraq/s60_x/rules.mk index 9f0ae7caebd1..31de8ba39e34 100644 --- a/keyboards/s60_x/rules.mk +++ b/keyboards/sentraq/s60_x/rules.mk @@ -64,6 +64,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -DEFAULT_FOLDER = s60_x/default +DEFAULT_FOLDER = sentraq/s60_x/default LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso diff --git a/keyboards/s60_x/s60_x.c b/keyboards/sentraq/s60_x/s60_x.c similarity index 100% rename from keyboards/s60_x/s60_x.c rename to keyboards/sentraq/s60_x/s60_x.c diff --git a/keyboards/s60_x/s60_x.h b/keyboards/sentraq/s60_x/s60_x.h similarity index 62% rename from keyboards/s60_x/s60_x.h rename to keyboards/sentraq/s60_x/s60_x.h index b70cb5864b12..59c9741b5a87 100644 --- a/keyboards/s60_x/s60_x.h +++ b/keyboards/sentraq/s60_x/s60_x.h @@ -1,10 +1,10 @@ #ifndef S60X_H #define S60X_H -#ifdef KEYBOARD_s60_x_default +#ifdef KEYBOARD_sentraq_s60_x_default #include "default.h" #endif -#ifdef KEYBOARD_s60_x_rgb +#ifdef KEYBOARD_sentraq_s60_x_rgb #include "rgb.h" #endif diff --git a/keyboards/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h similarity index 100% rename from keyboards/s65_plus/config.h rename to keyboards/sentraq/s65_plus/config.h diff --git a/keyboards/s65_plus/info.json b/keyboards/sentraq/s65_plus/info.json similarity index 100% rename from keyboards/s65_plus/info.json rename to keyboards/sentraq/s65_plus/info.json diff --git a/keyboards/s65_plus/keymaps/default/keymap.c b/keyboards/sentraq/s65_plus/keymaps/default/keymap.c similarity index 100% rename from keyboards/s65_plus/keymaps/default/keymap.c rename to keyboards/sentraq/s65_plus/keymaps/default/keymap.c diff --git a/keyboards/s65_plus/keymaps/iso/keymap.c b/keyboards/sentraq/s65_plus/keymaps/iso/keymap.c similarity index 100% rename from keyboards/s65_plus/keymaps/iso/keymap.c rename to keyboards/sentraq/s65_plus/keymaps/iso/keymap.c diff --git a/keyboards/s65_plus/keymaps/iso/readme.md b/keyboards/sentraq/s65_plus/keymaps/iso/readme.md similarity index 100% rename from keyboards/s65_plus/keymaps/iso/readme.md rename to keyboards/sentraq/s65_plus/keymaps/iso/readme.md diff --git a/keyboards/s65_plus/readme.md b/keyboards/sentraq/s65_plus/readme.md similarity index 94% rename from keyboards/s65_plus/readme.md rename to keyboards/sentraq/s65_plus/readme.md index b1ee865bfc82..0940d9a4fd5f 100644 --- a/keyboards/s65_plus/readme.md +++ b/keyboards/sentraq/s65_plus/readme.md @@ -9,6 +9,6 @@ Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/s Make example for this keyboard (after setting up your build environment): - make s65_plus:default + make sentraq/s65_plus: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/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk similarity index 100% rename from keyboards/s65_plus/rules.mk rename to keyboards/sentraq/s65_plus/rules.mk diff --git a/keyboards/s65_plus/s65_plus.c b/keyboards/sentraq/s65_plus/s65_plus.c similarity index 100% rename from keyboards/s65_plus/s65_plus.c rename to keyboards/sentraq/s65_plus/s65_plus.c diff --git a/keyboards/s65_plus/s65_plus.h b/keyboards/sentraq/s65_plus/s65_plus.h similarity index 100% rename from keyboards/s65_plus/s65_plus.h rename to keyboards/sentraq/s65_plus/s65_plus.h diff --git a/keyboards/s65_x/config.h b/keyboards/sentraq/s65_x/config.h similarity index 100% rename from keyboards/s65_x/config.h rename to keyboards/sentraq/s65_x/config.h diff --git a/keyboards/s65_x/info.json b/keyboards/sentraq/s65_x/info.json similarity index 100% rename from keyboards/s65_x/info.json rename to keyboards/sentraq/s65_x/info.json diff --git a/keyboards/s65_x/keymaps/default/keymap.c b/keyboards/sentraq/s65_x/keymaps/default/keymap.c similarity index 100% rename from keyboards/s65_x/keymaps/default/keymap.c rename to keyboards/sentraq/s65_x/keymaps/default/keymap.c diff --git a/keyboards/s65_x/keymaps/default/readme.md b/keyboards/sentraq/s65_x/keymaps/default/readme.md similarity index 100% rename from keyboards/s65_x/keymaps/default/readme.md rename to keyboards/sentraq/s65_x/keymaps/default/readme.md diff --git a/keyboards/s65_x/keymaps/iso/keymap.c b/keyboards/sentraq/s65_x/keymaps/iso/keymap.c similarity index 100% rename from keyboards/s65_x/keymaps/iso/keymap.c rename to keyboards/sentraq/s65_x/keymaps/iso/keymap.c diff --git a/keyboards/s65_x/keymaps/iso/readme.md b/keyboards/sentraq/s65_x/keymaps/iso/readme.md similarity index 100% rename from keyboards/s65_x/keymaps/iso/readme.md rename to keyboards/sentraq/s65_x/keymaps/iso/readme.md diff --git a/keyboards/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c similarity index 100% rename from keyboards/s65_x/keymaps/kelorean/keymap.c rename to keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c diff --git a/keyboards/s65_x/keymaps/kelorean/readme.md b/keyboards/sentraq/s65_x/keymaps/kelorean/readme.md similarity index 100% rename from keyboards/s65_x/keymaps/kelorean/readme.md rename to keyboards/sentraq/s65_x/keymaps/kelorean/readme.md diff --git a/keyboards/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c similarity index 100% rename from keyboards/s65_x/keymaps/nall/keymap.c rename to keyboards/sentraq/s65_x/keymaps/nall/keymap.c diff --git a/keyboards/s65_x/keymaps/smt/keymap.c b/keyboards/sentraq/s65_x/keymaps/smt/keymap.c similarity index 100% rename from keyboards/s65_x/keymaps/smt/keymap.c rename to keyboards/sentraq/s65_x/keymaps/smt/keymap.c diff --git a/keyboards/s65_x/readme.md b/keyboards/sentraq/s65_x/readme.md similarity index 94% rename from keyboards/s65_x/readme.md rename to keyboards/sentraq/s65_x/readme.md index d1dbdb10b6af..d6d309c843fc 100644 --- a/keyboards/s65_x/readme.md +++ b/keyboards/sentraq/s65_x/readme.md @@ -9,6 +9,6 @@ Hardware Availability: [Sentraq](https://sentraq.com/products/s65-x-rgb-diy-keyb Make example for this keyboard (after setting up your build environment): - make s65_x:default + make sentraq/s65_x: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/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk similarity index 100% rename from keyboards/s65_x/rules.mk rename to keyboards/sentraq/s65_x/rules.mk diff --git a/keyboards/s65_x/s65_x.c b/keyboards/sentraq/s65_x/s65_x.c similarity index 100% rename from keyboards/s65_x/s65_x.c rename to keyboards/sentraq/s65_x/s65_x.c diff --git a/keyboards/s65_x/s65_x.h b/keyboards/sentraq/s65_x/s65_x.h similarity index 100% rename from keyboards/s65_x/s65_x.h rename to keyboards/sentraq/s65_x/s65_x.h From b89cab87ce9daed9253126d2af43af1b6d79d54d Mon Sep 17 00:00:00 2001 From: Biacco42 Date: Wed, 6 Feb 2019 01:20:47 +0900 Subject: [PATCH 291/458] Add "meishi" keyboard (#5054) * Add meishi keyboard project * Update readme * Fix copyrights * Fix copyright year * Replace include guard with pragma once * Replace KEYMAP with LAYOUT --- keyboards/meishi/config.h | 188 +++++++++++++++++++++ keyboards/meishi/keymaps/default/keymap.c | 42 +++++ keyboards/meishi/keymaps/default/readme.md | 1 + keyboards/meishi/meishi.c | 43 +++++ keyboards/meishi/meishi.h | 31 ++++ keyboards/meishi/readme.md | 19 +++ keyboards/meishi/rules.mk | 68 ++++++++ 7 files changed, 392 insertions(+) create mode 100644 keyboards/meishi/config.h create mode 100644 keyboards/meishi/keymaps/default/keymap.c create mode 100644 keyboards/meishi/keymaps/default/readme.md create mode 100644 keyboards/meishi/meishi.c create mode 100644 keyboards/meishi/meishi.h create mode 100644 keyboards/meishi/readme.md create mode 100644 keyboards/meishi/rules.mk diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h new file mode 100644 index 000000000000..cbc22476dd9a --- /dev/null +++ b/keyboards/meishi/config.h @@ -0,0 +1,188 @@ +/* +Copyright 2019 Biacco42 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0xBC42 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Biacco42 +#define PRODUCT meishi +#define DESCRIPTION The micro macro keyboard + +/* 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 { B5 } +#define MATRIX_COL_PINS { B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #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. + * + */ + +/* 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 + diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c new file mode 100644 index 000000000000..88f08ee5656a --- /dev/null +++ b/keyboards/meishi/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2017 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "meishi.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V) \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +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/meishi/keymaps/default/readme.md b/keyboards/meishi/keymaps/default/readme.md new file mode 100644 index 000000000000..a9eb4e9cd80b --- /dev/null +++ b/keyboards/meishi/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for meishi \ No newline at end of file diff --git a/keyboards/meishi/meishi.c b/keyboards/meishi/meishi.c new file mode 100644 index 000000000000..92c5194d5f74 --- /dev/null +++ b/keyboards/meishi/meishi.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "meishi.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/meishi/meishi.h b/keyboards/meishi/meishi.h new file mode 100644 index 000000000000..61b9f628dbc7 --- /dev/null +++ b/keyboards/meishi/meishi.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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, k03\ +) \ +{ \ + { k00, k01, k02, k03 }\ +} + diff --git a/keyboards/meishi/readme.md b/keyboards/meishi/readme.md new file mode 100644 index 000000000000..99421ed8d33d --- /dev/null +++ b/keyboards/meishi/readme.md @@ -0,0 +1,19 @@ +# Meishi - The micro macro keyboard + +_Meishi_ means name cards. + +![meishi](https://raw.githubusercontent.com/Biacco42/meishi/readme/readme_image/P1210037.JPG) + +Only four keys keyboard for self made keyboard beginners. + +Keyboard Maintainer: [Biacco42](https://github.com/biacco42) +Hardware Supported: [Meishi keyboard PCB](https://github.com/Biacco42/meishi), Pro Micro supported +Hardware Availability: [Tanoshi life - Booth](https://biacco42.booth.pm/) + +Make example for this keyboard (after setting up your build environment): + +``` +$ make meishi:default:avrdude +``` + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/meishi/rules.mk b/keyboards/meishi/rules.mk new file mode 100644 index 000000000000..45eb6ee3766f --- /dev/null +++ b/keyboards/meishi/rules.mk @@ -0,0 +1,68 @@ +# 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 + + +# 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 From b97325812368cb853437068211e89b5617d3d841 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Tue, 5 Feb 2019 09:38:32 -0800 Subject: [PATCH 292/458] [Keyboard] TMO50 Off By 1 Column Bug (#5055) * fix a bug in which the physical matrix did not match the physical layout. Top row was missing 1 key and bottom row had 1 extra key * amend keymap to account for the new physical matrix * 6.25u space bar is actually supported, so add a new layout that supports this * fix keymap readme to no longer need the cautionary warning --- keyboards/tmo50/info.json | 7 +++-- keyboards/tmo50/keymaps/default/keymap.c | 32 ++++++++++++----------- keyboards/tmo50/keymaps/default/readme.md | 2 -- keyboards/tmo50/tmo50.h | 32 ++++++++++++++++------- 4 files changed, 45 insertions(+), 28 deletions(-) diff --git a/keyboards/tmo50/info.json b/keyboards/tmo50/info.json index e96fa4ceac03..751e766555be 100644 --- a/keyboards/tmo50/info.json +++ b/keyboards/tmo50/info.json @@ -2,12 +2,15 @@ "keyboard_name": "TMO50", "url": "", "maintainer": "funderburker", - "bootloader": "atmel-dfu", "width": 15.25, "height": 4, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [{"label":"", "x":0, "y":0}, {"label":"", "x":1.25, "y":0}, {"label":"", "x":2.25, "y":0}, {"label":"", "x":3.25, "y":0}, {"label":"", "x":4.25, "y":0}, {"label":"", "x":5.25, "y":0}, {"label":"", "x":6.25, "y":0}, {"label":"", "x":7.25, "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}, {"x":0, "y":1}, {"label":"Ctrl", "x":1.25, "y":1, "w":1.25}, {"label":"", "x":2.5, "y":1}, {"label":"", "x":3.5, "y":1}, {"label":"", "x":4.5, "y":1}, {"label":"", "x":5.5, "y":1}, {"label":"", "x":6.5, "y":1}, {"label":"", "x":7.5, "y":1}, {"label":"", "x":8.5, "y":1}, {"label":"", "x":9.5, "y":1}, {"label":"", "x":10.5, "y":1}, {"label":"", "x":11.5, "y":1}, {"label":"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":1.75}, {"label":"", "x":3, "y":2}, {"label":"", "x":4, "y":2}, {"label":"", "x":5, "y":2}, {"label":"", "x":6, "y":2}, {"label":"b", "x":7, "y":2}, {"label":"", "x":8, "y":2}, {"label":"m", "x":9, "y":2}, {"label":"", "x":10, "y":2}, {"label":"", "x":11, "y":2}, {"label":"", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"", "x":14.25, "y":2}, {"x":0, "y":3}, {"label":"Alt", "x":2.75, "y":3}, {"label":"Win", "x":3.75, "y":3, "w":1.5}, {"label":"", "x":5.25, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"AltGr", "x":10.25, "y":3, "w":1.5}, {"label":"L3", "x":11.75, "y":3}] + }, + + "LAYOUT_space": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":0, "y":1}, {"x":1.25, "y":1, "w":1.25}, {"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.75}, {"x":0, "y":2}, {"x":1.25, "y":2, "w":1.75}, {"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":12, "y":2}, {"x":13, "y":2, "w":1.25}, {"x":14.25, "y":2}, {"x":0, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3, "w":1.5}, {"x":5.25, "y":3, "w":6.25}, {"x":11.5, "y":3, "w":1.25}] } } } diff --git a/keyboards/tmo50/keymaps/default/keymap.c b/keyboards/tmo50/keymaps/default/keymap.c index 7b8b644cc6ec..a1d896b61be2 100644 --- a/keyboards/tmo50/keymaps/default/keymap.c +++ b/keyboards/tmo50/keymaps/default/keymap.c @@ -15,36 +15,38 @@ */ #include QMK_KEYBOARD_H +#define LT1_SPC LT(1, KC_SPC) + 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, + [0] = LAYOUT_all( + KC_TRNS, 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_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_TAB, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3) + KC_TRNS, KC_LALT, KC_LGUI, LT1_SPC, LT1_SPC, KC_RALT, MO(3) ), // Fn1 layer - [1] = LAYOUT( - 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_BSPC, - 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, KC_TRNS + [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_BSPC, KC_DEL, + 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( - 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, + [2] = LAYOUT_all( + 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_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_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 + 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, + [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, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/tmo50/keymaps/default/readme.md b/keyboards/tmo50/keymaps/default/readme.md index e3b0e0e6aee1..e8f5de830d09 100644 --- a/keyboards/tmo50/keymaps/default/readme.md +++ b/keyboards/tmo50/keymaps/default/readme.md @@ -6,8 +6,6 @@ You probably tried or will try to configure the keymapping to your liking. To ma ![TMO50 matrix](https://i.imgur.com/ud7RB8d.png) -As you can see here matrix consists of 4 rows and 14 columns. But the tricky part is that topmost left key (Tab/Esc) is connected to row 3 - this is done so there's no 15th column that would connect only one key to seperate pin. This also poses an thread that you will configure your layout incorrectly because KC_TAB is not in the correct place *[visually](https://i.imgur.com/RtoD9F6.png)* in *keymap.c* file. Please take this into account when making changes and double-check this. - ## Pinout Most of the pinout can be found in *config.h* but there's here's a table of all the used pins for TMO50 (including indicator LED pins) diff --git a/keyboards/tmo50/tmo50.h b/keyboards/tmo50/tmo50.h index 5723b00aeae1..df88350f02ab 100644 --- a/keyboards/tmo50/tmo50.h +++ b/keyboards/tmo50/tmo50.h @@ -25,16 +25,30 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ - 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, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K305, K307, K309, K310 \ + +#define LAYOUT_all( \ + K00, K31, 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, K32, K33, K35, K37, K39, K3A \ +) \ +{ \ + { 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, KC_NO, K35, KC_NO, K37, KC_NO, K39, K3A, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_space( \ + K00, K31, 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, K32, K33, K37, K3A \ ) \ { \ - { 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 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO } \ + { 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, KC_NO, KC_NO, KC_NO, K37, KC_NO, KC_NO, K3A, KC_NO, KC_NO, KC_NO } \ } From cb1aeb425488aaff11416caa0960c8b87801baf5 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sat, 2 Feb 2019 10:09:41 +1100 Subject: [PATCH 293/458] make clean should remove .bin and .hex too --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dd33357112d7..73fd8dc890a1 100644 --- a/Makefile +++ b/Makefile @@ -125,9 +125,11 @@ generate-keyboards-file: exit 0 clean: - echo -n 'Deleting .build ... ' + echo 'Deleting .build/ ...' rm -rf $(BUILD_DIR) - echo 'done' + echo 'Deleting *.bin and *.hex ...' + rm -f *.bin *.hex + echo 'Done.' exit 0 #Compatibility with the old make variables, anything you specify directly on the command line From 6172273c866637c06150647cacf1477d8c8075c9 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Sun, 3 Feb 2019 01:26:35 +1100 Subject: [PATCH 294/458] These targets should be .PHONY --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 73fd8dc890a1..c7dda23dc6f5 100644 --- a/Makefile +++ b/Makefile @@ -112,6 +112,7 @@ $(eval $(call GET_KEYBOARDS)) # Only consider folders with makefiles, to prevent errors in case there are extra folders #KEYBOARDS += $(patsubst $(ROOD_DIR)/keyboards/%/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk)) +.PHONY: list-keyboards list-keyboards: echo $(KEYBOARDS) exit 0 @@ -120,10 +121,12 @@ define PRINT_KEYBOARD $(info $(PRINTING_KEYBOARD)) endef +.PHONY: generate-keyboards-file generate-keyboards-file: $(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD))) exit 0 +.PHONY: clean clean: echo 'Deleting .build/ ...' rm -rf $(BUILD_DIR) @@ -579,6 +582,7 @@ lib/%: git submodule sync $? git submodule update --init $? +.PHONY: git-submodule git-submodule: git submodule sync --recursive git submodule update --init --recursive --progress From 612dc232d7e1e88dcd21be09eb32ef7099af854a Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 5 Feb 2019 10:06:08 +1100 Subject: [PATCH 295/458] Add distclean target instead --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index c7dda23dc6f5..610f53b4d42d 100644 --- a/Makefile +++ b/Makefile @@ -115,7 +115,6 @@ $(eval $(call GET_KEYBOARDS)) .PHONY: list-keyboards list-keyboards: echo $(KEYBOARDS) - exit 0 define PRINT_KEYBOARD $(info $(PRINTING_KEYBOARD)) @@ -124,16 +123,18 @@ endef .PHONY: generate-keyboards-file generate-keyboards-file: $(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD))) - exit 0 .PHONY: clean clean: - echo 'Deleting .build/ ...' + echo -n 'Deleting .build/ ... ' rm -rf $(BUILD_DIR) - echo 'Deleting *.bin and *.hex ...' + echo 'done.' + +.PHONY: distclean +distclean: clean + echo -n 'Deleting *.bin and *.hex ... ' rm -f *.bin *.hex - echo 'Done.' - exit 0 + echo 'done.' #Compatibility with the old make variables, anything you specify directly on the command line # always overrides the detected folders From d4e1e712f68567dfed6ff19cf762d01f6bb3d60c Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 5 Feb 2019 10:59:10 -0700 Subject: [PATCH 296/458] dd Honeycomb macropad (#5000) * Add Honeycome macropad * Replace pragma, update info * Update code based on review --- keyboards/honeycomb/config.h | 65 ++++++ keyboards/honeycomb/honeycomb.c | 92 +++++++++ keyboards/honeycomb/honeycomb.h | 37 ++++ keyboards/honeycomb/keymaps/default/keymap.c | 91 +++++++++ keyboards/honeycomb/matrix.c | 202 +++++++++++++++++++ keyboards/honeycomb/readme.md | 20 ++ keyboards/honeycomb/rules.mk | 68 +++++++ 7 files changed, 575 insertions(+) create mode 100755 keyboards/honeycomb/config.h create mode 100755 keyboards/honeycomb/honeycomb.c create mode 100755 keyboards/honeycomb/honeycomb.h create mode 100755 keyboards/honeycomb/keymaps/default/keymap.c create mode 100755 keyboards/honeycomb/matrix.c create mode 100755 keyboards/honeycomb/readme.md create mode 100755 keyboards/honeycomb/rules.mk diff --git a/keyboards/honeycomb/config.h b/keyboards/honeycomb/config.h new file mode 100755 index 000000000000..abc273c9772f --- /dev/null +++ b/keyboards/honeycomb/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 @filoxo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0xACC8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keyhive +#define PRODUCT Honeycomb Macropad +#define DESCRIPTION QMK firmware for Honeycomb Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 16 + +#define ONESHOT_TIMEOUT 500 + +/* 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 + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ +} while(0) diff --git a/keyboards/honeycomb/honeycomb.c b/keyboards/honeycomb/honeycomb.c new file mode 100755 index 000000000000..add4af153652 --- /dev/null +++ b/keyboards/honeycomb/honeycomb.c @@ -0,0 +1,92 @@ +#include "honeycomb.h" +#include "pointing_device.h" +#include "report.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void pointing_device_task(void){ + /*report_mouse_t currentReport = {}; + SERIAL_UART_INIT(); + uint32_t timeout = 0; + + //the m character requests the RF slave to send the mouse report + SERIAL_UART_DATA = 'm'; + + //trust the external inputs completely, erase old data + uint8_t uart_data[5] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 5; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + xprintf("\r\nTIMED OUT"); + break; + } + } + xprintf("\r\nGOT DATA for %d",i); + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, bytes 1-4 are movement and scroll + //but byte 5 has bits 0-3 for the scroll button state + //(1000 if pressed, 0000 if not) and bits 4-7 are always 1 + //We can use this to verify the report sent properly. + if (uart_data[4] == 0x0F || uart_data[4] == 0x8F) + { + xprintf("\r\nREQUESTED MOUSE, RECEIVED %i, %i, %i, %i, %i",uart_data[0],uart_data[1],uart_data[2],uart_data[3],uart_data[4]); + currentReport = pointing_device_get_report(); + //shifting and transferring the info to the mouse report varaible + //mouseReport.x = 127 max -127 min + currentReport.x = (int8_t) uart_data[0]; + //mouseReport.y = 127 max -127 min + currentReport.y = (int8_t) uart_data[1]; + //mouseReport.v = 127 max -127 min (scroll vertical) + currentReport.v = (int8_t) uart_data[2]; + //mouseReport.h = 127 max -127 min (scroll horizontal) + currentReport.h = (int8_t) uart_data[3]; + //mouseReport.buttons = 0x31 max (bitmask for mouse buttons 1-5) 0x00 min + //mouse buttons 1 and 2 are handled by the keymap, but not 3 + if (uart_data[4] == 0x0F) { //then 3 is not pressed + currentReport.buttons &= ~MOUSE_BTN3; //MOUSE_BTN3 is def in report.h + } else { //3 must be pressed + currentReport.buttons |= MOUSE_BTN3; + } + pointing_device_set_report(currentReport); + } else { + xprintf("\r\nRequested packet, data 4 was %d",uart_data[4]); + }*/ + pointing_device_send(); +} + +void led_init(void) { + setPinOutput(D1); + writePinHigh(D1); + setPinOutput(F4); + writePinHigh(F4); + setPinOutput(F5); + writePinHigh(F5); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + uart_init(); + led_init(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} + +void led_set_kb(uint8_t usb_led) { + +} diff --git a/keyboards/honeycomb/honeycomb.h b/keyboards/honeycomb/honeycomb.h new file mode 100755 index 000000000000..9374a02c5c62 --- /dev/null +++ b/keyboards/honeycomb/honeycomb.h @@ -0,0 +1,37 @@ +#pragma once + +#define HONEYCOMB_H + +#include "quantum.h" +#include "matrix.h" +#include "backlight.h" +#include + +#define RED_LED_OFF() writePinHigh(F6) +#define RED_LED_ON() writePinLow(F6) +#define BLU_LED_OFF() writePinHigh(F5) +#define BLU_LED_ON() writePinLow(F5) +#define GRN_LED_OFF() writePinHigh(D1) +#define GRN_LED_ON() writePinLow(D1) + +#define SET_LED_OFF (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_OFF(); ) +#define SET_LED_RED (RED_LED_ON(); GRN_LED_OFF(); BLU_LED_OFF(); ) +#define SET_LED_BLUE (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_ON(); ) +#define SET_LED_GREEN (RED_LED_OFF(); GRN_LED_ON(); BLU_LED_OFF(); ) +#define SET_LED_YELLOW (RED_LED_ON(); GRN_LED_ON(); BLU_LED_OFF(); ) +#define SET_LED_MAGENTA (RED_LED_ON(); GRN_LED_OFF(); BLU_LED_ON(); ) +#define SET_LED_CYAN (RED_LED_OFF(); GRN_LED_ON(); BLU_LED_ON(); ) +#define SET_LED_WHITE (RED_LED_ON(); GRN_LED_ON(); BLU_LED_ON(); ) + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k13, k14, k15, k16, \ + k09, k10, k11, k12, \ + k05, k06, k07, k08, \ + k01, k02, k03, k04 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, k16 } \ +} diff --git a/keyboards/honeycomb/keymaps/default/keymap.c b/keyboards/honeycomb/keymaps/default/keymap.c new file mode 100755 index 000000000000..d0a5961873aa --- /dev/null +++ b/keyboards/honeycomb/keymaps/default/keymap.c @@ -0,0 +1,91 @@ +#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 honeycomb_layers { + _BS, + _EN +}; + +// Macro definitions for readability +enum honeycomb_keycodes { + HW = SAFE_RANGE, + COPY, + PASTA +}; + +extern int8_t encoderValue; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BS] = LAYOUT( /* Base layout, put whatever defaults. */ + HW, COPY, PASTA, KC_MUTE, + KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_A, KC_B, + KC_C, KC_D, KC_E, KC_F + ), + + [_EN] = LAYOUT( /* Alternate layer */ + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) +}; + +report_mouse_t currentReport = {}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + //uint8_t layer = biton32(layer_state); // get the current layer + + // Basic example functions + switch (keycode) { + case HW: + if (record->event.pressed) { + SEND_STRING("Hello, world!"); + } else { + SEND_STRING("Goodbye, cruel world!"); + } + break; + case COPY: + if (record->event.pressed) { + tap_code16(LCTL(KC_C)); // Replace with tap_code16(LCMD(KC_C)) to enable for Mac + } + break; + case PASTA: + if (record->event.pressed) { + tap_code16(LCTL(KC_V)); // Replace with tap_code16(LCMD(KC_V)) to enable for Mac + } + break; + return false; + } + return true; +}; + +void matrix_scan_user(void) { + /* Leaving some LED stuff in here in comment form so you can see how to use it. + if (shiftLED || capsLED){ + red_led_on; + } else { + red_led_off; + } + if (numLED){ + grn_led_on; + } else { + grn_led_off; + } + if (mouseLED){ + blu_led_on; + } else { + blu_led_off; + }*/ + while (encoderValue < 0){ + tap_code(KC_VOLD); + encoderValue++; + } + while (encoderValue > 0){ + tap_code(KC_VOLU); + encoderValue--; + } +}; diff --git a/keyboards/honeycomb/matrix.c b/keyboards/honeycomb/matrix.c new file mode 100755 index 000000000000..a06afb6d9685 --- /dev/null +++ b/keyboards/honeycomb/matrix.c @@ -0,0 +1,202 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert +Copyright 2019 @filoxo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" +#include "honeycomb.h" +#include "pointing_device.h" +#include "report.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 + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +//extern int8_t encoderValue; +int8_t encoderValue = 0; + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + // The 's' character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + // Trust the external keystates entirely, erase the last data + uint8_t uart_data[4] = {0}; + + // There are 3 bytes corresponding to the data, and a checksum + for (uint8_t i = 0; i < 4; i++) { + // Wait for the serial data, timeout if it's been too long + // This only happened in testing with a loose wire, but does no + // harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + xprintf("\r\nTime out in keyboard."); + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + // Check for the end packet, it's our checksum. + // Will only be a match if the correct bytes were recieved + if (uart_data[3] == (uart_data[0] ^ uart_data[1] ^ uart_data[2])) { // This is an arbitrary checksum calculated by XORing all the data. + // Transferring the keystates to the QMK matrix variable + /* ASSUMING MSB FIRST */ + matrix[0] = ((uint16_t) uart_data[0] << 8) | ((uint16_t) uart_data[1]); + encoderValue += (int8_t) uart_data[2]; + if ((uart_data[0] | uart_data[1] | uart_data[2])!=0){ + xprintf("\r\n0x%0X%02X%02X",uart_data[0],uart_data[1], uart_data[2]); + } + /* OK, TURNS OUT THAT WAS A BAD ASSUMPTION */ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + // I've unpacked these into the mirror image of what QMK expects them to be, so... + matrix[i] = bitrev16(matrix[i]); + // So I'll reverse it, and this should be fine now. + } + + // A mouse report for scrolling would go here, but I don't plan on doing scrolling with the encoder. So. + + report_mouse_t currentReport = {}; +/* + currentReport = pointing_device_get_report(); + //mouseReport.x = 127 max -127 min + currentReport.x = (int8_t) uart_data[6]; + //mouseReport.y = 127 max -127 min + currentReport.y = (int8_t) uart_data[7]; + //mouseReport.v = 127 max -127 min (scroll vertical) + currentReport.v = (int8_t) uart_data[8]; + //mouseReport.h = 127 max -127 min (scroll horizontal) + currentReport.h = (int8_t) uart_data[9]; + */ + /* + currentReport.x = 0; + currentReport.y = 0; + currentReport.v = 0; + currentReport.h = 0;*/ + + pointing_device_set_report(currentReport); + } else { + xprintf("\r\nRequested packet, data 3 was %d",uart_data[3]); + } + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1 Date: Tue, 5 Feb 2019 13:01:35 -0500 Subject: [PATCH 297/458] [Keyboard] Add support for jj4x4 numpad/macropad by Kprepublic (#5016) * added keyboard jj4x4, a shorter version of the jj40 * removed useless file * edited jj4x4 readme.md * optimized array size in jj4x4 config.h, removed reference to jj40 layouts from rules.mk * removed custom matrix for this ps2avrgb board, refactored column and row pins --- keyboards/jj4x4/README.md | 71 ++++ keyboards/jj4x4/backlight.c | 213 ++++++++++++ keyboards/jj4x4/backlight_custom.h | 15 + keyboards/jj4x4/breathing_custom.h | 140 ++++++++ keyboards/jj4x4/config.h | 53 +++ keyboards/jj4x4/i2c.c | 104 ++++++ keyboards/jj4x4/i2c.h | 25 ++ keyboards/jj4x4/info.json | 23 ++ keyboards/jj4x4/jj4x4.c | 97 ++++++ keyboards/jj4x4/jj4x4.h | 46 +++ keyboards/jj4x4/keymaps/default/keymap.c | 34 ++ keyboards/jj4x4/rules.mk | 58 ++++ keyboards/jj4x4/tools/README.md | 16 + keyboards/jj4x4/tools/usb_detach.c | 33 ++ keyboards/jj4x4/usbconfig.h | 397 +++++++++++++++++++++++ 15 files changed, 1325 insertions(+) create mode 100644 keyboards/jj4x4/README.md create mode 100644 keyboards/jj4x4/backlight.c create mode 100644 keyboards/jj4x4/backlight_custom.h create mode 100644 keyboards/jj4x4/breathing_custom.h create mode 100644 keyboards/jj4x4/config.h create mode 100644 keyboards/jj4x4/i2c.c create mode 100644 keyboards/jj4x4/i2c.h create mode 100644 keyboards/jj4x4/info.json create mode 100644 keyboards/jj4x4/jj4x4.c create mode 100644 keyboards/jj4x4/jj4x4.h create mode 100644 keyboards/jj4x4/keymaps/default/keymap.c create mode 100644 keyboards/jj4x4/rules.mk create mode 100644 keyboards/jj4x4/tools/README.md create mode 100644 keyboards/jj4x4/tools/usb_detach.c create mode 100644 keyboards/jj4x4/usbconfig.h diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/README.md new file mode 100644 index 000000000000..09684bd82563 --- /dev/null +++ b/keyboards/jj4x4/README.md @@ -0,0 +1,71 @@ +# jj4x4 + +![jj4x4](https://cdn.shopify.com/s/files/1/2711/4238/products/JJ4x4case-1_1024x1024.jpg?v=1532325339) + +A 4x4 keypad kit made and KPRepublic on AliExpress. This is a chopped off version of the jj40 with rearranged keys. + +Keyboard Maintainer: [QMK Community](https://github.com/qmk) +Hardware Supported: Atmega32A +Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj4x4-jj4X4-16-keys-Custom-Mechanical-Keyboard-PCB-programmed-numpad-layouts-bface-firmware-with-rgb-bottom/32901955446.html?spm=2114.search0104.3.7.3ebf431ae1d9ic&ws_ab_test=searchweb0_0,searchweb201602_4_10065_10130_10068_10547_319_317_10548_10545_10696_453_10084_454_10083_433_10618_431_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_6,ppcSwitch_0&algo_expid=9d1891dd-80af-4793-a889-5a62e1fdfdd8-1&algo_pvid=9d1891dd-80af-4793-a889-5a62e1fdfdd8&transAbTest=ae803_5) + +Make example for this keyboard (after setting up your build environment): + + make jj4x4:default:program + +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. + +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. + +In addition you may need the AVR toolchain and `bootloadHID` ([GitHub repo](https://github.com/whiteneon/bootloadHID)) for flashing: + +For macOS: +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +For Linux: +``` +$ sudo apt install libusb-dev +$ wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz +$ tar -xzf bootloadHID.2012-12-08.tar.gz +$ cd bootloadHID.2012-12-08/commandline +$ make +$ sudo cp bootloadHID /usr/bin +``` + +In order to use the `./program` script, which can reboot the board into +the bootloader, you'll need Python 2 with PyUSB installed: + +``` +$ pip install pyusb +``` + +If you prefer (or are having issues with a `program` flash), you can just build it (`make jj40:` and flash the firmware (`.hex` file) directly with +`bootloadHID` if you boot the board while holding down `8` (second from top, second from left, with usb plug is at the top) to keep it +in the bootloader: + +``` +$ make jj40 +$ bootloadHID -r jj4x4_default.hex +``` + +For Windows 10: +Windows sometimes doesn't recognize the jj4x4. The easiest way of flashing a new layout is probably using [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +1. Go to Windows Device Manager and find the keyboard (plug it in while holding down `8` (second from top, second from left, with usb plug is at the top)). It can be found under Human Interface Devices or under Keyboards. +2. Go to properties and the Details tab to find the hardware ID. You want the VID and the PID (code after the underscore). Plug them into HIDBootFlash and hit Find Device. +3. Use `make jj4x4:` to generate the .hex file in the qmk basis folder. Select the .hex file in HIDBootFlash and press Flash Device. + + +## Troubleshooting + +1. Try plugging the board in while pressing `8` (usb plug at top, second from top, second from left). 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. +3. If you get an error such as "Resource Unavailable" when attemting to flash + on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` + for more info. diff --git a/keyboards/jj4x4/backlight.c b/keyboards/jj4x4/backlight.c new file mode 100644 index 000000000000..fbd241fa9dee --- /dev/null +++ b/keyboards/jj4x4/backlight.c @@ -0,0 +1,213 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#include "backlight.h" +#include "quantum.h" + +#include +#include + +#include "backlight_custom.h" +#include "breathing_custom.h" + +// DEBUG +#include +#include + +// Port D: digital pins of the AVR chipset +#define NUMLOCK_PORT (1 << 0) // D0 +#define CAPSLOCK_PORT (1 << 1) // D1 +#define BACKLIGHT_PORT (1 << 4) // D4 +#define SCROLLLOCK_PORT (1 << 6) // D6 + +#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 +#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default + +#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask + +#define PWM_MAX 0xFF +#define TIMER_TOP 255 // 8 bit PWM + +extern backlight_config_t backlight_config; + +/** + * References + * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation + * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b + * Timers: http://www.avrbeginners.net/architecture/timers/timers.html + * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ + * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware + */ + +// @Override +// turn LEDs on and off depending on USB caps/num/scroll lock states. +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // turn on + DDRD |= NUMLOCK_PORT; + PORTD |= NUMLOCK_PORT; + } else { + // turn off + DDRD &= ~NUMLOCK_PORT; + PORTD &= ~NUMLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= CAPSLOCK_PORT; + PORTD |= CAPSLOCK_PORT; + } else { + DDRD &= ~CAPSLOCK_PORT; + PORTD &= ~CAPSLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRD |= SCROLLLOCK_PORT; + PORTD |= SCROLLLOCK_PORT; + } else { + DDRD &= ~SCROLLLOCK_PORT; + PORTD &= ~SCROLLLOCK_PORT; + } +} + +#ifdef BACKLIGHT_ENABLE + +// sets up Timer 1 for 8-bit PWM +void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE + // default 8 bit mode + TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH + TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW + + // clear output compare value A + // outb(OCR1AH, 0); + // outb(OCR1AL, 0); + + // clear output comparator registers for B + OCR1BH = 0; // outb(OCR1BH, 0); + OCR1BL = 0; // outb(OCR1BL, 0); +} + +bool is_init = false; +void timer1Init(void) { + // timer1SetPrescaler(TIMER1PRESCALE) + // set to DIV/64 + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; + + // reset TCNT1 + TCNT1H = 0; // outb(TCNT1H, 0); + TCNT1L = 0; // outb(TCNT1L, 0); + + // TOIE1: Timer Overflow Interrupt Enable (Timer 1); + TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); + + is_init = true; +} + +void timer1UnInit(void) { + // set prescaler back to NONE + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP + + // disable timer overflow interrupt + TIMSK &= ~_BV(TOIE1); // overflow bit? + + setPWM(0); + + is_init = false; +} + + +// handle TCNT1 overflow +//! Interrupt handler for tcnt1 overflow interrupt +ISR(TIMER1_OVF_vect, ISR_NOBLOCK) +{ + // sei(); + // handle breathing here + #ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + custom_breathing_handler(); + } + #endif + + // TODO call user defined function +} + +// enable timer 1 PWM +// timer1PWMBOn() +void timer1PWMBEnable(void) { + // turn on channel B (OC1B) PWM output + // set OC1B as non-inverted PWM + TCCR1A |= _BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +// disable timer 1 PWM +// timer1PWMBOff() +void timer1PWMBDisable(void) { + TCCR1A &= ~_BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +void enableBacklight(void) { + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high +} + +void disableBacklight(void) { + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low +} + +void startPWM(void) { + timer1Init(); + timer1PWMBEnable(); + enableBacklight(); +} + +void stopPWM(void) { + timer1UnInit(); + disableBacklight(); + timer1PWMBDisable(); +} + +void b_led_init_ports(void) { + /* turn backlight on/off depending on user preference */ + #if BACKLIGHT_ON_STATE == 0 + // DDRx register: sets the direction of Port D + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low + #else + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high + #endif + + timer1PWMSetup(); + startPWM(); + + #ifdef BACKLIGHT_BREATHING + breathing_enable(); + #endif +} + +void b_led_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); +} + +// called every matrix scan +void b_led_task(void) { + // do nothing for now +} + +void setPWM(uint16_t xValue) { + if (xValue > TIMER_TOP) { + xValue = TIMER_TOP; + } + OCR1B = xValue; // timer1PWMBSet(xValue); +} + +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj4x4/backlight_custom.h b/keyboards/jj4x4/backlight_custom.h new file mode 100644 index 000000000000..7210be840e09 --- /dev/null +++ b/keyboards/jj4x4/backlight_custom.h @@ -0,0 +1,15 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifndef BACKLIGHT_CUSTOM_H +#define BACKLIGHT_CUSTOM_H + +#include +void b_led_init_ports(void); +void b_led_set(uint8_t level); +void b_led_task(void); +void setPWM(uint16_t xValue); + +#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/jj4x4/breathing_custom.h b/keyboards/jj4x4/breathing_custom.h new file mode 100644 index 000000000000..71416b1b45da --- /dev/null +++ b/keyboards/jj4x4/breathing_custom.h @@ -0,0 +1,140 @@ +/** + * Breathing effect code for PS2AVRGB boards (ATMEGA32A) + * Works in conjunction with `backlight.c`. + * + * Code adapted from `quantum.c` to register with the existing TIMER1 overflow + * handler in `backlight.c` instead of setting up its own timer. + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifdef BACKLIGHT_ENABLE +#ifdef BACKLIGHT_BREATHING + +#include "backlight_custom.h" + +#ifndef BREATHING_PERIOD +#define BREATHING_PERIOD 6 +#endif + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) + +// TODO make this share code with quantum.c + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +static bool breathing = false; + +bool is_breathing(void) { + return breathing; +} + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + +void breathing_enable(void) { + breathing = true; + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + // interrupt already registered +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + // breathing_interrupt_enable(); + breathing = true; +} + +void breathing_disable(void) { + breathing = false; + // backlight_set(get_backlight_level()); + b_led_set(get_backlight_level()); // custom implementation of backlight_set() +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +void custom_breathing_handler(void) { + uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + // breathing_interrupt_disable(); + } + + setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); +} + +#endif // BACKLIGHT_BREATHING +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h new file mode 100644 index 000000000000..d48df5f1dbbe --- /dev/null +++ b/keyboards/jj4x4/config.h @@ -0,0 +1,53 @@ +/* +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 "config_common.h" + +#ifndef CONFIG_H +#define CONFIG_H + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER Kprepublic +#define PRODUCT jj4x4 + +/* matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 +#define MATRIX_ROW_PINS { B5, B0, B3, B4 } +#define MATRIX_COL_PINS { A1, A0, A2, A3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 12 +// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work + +#define TAPPING_TOGGLE 3 + +#define NO_UART 1 + +/* RGB underglow */ +// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. +// The same pin is used on the JJ40, at least. +#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/i2c.c b/keyboards/jj4x4/i2c.c new file mode 100644 index 000000000000..c27f3e3d17e1 --- /dev/null +++ b/keyboards/jj4x4/i2c.c @@ -0,0 +1,104 @@ +/* +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 . +*/ + +#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 . +*/ + +#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/jj4x4/info.json b/keyboards/jj4x4/info.json new file mode 100644 index 000000000000..c6416ce16814 --- /dev/null +++ b/keyboards/jj4x4/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "jj40", + "url": "", + "maintainer": "qmk", + "width": 12, + "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}] + } + } +} diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c new file mode 100644 index 000000000000..6fbff7afba60 --- /dev/null +++ b/keyboards/jj4x4/jj4x4.c @@ -0,0 +1,97 @@ +/* +Copyright 2017 Luiz Ribeiro +Modified 2018 Kenneth A. + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "jj4x4.h" + +#include + +#include "action_layer.h" +#include "quantum.h" + +#include "i2c.h" + +#include "backlight.h" +#include "backlight_custom.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i=0; i + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#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( \ + 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 } \ +} + + + +#endif diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c new file mode 100644 index 000000000000..d4130e809063 --- /dev/null +++ b/keyboards/jj4x4/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + + +#define _QWERTY 0 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,---------------------------. + * | A | B | C | D | + * +------+------+------+------| + * | E | F | G | H | + * +------+------+------+------| + * | I | J | K | L | + * +------+------+------+------| + * | M | N | O | P | + * ----------------------------' + */ +[_QWERTY] = LAYOUT( \ + 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 \ +), +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk new file mode 100644 index 000000000000..3e222c620da6 --- /dev/null +++ b/keyboards/jj4x4/rules.mk @@ -0,0 +1,58 @@ +# 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 = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes + +BACKLIGHT_ENABLE = yes +BACKLIGHT_CUSTOM_DRIVER = yes + +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +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 + +SRC = i2c.c backlight.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + + diff --git a/keyboards/jj4x4/tools/README.md b/keyboards/jj4x4/tools/README.md new file mode 100644 index 000000000000..081984ed44bc --- /dev/null +++ b/keyboards/jj4x4/tools/README.md @@ -0,0 +1,16 @@ +# 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 new file mode 100644 index 000000000000..c21e47a7a439 --- /dev/null +++ b/keyboards/jj4x4/tools/usb_detach.c @@ -0,0 +1,33 @@ +/* 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/usbconfig.h b/keyboards/jj4x4/usbconfig.h new file mode 100644 index 000000000000..ad97e7f0a382 --- /dev/null +++ b/keyboards/jj4x4/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 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 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* 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 'j', 'j', '4', '0' +#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 47051f506fd4888bbb55fa7981cb7b24827f3d1b Mon Sep 17 00:00:00 2001 From: Thomas Baart Date: Tue, 5 Feb 2019 19:19:56 +0100 Subject: [PATCH 298/458] Add One Shot Key callbacks (#4697) * Added callbacks to one shot modifier changes * Altered signature of callback functions * Reordered the callback methods, shortened brief documentation * Added One Shot Modifier callback documentation * First attempt at unit tests * Revert "First attempt at unit tests" This reverts commit 5ec21a782202c0d74cf21cb852bd319f0c8b4842. * Simplified oneshot function implementations * Made clear_oneshot_locked_mods to be conform action_util.h, adhering to the (void) signature * Made used datatypes for oneshot mods consistently unsigned integers * Corrected callback to call clear callback when clear_oneshot_locked_mods is invoked * Simplified oneshot equals statements * Corrected return type and signature of get and set oneshot locked mods * Consolidated one shot callbacks, added initial layer callback version * Fixed non-updating one shot layer variable after timeout or other clear, added code comments * Added better one shot key docs --- docs/feature_advanced_keycodes.md | 75 ++++++++++++++++++++++++++ tmk_core/common/action_util.c | 88 ++++++++++++++++++++++++++----- tmk_core/common/action_util.h | 11 +++- 3 files changed, 159 insertions(+), 15 deletions(-) diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md index 37a3d43fc39d..d23cb31d9a52 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -161,6 +161,81 @@ For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear !> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop. +## Callbacks + +When you'd like to perform custom logic when pressing a one shot key, there are several callbacks you can choose to implement. You could indicate changes in one shot keys by flashing an LED or making a sound, for example. + +There is a callback for `OSM(mod)`. It is called whenever the state of any one shot modifier key is changed: when it toggles on, but also when it is toggled off. You can use it like this: + +```c +void oneshot_mods_changed_user(uint8_t mods) { + if (mods & MOD_MASK_SHIFT) { + println("Oneshot mods SHIFT"); + } + if (mods & MOD_MASK_CTRL) { + println("Oneshot mods CTRL"); + } + if (mods & MOD_MASK_ALT) { + println("Oneshot mods ALT"); + } + if (mods & MOD_MASK_GUI) { + println("Oneshot mods GUI"); + } + if (!mods) { + println("Oneshot mods off"); + } +} +``` + +The `mods` argument contains the active mods after the change, so it reflects the current state. + +When you use One Shot Tap Toggle (by adding `#define ONESHOT_TAP_TOGGLE 2` in your `config.h` file), you may lock a modifier key by pressing it the specified amount of times. There's a callback for that, too: + +```c +void oneshot_locked_mods_changed_user(uint8_t mods) { + if (mods & MOD_MASK_SHIFT) { + println("Oneshot locked mods SHIFT"); + } + if (mods & MOD_MASK_CTRL) { + println("Oneshot locked mods CTRL"); + } + if (mods & MOD_MASK_ALT) { + println("Oneshot locked mods ALT"); + } + if (mods & MOD_MASK_GUI) { + println("Oneshot locked mods GUI"); + } + if (!mods) { + println("Oneshot locked mods off"); + } +} +``` + +Last, there is also a callback for the `OSL(layer)` one shot key: + +```c +void oneshot_layer_changed_user(uint8_t layer) { + if (layer == 1) { + println("Oneshot layer 1 on"); + } + if (!layer) { + println("Oneshot layer off"); + } +} +``` + +If any one shot layer is switched off, `layer` will be zero. When you're looking to do something on any layer change instead of one shot layer changes, `layer_state_set_user` is a better callback to use. + +If you are making your own keyboard, there are also `_kb` equivalent functions: + +```c +void oneshot_locked_mods_changed_kb(uint8_t mods); +void oneshot_mods_changed_kb(uint8_t mods); +void oneshot_layer_changed_kb(uint8_t layer); +``` + +As with any callback, be sure to call the `_user` variant to allow for further customizability. + # Tap-Hold Configuration Options While Tap-Hold options are fantastic, they are not without their issues. We have tried to configure them with reasonal defaults, but that may still cause issues for some people. diff --git a/tmk_core/common/action_util.c b/tmk_core/common/action_util.c index 58401ace5588..365ed6a1ddff 100644 --- a/tmk_core/common/action_util.c +++ b/tmk_core/common/action_util.c @@ -48,11 +48,21 @@ extern inline void del_key(uint8_t key); extern inline void clear_keys(void); #ifndef NO_ACTION_ONESHOT -static int8_t oneshot_mods = 0; -static int8_t oneshot_locked_mods = 0; -int8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; } -void set_oneshot_locked_mods(int8_t mods) { oneshot_locked_mods = mods; } -void clear_oneshot_locked_mods(void) { oneshot_locked_mods = 0; } +static uint8_t oneshot_mods = 0; +static uint8_t oneshot_locked_mods = 0; +uint8_t get_oneshot_locked_mods(void) { return oneshot_locked_mods; } +void set_oneshot_locked_mods(uint8_t mods) { + if (mods != oneshot_locked_mods) { + oneshot_locked_mods = mods; + oneshot_locked_mods_changed_kb(oneshot_locked_mods); + } +} +void clear_oneshot_locked_mods(void) { + if (oneshot_locked_mods) { + oneshot_locked_mods = 0; + oneshot_locked_mods_changed_kb(oneshot_locked_mods); + } +} #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) static uint16_t oneshot_time = 0; bool has_oneshot_mods_timed_out(void) { @@ -97,6 +107,7 @@ void set_oneshot_layer(uint8_t layer, uint8_t state) #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) oneshot_layer_time = timer_read(); #endif + oneshot_layer_changed_kb(get_oneshot_layer()); } /** \brief Reset oneshot layer * @@ -107,6 +118,7 @@ void reset_oneshot_layer(void) { #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) oneshot_layer_time = 0; #endif + oneshot_layer_changed_kb(get_oneshot_layer()); } /** \brief Clear oneshot layer * @@ -118,9 +130,7 @@ void clear_oneshot_layer_state(oneshot_fullfillment_t state) oneshot_layer_data &= ~state; if (!get_oneshot_layer_state() && start_state != oneshot_layer_data) { layer_off(get_oneshot_layer()); -#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - oneshot_layer_time = 0; -#endif + reset_oneshot_layer(); } } /** \brief Is oneshot layer active @@ -243,23 +253,27 @@ void clear_macro_mods(void) { macro_mods = 0; } * * FIXME: needs doc */ -void set_oneshot_mods(uint8_t mods) -{ - oneshot_mods = mods; +void set_oneshot_mods(uint8_t mods) { + if (oneshot_mods != mods) { #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) oneshot_time = timer_read(); #endif + oneshot_mods = mods; + oneshot_mods_changed_kb(mods); + } } /** \brief clear oneshot mods * * FIXME: needs doc */ -void clear_oneshot_mods(void) -{ +void clear_oneshot_mods(void) { + if (oneshot_mods) { oneshot_mods = 0; #if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) oneshot_time = 0; #endif + oneshot_mods_changed_kb(oneshot_mods); + } } /** \brief get oneshot mods * @@ -271,6 +285,54 @@ uint8_t get_oneshot_mods(void) } #endif +/** \brief Called when the one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) +void oneshot_locked_mods_changed_user(uint8_t mods) { } + +/** \brief Called when the locked one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) +void oneshot_locked_mods_changed_kb(uint8_t mods) { + oneshot_locked_mods_changed_user(mods); +} + +/** \brief Called when the one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) +void oneshot_mods_changed_user(uint8_t mods) { } + +/** \brief Called when the one shot modifiers have been changed. + * + * \param mods Contains the active modifiers active after the change. + */ +__attribute__((weak)) +void oneshot_mods_changed_kb(uint8_t mods) { + oneshot_mods_changed_user(mods); +} + +/** \brief Called when the one shot layers have been changed. + * + * \param layer Contains the layer that is toggled on, or zero when toggled off. + */ +__attribute__((weak)) +void oneshot_layer_changed_user(uint8_t layer) { } + +/** \brief Called when the one shot layers have been changed. + * + * \param layer Contains the layer that is toggled on, or zero when toggled off. + */ +__attribute__((weak)) +void oneshot_layer_changed_kb(uint8_t layer) { + oneshot_layer_changed_user(layer); +} + /** \brief inspect keyboard state * * FIXME: needs doc diff --git a/tmk_core/common/action_util.h b/tmk_core/common/action_util.h index 34589315144b..d03f5682a331 100644 --- a/tmk_core/common/action_util.h +++ b/tmk_core/common/action_util.h @@ -71,8 +71,8 @@ void oneshot_enable(void); void oneshot_disable(void); bool has_oneshot_mods_timed_out(void); -int8_t get_oneshot_locked_mods(void); -void set_oneshot_locked_mods(int8_t mods); +uint8_t get_oneshot_locked_mods(void); +void set_oneshot_locked_mods(uint8_t mods); void clear_oneshot_locked_mods(void); typedef enum { @@ -89,6 +89,13 @@ bool is_oneshot_layer_active(void); uint8_t get_oneshot_layer_state(void); bool has_oneshot_layer_timed_out(void); +void oneshot_locked_mods_changed_user(uint8_t mods); +void oneshot_locked_mods_changed_kb(uint8_t mods); +void oneshot_mods_changed_user(uint8_t mods); +void oneshot_mods_changed_kb(uint8_t mods); +void oneshot_layer_changed_user(uint8_t layer); +void oneshot_layer_changed_kb(uint8_t layer); + /* inspect */ uint8_t has_anymod(void); From 5c7a31eae2518b2630f31cf825ecbb08e358ae76 Mon Sep 17 00:00:00 2001 From: Anthony Date: Tue, 5 Feb 2019 19:36:26 +0100 Subject: [PATCH 299/458] Improvements to Space Cadet Shift (#3856) * Improvement of Space Cadet Shift by preventing to automatically apply a modifier on the key and allow to override the default modifier. Closes qmk/qmk_firmware#3815 * Improve the use of the DISABLE_SPACE_CADET_MODIFIER flag to avoid unregistering KC_LSFT when equals to LSPO_MOD * change #if to if statement --- docs/feature_space_cadet_shift.md | 16 ++++++++----- quantum/quantum.c | 37 +++++++++++++++++++++++++++++-- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/docs/feature_space_cadet_shift.md b/docs/feature_space_cadet_shift.md index bec7cbd3d9fd..427d2a58127c 100644 --- a/docs/feature_space_cadet_shift.md +++ b/docs/feature_space_cadet_shift.md @@ -25,9 +25,13 @@ COMMAND_ENABLE = no By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. You can also disable the rollover, allowing you to use the opposite Shift key to cancel the Space Cadet state in the event of an erroneous press, instead of emitting a pair of parentheses when the keys are released. - -|Define |Default |Description | -|------------------------------|-------------|------------------------------------------------------------| -|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped | -|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped | -|`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet| +Also, by default, the Space Cadet applies modifiers LSPO_MOD and RSPC_MOD to keys defined by LSPO_KEY and RSPC_KEY. You can override this behavior by redefining those variables in your `config.h`. You can also prevent the Space Cadet to apply a modifier by defining DISABLE_SPACE_CADET_MODIFIER in your `config.h`. + +|Define |Default |Description | +|------------------------------|-------------|--------------------------------------------------------------------------------| +|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped | +|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped | +|`LSPO_MOD` |`KC_LSFT` |The keycode to send when Left Shift is tapped | +|`RSPC_MOD` |`KC_RSFT` |The keycode to send when Right Shift is tapped | +|`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet | +|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet to apply a modifier to LSPO_KEY and RSPC_KEY| diff --git a/quantum/quantum.c b/quantum/quantum.c index c1829c7685cb..bd3715c80ab2 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -195,6 +195,13 @@ void reset_keyboard(void) { #define RSPC_KEY KC_0 #endif +#ifndef LSPO_MOD + #define LSPO_MOD KC_LSFT +#endif +#ifndef RSPC_MOD + #define RSPC_MOD KC_RSFT +#endif + // Shift / Enter setup #ifndef SFTENT_KEY #define SFTENT_KEY KC_ENT @@ -674,14 +681,27 @@ bool process_record_quantum(keyrecord_t *record) { } else { #ifdef DISABLE_SPACE_CADET_ROLLOVER - if (get_mods() & MOD_BIT(KC_RSFT)) { + if (get_mods() & MOD_BIT(RSPC_MOD)) { shift_interrupted[0] = true; shift_interrupted[1] = true; } #endif if (!shift_interrupted[0] && timer_elapsed(scs_timer[0]) < TAPPING_TERM) { + #ifdef DISABLE_SPACE_CADET_MODIFIER + unregister_mods(MOD_BIT(KC_LSFT)); + #else + if( LSPO_MOD != KC_LSFT ){ + unregister_mods(MOD_BIT(KC_LSFT)); + register_mods(MOD_BIT(LSPO_MOD)); + } + #endif register_code(LSPO_KEY); unregister_code(LSPO_KEY); + #ifndef DISABLE_SPACE_CADET_MODIFIER + if( LSPO_MOD != KC_LSFT ){ + unregister_mods(MOD_BIT(LSPO_MOD)); + } + #endif } unregister_mods(MOD_BIT(KC_LSFT)); } @@ -696,14 +716,27 @@ bool process_record_quantum(keyrecord_t *record) { } else { #ifdef DISABLE_SPACE_CADET_ROLLOVER - if (get_mods() & MOD_BIT(KC_LSFT)) { + if (get_mods() & MOD_BIT(LSPO_MOD)) { shift_interrupted[0] = true; shift_interrupted[1] = true; } #endif if (!shift_interrupted[1] && timer_elapsed(scs_timer[1]) < TAPPING_TERM) { + #ifdef DISABLE_SPACE_CADET_MODIFIER + unregister_mods(MOD_BIT(KC_RSFT)); + #else + if( RSPC_MOD != KC_RSFT ){ + unregister_mods(MOD_BIT(KC_RSFT)); + register_mods(MOD_BIT(RSPC_MOD)); + } + #endif register_code(RSPC_KEY); unregister_code(RSPC_KEY); + #ifndef DISABLE_SPACE_CADET_MODIFIER + if ( RSPC_MOD != KC_RSFT ){ + unregister_mods(MOD_BIT(RSPC_MOD)); + } + #endif } unregister_mods(MOD_BIT(KC_RSFT)); } From 0affcc8bc3fbe6ed1f5ef6791a41b459421f0ed8 Mon Sep 17 00:00:00 2001 From: Cole Markham Date: Tue, 5 Feb 2019 16:56:17 -0600 Subject: [PATCH 300/458] Add Scarlet Bandana Version IV mark.2 (#3397) * Add scarlet bandana * updates for scarlet bandana --- keyboards/scarletbandana/config.h | 63 ++++ .../scarletbandana/keymaps/default/config.h | 24 ++ .../scarletbandana/keymaps/default/keymap.c | 192 +++++++++++ .../scarletbandana/keymaps/default/readme.md | 1 + keyboards/scarletbandana/matrix.c | 326 ++++++++++++++++++ keyboards/scarletbandana/readme.md | 31 ++ keyboards/scarletbandana/rules.mk | 69 ++++ keyboards/scarletbandana/scarletbandana.c | 102 ++++++ keyboards/scarletbandana/scarletbandana.h | 43 +++ 9 files changed, 851 insertions(+) create mode 100644 keyboards/scarletbandana/config.h create mode 100644 keyboards/scarletbandana/keymaps/default/config.h create mode 100644 keyboards/scarletbandana/keymaps/default/keymap.c create mode 100644 keyboards/scarletbandana/keymaps/default/readme.md create mode 100644 keyboards/scarletbandana/matrix.c create mode 100644 keyboards/scarletbandana/readme.md create mode 100644 keyboards/scarletbandana/rules.mk create mode 100644 keyboards/scarletbandana/scarletbandana.c create mode 100644 keyboards/scarletbandana/scarletbandana.h diff --git a/keyboards/scarletbandana/config.h b/keyboards/scarletbandana/config.h new file mode 100644 index 000000000000..7716813dd483 --- /dev/null +++ b/keyboards/scarletbandana/config.h @@ -0,0 +1,63 @@ +/* +Copyright 2017 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6969 +#define DEVICE_VER 0x0001 +#define MANUFACTURER WoodKeys.click +#define PRODUCT Scarlet Bandana Version IV mark.2 +#define DESCRIPTION What keyboard is that? + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#endif + +#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5 } +#define MATRIX_COL_PINS { B2, B3, B7, B1, F5, F4, F6, F7, B0, F0, F1, D0, D1, D2, D5, B6, C7 } + +#define QMK_SPEAKER C6 + +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#define STARTUP_SONG SONG(PREONIC_SOUND) +// Disable music mode to keep the firmware size down +#define NO_MUSIC_MODE +#endif + +#define DEBOUNCING_DELAY 5 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#endif diff --git a/keyboards/scarletbandana/keymaps/default/config.h b/keyboards/scarletbandana/keymaps/default/config.h new file mode 100644 index 000000000000..97210115b9e5 --- /dev/null +++ b/keyboards/scarletbandana/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Cole Markham, WoodKeys.click + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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" + +// place overrides here + +#endif diff --git a/keyboards/scarletbandana/keymaps/default/keymap.c b/keyboards/scarletbandana/keymaps/default/keymap.c new file mode 100644 index 000000000000..c67eeab7f91a --- /dev/null +++ b/keyboards/scarletbandana/keymaps/default/keymap.c @@ -0,0 +1,192 @@ +/* Copyright 2017 Cole Markham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "../../scarletbandana.h" + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#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, +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = KEYMAP( + KC_F1, KC_F2, KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_PGUP,\ + 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_PGDN,\ + 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_DEL, KC_HOME,\ + 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_SLASH,KC_RSFT,KC_UP,KC_END,\ + KC_F9, KC_F10, KC_LCTL,KC_LGUI,KC_LALT, RAISE, KC_SPACE, LOWER, KC_RALT,KC_APP,KC_RCTRL,KC_LEFT,KC_DOWN,KC_RIGHT), + + [_RAISE] = KEYMAP( + RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______), + + [_LOWER] = KEYMAP( + RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______), + + [_ADJUST] = KEYMAP( + RESET, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); +#endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +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; +}; + +#ifdef AUDIO_ENABLE + + float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(16); +#endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change +#endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(15); +#endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change +#endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + // FIXME add RGB feedback + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + 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 +#ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; +#endif + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/scarletbandana/keymaps/default/readme.md b/keyboards/scarletbandana/keymaps/default/readme.md new file mode 100644 index 000000000000..c2c281fe3535 --- /dev/null +++ b/keyboards/scarletbandana/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for scarletbandana diff --git a/keyboards/scarletbandana/matrix.c b/keyboards/scarletbandana/matrix.c new file mode 100644 index 000000000000..7b7934c9efb1 --- /dev/null +++ b/keyboards/scarletbandana/matrix.c @@ -0,0 +1,326 @@ +/* +Copyright 2012 Jun Wako +Copyright 2017 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 +#if defined(__AVR__) +#include +#include "pincontrol.h" +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "config.h" +#include "timer.h" +//#include "audio.h" + +#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) +#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 + +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const uint8_t col_pins[4] = MATRIX_COL_PINS; +static const uint8_t xcol_pins[MATRIX_COLS - 16] = MATRIX_XCOL_PINS; +// +//float init_song[][2] = SONG(QWERTY_SOUND); + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +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 init_cols(void); +static void select_col(uint8_t col); +//static void demux_enable(bool enabled); + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + debug_enable = true; + debug_matrix = true; + debug_mouse = true; + dprintf("matrix init"); + // initialize row and col + init_cols(); + init_rows(); + + +// PLAY_NOTE_ARRAY(init_song, false, 0); + + + // 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) +{ + // 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 + + } + + // Unselect cols + unselect_cols(); + +# 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 + + return 1; +} + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + matrix_scan_quantum(); + return ret; +} + +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<= 16) { +// demux_enable(false); +// digitalWrite(MATRIX_EN_PIN, PinLevelHigh); + } else { + for(uint8_t x = 0; x < 4; x++) { + uint8_t pin = col_pins[x]; + pinMode(pin, PinDirectionOutput); + digitalWrite(pin, (col >> x) & 0x1); + } +// demux_enable(true); + digitalWrite(MATRIX_EN_PIN, PinLevelLow); + } +} + +static void init_cols(void) { + for (uint8_t y = 16; y < MATRIX_COLS; y++) { + uint8_t pin = xcol_pins[y-16]; + pinMode(pin, PinDirectionOutput); + } + for(uint8_t x = 0; x < 4; x++) { + uint8_t pin = col_pins[x]; + pinMode(pin, PinDirectionOutput); + } + pinMode(MATRIX_EN_PIN, PinDirectionOutput); +// digitalWrite(MATRIX_EN_PIN, PinLevelHigh); + unselect_cols(); +} + +static void unselect_cols(void) +{ + for (uint8_t y = 16; y < MATRIX_COLS; y++) { + uint8_t pin = xcol_pins[y-16]; + digitalWrite(pin, PinLevelHigh); + } +// demux_enable(false); +// digitalWrite(MATRIX_EN_PIN, PinLevelHigh); +} + +//static void demux_enable(uint8_t state) +//{ +// if (enabled){ +// digitalWrite(F7, PinLevelLow); +// } else { +// digitalWrite(F7, PinLevelHigh); +// } +//} diff --git a/keyboards/scarletbandana/readme.md b/keyboards/scarletbandana/readme.md new file mode 100644 index 000000000000..6d5d9b553510 --- /dev/null +++ b/keyboards/scarletbandana/readme.md @@ -0,0 +1,31 @@ +# Meira + +![Miera](https://imgur.com/kF4MFlW) + +A 4x12 ortholinear low-profile keyboard. + +Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) +Hardware Supported: Meira/ProMicro, Meira/FeatherBLE +Hardware Availability: [WoodKeys.click](https://woodkeys.click/meira) + +Two controllers are support: the Pro Micro, and the Adafruit Feather BLE 32u4. Support for each is defined as a hardware revision subfolder in QMK. Main differences include processor frequencies and matrix pinouts. + +Make example for this keyboard (after setting up your build environment): + + make meira/promicro:default + +or + + make meira/featherble:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information on generic QMK configuration and setup. + +Both the Pro Micro and the Feather BLE use the Catalina bootloader, which is typically programmed using avrdude. + +## Matrix + +In order to have enough pins for the matrix and other functions, a custom matrix is implemented using a demultiplexer to scan the columns. Since the demux is active low, the diodes must be oriented with the cathode connected to the demux pin. When looking at the bottom of the board with the controller at the top right, the cathode mark on the diode should be toward the left. + +## LED Controller + +The in-switch LEDs are driven by an ISSI LED controller (IS31FL3731). The micro controller communicates with this chip using I2C. Individual LED control is possible, but currently only general backlighting support is implemented. This functionality is located in lighting.c, issi.c, and TWILib.c. \ No newline at end of file diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk new file mode 100644 index 000000000000..b6f61d8a486c --- /dev/null +++ b/keyboards/scarletbandana/rules.mk @@ -0,0 +1,69 @@ +# 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 + + +# 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 +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 = yes # Audio output on port C6 +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera diff --git a/keyboards/scarletbandana/scarletbandana.c b/keyboards/scarletbandana/scarletbandana.c new file mode 100644 index 000000000000..6926312ec5a6 --- /dev/null +++ b/keyboards/scarletbandana/scarletbandana.c @@ -0,0 +1,102 @@ +/* Copyright 2017 Cole Markham, WoodKeys.click + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 "scarletbandana.h" +#include + +#include "quantum.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif +} + + +void matrix_init_kb(void) +{ + // This is required to access the pins in the F-register + JTAG_DISABLE(); + debug_enable=true; + print("sb matrix_init_kb\n"); +#ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +#endif + + + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); +} + +void matrix_scan_kb(void) +{ + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // Test code that turns on the switch led for the key that is pressed + // set_backlight_by_keymap(record->event.key.col, record->event.key.row); + if (keycode == RESET) { + reset_keyboard_kb(); + } else { + } + 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); +} + +//void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +//{ +//#ifdef AUDIO_ENABLE +// int8_t sign = 1; +//#endif +// if(id == LFK_ESC_TILDE){ +// // Send ~ on shift-esc +// void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key; +// uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); +// method(shifted ? KC_GRAVE : KC_ESCAPE); +// send_keyboard_report(); +// }else if(event->event.pressed){ +// switch(id){ +// case LFK_CLEAR: +// // Go back to default layer +// layer_clear(); +// break; +//#ifdef ISSI_ENABLE +// case LFK_LED_TEST: +// led_test(); +// break; +//#endif +// } +// } +//} + +void reset_keyboard_kb(){ + xprintf("programming!\n"); + reset_keyboard(); +} diff --git a/keyboards/scarletbandana/scarletbandana.h b/keyboards/scarletbandana/scarletbandana.h new file mode 100644 index 000000000000..77b6afa7a50e --- /dev/null +++ b/keyboards/scarletbandana/scarletbandana.h @@ -0,0 +1,43 @@ +/* Copyright 2017 Cole Markham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 SCARLETBANDANA_H +#define SCARLETBANDANA_H + +#include "quantum.h" + +void reset_keyboard_kb(void); + +// 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 KEYMAP( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, \ + k40, k41, k42, k43, k44, k45, k47, k49, k4a, k4b, k4c, k4e, k4f, k4g \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, k3f, k3g }, \ + { k40, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k4a, k4b, k4c, KC_NO, k4e, k4f, k4g } \ +} + +#endif + From 9986c3d0b7f10cc07a3c38d8f46b4a157479e33a Mon Sep 17 00:00:00 2001 From: Rys Sommefeldt Date: Tue, 5 Feb 2019 23:58:01 +0000 Subject: [PATCH 301/458] Add another secure string emitter to the keymap (#5057) * Add another secure string emitter to the keymap * Delete BACKLIGHT_ENABLE since it's default Co-Authored-By: rys --- keyboards/tada68/keymaps/rys/keymap.c | 8 +++++++- keyboards/tada68/keymaps/rys/rules.mk | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/keyboards/tada68/keymaps/rys/keymap.c b/keyboards/tada68/keymaps/rys/keymap.c index a729e4be8973..c37f03075027 100644 --- a/keyboards/tada68/keymaps/rys/keymap.c +++ b/keyboards/tada68/keymaps/rys/keymap.c @@ -7,6 +7,7 @@ enum rys_keycodes { PSTOKEN = SAFE_RANGE, + QSTOKEN }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -16,6 +17,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(RYS_PSTOKEN); } break; + case QSTOKEN: + if (record->event.pressed) { + SEND_STRING(RYS_QSTOKEN); + } + break; } return true; }; @@ -59,7 +65,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, _______, PSTOKEN, \ _______, 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, \ + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, QSTOKEN, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_MS_U, KC_END, \ _______, _______, _______, RESET, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R ), }; diff --git a/keyboards/tada68/keymaps/rys/rules.mk b/keyboards/tada68/keymaps/rys/rules.mk index db6efeb8f16b..eb868df074d4 100644 --- a/keyboards/tada68/keymaps/rys/rules.mk +++ b/keyboards/tada68/keymaps/rys/rules.mk @@ -8,7 +8,6 @@ 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 = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode @@ -17,4 +16,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend RYS_PSTOKEN = $(shell security find-generic-password -a qmk -s tada68 -w) +RYS_QSTOKEN = $(shell security find-generic-password -a qmk -s tada68-2 -w) CFLAGS += -DRYS_PSTOKEN=\"$(RYS_PSTOKEN)\" +CFLAGS += -DRYS_QSTOKEN=\"$(RYS_QSTOKEN)\" From 045400ab28ee6c4f5d714b632f765d54da883f6c Mon Sep 17 00:00:00 2001 From: Jeremy Bernhardt Date: Wed, 6 Feb 2019 00:10:47 -0600 Subject: [PATCH 302/458] Update gergo.h Did a big brane move and mixed those up. Been using this keyboard for weeks and never noticed. --- keyboards/gergo/gergo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/gergo/gergo.h b/keyboards/gergo/gergo.h index c0d885029b75..0292c512ac4a 100644 --- a/keyboards/gergo/gergo.h +++ b/keyboards/gergo/gergo.h @@ -48,7 +48,7 @@ uint8_t init_mcp23018(void); { L01, L11, L21, KC_NO}, \ { L00, L10, L20, KC_NO}, \ \ - { R10, KC_NO, R20, R30}, \ + { KC_NO, R10, R20, R30}, \ { R00, R11, R21, R31}, \ { R01, R12, R22, R32}, \ { R02, R13, R23, R33}, \ From f1be0236b632b0a86e32a1f362cd1f9517a30c9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20=C4=90or=C4=91evi=C4=87?= Date: Wed, 6 Feb 2019 20:28:47 +0100 Subject: [PATCH 303/458] Remove unnecessary IS_COMMAND definitions from recently added keyboards (#5065) --- keyboards/meishi/config.h | 5 ----- keyboards/scarletbandana/config.h | 10 +--------- keyboards/sentraq/number_pad/config.h | 5 ----- tmk_core/protocol/usb_hid/test/config.h | 12 +----------- 4 files changed, 2 insertions(+), 30 deletions(-) diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h index cbc22476dd9a..6c712e2ad13c 100644 --- a/keyboards/meishi/config.h +++ b/keyboards/meishi/config.h @@ -104,11 +104,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/scarletbandana/config.h b/keyboards/scarletbandana/config.h index 7716813dd483..74443b3f866c 100644 --- a/keyboards/scarletbandana/config.h +++ b/keyboards/scarletbandana/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" @@ -54,10 +53,3 @@ along with this program. If not, see . #endif #define DEBOUNCING_DELAY 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h index d52670c7dacb..0769f9f3d219 100644 --- a/keyboards/sentraq/number_pad/config.h +++ b/keyboards/sentraq/number_pad/config.h @@ -76,8 +76,3 @@ along with this program. If not, see . /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/tmk_core/protocol/usb_hid/test/config.h b/tmk_core/protocol/usb_hid/test/config.h index a2403fe9c500..71a6814fd152 100644 --- a/tmk_core/protocol/usb_hid/test/config.h +++ b/tmk_core/protocol/usb_hid/test/config.h @@ -15,9 +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 #define VENDOR_ID 0xFEED #define PRODUCT_ID 0xCAFE @@ -25,16 +23,8 @@ along with this program. If not, see . #define MANUFACTURER t.m.k. #define PRODUCT USB to USB keyboard converter - #define DESCRIPTION Product from t.m.k. keyboard firmware project - /* matrix size */ #define MATRIX_ROWS 32 #define MATRIX_COLS 8 - - -/* key combination for command */ -#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -#endif From 80e733798a808ba1cf0d5371360c152fbb933717 Mon Sep 17 00:00:00 2001 From: adiron Date: Wed, 6 Feb 2019 21:35:45 +0200 Subject: [PATCH 304/458] Fixed default Preonic keymap's encoder hadnling (#5067) The function had the wrong name & arguments. This commit fixes this. This in turn should also close issue #4997 --- keyboards/preonic/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 33ca90f99b70..d37882eabc6e 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -233,7 +233,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -void encoder_update(bool clockwise) { +void encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { From afa4763ef55abcf122c07700e1c1fd012973fea2 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 6 Feb 2019 12:41:14 -0800 Subject: [PATCH 305/458] [Keyboard] Update the Scarlet Bandana (#5058) * remove unneeded file * make an appropriate readme * amend the LAYOUT macro to adhere to new QMK standards and create an appropriate keymap * add QMK Configurator support * a bunch of changes lol * delete unneeded routines * update date to modern times * remove a useless prototype * add in drashna's suggestions on PR --- keyboards/scarletbandana/config.h | 7 +- keyboards/scarletbandana/info.json | 12 + .../scarletbandana/keymaps/default/config.h | 2 +- .../scarletbandana/keymaps/default/keymap.c | 32 +- keyboards/scarletbandana/matrix.c | 326 ------------------ keyboards/scarletbandana/readme.md | 30 +- keyboards/scarletbandana/rules.mk | 5 +- keyboards/scarletbandana/scarletbandana.c | 82 +---- keyboards/scarletbandana/scarletbandana.h | 17 +- 9 files changed, 47 insertions(+), 466 deletions(-) create mode 100644 keyboards/scarletbandana/info.json delete mode 100644 keyboards/scarletbandana/matrix.c diff --git a/keyboards/scarletbandana/config.h b/keyboards/scarletbandana/config.h index 74443b3f866c..58c5d4a413a0 100644 --- a/keyboards/scarletbandana/config.h +++ b/keyboards/scarletbandana/config.h @@ -1,5 +1,5 @@ /* -Copyright 2017 Cole Markham +Copyright 2019 Cole Markham This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -25,7 +25,7 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER WoodKeys.click #define PRODUCT Scarlet Bandana Version IV mark.2 -#define DESCRIPTION What keyboard is that? +#define DESCRIPTION 65% with macro keys /* key matrix size */ #define MATRIX_ROWS 5 @@ -52,4 +52,7 @@ along with this program. If not, see . #define NO_MUSIC_MODE #endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + #define DEBOUNCING_DELAY 5 diff --git a/keyboards/scarletbandana/info.json b/keyboards/scarletbandana/info.json new file mode 100644 index 000000000000..9fb7c230ae73 --- /dev/null +++ b/keyboards/scarletbandana/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Scarlet Bandana Version IV Mark 2", + "url": "", + "maintainer": "qmk", + "width": 18.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":17.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"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, "w":1.5}, {"x":17.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2, "w":2.25}, {"x":17.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":2.25}, {"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}, {"x":14.75, "y":3, "w":1.75}, {"x":16.5, "y":3}, {"x":17.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.25}, {"x":6.25, "y":4, "w":2.25}, {"x":8.5, "y":4, "w":1.75}, {"x":10.25, "y":4, "w":2.25}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":16.5, "y":4}, {"x":17.5, "y":4}] + } + } +} \ No newline at end of file diff --git a/keyboards/scarletbandana/keymaps/default/config.h b/keyboards/scarletbandana/keymaps/default/config.h index 97210115b9e5..36f483c11194 100644 --- a/keyboards/scarletbandana/keymaps/default/config.h +++ b/keyboards/scarletbandana/keymaps/default/config.h @@ -1,4 +1,4 @@ -/* Copyright 2017 Cole Markham, WoodKeys.click +/* Copyright 2019 Cole Markham, WoodKeys.click * * This 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/scarletbandana/keymaps/default/keymap.c b/keyboards/scarletbandana/keymaps/default/keymap.c index c67eeab7f91a..3d4c96160c90 100644 --- a/keyboards/scarletbandana/keymaps/default/keymap.c +++ b/keyboards/scarletbandana/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2017 Cole Markham +/* Copyright 2019 Cole Markham * * This 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,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "../../scarletbandana.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -41,39 +41,35 @@ bool TOG_STATUS = false; int RGB_current_mode; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( - KC_F1, KC_F2, KC_ESC,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_PGUP,\ + [_QWERTY] = LAYOUT_all( + KC_F1, KC_F2, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_DEL, KC_PGUP,\ 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_PGDN,\ - 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_DEL, KC_HOME,\ + 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_HOME,\ 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_SLASH,KC_RSFT,KC_UP,KC_END,\ KC_F9, KC_F10, KC_LCTL,KC_LGUI,KC_LALT, RAISE, KC_SPACE, LOWER, KC_RALT,KC_APP,KC_RCTRL,KC_LEFT,KC_DOWN,KC_RIGHT), - [_RAISE] = KEYMAP( - RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + [_RAISE] = LAYOUT_all( + RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______), - [_LOWER] = KEYMAP( - RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + [_LOWER] = LAYOUT_all( + RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______), - [_ADJUST] = KEYMAP( - RESET, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + [_ADJUST] = LAYOUT_all( + RESET, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ - _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______) }; -const uint16_t PROGMEM fn_actions[] = { - -}; - // 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)) { diff --git a/keyboards/scarletbandana/matrix.c b/keyboards/scarletbandana/matrix.c deleted file mode 100644 index 7b7934c9efb1..000000000000 --- a/keyboards/scarletbandana/matrix.c +++ /dev/null @@ -1,326 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2017 Cole Markham - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General 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 -#if defined(__AVR__) -#include -#include "pincontrol.h" -#endif -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "config.h" -#include "timer.h" -//#include "audio.h" - -#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) -#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 - -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[4] = MATRIX_COL_PINS; -static const uint8_t xcol_pins[MATRIX_COLS - 16] = MATRIX_XCOL_PINS; -// -//float init_song[][2] = SONG(QWERTY_SOUND); - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -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 init_cols(void); -static void select_col(uint8_t col); -//static void demux_enable(bool enabled); - -__attribute__ ((weak)) -void matrix_init_quantum(void) { - matrix_init_kb(); -} - -__attribute__ ((weak)) -void matrix_scan_quantum(void) { - matrix_scan_kb(); -} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - dprintf("matrix init"); - // initialize row and col - init_cols(); - init_rows(); - - -// PLAY_NOTE_ARRAY(init_song, false, 0); - - - // 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) -{ - // 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 - - } - - // Unselect cols - unselect_cols(); - -# 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 - - return 1; -} - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - matrix_scan_quantum(); - return ret; -} - -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<= 16) { -// demux_enable(false); -// digitalWrite(MATRIX_EN_PIN, PinLevelHigh); - } else { - for(uint8_t x = 0; x < 4; x++) { - uint8_t pin = col_pins[x]; - pinMode(pin, PinDirectionOutput); - digitalWrite(pin, (col >> x) & 0x1); - } -// demux_enable(true); - digitalWrite(MATRIX_EN_PIN, PinLevelLow); - } -} - -static void init_cols(void) { - for (uint8_t y = 16; y < MATRIX_COLS; y++) { - uint8_t pin = xcol_pins[y-16]; - pinMode(pin, PinDirectionOutput); - } - for(uint8_t x = 0; x < 4; x++) { - uint8_t pin = col_pins[x]; - pinMode(pin, PinDirectionOutput); - } - pinMode(MATRIX_EN_PIN, PinDirectionOutput); -// digitalWrite(MATRIX_EN_PIN, PinLevelHigh); - unselect_cols(); -} - -static void unselect_cols(void) -{ - for (uint8_t y = 16; y < MATRIX_COLS; y++) { - uint8_t pin = xcol_pins[y-16]; - digitalWrite(pin, PinLevelHigh); - } -// demux_enable(false); -// digitalWrite(MATRIX_EN_PIN, PinLevelHigh); -} - -//static void demux_enable(uint8_t state) -//{ -// if (enabled){ -// digitalWrite(F7, PinLevelLow); -// } else { -// digitalWrite(F7, PinLevelHigh); -// } -//} diff --git a/keyboards/scarletbandana/readme.md b/keyboards/scarletbandana/readme.md index 6d5d9b553510..83281bae36c7 100644 --- a/keyboards/scarletbandana/readme.md +++ b/keyboards/scarletbandana/readme.md @@ -1,31 +1,11 @@ -# Meira - -![Miera](https://imgur.com/kF4MFlW) - -A 4x12 ortholinear low-profile keyboard. +# Scarlet Bandana Version IV Mark 2 Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) -Hardware Supported: Meira/ProMicro, Meira/FeatherBLE -Hardware Availability: [WoodKeys.click](https://woodkeys.click/meira) - -Two controllers are support: the Pro Micro, and the Adafruit Feather BLE 32u4. Support for each is defined as a hardware revision subfolder in QMK. Main differences include processor frequencies and matrix pinouts. +Hardware Supported: Scarlet Bandana Version IV Mark 2 +Hardware Availability: [WoodKeys.click](https://woodkeys.click/product/scarlet-bandana-version-iv-mark-2/) Make example for this keyboard (after setting up your build environment): - make meira/promicro:default - -or - - make meira/featherble:default - -See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information on generic QMK configuration and setup. - -Both the Pro Micro and the Feather BLE use the Catalina bootloader, which is typically programmed using avrdude. - -## Matrix - -In order to have enough pins for the matrix and other functions, a custom matrix is implemented using a demultiplexer to scan the columns. Since the demux is active low, the diodes must be oriented with the cathode connected to the demux pin. When looking at the bottom of the board with the controller at the top right, the cathode mark on the diode should be toward the left. - -## LED Controller + make scarletbandana:default -The in-switch LEDs are driven by an ISSI LED controller (IS31FL3731). The micro controller communicates with this chip using I2C. Individual LED control is possible, but currently only general backlighting support is implemented. This functionality is located in lighting.c, issi.c, and TWILib.c. \ 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/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index b6f61d8a486c..2767697c52e9 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -45,13 +45,13 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +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 = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) @@ -67,3 +67,4 @@ AUDIO_ENABLE = yes # Audio output on port C6 RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera +EXTRAFLAGS += -flto diff --git a/keyboards/scarletbandana/scarletbandana.c b/keyboards/scarletbandana/scarletbandana.c index 6926312ec5a6..6ef183c2cc1a 100644 --- a/keyboards/scarletbandana/scarletbandana.c +++ b/keyboards/scarletbandana/scarletbandana.c @@ -1,4 +1,4 @@ -/* Copyright 2017 Cole Markham, WoodKeys.click +/* Copyright 2019 Cole Markham, WoodKeys.click * * This 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,89 +14,9 @@ * along with this program. If not, see . */ #include "scarletbandana.h" -#include -#include "quantum.h" -#ifdef AUDIO_ENABLE - float tone_startup[][2] = SONG(STARTUP_SOUND); - float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -#endif -void shutdown_user(void) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); - #endif -} -void matrix_init_kb(void) -{ - // This is required to access the pins in the F-register - JTAG_DISABLE(); - debug_enable=true; - print("sb matrix_init_kb\n"); -#ifdef AUDIO_ENABLE - _delay_ms(20); // gets rid of tick - PLAY_NOTE_ARRAY(tone_startup, false, 0); -#endif - - - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); -} - -void matrix_scan_kb(void) -{ - matrix_scan_user(); -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - // Test code that turns on the switch led for the key that is pressed - // set_backlight_by_keymap(record->event.key.col, record->event.key.row); - if (keycode == RESET) { - reset_keyboard_kb(); - } else { - } - 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); -} - -//void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) -//{ -//#ifdef AUDIO_ENABLE -// int8_t sign = 1; -//#endif -// if(id == LFK_ESC_TILDE){ -// // Send ~ on shift-esc -// void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key; -// uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)); -// method(shifted ? KC_GRAVE : KC_ESCAPE); -// send_keyboard_report(); -// }else if(event->event.pressed){ -// switch(id){ -// case LFK_CLEAR: -// // Go back to default layer -// layer_clear(); -// break; -//#ifdef ISSI_ENABLE -// case LFK_LED_TEST: -// led_test(); -// break; -//#endif -// } -// } -//} - -void reset_keyboard_kb(){ - xprintf("programming!\n"); - reset_keyboard(); -} diff --git a/keyboards/scarletbandana/scarletbandana.h b/keyboards/scarletbandana/scarletbandana.h index 77b6afa7a50e..8178e8c8dcf8 100644 --- a/keyboards/scarletbandana/scarletbandana.h +++ b/keyboards/scarletbandana/scarletbandana.h @@ -1,4 +1,4 @@ -/* Copyright 2017 Cole Markham +/* Copyright 2019 Cole Markham * * This 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,23 +13,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef SCARLETBANDANA_H -#define SCARLETBANDANA_H +#pragma once #include "quantum.h" -void reset_keyboard_kb(void); - // 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 KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k2f, k0g, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2g, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, \ - k40, k41, k42, k43, k44, k45, k47, k49, k4a, k4b, k4c, k4e, k4f, k4g \ + k40, k41, k42, k43, k44, k45, k47, k49, k4a, k4b, k4c, k4e, k4f, k4g \ ) \ { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ @@ -39,5 +36,3 @@ void reset_keyboard_kb(void); { k40, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k4a, k4b, k4c, KC_NO, k4e, k4f, k4g } \ } -#endif - From 35f6919673c57a9fea9305a001c0069e8bbc2844 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 6 Feb 2019 12:43:25 -0800 Subject: [PATCH 306/458] Fix Bootmgic Mod Handling for LM keycodes (#4740) --- quantum/keymap_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 1a6af9e08f3c..9d2d331ce549 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -127,7 +127,7 @@ action_t action_for_key(uint8_t layer, keypos_t key) action.code = ACTION_LAYER_TAP_TOGGLE(keycode & 0xFF); break; case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: - mod = keycode & 0xF; + mod = mod_config(keycode & 0xF); action_layer = (keycode >> 4) & 0xF; action.code = ACTION_LAYER_MODS(action_layer, mod); break; From a3104a71105e7743c778c47617dce0468bf8dc1f Mon Sep 17 00:00:00 2001 From: Chuck Lauer Vose Date: Wed, 6 Feb 2019 14:41:17 -0800 Subject: [PATCH 307/458] [Keyboard] Initial commit of Laptreus Keyboard (#4967) * Add userspace files for vosechu * Code review corrections * Few more code review corrections * Initial add of Laptreus code * Initial add of Laptreus code * Adding last punctuation to default * Add some debug suggestions to the debug readme * Fixes for PR feedback * Fixing capitalization of readme files * update auto detect connection logic --- keyboards/laptreus/config.h | 72 +++++++++++++++++ keyboards/laptreus/keymaps/debug/keymap.c | 11 +++ keyboards/laptreus/keymaps/debug/readme.md | 81 ++++++++++++++++++++ keyboards/laptreus/keymaps/default/keymap.c | 74 ++++++++++++++++++ keyboards/laptreus/keymaps/default/readme.md | 79 +++++++++++++++++++ keyboards/laptreus/keymaps/vosechu/keymap.c | 36 +++++++++ keyboards/laptreus/keymaps/vosechu/readme.md | 0 keyboards/laptreus/laptreus.c | 6 ++ keyboards/laptreus/laptreus.h | 41 ++++++++++ keyboards/laptreus/readme.md | 35 +++++++++ keyboards/laptreus/rules.mk | 67 ++++++++++++++++ 11 files changed, 502 insertions(+) create mode 100644 keyboards/laptreus/config.h create mode 100644 keyboards/laptreus/keymaps/debug/keymap.c create mode 100644 keyboards/laptreus/keymaps/debug/readme.md create mode 100644 keyboards/laptreus/keymaps/default/keymap.c create mode 100644 keyboards/laptreus/keymaps/default/readme.md create mode 100644 keyboards/laptreus/keymaps/vosechu/keymap.c create mode 100644 keyboards/laptreus/keymaps/vosechu/readme.md create mode 100644 keyboards/laptreus/laptreus.c create mode 100644 keyboards/laptreus/laptreus.h create mode 100644 keyboards/laptreus/readme.md create mode 100644 keyboards/laptreus/rules.mk diff --git a/keyboards/laptreus/config.h b/keyboards/laptreus/config.h new file mode 100644 index 000000000000..de6b7ce94d21 --- /dev/null +++ b/keyboards/laptreus/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2019 Chuck "@vosechu" Lauer Vose + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 0x1209 // pid.codes Vendor ID +#define PRODUCT_ID 0xA1F1 // FIXME: Need to send PR to pid.codes to make this official +#define DEVICE_VER 0x0001 +#define MANUFACTURER Vosechu +#define PRODUCT Laptreus +#define DESCRIPTION keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +#define MATRIX_ROW_PINS { F7, F6, F5, F1, F4 } +#define MATRIX_COL_PINS { D6, B7, B6, D7, C6, D1, D0, D3, D2, F0 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* 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 + +/* + * 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/laptreus/keymaps/debug/keymap.c b/keyboards/laptreus/keymaps/debug/keymap.c new file mode 100644 index 000000000000..8ffb06fa2534 --- /dev/null +++ b/keyboards/laptreus/keymaps/debug/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* ============================= DEBUG LAYER ============================= */ + [0] = LAYOUT( + KC_A, KC_1, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + KC_A, KC_2, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + KC_A, KC_3, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + KC_A, KC_4, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L + ) +}; diff --git a/keyboards/laptreus/keymaps/debug/readme.md b/keyboards/laptreus/keymaps/debug/readme.md new file mode 100644 index 000000000000..fa4a27eda897 --- /dev/null +++ b/keyboards/laptreus/keymaps/debug/readme.md @@ -0,0 +1,81 @@ +# Debug layout + +This layout is expressly for debugging to see if your keys are working. + +## Flashing + +**NOTE**: Make sure you don't have a second QMK keyboard plugged in when you do this! + +To compile and flash to the board: + + make laptreus:debug:avrdude + +To just compile: + + make laptreus:debug + +Then use QMK toolbox to write the file + +# Testing + +Now that you've got the image flashed, do the following: + +* Open a new text document +* Click each key in order and hit enter (with the other keyboard) between each line +* For any keys that don't register, hit space (with the other keyboard) and continue on +* You'll end up with something looking like this: + + a1bcdefghijkl + a2bcdefghijkl + a3bcdefghijkl + a4bcdefghijkl + +But almost certainly it won't be perfect, so lets go through some scenarios: + +## Step 1: Get all the letters to output _something_ + +For lines that look like this: + + a1bc efg ijkl + +* Option 1: Bent pin - Pull out the switch in those spots, probably the pin got bent when you inserted it into the hotswap socket. Gently bend the pin straight and re-insert. +* Option 2: Broken joint on hotswap - If the pin looks okay, try connecting the two metal plated holes underneath the hotswap holes to see if the letter comes out. If it does, reflow (aka, apply some flux to both pads and reheat) the solder joint. +* Option 3: Diode is backwards - If connecting the two metal pins didn't work, double check that the diode is the right direction. This may also need to be reflowed. +* Option 4: ??? - Hop in [the discord]() and let's chat! + +## Step 2: Correct double letters + +Once you have all the keys outputting _anything_, flash the default layout and do the same thing. If everything is working, your layout will look something like this: + + qwertyuiop + asdfghjkl;' + zxcvbnm,./ + +**Note**: Don't worry about hitting the backspace or command keys + +### Duplicate letters + +For lines that look like this: + + qwertyyuiop (double y) + +* Option 1: Bent pin - Pull out the switch in those spots, probably the pin got bent when you inserted it into the hotswap socket. Gently bend the pin straight and re-insert. +* Option 2: Switch is broken - Try connecting the two metal plated holes underneath the hotswap holes to see if the letter comes out just once. If it does, the switch is broken and should be replaced. If you don't have another switch, you _may_ be able to unbend the leaf inside the switch, but it's really tricky. + +### Second letter sent (same row) + +For lines that look like this: + + qwertyyuiop (t sent t AND y) + +* Option 1: ??? - I can't imagine how this would happen with this layout, but let me know if it does! + +### Second letter sent (same column) + +For lines that look like this: + + qwertgyuiop (t sent t AND g) + qwertgbyuiop (t sent t AND g AND b) + +* Option 1: Diodes are backwards - Some of the diodes on this column are backwards, you can use a diode tester to confirm the direction, or just check them with a magnifying glass and switch them if needed. +* Option 2: ??? diff --git a/keyboards/laptreus/keymaps/default/keymap.c b/keyboards/laptreus/keymaps/default/keymap.c new file mode 100644 index 000000000000..b0e1c9f023a7 --- /dev/null +++ b/keyboards/laptreus/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY = 0, + _DVORAK, + _LOWER, + _RAISE, + _LIFT +}; + +// Fillers to make layering more clear +#define _LAYER_ KC_TRNS + +// Adding macros to make the keymaps below much easier to read. +#define CTL_ESC CTL_T(KC_ESC) +#define CTL_GRV CTL_T(KC_GRV) +#define ALT_TAB ALT_T(KC_TAB) +#define SFT_SPC SFT_T(KC_SPC) + +// Extended alpha key layers +#define RSE_J LT(_RAISE, KC_J) +#define LWR_F LT(_LOWER, KC_F) +#define RSE_H LT(_RAISE, KC_H) +#define LWR_U LT(_LOWER, KC_U) +#define LFT_BK LT(_LIFT, KC_BSPC) +#define LFT_ENT LT(_LIFT, KC_ENT) + +// Macro keys for some apps +#define SLACKUP LALT(LSFT(KC_UP)) +#define SLACKDN LALT(LSFT(KC_DOWN)) +#define TAB_LFT LGUI(LSFT(KC_LBRC)) +#define TAB_RGT LGUI(LSFT(KC_RBRC)) +#define BWSR_BK LGUI(KC_LBRC) +#define BWSR_FW LGUI(KC_RBRC) +#define SCR_LFT HYPR(KC_LEFT) +#define SCR_RGT HYPR(KC_RGHT) +#define SCR_FUL HYPR(KC_F) + +// Layer toggles +#define TO_QW TO(_QWERTY) +#define TO_DV TO(_DVORAK) + +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 , + KC_ESC , KC_A , KC_S , KC_D , LWR_F , KC_G , KC_H , RSE_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_HYPR , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , 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 , + KC_ESC , KC_A , KC_O , KC_E , LWR_U , KC_I , KC_D , RSE_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_HYPR , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT + ), + [_LOWER] = LAYOUT( + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_7 , KC_8 , KC_9 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , KC_4 , KC_5 , KC_6 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_1 , KC_2 , KC_3 , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_DOT , _______ , _______ + ), + [_RAISE] = LAYOUT( + _______ , KC_LABK , KC_RABK , KC_LCBR , KC_RCBR , KC_EQL , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , KC_MINS , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , KC_BSLS , KC_SLSH , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), + [_LIFT] = LAYOUT( + _______ , BWSR_BK , TAB_LFT , KC_UP , TAB_RGT , BWSR_FW , KC_MUTE , XXXXXXX , SCR_LFT , SCR_FUL , SCR_RGT , _______ , + _______ , XXXXXXX , KC_LEFT , KC_DOWN , KC_RGHT , KC_PGUP , KC_VOLU , SLACKUP , XXXXXXX , XXXXXXX , TO_QW , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_PGDN , KC_VOLD , SLACKDN , XXXXXXX , XXXXXXX , TO_DV , _______ , + _______ , RESET , _______ , _______ , _LAYER_ , KC_BSPC , _______ , KC_LSFT , KC_LGUI , KC_LALT , KC_LCTL , _______ + ) +}; diff --git a/keyboards/laptreus/keymaps/default/readme.md b/keyboards/laptreus/keymaps/default/readme.md new file mode 100644 index 000000000000..0124ab9a9f82 --- /dev/null +++ b/keyboards/laptreus/keymaps/default/readme.md @@ -0,0 +1,79 @@ +# Default layout + +This is the default layout for the Laptreus + +## Layout + +Some special things: + +* Lower/Raise are on the F/J keys. Tap to type the character, hold to activate the layer +* Enter and Backspace also activate the Lift layer. +* -- To get repeated backspace, hold BkLft and then press Shift + +### Qwerty + + ,-----------------------------------------------------------------------------------. + | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | S | D | Lwr/F| G | H | Rse/J| K | L | ; | " | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Hyper|Ctrl/~|AltTab| Cmd | BkLft| Shift| Space|EntLft| Left | Down | Up | Right| + `-----------------------------------------------------------------------------------' + +### Dvorak + + ,-----------------------------------------------------------------------------------. + | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | O | E | Lwr/U| I | D | Rse/H| T | N | S | / | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | B | M | W | V | Z | Enter| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Hyper|Ctrl/~|AltTab| Cmd | BkLft| Shift| Space|EntLft| Left | Down | Up | Right| + `-----------------------------------------------------------------------------------' + +### Raise + + ,-----------------------------------------------------------------------------------. + | | < | > | { | } | | | | | | | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | ( | ) | [ | ] | | | | | | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | BkLft| Shift| Space|EntLft| | | | | + `-----------------------------------------------------------------------------------' + +### Lower + + ,-----------------------------------------------------------------------------------. + | | | | | | | | 7 | 8 | 9 | | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | | | | | | 4 | 5 | 6 | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | 1 | 2 | 3 | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | BkLft| Shift| Space| 0 | 0 | . | | | + `-----------------------------------------------------------------------------------' + +### Lift + + ,-----------------------------------------------------------------------------------. + | |Hist ←| Tab ←| ↑ | Tab →|Hist →| Mute | |ScrLft|ScrFul|ScrRgt| | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | ← | ↓ | → | Pg Up|Vol up|Slk up| | |Qwerty| | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | Pg Dn|Vol dn|Slk dn| | |Dvorak| | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | Reset| | | | Bksp | | Shift| Cmd | Opt | Ctrl | | + `-----------------------------------------------------------------------------------' + +Special things: + +* Hist: Back button in your browser +* Tab: Move one tab left/right in most mac apps +* Slk: Go to the previous/next unread conversation in Slack +* Scr: Make this app fill the left/right side of your monitor (or full screen) +* Since arrows are on this layer, the command keys are moved to the right side diff --git a/keyboards/laptreus/keymaps/vosechu/keymap.c b/keyboards/laptreus/keymaps/vosechu/keymap.c new file mode 100644 index 000000000000..8bb08a873284 --- /dev/null +++ b/keyboards/laptreus/keymaps/vosechu/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +#include "vosechu.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DV] = LAYOUT( + PAWFIVE , KC_QUOT , KC_COMM , KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L , RESET , + KC_ESC , KC_A , KC_O , KC_E , LWR_U , KC_I , KC_D , RSE_H , KC_T , KC_N , KC_S , XXXXXXX , + XXXXXXX , KC_SCLN , KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , KC_ENT , + XXXXXXX , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_MINS , KC_EQL , KC_SLSH , KC_BSLS + ), + [QW] = 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 , LWR_F , KC_G , KC_H , RSE_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_HYPR , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT + ), + [LWR] = LAYOUT( + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_7 , KC_8 , KC_9 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , KC_4 , KC_5 , KC_6 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_1 , KC_2 , KC_3 , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_0 , KC_DOT , _______ , _______ + ), + [RSE] = LAYOUT( + _______ , KC_LABK , KC_RABK , KC_LCBR , KC_RCBR , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , XXXXXXX , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), + [LFT] = LAYOUT( + _______ , BWSR_BK , TAB_LFT , KC_UP , TAB_RGT , BWSR_FW , KC_MUTE , XXXXXXX , SCR_LFT , SCR_FUL , SCR_RGT , _______ , + _______ , XXXXXXX , KC_LEFT , KC_DOWN , KC_RGHT , KC_PGUP , KC_VOLU , SLACKUP , XXXXXXX , XXXXXXX , TO(QW) , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_PGDN , KC_VOLD , SLACKDN , XXXXXXX , XXXXXXX , TO(DV) , _______ , + _______ , RESET , _______ , _______ , _LAYER_ , KC_BSPC , _______ , KC_LSFT , KC_LGUI , KC_LALT , KC_LCTL , _______ + ) +}; diff --git a/keyboards/laptreus/keymaps/vosechu/readme.md b/keyboards/laptreus/keymaps/vosechu/readme.md new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/keyboards/laptreus/laptreus.c b/keyboards/laptreus/laptreus.c new file mode 100644 index 000000000000..2e59ffd622fe --- /dev/null +++ b/keyboards/laptreus/laptreus.c @@ -0,0 +1,6 @@ +#include "laptreus.h" + +void matrix_init_kb() { + // auto detect output on init + set_output(OUTPUT_AUTO); +} diff --git a/keyboards/laptreus/laptreus.h b/keyboards/laptreus/laptreus.h new file mode 100644 index 000000000000..305d4127480f --- /dev/null +++ b/keyboards/laptreus/laptreus.h @@ -0,0 +1,41 @@ +#ifndef LAPTREUS_H +#define LAPTREUS_H + +#include "quantum.h" +#include "outputselect.h" + +/* +// 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( \ + A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \ + B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \ + C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \ + D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \ +) \ +{ \ + {A2, A3, A4, A5, A6, A7, A8, A9, A10, A11}, \ + {B2, B3, B4, B5, B6, B7, B8, B9, B10, B11}, \ + {C2, C3, C4, C5, C6, C7, C8, C9, C10, C11}, \ + {D2, D3, D4, D5, D6, D7, D8, D9, D10, D11}, \ + {A1, B1, C1, D1, KC_NO, KC_NO, D12, C12, B12, A12} \ +} + +#define LAYOUT_kc( \ + A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \ + B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \ + C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \ + D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \ +) \ +{ \ + LAYOUT( \ + KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, KC_##A11, KC_##A12, \ + KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, KC_##B11, KC_##B12, \ + KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C8, KC_##C9, KC_##C10, KC_##C11, KC_##C12, \ + KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D6, KC_##D7, KC_##D8, KC_##D9, KC_##D10, KC_##D11, KC_##D12 \ + ) \ +} + +#endif diff --git a/keyboards/laptreus/readme.md b/keyboards/laptreus/readme.md new file mode 100644 index 000000000000..e27c206048e2 --- /dev/null +++ b/keyboards/laptreus/readme.md @@ -0,0 +1,35 @@ +# Laptreus + +TODO: Insert cool photo + +Laptreus is a 40% bluetooth keyboard in the style of the Atreus, which is specifically designed to sit atop your laptop keyboard. + +Maintainer: [Chuck Lauer Vose](https://github.com/vosechu) +MCU: Adafruit Feather 32u4 BLE +Purchase link: GB coming soon +Case link: GB coming soon +Case design files: TODO + +## Flashing + +**NOTE**: Make sure you don't have a second QMK keyboard plugged in when you do this! + +[Default layout documentation](https://github.com/qmk/qmk_firmware/tree/master/keyboards/laptreus/keymaps/default) + +To compile and flash to the board: + + make laptreus:default:avrdude + +To just compile: + + make laptreus:default + +Then use QMK toolbox to write the file + +## Changelog + +v1.2: Mostly working, but JST connector is a little too tight and the reset switch is not connected. + +## Build log + +TODO diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk new file mode 100644 index 000000000000..d170345073d2 --- /dev/null +++ b/keyboards/laptreus/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 = 8000000 + +# +# 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 = catarina + +# 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 = 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 +UNICODE_ENABLE = no # Unicode +KEY_LOCK_ENABLE = no +TAP_DANCE_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 + +BLUETOOTH_ENABLE = no # Legacy bluetooth support +BLUETOOTH = AdafruitBLE From 4397b17ca0893c3c80306a9d460a7c9f729cef91 Mon Sep 17 00:00:00 2001 From: Robin Hallabro-Kokko <44033026+hallabro@users.noreply.github.com> Date: Wed, 6 Feb 2019 11:57:19 +0000 Subject: [PATCH 308/458] faq_build.md: Add section about serial devices on Linux --- docs/faq_build.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/faq_build.md b/docs/faq_build.md index 14c61a1e99e6..d920d27e2a45 100644 --- a/docs/faq_build.md +++ b/docs/faq_build.md @@ -37,6 +37,10 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066 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 +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. From f1c7718463835dfb5b7304d68c279372efe9fcb4 Mon Sep 17 00:00:00 2001 From: stanrc85 <47038504+stanrc85@users.noreply.github.com> Date: Wed, 6 Feb 2019 17:58:00 -0500 Subject: [PATCH 309/458] [Keymap] stanrc85 Keymap updates (#5066) * Rename aliases to better reflect keycodes used * Update readme to reflect changes in keymap * Disabled more unused options to reduce memory usage * Remove backlight keycodes and move RGB keycodes * Update to reflect changes in keymap * Disable backlight option * Spacing --- .../community/60_ansi/stanrc85-ansi/keymap.c | 28 +++++++++---------- .../community/60_ansi/stanrc85-ansi/readme.md | 4 +-- .../community/60_ansi/stanrc85-ansi/rules.mk | 8 ++++++ 3 files changed, 24 insertions(+), 16 deletions(-) diff --git a/layouts/community/60_ansi/stanrc85-ansi/keymap.c b/layouts/community/60_ansi/stanrc85-ansi/keymap.c index f6a5f4c9838b..ddda4fcd8a28 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/keymap.c +++ b/layouts/community/60_ansi/stanrc85-ansi/keymap.c @@ -15,20 +15,20 @@ */ #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 //Backlight controls and RESET +#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 CA_ESC LT(2, KC_ESC) -#define CA_SPCF LT(2, KC_SPC) -#define CA_TESC TD(TD_ESC) -#define CA_TWIN TD(TD_WIN) +#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 { @@ -43,11 +43,11 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( - CA_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, + 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, - CA_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_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, CA_SPCF, KC_RALT, CA_TWIN, MO(3), KC_RCTL), + 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, @@ -64,10 +64,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______), [3] = LAYOUT_60_ansi( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - KC_CAPS, _______, _______, TG(1), _______, _______, BL_STEP, BL_DEC, BL_INC, BL_TOGG, _______, _______, _______, - _______, _______, _______, RGB_VAD, RGB_VAI, RGB_SAI, RGB_HUD, RGB_HUI, RGB_MOD, RGB_TOG, _______, _______, + _______, _______, _______, TG(1), _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) }; diff --git a/layouts/community/60_ansi/stanrc85-ansi/readme.md b/layouts/community/60_ansi/stanrc85-ansi/readme.md index 620d0775a041..2df5588af7fb 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/readme.md +++ b/layouts/community/60_ansi/stanrc85-ansi/readme.md @@ -5,10 +5,10 @@ Shared keymap between two 60% PCB: - DZ60 (hotswap) ## Keymap Notes -- Layer 0 is custom ANSI layout with SpaceFN, EscFN on CAPS, Tap Dance on Fn1 key for CTRL+ALT+DEL and WIN+L +- 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 backlight control and RESET +- Layer 3 is RGB Underglow control and RESET ### Build To build the firmware file associated with this keymap, simply run `make your_keyboard:stanrc85-ansi`. diff --git a/layouts/community/60_ansi/stanrc85-ansi/rules.mk b/layouts/community/60_ansi/stanrc85-ansi/rules.mk index d58c21f2b915..324e52674d6c 100644 --- a/layouts/community/60_ansi/stanrc85-ansi/rules.mk +++ b/layouts/community/60_ansi/stanrc85-ansi/rules.mk @@ -1,2 +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 From 3a513fc3a3e9c1ead4bdb58e8cdf5735ac8161e7 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Wed, 6 Feb 2019 16:43:47 -0800 Subject: [PATCH 310/458] [Docs] Bootmagic Lite Caveat (#5069) Document that using bootmagic lite resets the eeprom every time. --- docs/feature_bootmagic.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 504fb90f451b..39e4e47f4e09 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -127,7 +127,9 @@ Additionally, you may want to specify which key to use. This is especially usef By default, these are set to 0 and 0, which is usually the "ESC" key on a majority of keyboards. -And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key. +And to trigger the bootloader, you hold this key down when plugging the keyboard in. Just the single key. + +!> Using bootmagic lite will **always reset** the EEPROM, so you will lose any settings that have been saved. ## Advanced Bootmagic Lite From c7895776759c9e137204fc7c3ae3dcc1ae9eb690 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Thu, 7 Feb 2019 11:34:15 -0500 Subject: [PATCH 311/458] Adds a period to the docs. Yes, really. Revolutionary, I know! --- 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 d23cb31d9a52..95c47355ceb6 100644 --- a/docs/feature_advanced_keycodes.md +++ b/docs/feature_advanced_keycodes.md @@ -21,7 +21,7 @@ Additionally, if at least one right-handed modifier is specified in a Mod Tap or # Switching and Toggling Layers -These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers) When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended. +These functions allow you to activate layers in various ways. Note that layers are not generally independent layouts -- multiple layers can be activated at once, and it's typical for layers to use `KC_TRNS` to allow keypresses to pass through to lower layers. For a detailed explanation of layers, see [Keymap Overview](keymap.md#keymap-and-layers). When using momentary layer switching with MO(), LM(), TT(), or LT(), make sure to leave the key on the above layers transparent or it may not work as intended. * `DF(layer)` - switches the default layer. The default layer is the always-active base layer that other layers stack on top of. See below for more about the default layer. This might be used to switch from QWERTY to Dvorak layout. (Note that this is a temporary switch that only persists until the keyboard loses power. To modify the default layer in a persistent way requires deeper customization, such as calling the `set_single_persistent_default_layer` function inside of [process_record_user](custom_quantum_functions.md#programming-the-behavior-of-any-keycode).) * `MO(layer)` - momentarily activates *layer*. As soon as you let go of the key, the layer is deactivated. From 6affec582b4816bf7f3b22bb3e3c7175d09e5c9e Mon Sep 17 00:00:00 2001 From: Brice Figureau Date: Thu, 7 Feb 2019 23:22:20 +0100 Subject: [PATCH 312/458] Regroup all Exclusive keyboard in one directory To reduce clutter in the `keyboards/` directory, this patch moves all keyboards definitions for Exclusive boards to its own subdirectory. --- keyboards/{ => exclusive}/e6_rgb/config.h | 0 keyboards/{ => exclusive}/e6_rgb/e6_rgb.c | 0 keyboards/{ => exclusive}/e6_rgb/e6_rgb.h | 0 keyboards/{ => exclusive}/e6_rgb/info.json | 0 .../{ => exclusive}/e6_rgb/keymaps/60_ansi/keymap.c | 0 .../e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c | 0 .../{ => exclusive}/e6_rgb/keymaps/60_hhkb/keymap.c | 0 keyboards/{ => exclusive}/e6_rgb/keymaps/60_wkl/keymap.c | 0 .../e6_rgb/keymaps/60_wkl_split_bs/keymap.c | 0 .../{ => exclusive}/e6_rgb/keymaps/default/keymap.c | 0 keyboards/{ => exclusive}/e6_rgb/readme.md | 2 +- keyboards/{ => exclusive}/e6_rgb/rules.mk | 0 keyboards/{ => exclusive}/e6v2/le/config.h | 0 keyboards/{ => exclusive}/e6v2/le/info.json | 0 .../{ => exclusive}/e6v2/le/keymaps/default/keymap.c | 0 keyboards/{ => exclusive}/e6v2/le/keymaps/eric/keymap.c | 0 keyboards/{ => exclusive}/e6v2/le/keymaps/johu/keymap.c | 0 keyboards/{ => exclusive}/e6v2/le/keymaps/johu/readme.md | 0 keyboards/{ => exclusive}/e6v2/le/le.c | 0 keyboards/{ => exclusive}/e6v2/le/le.h | 0 keyboards/{ => exclusive}/e6v2/le/readme.md | 6 +++--- keyboards/{ => exclusive}/e6v2/le/rules.mk | 0 keyboards/{ => exclusive}/e6v2/oe/config.h | 0 keyboards/{ => exclusive}/e6v2/oe/info.json | 0 .../{ => exclusive}/e6v2/oe/keymaps/amnesia0287/keymap.c | 0 .../e6v2/oe/keymaps/amnesia0287/readme.md | 0 .../{ => exclusive}/e6v2/oe/keymaps/default/keymap.c | 0 .../{ => exclusive}/e6v2/oe/keymaps/default/readme.md | 0 keyboards/{ => exclusive}/e6v2/oe/oe.c | 0 keyboards/{ => exclusive}/e6v2/oe/oe.h | 0 keyboards/{ => exclusive}/e6v2/oe/readme.md | 0 keyboards/{ => exclusive}/e6v2/oe/rules.mk | 0 keyboards/{ => exclusive}/e6v2/readme.md | 0 keyboards/{ => exclusive}/e7v1/config.h | 0 keyboards/{ => exclusive}/e7v1/e7v1.c | 0 keyboards/{ => exclusive}/e7v1/e7v1.h | 0 keyboards/{ => exclusive}/e7v1/info.json | 0 .../{ => exclusive}/e7v1/keymaps/ansi_splitbs/keymap.c | 0 .../{ => exclusive}/e7v1/keymaps/ansi_splitbs/readme.md | 0 keyboards/{ => exclusive}/e7v1/keymaps/default/keymap.c | 0 keyboards/{ => exclusive}/e7v1/keymaps/default/readme.md | 0 .../{ => exclusive}/e7v1/keymaps/masterzen/keymap.c | 0 .../{ => exclusive}/e7v1/keymaps/masterzen/readme.md | 0 keyboards/{ => exclusive}/e7v1/readme.md | 2 +- keyboards/{ => exclusive}/e7v1/rules.mk | 0 keyboards/exclusive/readme.md | 9 +++++++++ 46 files changed, 14 insertions(+), 5 deletions(-) rename keyboards/{ => exclusive}/e6_rgb/config.h (100%) rename keyboards/{ => exclusive}/e6_rgb/e6_rgb.c (100%) rename keyboards/{ => exclusive}/e6_rgb/e6_rgb.h (100%) rename keyboards/{ => exclusive}/e6_rgb/info.json (100%) rename keyboards/{ => exclusive}/e6_rgb/keymaps/60_ansi/keymap.c (100%) rename keyboards/{ => exclusive}/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c (100%) rename keyboards/{ => exclusive}/e6_rgb/keymaps/60_hhkb/keymap.c (100%) rename keyboards/{ => exclusive}/e6_rgb/keymaps/60_wkl/keymap.c (100%) rename keyboards/{ => exclusive}/e6_rgb/keymaps/60_wkl_split_bs/keymap.c (100%) rename keyboards/{ => exclusive}/e6_rgb/keymaps/default/keymap.c (100%) rename keyboards/{ => exclusive}/e6_rgb/readme.md (93%) rename keyboards/{ => exclusive}/e6_rgb/rules.mk (100%) rename keyboards/{ => exclusive}/e6v2/le/config.h (100%) rename keyboards/{ => exclusive}/e6v2/le/info.json (100%) rename keyboards/{ => exclusive}/e6v2/le/keymaps/default/keymap.c (100%) rename keyboards/{ => exclusive}/e6v2/le/keymaps/eric/keymap.c (100%) rename keyboards/{ => exclusive}/e6v2/le/keymaps/johu/keymap.c (100%) rename keyboards/{ => exclusive}/e6v2/le/keymaps/johu/readme.md (100%) rename keyboards/{ => exclusive}/e6v2/le/le.c (100%) rename keyboards/{ => exclusive}/e6v2/le/le.h (100%) rename keyboards/{ => exclusive}/e6v2/le/readme.md (83%) rename keyboards/{ => exclusive}/e6v2/le/rules.mk (100%) rename keyboards/{ => exclusive}/e6v2/oe/config.h (100%) rename keyboards/{ => exclusive}/e6v2/oe/info.json (100%) rename keyboards/{ => exclusive}/e6v2/oe/keymaps/amnesia0287/keymap.c (100%) rename keyboards/{ => exclusive}/e6v2/oe/keymaps/amnesia0287/readme.md (100%) rename keyboards/{ => exclusive}/e6v2/oe/keymaps/default/keymap.c (100%) rename keyboards/{ => exclusive}/e6v2/oe/keymaps/default/readme.md (100%) rename keyboards/{ => exclusive}/e6v2/oe/oe.c (100%) rename keyboards/{ => exclusive}/e6v2/oe/oe.h (100%) rename keyboards/{ => exclusive}/e6v2/oe/readme.md (100%) rename keyboards/{ => exclusive}/e6v2/oe/rules.mk (100%) rename keyboards/{ => exclusive}/e6v2/readme.md (100%) rename keyboards/{ => exclusive}/e7v1/config.h (100%) rename keyboards/{ => exclusive}/e7v1/e7v1.c (100%) rename keyboards/{ => exclusive}/e7v1/e7v1.h (100%) rename keyboards/{ => exclusive}/e7v1/info.json (100%) rename keyboards/{ => exclusive}/e7v1/keymaps/ansi_splitbs/keymap.c (100%) rename keyboards/{ => exclusive}/e7v1/keymaps/ansi_splitbs/readme.md (100%) rename keyboards/{ => exclusive}/e7v1/keymaps/default/keymap.c (100%) rename keyboards/{ => exclusive}/e7v1/keymaps/default/readme.md (100%) rename keyboards/{ => exclusive}/e7v1/keymaps/masterzen/keymap.c (100%) rename keyboards/{ => exclusive}/e7v1/keymaps/masterzen/readme.md (100%) rename keyboards/{ => exclusive}/e7v1/readme.md (95%) rename keyboards/{ => exclusive}/e7v1/rules.mk (100%) create mode 100644 keyboards/exclusive/readme.md diff --git a/keyboards/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h similarity index 100% rename from keyboards/e6_rgb/config.h rename to keyboards/exclusive/e6_rgb/config.h diff --git a/keyboards/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c similarity index 100% rename from keyboards/e6_rgb/e6_rgb.c rename to keyboards/exclusive/e6_rgb/e6_rgb.c diff --git a/keyboards/e6_rgb/e6_rgb.h b/keyboards/exclusive/e6_rgb/e6_rgb.h similarity index 100% rename from keyboards/e6_rgb/e6_rgb.h rename to keyboards/exclusive/e6_rgb/e6_rgb.h diff --git a/keyboards/e6_rgb/info.json b/keyboards/exclusive/e6_rgb/info.json similarity index 100% rename from keyboards/e6_rgb/info.json rename to keyboards/exclusive/e6_rgb/info.json diff --git a/keyboards/e6_rgb/keymaps/60_ansi/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_ansi/keymap.c similarity index 100% rename from keyboards/e6_rgb/keymaps/60_ansi/keymap.c rename to keyboards/exclusive/e6_rgb/keymaps/60_ansi/keymap.c diff --git a/keyboards/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c similarity index 100% rename from keyboards/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c rename to keyboards/exclusive/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c diff --git a/keyboards/e6_rgb/keymaps/60_hhkb/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_hhkb/keymap.c similarity index 100% rename from keyboards/e6_rgb/keymaps/60_hhkb/keymap.c rename to keyboards/exclusive/e6_rgb/keymaps/60_hhkb/keymap.c diff --git a/keyboards/e6_rgb/keymaps/60_wkl/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_wkl/keymap.c similarity index 100% rename from keyboards/e6_rgb/keymaps/60_wkl/keymap.c rename to keyboards/exclusive/e6_rgb/keymaps/60_wkl/keymap.c diff --git a/keyboards/e6_rgb/keymaps/60_wkl_split_bs/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_wkl_split_bs/keymap.c similarity index 100% rename from keyboards/e6_rgb/keymaps/60_wkl_split_bs/keymap.c rename to keyboards/exclusive/e6_rgb/keymaps/60_wkl_split_bs/keymap.c diff --git a/keyboards/e6_rgb/keymaps/default/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/e6_rgb/keymaps/default/keymap.c rename to keyboards/exclusive/e6_rgb/keymaps/default/keymap.c diff --git a/keyboards/e6_rgb/readme.md b/keyboards/exclusive/e6_rgb/readme.md similarity index 93% rename from keyboards/e6_rgb/readme.md rename to keyboards/exclusive/e6_rgb/readme.md index 6433dd74d010..b252ab53b4fd 100644 --- a/keyboards/e6_rgb/readme.md +++ b/keyboards/exclusive/e6_rgb/readme.md @@ -7,6 +7,6 @@ Hardware Supported: E6V1, E6V2 Make example for this keyboard (after setting up your build environment): - make e6_rgb:60_ansi + make exclusive/e6_rgb:60_ansi 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/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk similarity index 100% rename from keyboards/e6_rgb/rules.mk rename to keyboards/exclusive/e6_rgb/rules.mk diff --git a/keyboards/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h similarity index 100% rename from keyboards/e6v2/le/config.h rename to keyboards/exclusive/e6v2/le/config.h diff --git a/keyboards/e6v2/le/info.json b/keyboards/exclusive/e6v2/le/info.json similarity index 100% rename from keyboards/e6v2/le/info.json rename to keyboards/exclusive/e6v2/le/info.json diff --git a/keyboards/e6v2/le/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/le/keymaps/default/keymap.c similarity index 100% rename from keyboards/e6v2/le/keymaps/default/keymap.c rename to keyboards/exclusive/e6v2/le/keymaps/default/keymap.c diff --git a/keyboards/e6v2/le/keymaps/eric/keymap.c b/keyboards/exclusive/e6v2/le/keymaps/eric/keymap.c similarity index 100% rename from keyboards/e6v2/le/keymaps/eric/keymap.c rename to keyboards/exclusive/e6v2/le/keymaps/eric/keymap.c diff --git a/keyboards/e6v2/le/keymaps/johu/keymap.c b/keyboards/exclusive/e6v2/le/keymaps/johu/keymap.c similarity index 100% rename from keyboards/e6v2/le/keymaps/johu/keymap.c rename to keyboards/exclusive/e6v2/le/keymaps/johu/keymap.c diff --git a/keyboards/e6v2/le/keymaps/johu/readme.md b/keyboards/exclusive/e6v2/le/keymaps/johu/readme.md similarity index 100% rename from keyboards/e6v2/le/keymaps/johu/readme.md rename to keyboards/exclusive/e6v2/le/keymaps/johu/readme.md diff --git a/keyboards/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c similarity index 100% rename from keyboards/e6v2/le/le.c rename to keyboards/exclusive/e6v2/le/le.c diff --git a/keyboards/e6v2/le/le.h b/keyboards/exclusive/e6v2/le/le.h similarity index 100% rename from keyboards/e6v2/le/le.h rename to keyboards/exclusive/e6v2/le/le.h diff --git a/keyboards/e6v2/le/readme.md b/keyboards/exclusive/e6v2/le/readme.md similarity index 83% rename from keyboards/e6v2/le/readme.md rename to keyboards/exclusive/e6v2/le/readme.md index 844b315681cd..b57bb016048b 100644 --- a/keyboards/e6v2/le/readme.md +++ b/keyboards/exclusive/e6v2/le/readme.md @@ -10,10 +10,10 @@ Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.o Make example for this keyboard (after setting up your build environment): - make e6v2/le:default + make exclusive/e6v2/le:default Or to make and flash: - make e6v2/le:default:dfu + make exclusive/e6v2/le:default:dfu -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. diff --git a/keyboards/e6v2/le/rules.mk b/keyboards/exclusive/e6v2/le/rules.mk similarity index 100% rename from keyboards/e6v2/le/rules.mk rename to keyboards/exclusive/e6v2/le/rules.mk diff --git a/keyboards/e6v2/oe/config.h b/keyboards/exclusive/e6v2/oe/config.h similarity index 100% rename from keyboards/e6v2/oe/config.h rename to keyboards/exclusive/e6v2/oe/config.h diff --git a/keyboards/e6v2/oe/info.json b/keyboards/exclusive/e6v2/oe/info.json similarity index 100% rename from keyboards/e6v2/oe/info.json rename to keyboards/exclusive/e6v2/oe/info.json diff --git a/keyboards/e6v2/oe/keymaps/amnesia0287/keymap.c b/keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/keymap.c similarity index 100% rename from keyboards/e6v2/oe/keymaps/amnesia0287/keymap.c rename to keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/keymap.c diff --git a/keyboards/e6v2/oe/keymaps/amnesia0287/readme.md b/keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/readme.md similarity index 100% rename from keyboards/e6v2/oe/keymaps/amnesia0287/readme.md rename to keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/readme.md diff --git a/keyboards/e6v2/oe/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe/keymaps/default/keymap.c similarity index 100% rename from keyboards/e6v2/oe/keymaps/default/keymap.c rename to keyboards/exclusive/e6v2/oe/keymaps/default/keymap.c diff --git a/keyboards/e6v2/oe/keymaps/default/readme.md b/keyboards/exclusive/e6v2/oe/keymaps/default/readme.md similarity index 100% rename from keyboards/e6v2/oe/keymaps/default/readme.md rename to keyboards/exclusive/e6v2/oe/keymaps/default/readme.md diff --git a/keyboards/e6v2/oe/oe.c b/keyboards/exclusive/e6v2/oe/oe.c similarity index 100% rename from keyboards/e6v2/oe/oe.c rename to keyboards/exclusive/e6v2/oe/oe.c diff --git a/keyboards/e6v2/oe/oe.h b/keyboards/exclusive/e6v2/oe/oe.h similarity index 100% rename from keyboards/e6v2/oe/oe.h rename to keyboards/exclusive/e6v2/oe/oe.h diff --git a/keyboards/e6v2/oe/readme.md b/keyboards/exclusive/e6v2/oe/readme.md similarity index 100% rename from keyboards/e6v2/oe/readme.md rename to keyboards/exclusive/e6v2/oe/readme.md diff --git a/keyboards/e6v2/oe/rules.mk b/keyboards/exclusive/e6v2/oe/rules.mk similarity index 100% rename from keyboards/e6v2/oe/rules.mk rename to keyboards/exclusive/e6v2/oe/rules.mk diff --git a/keyboards/e6v2/readme.md b/keyboards/exclusive/e6v2/readme.md similarity index 100% rename from keyboards/e6v2/readme.md rename to keyboards/exclusive/e6v2/readme.md diff --git a/keyboards/e7v1/config.h b/keyboards/exclusive/e7v1/config.h similarity index 100% rename from keyboards/e7v1/config.h rename to keyboards/exclusive/e7v1/config.h diff --git a/keyboards/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c similarity index 100% rename from keyboards/e7v1/e7v1.c rename to keyboards/exclusive/e7v1/e7v1.c diff --git a/keyboards/e7v1/e7v1.h b/keyboards/exclusive/e7v1/e7v1.h similarity index 100% rename from keyboards/e7v1/e7v1.h rename to keyboards/exclusive/e7v1/e7v1.h diff --git a/keyboards/e7v1/info.json b/keyboards/exclusive/e7v1/info.json similarity index 100% rename from keyboards/e7v1/info.json rename to keyboards/exclusive/e7v1/info.json diff --git a/keyboards/e7v1/keymaps/ansi_splitbs/keymap.c b/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/keymap.c similarity index 100% rename from keyboards/e7v1/keymaps/ansi_splitbs/keymap.c rename to keyboards/exclusive/e7v1/keymaps/ansi_splitbs/keymap.c diff --git a/keyboards/e7v1/keymaps/ansi_splitbs/readme.md b/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/readme.md similarity index 100% rename from keyboards/e7v1/keymaps/ansi_splitbs/readme.md rename to keyboards/exclusive/e7v1/keymaps/ansi_splitbs/readme.md diff --git a/keyboards/e7v1/keymaps/default/keymap.c b/keyboards/exclusive/e7v1/keymaps/default/keymap.c similarity index 100% rename from keyboards/e7v1/keymaps/default/keymap.c rename to keyboards/exclusive/e7v1/keymaps/default/keymap.c diff --git a/keyboards/e7v1/keymaps/default/readme.md b/keyboards/exclusive/e7v1/keymaps/default/readme.md similarity index 100% rename from keyboards/e7v1/keymaps/default/readme.md rename to keyboards/exclusive/e7v1/keymaps/default/readme.md diff --git a/keyboards/e7v1/keymaps/masterzen/keymap.c b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c similarity index 100% rename from keyboards/e7v1/keymaps/masterzen/keymap.c rename to keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c diff --git a/keyboards/e7v1/keymaps/masterzen/readme.md b/keyboards/exclusive/e7v1/keymaps/masterzen/readme.md similarity index 100% rename from keyboards/e7v1/keymaps/masterzen/readme.md rename to keyboards/exclusive/e7v1/keymaps/masterzen/readme.md diff --git a/keyboards/e7v1/readme.md b/keyboards/exclusive/e7v1/readme.md similarity index 95% rename from keyboards/e7v1/readme.md rename to keyboards/exclusive/e7v1/readme.md index 6224694b4ff1..9d1b8538b496 100644 --- a/keyboards/e7v1/readme.md +++ b/keyboards/exclusive/e7v1/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [https://geekhack.org/index.php?topic=97182.msg2654226#ms Make example for this keyboard (after setting up your build environment): - make e7v1:default + make exclusive/e7v1: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/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk similarity index 100% rename from keyboards/e7v1/rules.mk rename to keyboards/exclusive/e7v1/rules.mk diff --git a/keyboards/exclusive/readme.md b/keyboards/exclusive/readme.md new file mode 100644 index 000000000000..85409c923671 --- /dev/null +++ b/keyboards/exclusive/readme.md @@ -0,0 +1,9 @@ +# Exclusive Firmware + +All files related to firmware of keyboards designed by Exclusive. + +## Keyboards + +* [e6_rgb](./e6_rgb/): maintainer [astro](https://github.com/yulei) +* [e6-v2](./e6v2/): maintainers [MechMerlin](https://github.com/mechmerlin), [amnesia0287](https://github.com/amnesia0287) +* [e7-v1](./e7v1): maintainer [masterzen](https://github.com/masterzen) From 76da6ec0618a95afe956ae43f47ef173774cf8ae Mon Sep 17 00:00:00 2001 From: Daniel H Klein Date: Thu, 7 Feb 2019 15:24:34 -0800 Subject: [PATCH 313/458] [Keyboard] Unigo66 fixes and improvements (#5060) * 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 * updates and fixes --- keyboards/sirius/unigo66/info.json | 560 +++--------------- .../sirius/unigo66/keymaps/default/keymap.c | 120 +++- keyboards/sirius/unigo66/main.c | 7 +- keyboards/sirius/unigo66/readme.md | 17 + keyboards/sirius/unigo66/rules.mk | 3 +- keyboards/sirius/unigo66/unigo66.h | 70 ++- 6 files changed, 238 insertions(+), 539 deletions(-) create mode 100644 keyboards/sirius/unigo66/readme.md diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json index 142e8f1fadf3..f343cc3ead06 100644 --- a/keyboards/sirius/unigo66/info.json +++ b/keyboards/sirius/unigo66/info.json @@ -1,485 +1,81 @@ { - "keyboard_name": "UniGo66", - "url": "https://discord.gg/GJ8bdM", - "maintainer": "qmk", - "width": 22.5, - "height": 6.5, - "layouts": { - "LAYOUT_all": { - "layout": [ - {"label":"F13", "x":2, "y":0}, - {"label":"F14", "x":3, "y":0}, - {"label":"F15", "x":4, "y":0}, - {"label":"F16", "x":5, "y":0}, - {"label":"F17", "x":6.5, "y":0}, - {"label":"F18", "x":7.5, "y":0}, - {"label":"F19", "x":8.5, "y":0}, - {"label":"F20", "x":9.5, "y":0}, - {"label":"F21", "x":11, "y":0}, - {"label":"F22", "x":12, "y":0}, - {"label":"F23", "x":13, "y":0}, - {"label":"F24", "x":14, "y":0}, - {"label":"Esc", "x":0, "y":1}, - {"label":"F1", "x":2, "y":1}, - {"label":"F2", "x":3, "y":1}, - {"label":"F3", "x":4, "y":1}, - {"label":"F4", "x":5, "y":1}, - {"label":"F5", "x":6.5, "y":1}, - {"label":"F6", "x":7.5, "y":1}, - {"label":"F7", "x":8.5, "y":1}, - {"label":"F8", "x":9.5, "y":1}, - {"label":"F9", "x":11, "y":1}, - {"label":"F10", "x":12, "y":1}, - {"label":"F11", "x":13, "y":1}, - {"label":"F12", "x":14, "y":1}, - {"label":"Print Screen", "x":15.25, "y":1}, - {"label":"Scroll Lock", "x":16.25, "y":1}, - {"label":"Pause", "x":17.25, "y":1}, - {"label":"Volume Down", "x":18.5, "y":1}, - {"label":"Vol Up", "x":19.5, "y":1}, - {"label":"Mute", "x":20.5, "y":1}, - {"label":"Power", "x":21.5, "y":1}, - {"label":"Help", "x":22.75, "y":1}, - {"label":"`", "x":0, "y":2.5}, - {"label":"1", "x":1, "y":2.5}, - {"label":"2", "x":2, "y":2.5}, - {"label":"3", "x":3, "y":2.5}, - {"label":"4", "x":4, "y":2.5}, - {"label":"5", "x":5, "y":2.5}, - {"label":"6", "x":6, "y":2.5}, - {"label":"7", "x":7, "y":2.5}, - {"label":"8", "x":8, "y":2.5}, - {"label":"9", "x":9, "y":2.5}, - {"label":"0", "x":10, "y":2.5}, - {"label":"-", "x":11, "y":2.5}, - {"label":"=", "x":12, "y":2.5}, - {"label":"Yen", "x":13, "y":2.5}, - {"label":"Back Space", "x":14, "y":2.5}, - {"label":"Insert", "x":15.25, "y":2.5}, - {"label":"Home", "x":16.25, "y":2.5}, - {"label":"Page Up", "x":17.25, "y":2.5}, - {"label":"Num Lock", "x":18.5, "y":2.5}, - {"label":"Num /", "x":19.5, "y":2.5}, - {"label":"Num *", "x":20.5, "y":2.5}, - {"label":"Num -", "x":21.5, "y":2.5}, - {"label":"Stop", "x":22.75, "y":2.5}, - {"label":"Again", "x":23.75, "y":2.5}, - {"label":"Tab", "x":0, "y":3.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":3.5}, - {"label":"W", "x":2.5, "y":3.5}, - {"label":"E", "x":3.5, "y":3.5}, - {"label":"R", "x":4.5, "y":3.5}, - {"label":"T", "x":5.5, "y":3.5}, - {"label":"Y", "x":6.5, "y":3.5}, - {"label":"U", "x":7.5, "y":3.5}, - {"label":"I", "x":8.5, "y":3.5}, - {"label":"O", "x":9.5, "y":3.5}, - {"label":"P", "x":10.5, "y":3.5}, - {"label":"[", "x":11.5, "y":3.5}, - {"label":"]", "x":12.5, "y":3.5}, - {"label":"\\", "x":13.5, "y":3.5, "w":1.5}, - {"label":"Delete", "x":15.25, "y":3.5}, - {"label":"End", "x":16.25, "y":3.5}, - {"label":"Page Down", "x":17.25, "y":3.5}, - {"label":"Num 7", "x":18.5, "y":3.5}, - {"label":"Num 8", "x":19.5, "y":3.5}, - {"label":"Num 9", "x":20.5, "y":3.5}, - {"label":"Num +", "x":21.5, "y":3.5}, - {"label":"Menu", "x":22.75, "y":3.5}, - {"label":"Undo", "x":23.75, "y":3.5}, - {"label":"Caps Lock", "x":0, "y":4.5, "w":1.75}, - {"label":"A", "x":1.75, "y":4.5}, - {"label":"S", "x":2.75, "y":4.5}, - {"label":"D", "x":3.75, "y":4.5}, - {"label":"F", "x":4.75, "y":4.5}, - {"label":"G", "x":5.75, "y":4.5}, - {"label":"H", "x":6.75, "y":4.5}, - {"label":"J", "x":7.75, "y":4.5}, - {"label":"K", "x":8.75, "y":4.5}, - {"label":"L", "x":9.75, "y":4.5}, - {"label":";", "x":10.75, "y":4.5}, - {"label":"\"", "x":11.75, "y":4.5}, - {"label":"ISO #", "x":12.75, "y":4.5}, - {"label":"Enter", "x":13.75, "y":4.5, "w":1.25}, - {"label":"Num 4", "x":18.5, "y":4.5}, - {"label":"Num 5", "x":19.5, "y":4.5}, - {"label":"Num 6", "x":20.5, "y":4.5}, - {"label":"Num , ", "x":21.5, "y":4.5}, - {"label":"Select", "x":22.75, "y":4.5}, - {"label":"Copy", "x":23.75, "y":4.5}, - {"label":"Shift", "x":0, "y":5.5, "w":1.25}, - {"label":"ISO \\", "x":1.25, "y":5.5}, - {"label":"Z", "x":2.25, "y":5.5}, - {"label":"X", "x":3.25, "y":5.5}, - {"label":"C", "x":4.25, "y":5.5}, - {"label":"V", "x":5.25, "y":5.5}, - {"label":"B", "x":6.25, "y":5.5}, - {"label":"N", "x":7.25, "y":5.5}, - {"label":"M", "x":8.25, "y":5.5}, - {"label":",", "x":9.25, "y":5.5}, - {"label":".", "x":10.25, "y":5.5}, - {"label":"/", "x":11.25, "y":5.5}, - {"label":"JIS \\", "x":12.25, "y":5.5}, - {"label":"Shift", "x":13.25, "y":5.5, "w":1.75}, - {"label":"Up", "x":16.25, "y":5.5}, - {"label":"Num 1", "x":18.5, "y":5.5}, - {"label":"Num 2", "x":19.5, "y":5.5}, - {"label":"Num 3", "x":20.5, "y":5.5}, - {"label":"Num =", "x":21.5, "y":5.5}, - {"label":"Exec", "x":22.75, "y":5.5}, - {"label":"Paste", "x":23.75, "y":5.5}, - {"label":"Ctrl", "x":0, "y":6.5}, - {"label":"GUI", "x":1, "y":6.5}, - {"label":"Alt", "x":2, "y":6.5}, - {"label":"JIS Muhenkan", "x":3, "y":6.5}, - {"label":"Hanja", "x":4, "y":6.5}, - {"label":"Space", "x":5, "y":6.5, "w":3}, - {"label":"Hangul/English", "x":8, "y":6.5}, - {"label":"JIS Henkan", "x":9, "y":6.5}, - {"label":"JIS Katakana/Hiragana", "x":10, "y":6.5}, - {"label":"Alt", "x":11, "y":6.5}, - {"label":"GUI", "x":12, "y":6.5}, - {"label":"App", "x":13, "y":6.5}, - {"label":"Ctrl", "x":14, "y":6.5}, - {"label":"Left", "x":15.25, "y":6.5}, - {"label":"Down", "x":16.25, "y":6.5}, - {"label":"Right", "x":17.25, "y":6.5}, - {"label":"Num 0", "x":18.5, "y":6.5, "w":2}, - {"label":"Num .", "x":20.5, "y":6.5}, - {"label":"Num Enter", "x":21.5, "y":6.5}, - {"label":"Find", "x":22.75, "y":6.5}, - {"label":"Cut", "x":23.75, "y":6.5} - ] - }, - "LAYOUT_ansi": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"PrtSc", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - {"label":"`", "x":0, "y":1.5}, - {"label":"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":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"Page Up", "x":17.25, "y":1.5}, - {"label":"Num Lock", "x":18.5, "y":1.5}, - {"label":"Num /", "x":19.5, "y":1.5}, - {"label":"Num *", "x":20.5, "y":1.5}, - {"label":"Num -", "x":21.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"[", "x":11.5, "y":2.5}, - {"label":"]", "x":12.5, "y":2.5}, - {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"Page Down", "x":17.25, "y":2.5}, - {"label":"Num 7", "x":18.5, "y":2.5}, - {"label":"Num 8", "x":19.5, "y":2.5}, - {"label":"Num 9", "x":20.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":"Num 4", "x":18.5, "y":3.5}, - {"label":"Num 5", "x":19.5, "y":3.5}, - {"label":"Num 6", "x":20.5, "y":3.5}, - {"label":"Num +", "x":21.5, "y":2.5, "h":2}, - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":",", "x":9.25, "y":4.5}, - {"label":".", "x":10.25, "y":4.5}, - {"label":"/", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, - {"label":"Up", "x":16.25, "y":4.5}, - {"label":"Num 1", "x":18.5, "y":4.5}, - {"label":"Num 2", "x":19.5, "y":4.5}, - {"label":"Num 3", "x":20.5, "y":4.5}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, - {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, - {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, - {"label":"Alt", "x":10, "y":5.5, "w":1.25}, - {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, - {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, - {"label":"Left", "x":15.25, "y":5.5}, - {"label":"Down", "x":16.25, "y":5.5}, - {"label":"Right", "x":17.25, "y":5.5}, - {"label":"Num 0", "x":18.5, "y":5.5, "w":2}, - {"label":"Num .", "x":20.5, "y":5.5}, - {"label":"Num Enter", "x":21.5, "y":4.5, "h":2} - ] - }, - "LAYOUT_iso": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"Print Screen", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - {"label":"`", "x":0, "y":1.5}, - {"label":"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":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"Page Up", "x":17.25, "y":1.5}, - {"label":"Num Lock", "x":18.5, "y":1.5}, - {"label":"Num /", "x":19.5, "y":1.5}, - {"label":"Num *", "x":20.5, "y":1.5}, - {"label":"Num -", "x":21.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"[", "x":11.5, "y":2.5}, - {"label":"]", "x":12.5, "y":2.5}, - {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"Page Down", "x":17.25, "y":2.5}, - {"label":"Num 7", "x":18.5, "y":2.5}, - {"label":"Num 8", "x":19.5, "y":2.5}, - {"label":"Num 9", "x":20.5, "y":2.5}, - {"label":"Num +", "x":21.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":"ISO #", "x":12.75, "y":3.5}, - {"label":"Num 4", "x":18.5, "y":3.5}, - {"label":"Num 5", "x":19.5, "y":3.5}, - {"label":"Num 6", "x":20.5, "y":3.5}, - {"label":"Shift", "x":0, "y":4.5, "w":1.25}, - {"label":"ISO \\", "x":1.25, "y":4.5}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":",", "x":9.25, "y":4.5}, - {"label":".", "x":10.25, "y":4.5}, - {"label":"/", "x":11.25, "y":4.5}, - {"label":"Shift", "x":12.25, "y":4.5, "w":2.75}, - {"label":"Up", "x":16.25, "y":4.5}, - {"label":"Num 1", "x":18.5, "y":4.5}, - {"label":"Num 2", "x":19.5, "y":4.5}, - {"label":"Num 3", "x":20.5, "y":4.5}, - {"label":"Num Enter", "x":21.5, "y":4.5, "h":2}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, - {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, - {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, - {"label":"AltGr", "x":10, "y":5.5, "w":1.25}, - {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, - {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, - {"label":"Left", "x":15.25, "y":5.5}, - {"label":"Down", "x":16.25, "y":5.5}, - {"label":"Right", "x":17.25, "y":5.5}, - {"label":"Num 0", "x":18.5, "y":5.5, "w":2}, - {"label":"Num .", "x":20.5, "y":5.5} - ] - }, - "LAYOUT_jis": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"F1", "x":2, "y":0}, - {"label":"F2", "x":3, "y":0}, - {"label":"F3", "x":4, "y":0}, - {"label":"F4", "x":5, "y":0}, - {"label":"F5", "x":6.5, "y":0}, - {"label":"F6", "x":7.5, "y":0}, - {"label":"F7", "x":8.5, "y":0}, - {"label":"F8", "x":9.5, "y":0}, - {"label":"F9", "x":11, "y":0}, - {"label":"F10", "x":12, "y":0}, - {"label":"F11", "x":13, "y":0}, - {"label":"F12", "x":14, "y":0}, - {"label":"Print Screen", "x":15.25, "y":0}, - {"label":"Scroll Lock", "x":16.25, "y":0}, - {"label":"Pause", "x":17.25, "y":0}, - {"label":"JIS Hankaku / Zenkaku", "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":"JIS Yen", "x":13, "y":1.5}, - {"label":"Back Space", "x":14, "y":1.5}, - {"label":"Insert", "x":15.25, "y":1.5}, - {"label":"Home", "x":16.25, "y":1.5}, - {"label":"Page Up", "x":17.25, "y":1.5}, - {"label":"Num Lock", "x":18.5, "y":1.5}, - {"label":"Num /", "x":19.5, "y":1.5}, - {"label":"Num *", "x":20.5, "y":1.5}, - {"label":"Num -", "x":21.5, "y":1.5}, - {"label":"Tab", "x":0, "y":2.5, "w":1.5}, - {"label":"Q", "x":1.5, "y":2.5}, - {"label":"W", "x":2.5, "y":2.5}, - {"label":"E", "x":3.5, "y":2.5}, - {"label":"R", "x":4.5, "y":2.5}, - {"label":"T", "x":5.5, "y":2.5}, - {"label":"Y", "x":6.5, "y":2.5}, - {"label":"U", "x":7.5, "y":2.5}, - {"label":"I", "x":8.5, "y":2.5}, - {"label":"O", "x":9.5, "y":2.5}, - {"label":"P", "x":10.5, "y":2.5}, - {"label":"@", "x":11.5, "y":2.5}, - {"label":"[", "x":12.5, "y":2.5}, - {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, - {"label":"Delete", "x":15.25, "y":2.5}, - {"label":"End", "x":16.25, "y":2.5}, - {"label":"Page Down", "x":17.25, "y":2.5}, - {"label":"Num 7", "x":18.5, "y":2.5}, - {"label":"Num 8", "x":19.5, "y":2.5}, - {"label":"Num 9", "x":20.5, "y":2.5}, - {"label":"Num +", "x":21.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":"]", "x":12.75, "y":3.5}, - {"label":"Num 4", "x":18.5, "y":3.5}, - {"label":"Num 5", "x":19.5, "y":3.5}, - {"label":"Num 6", "x":20.5, "y":3.5}, - {"label":"Shift", "x":0, "y":4.5, "w":2.25}, - {"label":"Z", "x":2.25, "y":4.5}, - {"label":"X", "x":3.25, "y":4.5}, - {"label":"C", "x":4.25, "y":4.5}, - {"label":"V", "x":5.25, "y":4.5}, - {"label":"B", "x":6.25, "y":4.5}, - {"label":"N", "x":7.25, "y":4.5}, - {"label":"M", "x":8.25, "y":4.5}, - {"label":",", "x":9.25, "y":4.5}, - {"label":".", "x":10.25, "y":4.5}, - {"label":"/", "x":11.25, "y":4.5}, - {"label":"JIS \\", "x":12.25, "y":4.5}, - {"label":"Shift", "x":13.25, "y":4.5, "w":1.75}, - {"label":"Up", "x":16.25, "y":4.5}, - {"label":"Num 1", "x":18.5, "y":4.5}, - {"label":"Num 2", "x":19.5, "y":4.5}, - {"label":"Num 3", "x":20.5, "y":4.5}, - {"label":"Num Enter", "x":21.5, "y":4.5, "h":2}, - {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, - {"label":"GUI", "x":1.25, "y":5.5, "w":1.25}, - {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, - {"label":"JIS Muhenkan", "x":3.75, "y":5.5, "w":1.25}, - {"label":"Space", "x":5, "y":5.5, "w":2.5}, - {"label":"JIS Henkan", "x":7.5, "y":5.5, "w":1.25}, - {"label":"JIS Hiragana / Katakana", "x":8.75, "y":5.5, "w":1.25}, - {"label":"Alt", "x":10, "y":5.5, "w":1.25}, - {"label":"GUI", "x":11.25, "y":5.5, "w":1.25}, - {"label":"Menu", "x":12.5, "y":5.5, "w":1.25}, - {"label":"Ctrl", "x":13.75, "y":5.5, "w":1.25}, - {"label":"Left", "x":15.25, "y":5.5}, - {"label":"Down", "x":16.25, "y":5.5}, - {"label":"Right", "x":17.25, "y":5.5}, - {"label":"Num 0", "x":18.5, "y":5.5, "w":2}, - {"label":"Num .", "x":20.5, "y":5.5} - ] + "keyboard_name": "UniGo66", + "url": "https://discord.gg/GJ8bdM", + "maintainer": "qmk", + "width": 17, + "height": 7, + "layouts": { + "LAYOUT": { + "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}, + {"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":10.5, "y":6} + ] + } } - } } diff --git a/keyboards/sirius/unigo66/keymaps/default/keymap.c b/keyboards/sirius/unigo66/keymaps/default/keymap.c index d2e0cbfbff5e..06982e64b7d0 100644 --- a/keyboards/sirius/unigo66/keymaps/default/keymap.c +++ b/keyboards/sirius/unigo66/keymaps/default/keymap.c @@ -6,53 +6,115 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | L1 | | [ | Y | U | I | O | P | \ | + * | Tab | Q | W | E | R | T | PgUp | | [ | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| L2 | | ] |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Up | + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | + * |--------+------+------+------+------+------| PgDn | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | Up |M2/Shift| * `--------+------+------+---------------------------' `---------------------------+------+------+--------' - * | Ctrl | Super| Alt | | Left | Down| Right | + * | Ctrl | Gui | Alt | | Left | Down| Right | * `--------------------' `--------------------' - * ,------|------. ,---------------. - * | | PgUp | | Home | | - * | Space|------| |------| Enter | - * | | PgDn | | End | | + * ,-------------. ,---------------. + * | | Ins | | Home | | + * | Space|------| |------|M1/Space| + * | | Del | | End | | * `-------------' `---------------' */ [0] = LAYOUT( - 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, TG(1), KC_LBRC, 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, TG(2), KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_UP , - KC_LCTL, KC_LGUI,KC_LALT, KC_LEFT,KC_DOWN, KC_RGHT, - KC_SPC, KC_PGUP, KC_HOME, KC_ENT, - KC_SPC, KC_PGDN, KC_END, KC_ENT + 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_PGUP, KC_LBRC, 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, LM(2,MOD_RSFT), + KC_LCTL, KC_LGUI,KC_LALT, KC_LEFT,KC_DOWN, KC_RGHT, + KC_SPC, KC_INS, KC_HOME, LT(1,KC_SPC), + KC_NO , KC_DEL, KC_END, KC_NO ), +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | Del | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | ' | + * |--------+------+------+------+------+------| | | M3 |------+------+------+------+------+--------| + * | | Mute | Vol- | Vol+ | | | | | | | | | | / | | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | | | | + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | | | | | + * | |------| |------| | + * | | | | | | + * `-------------' `---------------' + */ [1] = 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_QUOT, + _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, TG(3), _______, _______, _______, _______, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | / | | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | | | | + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | | | | | + * | |------| |------| | + * | | | | | | + * `-------------' `---------------' + */ [2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | Calc |NumLoc| / | * | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | 7 | 8 | 9 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | 4 | 5 | 6 | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | 1 | 2 | 3 | Enter | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | 0 | . | Enter| + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | | | | | + * | |------| |------| | + * | | | | | | + * `-------------' `---------------' + */ + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, KC_NLCK, KC_PSLS,KC_PAST,KC_PMNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PEQL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, _______, _______, KC_P0, KC_PDOT,KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______ ), }; -void matrix_init_user(void) { - -} - void matrix_scan_user(void) { } diff --git a/keyboards/sirius/unigo66/main.c b/keyboards/sirius/unigo66/main.c index 76e88922cb41..4d167d9f7e6c 100644 --- a/keyboards/sirius/unigo66/main.c +++ b/keyboards/sirius/unigo66/main.c @@ -11,7 +11,6 @@ #include "keyboard.h" #include "led.h" - /* LED ping configuration */ #define TMK_LED //#define LEONARDO_LED @@ -87,6 +86,12 @@ int main(void) } */ + /* 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"); for (;;) { diff --git a/keyboards/sirius/unigo66/readme.md b/keyboards/sirius/unigo66/readme.md new file mode 100644 index 000000000000..78a02ed09e29 --- /dev/null +++ b/keyboards/sirius/unigo66/readme.md @@ -0,0 +1,17 @@ +# 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/rules.mk b/keyboards/sirius/unigo66/rules.mk index 562b2b694eb7..7cdb3839ac60 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -26,5 +26,4 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) USB_HID_ENABLE = yes CUSTOM_MATRIX = yes -SRC += custom_matrix.cpp \ - main.c +SRC = custom_matrix.cpp diff --git a/keyboards/sirius/unigo66/unigo66.h b/keyboards/sirius/unigo66/unigo66.h index 3215c891bfa7..cc7f3faece22 100644 --- a/keyboards/sirius/unigo66/unigo66.h +++ b/keyboards/sirius/unigo66/unigo66.h @@ -1,5 +1,22 @@ -#ifndef UNIGO66_H -#define UNIGO66_H +/* +Copyright 2017 Balz Guenat + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 USB_USB_H +#define USB_USB_H #include "quantum.h" @@ -19,9 +36,31 @@ * |-----------------------------------------------------------| ,-----------. |---------------| |-------| * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| * `-----------------------------------------------------------' `-----------' `---------------' `-------' - + * + * + * App: Windows Menu key + * Gui: Windows key, Mac ⌘ key or Meta key + * + * Pwr: Power for Unix and Mac + * VDn,Vup,Mut: Volume control for Unix and Mac + * Stp,Agn..: for Unix + * + * KP,: Brazilian Keypad Comma + * KP=: Keypad = for Mac + * <,#: ISO keys(UK legend) + * JPY: Japanese Yen(¥) + * RO: Japanese ろ or Brazilian / + * MHEN: Japanese 無変換 Non Conversion + * HENK: Japanese 変換 Conversion + * KANA: Japanese かな Hiragana/Katakana + * https://en.wikipedia.org/wiki/Keyboard_layout#Japanese + * H/E: Korean 한/영 Hangul/English + * HNJ: Korean 한자 Hanja + * https://en.wikipedia.org/wiki/Keyboard_layout#Hangul_.28for_Korean.29 + * + * TODO: use same keycode to pass through instead of KC_NO? */ -#define LAYOUT_ALL( \ +#define LAYOUT_all( \ K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ @@ -64,25 +103,6 @@ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ } -/* - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | L1 | | [ | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| L2 | | ] |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Up | - * `--------+------+------+---------------------------' `---------------------------+------+------+--------' - * | Ctrl | Super| Alt | | Left | Down| Right | - * `--------------------' `--------------------' - * ,------|------. ,---------------. - * | | PgUp | | Home | | - * | Space|------| |------| Enter | - * | | PgDn | | End | | - * `-------------' `---------------' - */ #define LAYOUT( \ K29,K1E,K1F,K20,K21,K22,K2D, K2E,K23,K24,K25,K26,K27,K2A,\ K2B,K14,K1A,K08,K15,K17,K4B, K2F,K1C,K18,K0C,K12,K13,K31,\ @@ -91,9 +111,9 @@ KE0,KE3,KE2, K50,K51,K4F,\ K2C,K49, K4A,K28, \ KE6,K4C, K4D,KE4 \ -) LAYOUT_ALL( \ +) 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, 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,\ + K29, 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,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO,K2A, K49,K4A,K4B, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, KC_NO,K28, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ From 6be078445cf017cd8b491c19a3b244b46dcf3ae0 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Thu, 7 Feb 2019 17:30:40 -0600 Subject: [PATCH 314/458] Merge ErgoTravel default keymap to match Group Buy orders (#5071) --- keyboards/ergotravel/keymaps/default/config.h | 2 +- keyboards/ergotravel/keymaps/default/keymap.c | 51 ++++++++----------- 2 files changed, 21 insertions(+), 32 deletions(-) diff --git a/keyboards/ergotravel/keymaps/default/config.h b/keyboards/ergotravel/keymaps/default/config.h index eeca26ce1dbb..7461cf321d7a 100644 --- a/keyboards/ergotravel/keymaps/default/config.h +++ b/keyboards/ergotravel/keymaps/default/config.h @@ -30,7 +30,7 @@ along with this program. If not, see . #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 +#define RGBLED_NUM 14 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c index d6f8d117158c..fd0d75adef32 100644 --- a/keyboards/ergotravel/keymaps/default/keymap.c +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -16,56 +16,45 @@ enum custom_keycodes { // #define KC_ KC_TRNS #define _______ KC_TRNS - +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_ESC, 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, + KC_ESC, 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_BSPC, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_A, KC_A, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' ), [_LOWER] = LAYOUT( - //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_A, KC_B, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_D, KC_Y, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_PGUP, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_END , KC_PGDN, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_BSPC, KC_BSPC, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), [_RAISE] = LAYOUT( - //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_A, KC_B, 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_C, KC_D, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, 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_DEL, \ + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, \ + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), [_ADJUST] = 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_BSPC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_C, KC_D, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET ) }; From be3a59d0ff19ff3721e4d9f8a7c1d8f98202dc4e Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Thu, 7 Feb 2019 17:32:39 -0600 Subject: [PATCH 315/458] [Keymap] Add Emiller Personal planck layout (#4249) * Add emiller * Add Num Layer * Update QWERTY * Update Raise and Lower * Add right shift to match ergodox * Update keyboards/planck/keymaps/emiller/config.h Co-Authored-By: Emiller88 * Update keyboards/planck/keymaps/emiller/config.h Co-Authored-By: Emiller88 * Update keyboards/planck/keymaps/emiller/config.h Co-Authored-By: Emiller88 * Update keyboards/planck/keymaps/emiller/keymap.c Co-Authored-By: Emiller88 * Update keyboards/planck/keymaps/emiller/keymap.c Co-Authored-By: Emiller88 * Update keyboards/planck/keymaps/emiller/config.h Co-Authored-By: Emiller88 * Add revisions Co-authored-by: drashna --- keyboards/planck/keymaps/emiller/config.h | 39 +++ keyboards/planck/keymaps/emiller/keymap.c | 307 +++++++++++++++++++++ keyboards/planck/keymaps/emiller/readme.md | 2 + keyboards/planck/keymaps/emiller/rules.mk | 1 + 4 files changed, 349 insertions(+) create mode 100644 keyboards/planck/keymaps/emiller/config.h create mode 100644 keyboards/planck/keymaps/emiller/keymap.c create mode 100644 keyboards/planck/keymaps/emiller/readme.md create mode 100644 keyboards/planck/keymaps/emiller/rules.mk diff --git a/keyboards/planck/keymaps/emiller/config.h b/keyboards/planck/keymaps/emiller/config.h new file mode 100644 index 000000000000..5fdfe80b3924 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/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 + +#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/planck/keymaps/emiller/keymap.c b/keyboards/planck/keymaps/emiller/keymap.c new file mode 100644 index 000000000000..7dcd99d3b723 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/keymap.c @@ -0,0 +1,307 @@ +/* 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, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + _VIM, + _NUM +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, + VIM, + NUM +}; + +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 | GUI | Alt | VIM | Lower| Space |Raise | NUM | Vol- | Vol+ | Del | + * `-----------------------------------------------------------------------------------' + */ +[_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, KC_LGUI, KC_LALT, MO(_VIM), LOWER, KC_SPC, KC_SPC, RAISE, TT(NUM), KC_VOLD, KC_VOLU, KC_RSFT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Prev | | | | Next | BL- | BL+ |Print | + * `-----------------------------------------------------------------------------------' + */ +[_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_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_MPRV, _______, _______, _______, _______, KC_MNXT, BL_DEC, BL_INC, KC_PSCREEN +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + _______, KC_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_MPRV, _______, _______, _______, _______, KC_MNXT, BL_DEC, BL_INC, 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, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, 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, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* VIM + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | Copy | Undo | | Paste| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | Cut | | | | Left | Down | Up | Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | Del | |Select| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_COPY, KC_UNDO, _______, KC_PASTE, _______, + _______, _______, _______, KC_CUT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, KC_DEL, _______, KC_SELECT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* NUM + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | 7 | 8 | 9 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | 0 | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUM] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______ +), +}; + +#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; + 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; + case NUM: + if (record->event.pressed) { + layer_on(_NUM); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_NUM); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/emiller/readme.md b/keyboards/planck/keymaps/emiller/readme.md new file mode 100644 index 000000000000..de9680b49851 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/emiller/rules.mk b/keyboards/planck/keymaps/emiller/rules.mk new file mode 100644 index 000000000000..509cf9fd5654 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality From 941f8678a472823bb771ef918f60378d6193ecae Mon Sep 17 00:00:00 2001 From: Danny Date: Fri, 8 Feb 2019 16:20:38 -0500 Subject: [PATCH 316/458] 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 317/458] 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 318/458] 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 319/458] 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 320/458] 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 321/458] 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 322/458] 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 323/458] 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 324/458] 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 325/458] 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 326/458] 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 327/458] 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 328/458] 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 329/458] 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 330/458] 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 331/458] 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 332/458] 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 333/458] 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 334/458] 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 335/458] 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 336/458] 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 337/458] [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 338/458] [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 339/458] [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 340/458] 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 341/458] [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 342/458] [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 343/458] [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 344/458] [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 345/458] 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 346/458] 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 347/458] 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 348/458] 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 349/458] 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 350/458] 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 351/458] 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 352/458] 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 353/458] 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 354/458] 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 355/458] 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 356/458] 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 357/458] 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 358/458] [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 359/458] 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 360/458] 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 361/458] [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 362/458] [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 363/458] [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 364/458] [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 365/458] [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 366/458] 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 367/458] 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 368/458] [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 369/458] [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 370/458] [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 371/458] [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 372/458] [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 373/458] 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 374/458] [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 375/458] 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 376/458] [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 377/458] 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 378/458] 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 379/458] 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 380/458] 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 381/458] 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 382/458] 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 383/458] 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 384/458] 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 385/458] 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 386/458] 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 387/458] 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 388/458] 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 389/458] 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 390/458] 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 391/458] 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 392/458] 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 393/458] 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 394/458] 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 395/458] 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 396/458] 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 397/458] 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 398/458] 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 399/458] [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 400/458] 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 401/458] [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 402/458] 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 403/458] 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 404/458] [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 405/458] 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 406/458] 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 407/458] 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 408/458] 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 409/458] 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 410/458] 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 411/458] 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 412/458] 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 413/458] 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 414/458] 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 415/458] 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 416/458] [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 417/458] 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 418/458] 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 419/458] 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 420/458] 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 421/458] 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 422/458] 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 423/458] 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 424/458] [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 425/458] [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 426/458] [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 427/458] 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 428/458] [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 429/458] 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 430/458] [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 431/458] 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 432/458] 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 433/458] 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 434/458] 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 435/458] 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 436/458] 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 437/458] 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 438/458] [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 439/458] 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 440/458] 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 441/458] [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 442/458] [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 443/458] [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 444/458] 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 445/458] 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 446/458] 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 447/458] 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 448/458] 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 449/458] [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 450/458] 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 451/458] [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 452/458] 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 453/458] 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 454/458] 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 455/458] 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 456/458] 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 457/458] 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 75214fa2504bdcaa113bde794fd0e125aa493175 Mon Sep 17 00:00:00 2001 From: Gergely Peidl Date: Sat, 23 Feb 2019 11:34:49 +0100 Subject: [PATCH 458/458] Add `pragma once`. --- keyboards/lets_split/keymaps/geripgeri/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboards/lets_split/keymaps/geripgeri/config.h b/keyboards/lets_split/keymaps/geripgeri/config.h index 2c82d1181118..1368257a73b7 100644 --- a/keyboards/lets_split/keymaps/geripgeri/config.h +++ b/keyboards/lets_split/keymaps/geripgeri/config.h @@ -18,6 +18,8 @@ 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