From 2758158a4bb15b0f5ec30de92760133248afe1f8 Mon Sep 17 00:00:00 2001 From: alex-ong Date: Sun, 12 Aug 2018 17:23:58 +1000 Subject: 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 + .../handwired/xeal60/keymaps/DE_simple/config.h | 37 ++ .../handwired/xeal60/keymaps/DE_simple/keymap.c | 155 +++++++ .../handwired/xeal60/keymaps/DE_simple/readme.md | 59 +++ .../handwired/xeal60/keymaps/DE_simple/rules.mk | 0 .../handwired/xeal60/keymaps/OLED_sample/config.h | 60 +++ .../handwired/xeal60/keymaps/OLED_sample/keymap.c | 441 +++++++++++++++++++ .../handwired/xeal60/keymaps/OLED_sample/readme.md | 25 ++ .../handwired/xeal60/keymaps/OLED_sample/rules.mk | 25 ++ keyboards/handwired/xeal60/keymaps/adam/config.h | 50 +++ keyboards/handwired/xeal60/keymaps/adam/keymap.c | 78 ++++ .../handwired/xeal60/keymaps/bbaserdem/README.md | 27 ++ .../handwired/xeal60/keymaps/bbaserdem/config.h | 27 ++ .../handwired/xeal60/keymaps/bbaserdem/keymap.c | 36 ++ .../handwired/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 ++ .../handwired/xeal60/keymaps/cpeters1982/config.h | 54 +++ .../handwired/xeal60/keymaps/cpeters1982/keymap.c | 221 ++++++++++ .../handwired/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 + keyboards/handwired/xeal60/keymaps/dlaroe/config.h | 37 ++ keyboards/handwired/xeal60/keymaps/dlaroe/keymap.c | 255 +++++++++++ keyboards/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 ++ .../handwired/xeal60/keymaps/drashna_old/config.h | 86 ++++ .../handwired/xeal60/keymaps/drashna_old/keymap.c | 1 + .../handwired/xeal60/keymaps/drashna_old/rules.mk | 28 ++ .../handwired/xeal60/keymaps/dwallace/config.h | 43 ++ .../handwired/xeal60/keymaps/dwallace/keymap.c | 224 ++++++++++ .../handwired/xeal60/keymaps/dwallace/rules.mk | 1 + keyboards/handwired/xeal60/keymaps/fabian/config.h | 34 ++ keyboards/handwired/xeal60/keymaps/fabian/keymap.c | 271 ++++++++++++ keyboards/handwired/xeal60/keymaps/fabian/rules.mk | 9 + keyboards/handwired/xeal60/keymaps/fido/config.h | 45 ++ keyboards/handwired/xeal60/keymaps/fido/keymap.c | 74 ++++ keyboards/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 ++ .../handwired/xeal60/keymaps/henxing/Readme.md | 51 +++ .../handwired/xeal60/keymaps/henxing/config.h | 37 ++ .../handwired/xeal60/keymaps/henxing/keymap.c | 113 +++++ .../handwired/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 + keyboards/handwired/xeal60/keymaps/khord/config.h | 44 ++ keyboards/handwired/xeal60/keymaps/khord/keymap.c | 170 ++++++++ keyboards/handwired/xeal60/keymaps/khord/rules.mk | 7 + keyboards/handwired/xeal60/keymaps/kris/keymap.c | 213 ++++++++++ keyboards/handwired/xeal60/keymaps/krusli/keymap.c | 238 +++++++++++ .../handwired/xeal60/keymaps/krusli/readme.md | 2 + .../handwired/xeal60/keymaps/mbsurfer/config.h | 43 ++ .../handwired/xeal60/keymaps/mbsurfer/keymap.c | 274 ++++++++++++ .../handwired/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 + keyboards/handwired/xeal60/keymaps/mjt/config.h | 38 ++ keyboards/handwired/xeal60/keymaps/mjt/keymap.c | 213 ++++++++++ keyboards/handwired/xeal60/keymaps/mjt/rules.mk | 25 ++ keyboards/handwired/xeal60/keymaps/mtdjr/config.h | 43 ++ keyboards/handwired/xeal60/keymaps/mtdjr/keymap.c | 55 +++ keyboards/handwired/xeal60/keymaps/mtdjr/rules.mk | 5 + .../handwired/xeal60/keymaps/normacos/config.h | 37 ++ .../handwired/xeal60/keymaps/normacos/keymap.c | 213 ++++++++++ .../handwired/xeal60/keymaps/normacos/readme.md | 86 ++++ .../handwired/xeal60/keymaps/piemod/README.md | 31 ++ keyboards/handwired/xeal60/keymaps/piemod/config.h | 49 +++ keyboards/handwired/xeal60/keymaps/piemod/keymap.c | 99 +++++ keyboards/handwired/xeal60/keymaps/piemod/rules.mk | 13 + keyboards/handwired/xeal60/keymaps/pitty/README.md | 91 ++++ keyboards/handwired/xeal60/keymaps/pitty/config.h | 26 ++ keyboards/handwired/xeal60/keymaps/pitty/keymap.c | 169 ++++++++ keyboards/handwired/xeal60/keymaps/pitty/rules.mk | 6 + keyboards/handwired/xeal60/keymaps/poker/config.h | 37 ++ keyboards/handwired/xeal60/keymaps/poker/keymap.c | 240 +++++++++++ keyboards/handwired/xeal60/keymaps/poker/rules.mk | 3 + keyboards/handwired/xeal60/keymaps/smt/config.h | 37 ++ keyboards/handwired/xeal60/keymaps/smt/keymap.c | 218 ++++++++++ keyboards/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 +++ keyboards/handwired/xeal60/keymaps/waples/config.h | 17 + keyboards/handwired/xeal60/keymaps/waples/keymap.c | 131 ++++++ keyboards/handwired/xeal60/keymaps/waples/rules.mk | 3 + keyboards/handwired/xeal60/keymaps/xk/config.h | 44 ++ keyboards/handwired/xeal60/keymaps/xk/keymap.c | 370 ++++++++++++++++ keyboards/handwired/xeal60/keymaps/xk/rules.mk | 19 + keyboards/handwired/xeal60/keymaps/zer09/config.h | 59 +++ keyboards/handwired/xeal60/keymaps/zer09/keymap.c | 38 ++ keyboards/handwired/xeal60/keymaps/zer09/keymap.h | 32 ++ keyboards/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 (limited to 'keyboards') diff --git a/keyboards/handwired/xeal60/config.h b/keyboards/handwired/xeal60/config.h new file mode 100644 index 0000000000..c910d8f24f --- /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 0000000000..084c890c40 --- /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 0000000000..aa1c3b8efc --- /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 0000000000..5a6261c4f7 --- /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 0000000000..d329bea4c0 --- /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 0000000000..972cd6c398 --- /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 0000000000..e69de29bb2 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 0000000000..e8632fe61d --- /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 0000000000..5eccbcf1ac --- /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 0000000000..b986ab780b --- /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 0000000000..4b37d73555 --- /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 atm