From cfc23836e5f9571056d3710b8580c1f27b91ed54 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 10 Aug 2013 22:57:01 +0300 Subject: [PATCH 001/101] Implementation for Ergodox project --- keyboard/ergodox/Makefile.pjrc | 115 +++++++++++ keyboard/ergodox/TODO | 10 + keyboard/ergodox/config.h | 75 +++++++ keyboard/ergodox/ergodox.c | 121 +++++++++++ keyboard/ergodox/ergodox.h | 114 +++++++++++ keyboard/ergodox/i2cmaster.h | 178 ++++++++++++++++ keyboard/ergodox/keymap.c | 228 +++++++++++++++++++++ keyboard/ergodox/keymap_colemak.h | 4 + keyboard/ergodox/keymap_cub.h | 227 +++++++++++++++++++++ keyboard/ergodox/keymap_dvorak.h | 4 + keyboard/ergodox/keymap_workman.h | 4 + keyboard/ergodox/led.c | 57 ++++++ keyboard/ergodox/matrix.c | 326 ++++++++++++++++++++++++++++++ keyboard/ergodox/twimaster.c | 202 ++++++++++++++++++ 14 files changed, 1665 insertions(+) create mode 100644 keyboard/ergodox/Makefile.pjrc create mode 100644 keyboard/ergodox/TODO create mode 100644 keyboard/ergodox/config.h create mode 100644 keyboard/ergodox/ergodox.c create mode 100644 keyboard/ergodox/ergodox.h create mode 100644 keyboard/ergodox/i2cmaster.h create mode 100644 keyboard/ergodox/keymap.c create mode 100644 keyboard/ergodox/keymap_colemak.h create mode 100644 keyboard/ergodox/keymap_cub.h create mode 100644 keyboard/ergodox/keymap_dvorak.h create mode 100644 keyboard/ergodox/keymap_workman.h create mode 100644 keyboard/ergodox/led.c create mode 100644 keyboard/ergodox/matrix.c create mode 100644 keyboard/ergodox/twimaster.c diff --git a/keyboard/ergodox/Makefile.pjrc b/keyboard/ergodox/Makefile.pjrc new file mode 100644 index 00000000..63772521 --- /dev/null +++ b/keyboard/ergodox/Makefile.pjrc @@ -0,0 +1,115 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# Target file name (without extension). +TARGET = ergodox_pjrc + +# Directory common source filess exist +TOP_DIR = ../.. + +# Directory keyboard dependent files exist +TARGET_DIR = . + +# project specific files +SRC = keymap.c \ + matrix.c \ + led.c \ + ergodox.c \ + twimaster.c + +CONFIG_H = config.h + + +# MCU name, you MUST set this to match the board you are using +# type "make clean" after changing this, so all files will be rebuilt +MCU = atmega32u4 +#MCU = at90usb1286 + + +# Processor frequency. +# Normally the first thing your program should do is set the clock prescaler, +# so your program will run at the correct speed. You should also set this +# variable to same clock speed. The _delay_ms() macro uses this, and many +# examples use this variable to calculate timings. Do not add a "UL" here. +F_CPU = 16000000 + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +OPT_DEFS += -DBOOTLOADER_SIZE=512 -DFLASH_SIZE_BYTES=0x8000 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+5000) +EXTRAKEY_ENABLE = yes # Audio control and System control(+600) +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(+500) +#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support +INVERT_NUMLOCK = yes # invert state of NumLock led + + +# Search Path +VPATH += $(TARGET_DIR) +VPATH += $(TOP_DIR) + +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk + +dvorak: OPT_DEFS += -DKEYMAP_DVORAK +dvorak: all + +colemak: OPT_DEFS += -DKEYMAP_COLEMAK +colemak: all + +workman: OPT_DEFS += -DKEYMAP_WORKMAN +workman: all + +cub: OPT_DEFS += -DKEYMAP_CUB +cub: all + + diff --git a/keyboard/ergodox/TODO b/keyboard/ergodox/TODO new file mode 100644 index 00000000..d630c730 --- /dev/null +++ b/keyboard/ergodox/TODO @@ -0,0 +1,10 @@ +1. Flash led on ~Ln keypress (for now it works only on +Ln) +2. Flash NumLock led only when "numpad" layer is active +3. Command (in terms of IS_COMMAND) to switch to no-leds mode +4. Increase count of ACTION keys +5. Check how it works with ACTION/TAP keys (layerN+key or modifier+key) +6. Fix command_state() onboard led: + it should flash only when kbd in some specific mode (CONSOLE || MOUSE) +7. Fix Right TEENSY key (for now it locks kbd & system) +8. Cleanup everything, add conditionals (ifdef/ifndef), push to github + diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h new file mode 100644 index 00000000..d2ca7ea6 --- /dev/null +++ b/keyboard/ergodox/config.h @@ -0,0 +1,75 @@ +/* +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 . + + +This work is heavily based on initial firmware for Ergodox keyboard. +Copyright (c) 2012, 2013 Ben Blazak +Released under The MIT License (see "doc/licenses/MIT.md") +Project located at +*/ + +#ifndef CONFIG_H +#define CONFIG_H + + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1111 +#define DEVICE_VER 0x0001 +#define MANUFACTURER TMK/Cub +#define PRODUCT Ergodox +#define DESCRIPTION t.m.k. keyboard firmware for Ergodox + +#define MATRIX_ROWS 14 +#define MATRIX_COLS 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 + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + + + +/* + * 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/keyboard/ergodox/ergodox.c b/keyboard/ergodox/ergodox.c new file mode 100644 index 00000000..8aed78ec --- /dev/null +++ b/keyboard/ergodox/ergodox.c @@ -0,0 +1,121 @@ +/* +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 . + + +This work is heavily based on initial firmware for Ergodox keyboard. +Copyright (c) 2012, 2013 Ben Blazak +Released under The MIT License (see "doc/licenses/MIT.md") +Project located at + +Most used files are located at + + +*/ + +#include +#include +#include +#include +#include +#include "action.h" +#include "command.h" +#include "print.h" +#include "debug.h" +#include "ergodox.h" +#include "i2cmaster.h" + +bool i2c_initialized = 0; + +bool ergodox_left_led_1 = 0; // left top +bool ergodox_left_led_2 = 0; // left middle +bool ergodox_left_led_3 = 0; // left bottom + + +void init_ergodox(void) +{ + // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") + TCCR1A = 0b10101001; // set and configure fast PWM + TCCR1B = 0b00001001; // set and configure fast PWM + + // (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-ip enabled + DDRC &= ~(1<<7); + DDRD &= ~(1<<7 | 1<<5 | 1<<4); + DDRE &= ~(1<<6); + PORTC |= (1<<7); + PORTD |= (1<<7 | 1<<5 | 1<<4); + PORTE |= (1<<6); + + // blink leds + ergodox_led_all_off(); + ergodox_led_all_set(LED_BRIGHTNESS_HI); + ergodox_led_all_on(); + _delay_ms(333); + ergodox_led_all_off(); +} + +uint8_t init_mcp23018(void) { + uint8_t err = 0x20; + + // I2C subsystem + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized++; + _delay_ms(1000); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; + err = i2c_write(IODIRA); if (err) goto out; + err = i2c_write(0b00000000); if (err) goto out; + err = i2c_write(0b00111111); if (err) goto out; + i2c_stop(); + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; + err = i2c_write(GPPUA); if (err) goto out; + err = i2c_write(0b00000000); if (err) goto out; + err = i2c_write(0b00111111); if (err) goto out; + i2c_stop(); + + // set logical value (doesn't matter on inputs) + // - unused : hi-Z : 1 + // - input : hi-Z : 1 + // - driving : hi-Z : 1 + err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; + err = i2c_write(OLATA); if (err) goto out; + err = i2c_write(0b11111111 + & ~(ergodox_left_led_3< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + + +Copyright (c) 2012, 2013 Ben Blazak +Released under The MIT License (see "doc/licenses/MIT.md") +Project located at + +Most used files are located at + + +*/ + +#include +#include +#include +#include "i2cmaster.h" + +#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_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); + +#define LED_BRIGHTNESS_LO 31 +#define LED_BRIGHTNESS_HI 255 + +#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B +#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B +#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A + +extern bool ergodox_left_led_1; // left top +extern bool ergodox_left_led_2; // left middle +extern bool ergodox_left_led_3; // left bottom + +inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } +inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } +inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } +inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } +inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } +inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } +inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } + +inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } +inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } +inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } +inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } +inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } +inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } + +inline void ergodox_left_leds_update(void) { init_mcp23018(); } + +inline void ergodox_led_all_on(void) +{ + ergodox_board_led_on(); + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + ergodox_left_led_1_on(); + ergodox_left_led_2_on(); + ergodox_left_led_3_on(); + ergodox_left_leds_update(); +} + +inline void ergodox_led_all_off(void) +{ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); + ergodox_left_leds_update(); +} + +inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } +inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } +inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } + +inline void ergodox_led_all_set(uint8_t n) +{ + ergodox_right_led_1_set(n); + ergodox_right_led_2_set(n); + ergodox_right_led_3_set(n); +} + diff --git a/keyboard/ergodox/i2cmaster.h b/keyboard/ergodox/i2cmaster.h new file mode 100644 index 00000000..70f51fd3 --- /dev/null +++ b/keyboard/ergodox/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 + */ +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/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap.c new file mode 100644 index 00000000..fb553d09 --- /dev/null +++ b/keyboard/ergodox/keymap.c @@ -0,0 +1,228 @@ +/* +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 +#include +#include +#include +#include "keycode.h" +#include "action.h" +#include "action_code.h" +#include "action_macro.h" +#include "bootloader.h" +#include "report.h" +#include "host.h" +#include "print.h" +#include "debug.h" +#include "keymap.h" +#include "ergodox.h" + + +/* ErgoDox keymap definition macro */ +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { KC_##k00,KC_##k10,KC_##k20,KC_##k30,KC_##k40,KC_NO }, \ + { KC_##k01,KC_##k11,KC_##k21,KC_##k31,KC_##k41,KC_##k51}, \ + { KC_##k02,KC_##k12,KC_##k22,KC_##k32,KC_##k42,KC_##k52}, \ + { KC_##k03,KC_##k13,KC_##k23,KC_##k33,KC_##k43,KC_##k53}, \ + { KC_##k04,KC_##k14,KC_##k24,KC_##k34,KC_##k44,KC_##k54}, \ + { KC_##k05,KC_##k15,KC_##k25,KC_##k35,KC_NO, KC_##k55}, \ + { KC_##k06,KC_##k16,KC_NO, KC_##k36,KC_NO, KC_##k56}, \ + \ + { KC_##k07,KC_##k17,KC_NO, KC_##k37,KC_NO, KC_##k57}, \ + { KC_##k08,KC_##k18,KC_##k28,KC_##k38,KC_NO, KC_##k58}, \ + { KC_##k09,KC_##k19,KC_##k29,KC_##k39,KC_##k49,KC_##k59}, \ + { KC_##k0A,KC_##k1A,KC_##k2A,KC_##k3A,KC_##k4A,KC_##k5A}, \ + { KC_##k0B,KC_##k1B,KC_##k2B,KC_##k3B,KC_##k4B,KC_##k5B}, \ + { KC_##k0C,KC_##k1C,KC_##k2C,KC_##k3C,KC_##k4C,KC_##k5C}, \ + { KC_##k0D,KC_##k1D,KC_##k2D,KC_##k3D,KC_##k4D,KC_NO } \ + } + +#if defined(KEYMAP_DVORAK) +#include "keymap_dvorak.h" +#elif defined(KEYMAP_COLEMAK) +#include "keymap_colemak.h" +#elif defined(KEYMAP_WORKMAN) +#include "keymap_workman.h" +#elif defined(KEYMAP_CUB) +#include "keymap_cub.h" +#else + +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( // layer 0 : default + // left hand + EQL, 1, 2, 3, 4, 5, ESC, + BSLS,Q, W, E, R, T, FN2, + TAB, A, S, D, F, G, + LSFT,Z, X, C, V, B, FN1, + LGUI,GRV, BSLS,LEFT,RGHT, + LCTL,LALT, + HOME, + BSPC,DEL, END, + // right hand + FN3, 6, 7, 8, 9, 0, MINS, + LBRC,Y, U, I, O, P, RBRC, + H, J, K, L, SCLN,QUOT, + FN1, N, M, COMM,DOT, SLSH,RSFT, + LEFT,DOWN,UP, RGHT,RGUI, + RALT,RCTL, + PGUP, + PGDN,ENT, SPC + ), + + KEYMAP( // layer 1 : function and symbol keys + // left hand + TRNS,F1, F2, F3, F4, F5, F11, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + F12, F6, F7, F8, F9, F10, 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 + ), + + KEYMAP( // layer 2 : keyboard functions + // left hand + FN0, 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, + // right hand + FN4, 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 + ), + + KEYMAP( // layer 3: numpad + // left hand + 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, + // right hand + SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, + TRNS,NO, P7, P8, P9, PMNS,BSPC, + NO, P4, P5, P6, PPLS,PENT, + TRNS,NO, P1, P2, P3, PPLS,PENT, + P0, PDOT,SLSH,PENT,PENT, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +static const uint16_t PROGMEM fn_actions[] = { + ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 + ACTION_LAYER_SET(2, ON_PRESS), // FN2 - push Layer2 + ACTION_LAYER_SET(3, ON_PRESS), // FN3 - push Layer3 + ACTION_LAYER_SET(0, ON_PRESS), // FN4 - push Layer0 +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} + +#endif + + +#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) +#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) + +/* translates key to keycode */ +uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) +{ + if (layer < KEYMAPS_SIZE) { + return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); + } else { + // fall back to layer 0 + return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); + } +} + +/* translates Fn keycode to action */ +action_t keymap_fn_to_action(uint8_t keycode) +{ + action_t action; + if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { + action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); + } else { + action.code = ACTION_NO; + } + return action; +} + diff --git a/keyboard/ergodox/keymap_colemak.h b/keyboard/ergodox/keymap_colemak.h new file mode 100644 index 00000000..4e5565e7 --- /dev/null +++ b/keyboard/ergodox/keymap_colemak.h @@ -0,0 +1,4 @@ +#error Colemak layout is not defined yet +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +}; +static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h new file mode 100644 index 00000000..178d10f1 --- /dev/null +++ b/keyboard/ergodox/keymap_cub.h @@ -0,0 +1,227 @@ +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap 0: Default Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | \ | | ' | 6 | 7 | 8 | 9 | 0 | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | ~Fn1 | | ~Fn3 | Y | U | I | O | P | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | RShift | + * |--------+------+------+------+------+------| Fn0 | | ~Fn4 |------+------+------+------+------+--------| + * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | RCtrl | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ~Fn1 | ~Fn2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~Fn4 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | +Fn2 | Home | | PgUp | Del | + * ,------|------|------| |------+------+------. + * | | | End | | PgDn | | | + * | BkSp | ESC |------| |------| Enter| Space| + * | | | Spc | | Ins | | | + * `--------------------' `--------------------' + */ + + KEYMAP( // layout: layer 0: default + // left hand + GRV, 1, 2, 3, 4, 5, BSLS, + TAB, Q, W, E, R, T, FN1, + LSFT,A, S, D, F, G, + LCTL,Z, X, C, V, B, FN0, + FN1, FN6, CAPS,LALT,LGUI, + FN2, HOME, + END, + BSPC,ESC, SPC, + // right hand + QUOT,6, 7, 8, 9, 0, EQL, + FN3, Y, U, I, O, P, LBRC, + H, J, K, L, SCLN,RSFT, + FN4, N, M, COMM,DOT, SLSH,RCTL, + LEFT,UP, DOWN,RGHT,FN4, + PGUP,DEL, + PGDN, + INS, ENT, SPC + ), + + KEYMAP( // layout: layer 1: F-keys instead of numbers + // left hand + TRNS,F1, F2, F3, F4, F5, F6, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + F7, F8, F9, F10, F11, F12, MINS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,RBRC, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + + KEYMAP( // layout: layer 2: mouse + numpad + // left hand + TRNS,NO, NO, NO, NO, PAUS,PSCR, + TRNS,WH_L,WH_U,WH_D,WH_R,BTN2,TRNS, + TRNS,MS_L,MS_U,MS_D,MS_R,BTN1, + TRNS,NO, NO, NO, NO, BTN3,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, + TRNS,NO, P7, P8, P9, PMNS,BSPC, + NO, P4, P5, P6, PPLS,PENT, + TRNS,NO, P1, P2, P3, PPLS,PENT, + P0, PDOT,SLSH,PENT,PENT, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // layout: layer 3: F-keys only + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,F13, F14, F15, F16, NO, TRNS, + TRNS,F17, F18, F19, F20, NO, + TRNS,F21, F22, F23, F24, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, F1, F2, F3, F4, TRNS, + NO, F5, F6, F7, F8, TRNS, + TRNS,NO, F9, F10, F11, F12, TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + + KEYMAP( // layout: layer 4: F-keys + cursor + // left hand + TRNS,F1, F2, F3, F4, F5, F6, + FN7, NO, PGUP,UP, PGDN,PGUP,TRNS, + TRNS,NO, LEFT,DOWN,RGHT,PGDN, + TRNS,NO, NO, END, HOME,NO, TRNS, + FN5, TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + F7, F8, F9, F10, F11, F12, MINS, + TRNS,PGUP,PGUP,UP, PGDN,NO, FN7, + PGDN,LEFT,DOWN,RGHT,NO, TRNS, + TRNS,NO, HOME,END, NO, NO, TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + + KEYMAP( // layout: layer 5: Workman layout + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,Q, D, R, W, B, TRNS, + TRNS,A, S, H, T, G, + TRNS,Z, X, M, C, V, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,J, F, U, P, 4, TRNS, + Y, N, E, O, I, TRNS, + TRNS,K, L, TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + +/* + KEYMAP( // layout: layer N: transparent on edges, all others are empty + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + KEYMAP( // layout: layer N: fully transparent + // left hand + 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, + // right hand + 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 + ), +*/ + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +static const uint16_t PROGMEM fn_actions[] = { + ACTION_DEFAULT_LAYER_SET(0), // FN0 - switch to Layer0 + ACTION_LAYER_MOMENTARY(1), // FN1 - push Layer1 + ACTION_DEFAULT_LAYER_SET(2), // FN2 - switch to Layer2 + ACTION_LAYER_MOMENTARY(3), // FN3 - push Layer3 + ACTION_LAYER_MOMENTARY(4), // FN4 - push Layer4 + ACTION_DEFAULT_LAYER_SET(5), // FN5 - switch to Layer5 + ACTION_LAYER_MOMENTARY(2), // FN6 - push Layer2 + ACTION_FUNCTION(TEENSY_KEY), // FN7 - Teensy key +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + print("action_function called\n"); + print("id = "); phex(id); print("\n"); + print("opt = "); phex(opt); print("\n"); + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} + diff --git a/keyboard/ergodox/keymap_dvorak.h b/keyboard/ergodox/keymap_dvorak.h new file mode 100644 index 00000000..198709c5 --- /dev/null +++ b/keyboard/ergodox/keymap_dvorak.h @@ -0,0 +1,4 @@ +#error Dvorak layout is not defined yet +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +}; +static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/ergodox/keymap_workman.h b/keyboard/ergodox/keymap_workman.h new file mode 100644 index 00000000..b1570650 --- /dev/null +++ b/keyboard/ergodox/keymap_workman.h @@ -0,0 +1,4 @@ +#error Workman layout is not defined yet +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +}; +static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/ergodox/led.c b/keyboard/ergodox/led.c new file mode 100644 index 00000000..55fb4ff3 --- /dev/null +++ b/keyboard/ergodox/led.c @@ -0,0 +1,57 @@ +/* +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 +#include +#include "print.h" +#include "debug.h" +#include "led.h" +#include "ergodox.h" + + +void led_set(uint8_t usb_led) +{ + // topmost - NumLock +#ifdef INVERT_NUMLOCK + 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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "ergodox.h" +#include "i2cmaster.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* 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(uint8_t mcp23018_status, uint8_t row); +static void init_cols(void); +static void unselect_rows(uint8_t mcp23018_status); +static void select_row(uint8_t mcp23018_status, uint8_t row); + + +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 + init_ergodox(); + uint8_t mcp23018_status; + mcp23018_status = init_mcp23018(); + unselect_rows(mcp23018_status); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } +} + +uint8_t matrix_scan(void) +{ +#ifdef KEYMAP_CUB + uint8_t layer = biton32(layer_state); + + if (layer == 1) { + ergodox_left_led_1_on(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); + } else if (layer == 2) { + ergodox_left_led_1_off(); + ergodox_left_led_2_on(); + ergodox_left_led_3_off(); + } else if (layer == 3) { + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_on(); + } else if (layer == 4) { + ergodox_left_led_1_on(); + ergodox_left_led_2_off(); + ergodox_left_led_3_on(); + } else if (layer == 5) { + ergodox_left_led_1_on(); + ergodox_left_led_2_on(); + ergodox_left_led_3_off(); + } else if (layer == 6) { + ergodox_left_led_1_off(); + ergodox_left_led_2_on(); + ergodox_left_led_3_on(); + } else if (layer == 7) { + ergodox_left_led_1_on(); + ergodox_left_led_2_on(); + ergodox_left_led_3_on(); + } else { + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); + } + + // not actually needed because we already calling init_mcp23018() in next line + // ergodox_left_leds_update(); + +#endif + + uint8_t mcp23018_status = init_mcp23018(); + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(mcp23018_status, i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(mcp23018_status, i); + if (matrix_debouncing[i] != cols) { + matrix_debouncing[i] = cols; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(mcp23018_status); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +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< 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 4000000UL +#endif + +/* I2C clock in Hz */ +#define SCL_CLOCK 100000L + + +/************************************************************************* + Initialization of the I2C bus interface. Need to be called only once +*************************************************************************/ +void i2c_init(void) +{ + /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ + + TWSR = 0; /* no prescaler */ + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; /* 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: Thu, 5 Sep 2013 00:03:22 +0300 Subject: [PATCH 002/101] Modified CUB layout --- keyboard/ergodox/keymap_cub.h | 60 +++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 178d10f1..0446bdc9 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -30,16 +30,16 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { FN1, FN6, CAPS,LALT,LGUI, FN2, HOME, END, - BSPC,ESC, SPC, + FN8, FN9, FN10, // right hand QUOT,6, 7, 8, 9, 0, EQL, FN3, Y, U, I, O, P, LBRC, - H, J, K, L, SCLN,RSFT, - FN4, N, M, COMM,DOT, SLSH,RCTL, + H, J, K, L, SCLN,MINS, + FN4, N, M, COMM,DOT, SLSH,RBRC, LEFT,UP, DOWN,RGHT,FN4, PGUP,DEL, PGDN, - INS, ENT, SPC + FN11,FN12,FN13 ), KEYMAP( // layout: layer 1: F-keys instead of numbers @@ -48,19 +48,19 @@ static const uint8_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,LALT,LGUI, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - LCTL,LSFT,TRNS, + TRNS,TRNS,TRNS, // right hand - F7, F8, F9, F10, F11, F12, MINS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,RBRC, + 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, - RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - TRNS,RSFT,RCTL + TRNS,TRNS,TRNS ), KEYMAP( // layout: layer 2: mouse + numpad @@ -90,19 +90,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,F13, F14, F15, F16, NO, TRNS, TRNS,F17, F18, F19, F20, NO, TRNS,F21, F22, F23, F24, NO, TRNS, - TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - LCTL,LSFT,TRNS, + TRNS,TRNS,TRNS, // right hand NO, NO, NO, NO, NO, NO, TRNS, TRNS,NO, F1, F2, F3, F4, TRNS, NO, F5, F6, F7, F8, TRNS, TRNS,NO, F9, F10, F11, F12, TRNS, - RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - TRNS,RSFT,RCTL + TRNS,TRNS,TRNS ), KEYMAP( // layout: layer 4: F-keys + cursor @@ -111,19 +111,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { FN7, NO, PGUP,UP, PGDN,PGUP,TRNS, TRNS,NO, LEFT,DOWN,RGHT,PGDN, TRNS,NO, NO, END, HOME,NO, TRNS, - FN5, TRNS,TRNS,LALT,LGUI, + FN5, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - LCTL,LSFT,TRNS, + TRNS,TRNS,TRNS, // right hand F7, F8, F9, F10, F11, F12, MINS, TRNS,PGUP,PGUP,UP, PGDN,NO, FN7, PGDN,LEFT,DOWN,RGHT,NO, TRNS, TRNS,NO, HOME,END, NO, NO, TRNS, - RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - TRNS,RSFT,RCTL + TRNS,TRNS,TRNS ), KEYMAP( // layout: layer 5: Workman layout @@ -148,6 +148,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* + // templates to copy from + KEYMAP( // layout: layer N: transparent on edges, all others are empty // left hand TRNS,NO, NO, NO, NO, NO, NO, @@ -201,14 +203,26 @@ enum function_id { * Fn action definition */ static const uint16_t PROGMEM fn_actions[] = { - ACTION_DEFAULT_LAYER_SET(0), // FN0 - switch to Layer0 + ACTION_LAYER_SET(0, ON_BOTH), // FN0 - switch to Layer0 ACTION_LAYER_MOMENTARY(1), // FN1 - push Layer1 - ACTION_DEFAULT_LAYER_SET(2), // FN2 - switch to Layer2 + ACTION_LAYER_SET(2, ON_BOTH), // FN2 - switch to Layer2 ACTION_LAYER_MOMENTARY(3), // FN3 - push Layer3 ACTION_LAYER_MOMENTARY(4), // FN4 - push Layer4 - ACTION_DEFAULT_LAYER_SET(5), // FN5 - switch to Layer5 + ACTION_LAYER_SET(5, ON_BOTH), // FN5 - switch to Layer5 ACTION_LAYER_MOMENTARY(2), // FN6 - push Layer2 ACTION_FUNCTION(TEENSY_KEY), // FN7 - Teensy key + + ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN8 = LShift with tap BackSpace + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), // FN9 = LCtrl with tap Escape + ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN10 = LAlt with tap Space + ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN11 = RAlt with tap Ins + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN12 = RShift with tap Enter + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN13 = RCtrl with tap Space + + /* + ACTION_LAYER_TAP_KEY(1, KC_SPC), // FN0 = L1 symbols + ACTION_LAYER_TAP_KEY(1, KC_ENT), // FN5 = L1 symbols + */ }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) @@ -217,11 +231,15 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) print("id = "); phex(id); print("\n"); print("opt = "); phex(opt); print("\n"); if (id == TEENSY_KEY) { + /* + * this won't work, idk why + */ clear_keyboard(); print("\n\nJump to bootloader... "); _delay_ms(250); bootloader_jump(); // should not return print("not supported.\n"); + /**/ } } From 5a7330dde43a544ac4f7f815688077e413e6712b Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Thu, 5 Sep 2013 01:12:48 +0300 Subject: [PATCH 003/101] Added handy switching to L2 to use Mouse keys --- keyboard/ergodox/keymap_cub.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 0446bdc9..08e7ea31 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -34,7 +34,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand QUOT,6, 7, 8, 9, 0, EQL, FN3, Y, U, I, O, P, LBRC, - H, J, K, L, SCLN,MINS, + FN14,J, K, L, SCLN,MINS, FN4, N, M, COMM,DOT, SLSH,RBRC, LEFT,UP, DOWN,RGHT,FN4, PGUP,DEL, @@ -76,7 +76,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, TRNS,NO, P7, P8, P9, PMNS,BSPC, - NO, P4, P5, P6, PPLS,PENT, + TRNS,P4, P5, P6, PPLS,PENT, TRNS,NO, P1, P2, P3, PPLS,PENT, P0, PDOT,SLSH,PENT,PENT, TRNS,TRNS, @@ -219,8 +219,9 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN12 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN13 = RCtrl with tap Space + ACTION_LAYER_TAP_KEY(2, KC_H), // FN14 = L2 symbols on J key, to use with Mouse keys + /* - ACTION_LAYER_TAP_KEY(1, KC_SPC), // FN0 = L1 symbols ACTION_LAYER_TAP_KEY(1, KC_ENT), // FN5 = L1 symbols */ }; From e6ad104bd8b4edcfc958ebe794894b0560720f43 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Thu, 5 Sep 2013 23:51:47 +0300 Subject: [PATCH 004/101] Added handy switching for RShift and RCtrl --- keyboard/ergodox/keymap_cub.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 08e7ea31..eda19e6e 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -34,8 +34,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand QUOT,6, 7, 8, 9, 0, EQL, FN3, Y, U, I, O, P, LBRC, - FN14,J, K, L, SCLN,MINS, - FN4, N, M, COMM,DOT, SLSH,RBRC, + FN16,J, K, L, SCLN,FN14, + FN4, N, M, COMM,DOT, SLSH,FN15, LEFT,UP, DOWN,RGHT,FN4, PGUP,DEL, PGDN, @@ -218,12 +218,10 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN11 = RAlt with tap Ins ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN12 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN13 = RCtrl with tap Space + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_MINS), // FN14 = RShift with tap Enter + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN15 = RCtrl with tap Space - ACTION_LAYER_TAP_KEY(2, KC_H), // FN14 = L2 symbols on J key, to use with Mouse keys - - /* - ACTION_LAYER_TAP_KEY(1, KC_ENT), // FN5 = L1 symbols - */ + ACTION_LAYER_TAP_KEY(2, KC_H), // FN16 = L2 symbols on J key, to use with Mouse keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) @@ -232,15 +230,11 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) print("id = "); phex(id); print("\n"); print("opt = "); phex(opt); print("\n"); if (id == TEENSY_KEY) { - /* - * this won't work, idk why - */ clear_keyboard(); print("\n\nJump to bootloader... "); _delay_ms(250); bootloader_jump(); // should not return print("not supported.\n"); - /**/ } } From 6b7921f91b207820e03e33f8bd9a48e50ee3f2c2 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 8 Sep 2013 18:25:40 +0300 Subject: [PATCH 005/101] Added debug counter of matrix scan frequency --- keyboard/ergodox/config.h | 1 + keyboard/ergodox/matrix.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index d2ca7ea6..62e5ff6a 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -71,5 +71,6 @@ Project located at //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_FREQ #endif diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index b0ba1c0e..e35b65c9 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -29,6 +29,9 @@ along with this program. If not, see . #include "matrix.h" #include "ergodox.h" #include "i2cmaster.h" +#ifdef DEBUG_MATRIX_FREQ +#include "timer.h" +#endif #ifndef DEBOUNCE # define DEBOUNCE 5 @@ -44,6 +47,10 @@ static void init_cols(void); static void unselect_rows(uint8_t mcp23018_status); static void select_row(uint8_t mcp23018_status, uint8_t row); +#ifdef DEBUG_MATRIX_FREQ +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif inline uint8_t matrix_rows(void) @@ -71,10 +78,29 @@ void matrix_init(void) matrix[i] = 0; matrix_debouncing[i] = 0; } + +#ifdef DEBUG_MATRIX_FREQ + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif } uint8_t matrix_scan(void) { +#ifdef DEBUG_MATRIX_FREQ + 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 + #ifdef KEYMAP_CUB uint8_t layer = biton32(layer_state); From 39da065913380c89246e6f788e1be772947c470e Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 01:30:44 +0300 Subject: [PATCH 006/101] Converting files to Unix-like format --- keyboard/ergodox/i2cmaster.h | 356 +++++++++++++++--------------- keyboard/ergodox/twimaster.c | 404 +++++++++++++++++------------------ 2 files changed, 380 insertions(+), 380 deletions(-) diff --git a/keyboard/ergodox/i2cmaster.h b/keyboard/ergodox/i2cmaster.h index 70f51fd3..3917b9e6 100644 --- a/keyboard/ergodox/i2cmaster.h +++ b/keyboard/ergodox/i2cmaster.h @@ -1,178 +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 - */ -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 +#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/keyboard/ergodox/twimaster.c b/keyboard/ergodox/twimaster.c index f0d850c2..a4dc5c11 100644 --- a/keyboard/ergodox/twimaster.c +++ b/keyboard/ergodox/twimaster.c @@ -1,202 +1,202 @@ -/************************************************************************* -* 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 4000000UL -#endif - -/* I2C clock in Hz */ -#define SCL_CLOCK 100000L - - -/************************************************************************* - Initialization of the I2C bus interface. Need to be called only once -*************************************************************************/ -void i2c_init(void) -{ - /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ - - TWSR = 0; /* no prescaler */ - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; /* 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< 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 4000000UL +#endif + +/* I2C clock in Hz */ +#define SCL_CLOCK 100000L + + +/************************************************************************* + Initialization of the I2C bus interface. Need to be called only once +*************************************************************************/ +void i2c_init(void) +{ + /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ + + TWSR = 0; /* no prescaler */ + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; /* 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: Mon, 9 Sep 2013 01:33:29 +0300 Subject: [PATCH 007/101] Switch TWI library to use 400kHz --- keyboard/ergodox/twimaster.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/twimaster.c b/keyboard/ergodox/twimaster.c index a4dc5c11..6959d81c 100644 --- a/keyboard/ergodox/twimaster.c +++ b/keyboard/ergodox/twimaster.c @@ -14,11 +14,11 @@ /* define CPU frequency in Mhz here if not defined in Makefile */ #ifndef F_CPU -#define F_CPU 4000000UL +#define F_CPU 16000000UL #endif /* I2C clock in Hz */ -#define SCL_CLOCK 100000L +#define SCL_CLOCK 400000L /************************************************************************* @@ -26,7 +26,7 @@ *************************************************************************/ void i2c_init(void) { - /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ + /* initialize TWI clock: 400 kHz clock, TWPS = 0 => prescaler = 1 */ TWSR = 0; /* no prescaler */ TWBR = ((F_CPU/SCL_CLOCK)-16)/2; /* must be > 10 for stable operation */ From 5329bbefee10503832d419733e6cfecb97e712cb Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 01:49:11 +0300 Subject: [PATCH 008/101] Optimizing I2C --- keyboard/ergodox/config.h | 12 +++++++- keyboard/ergodox/ergodox.c | 11 ++++++++ keyboard/ergodox/ergodox.h | 3 +- keyboard/ergodox/matrix.c | 56 ++++++++++++++++++-------------------- 4 files changed, 49 insertions(+), 33 deletions(-) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index 62e5ff6a..de32be7e 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -40,7 +40,17 @@ Project located at //#define MATRIX_HAS_GHOST /* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ +#define DEBOUNCE 2 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboard/ergodox/ergodox.c b/keyboard/ergodox/ergodox.c index 8aed78ec..f8b3d82e 100644 --- a/keyboard/ergodox/ergodox.c +++ b/keyboard/ergodox/ergodox.c @@ -90,6 +90,7 @@ uint8_t init_mcp23018(void) { err = i2c_write(0b00000000); if (err) goto out; err = i2c_write(0b00111111); if (err) goto out; i2c_stop(); + // set pull-up // - unused : on : 1 // - input : on : 1 @@ -98,8 +99,18 @@ uint8_t init_mcp23018(void) { err = i2c_write(GPPUA); if (err) goto out; err = i2c_write(0b00000000); if (err) goto out; err = i2c_write(0b00111111); if (err) goto out; + +out: i2c_stop(); + if (!err) err = ergodox_left_leds_update(); + + return err; +} + +uint8_t ergodox_left_leds_update(void) { + uint8_t err = 0x20; + // set logical value (doesn't matter on inputs) // - unused : hi-Z : 1 // - input : hi-Z : 1 diff --git a/keyboard/ergodox/ergodox.h b/keyboard/ergodox/ergodox.h index d9623687..a0511ff3 100644 --- a/keyboard/ergodox/ergodox.h +++ b/keyboard/ergodox/ergodox.h @@ -47,6 +47,7 @@ Most used files are located at void init_ergodox(void); uint8_t init_mcp23018(void); +uint8_t ergodox_left_leds_update(void); #define LED_BRIGHTNESS_LO 31 #define LED_BRIGHTNESS_HI 255 @@ -75,8 +76,6 @@ inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } -inline void ergodox_left_leds_update(void) { init_mcp23018(); } - inline void ergodox_led_all_on(void) { ergodox_board_led_on(); diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index e35b65c9..b75d7c57 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -42,10 +42,12 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static matrix_row_t read_cols(uint8_t mcp23018_status, uint8_t row); +static matrix_row_t read_cols(uint8_t row); static void init_cols(void); -static void unselect_rows(uint8_t mcp23018_status); -static void select_row(uint8_t mcp23018_status, uint8_t row); +static void unselect_rows(); +static void select_row(uint8_t row); + +static uint8_t mcp23018_status; #ifdef DEBUG_MATRIX_FREQ uint32_t matrix_timer; @@ -68,9 +70,8 @@ void matrix_init(void) { // initialize row and col init_ergodox(); - uint8_t mcp23018_status; mcp23018_status = init_mcp23018(); - unselect_rows(mcp23018_status); + unselect_rows(); init_cols(); // initialize matrix state: all keys off @@ -139,16 +140,14 @@ uint8_t matrix_scan(void) } // not actually needed because we already calling init_mcp23018() in next line - // ergodox_left_leds_update(); + mcp23018_status = ergodox_left_leds_update(); #endif - uint8_t mcp23018_status = init_mcp23018(); - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(mcp23018_status, i); + select_row(i); _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(mcp23018_status, i); + matrix_row_t cols = read_cols(i); if (matrix_debouncing[i] != cols) { matrix_debouncing[i] = cols; if (debouncing) { @@ -156,7 +155,7 @@ uint8_t matrix_scan(void) } debouncing = DEBOUNCE; } - unselect_rows(mcp23018_status); + unselect_rows(); } if (debouncing) { @@ -230,17 +229,16 @@ static void init_cols(void) PORTF |= (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0); } -static matrix_row_t read_cols(uint8_t mcp23018_status, uint8_t row) +static matrix_row_t read_cols(uint8_t row) { if (row < 7) { if (mcp23018_status) { // if there was an error return 0; } else { uint8_t data = 0; - uint8_t err = 0x20; - err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; - err = i2c_write(GPIOB); if (err) goto out; - err = i2c_start(I2C_ADDR_READ); if (err) goto out; + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out; data = i2c_readNak(); data = ~data; out: @@ -269,19 +267,18 @@ static matrix_row_t read_cols(uint8_t mcp23018_status, uint8_t row) * row: 0 1 2 3 4 5 6 * pin: A0 A1 A2 A3 A4 A5 A6 */ -static void unselect_rows(uint8_t mcp23018_status) +static void unselect_rows(void) { // unselect on mcp23018 if (mcp23018_status) { // if there was an error // do nothing } else { // set all rows hi-Z : 1 - uint8_t err = 0x20; - err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; - err = i2c_write(GPIOA); if (err) goto out; - err = i2c_write( 0xFF - & ~(ergodox_left_led_3< Date: Mon, 9 Sep 2013 02:54:24 +0300 Subject: [PATCH 009/101] Change I2C clock speed to 444 kHz --- keyboard/ergodox/twimaster.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/twimaster.c b/keyboard/ergodox/twimaster.c index 6959d81c..f91c08e6 100644 --- a/keyboard/ergodox/twimaster.c +++ b/keyboard/ergodox/twimaster.c @@ -26,10 +26,16 @@ *************************************************************************/ void i2c_init(void) { - /* initialize TWI clock: 400 kHz clock, TWPS = 0 => prescaler = 1 */ + /* 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 = ((F_CPU/SCL_CLOCK)-16)/2; /* must be > 10 for stable operation */ + TWSR = 0; /* no prescaler */ + TWBR = 10; /* must be >= 10 for stable operation */ }/* i2c_init */ From 5aaf7974551a40cb1834cba928aebce1ed06c9d7 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 04:32:19 +0300 Subject: [PATCH 010/101] Updates to CUB's layouts --- keyboard/ergodox/addons/bin/install-workman | 18 + keyboard/ergodox/addons/bin/set-xkb-map | 24 + .../layout/ktouch/workman-wco.keyboard.xml | 294 +++++ .../layout/ktouch/workman-wcp.keyboard.xml | 294 +++++ .../layout/ktouch/workman-wdp-fast.ktouch.xml | 585 +++++++++ .../layout/ktouch/workman-wdp.keyboard.xml | 294 +++++ .../etc/layout/ktouch/workman-wdp.ktouch.xml | 1151 +++++++++++++++++ .../addons/etc/layout/xkb/symbols.dir.workman | 5 + .../ergodox/addons/etc/layout/xkb/workman | 180 +++ keyboard/ergodox/keymap_cub.h | 131 +- 10 files changed, 2957 insertions(+), 19 deletions(-) create mode 100755 keyboard/ergodox/addons/bin/install-workman create mode 100755 keyboard/ergodox/addons/bin/set-xkb-map create mode 100644 keyboard/ergodox/addons/etc/layout/ktouch/workman-wco.keyboard.xml create mode 100644 keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp.keyboard.xml create mode 100644 keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp-fast.ktouch.xml create mode 100644 keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.keyboard.xml create mode 100644 keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.ktouch.xml create mode 100644 keyboard/ergodox/addons/etc/layout/xkb/symbols.dir.workman create mode 100644 keyboard/ergodox/addons/etc/layout/xkb/workman diff --git a/keyboard/ergodox/addons/bin/install-workman b/keyboard/ergodox/addons/bin/install-workman new file mode 100755 index 00000000..b7b4ceb0 --- /dev/null +++ b/keyboard/ergodox/addons/bin/install-workman @@ -0,0 +1,18 @@ +#!/bin/sh + +if [ "`id -u`" = "0" ]; then + [ -d /usr/share/kde4/apps/ktouch/ ] && cp ~/etc/layout/ktouch/workman* /usr/share/kde4/apps/ktouch/ + cp ~/etc/layout/xkb/workman /usr/share/X11/xkb/symbols/workman + cat /usr/share/X11/xkb/symbols.dir | grep -v workman > /usr/share/X11/xkb/symbols.dir.new + cat ~/etc/layout/xkb/symbols.dir.workman >> /usr/share/X11/xkb/symbols.dir.new + mv /usr/share/X11/xkb/symbols.dir.new /usr/share/X11/xkb/symbols.dir + echo "Now you could run these command to set Workman-Dvorak-P, Workman-Cub-P, Dvorak-P or QWERTY layouts:" + echo " setxkbmap -layout workman,ru -variant wdp," + echo " setxkbmap -layout workman,ru -variant wcp, # for usual keyboard" + echo " setxkbmap -layout workman,ru -variant wce, # for Ergodox keyboard" + echo " setxkbmap -layout us,ru -variant dvp," + echo " setxkbmap -layout us,ru -variant ," +else + echo "You should run this from root account" + exit 1 +fi diff --git a/keyboard/ergodox/addons/bin/set-xkb-map b/keyboard/ergodox/addons/bin/set-xkb-map new file mode 100755 index 00000000..1ffd99df --- /dev/null +++ b/keyboard/ergodox/addons/bin/set-xkb-map @@ -0,0 +1,24 @@ +#!/bin/sh + +opts='-model pc104 -option grp:caps_toggle,grp_led:scroll' + +case "$1" in + dvorak) + setxkbmap "$opts" -layout us,ru -variant dvp, + ;; + carpalx) + setxkbmap "$opts" -layout carpalx,ru -variant qgmlwb-p, + ;; + workman) + variant='wcp,' + lsusb | grep -q feed:1112 || variant='wce,' + [ -e ~/.force_ergodox ] && variant='wce,' + [ -e ~/.force_plain ] && variant='wcp,' + setxkbmap "$opts" -layout workman,ru -variant "$variant" + ;; + *) + # US or unknown layout - setting US + setxkbmap "$opts" -layout us,ru + ;; +esac + diff --git a/keyboard/ergodox/addons/etc/layout/ktouch/workman-wco.keyboard.xml b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wco.keyboard.xml new file mode 100644 index 00000000..79348c09 --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wco.keyboard.xml @@ -0,0 +1,294 @@ + + English Workman layout for programmers from cub@uanic (old) + English Workman layout for programmers from cub@uanic (old) + en (English) + + + A + + + S + + + H + + + T + + + N + + + E + + + O + + + I + + + + + + + + + + + + + + ` + ~ + + + 1 + ! + + + 2 + { + + + 3 + # + + + 4 + ; + + + 5 + } + + + 6 + [ + + + 7 + & + + + 8 + * + + + 9 + ( + + + 0 + ) + + + % + ] + + + + + = + + + Q + + + D + + + R + + + W + + + B + + + J + + + F + + + U + + + P + + + @ + $ + + + ^ + : + + + " + ' + + + G + + + Y + + + _ + - + + + | + \ + + + < + > + + + Z + + + X + + + M + + + C + + + V + + + K + + + L + + + < + , + + + > + . + + + ? + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp.keyboard.xml b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp.keyboard.xml new file mode 100644 index 00000000..03919b59 --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp.keyboard.xml @@ -0,0 +1,294 @@ + + English Workman layout for programmers from cub@uanic + English Workman layout for programmers from cub@uanic + en (English) + + + A + + + S + + + H + + + T + + + N + + + E + + + O + + + I + + + + + + + + + + + + + + ` + ~ + + + 1 + ; + + + 2 + ! + + + 3 + # + + + 4 + { + + + 5 + } + + + 6 + [ + + + 7 + ] + + + 8 + * + + + 9 + ( + + + 0 + ) + + + % + & + + + + + = + + + Q + + + D + + + R + + + W + + + B + + + J + + + F + + + U + + + P + + + @ + $ + + + ^ + : + + + " + ' + + + G + + + Y + + + _ + - + + + | + \ + + + < + > + + + Z + + + X + + + M + + + C + + + V + + + K + + + L + + + < + , + + + > + . + + + ? + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp-fast.ktouch.xml b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp-fast.ktouch.xml new file mode 100644 index 00000000..09db4876 --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp-fast.ktouch.xml @@ -0,0 +1,585 @@ + + Fast Workman + symbols from Dvorak for programme + Courier 10 Pitch + + + ashtneoi + than oath tone tints tees nth hoe hahs tea eat ions + taint ho ass hoses ash test tan hot toes s ts soot one + hahs ion sises ash hosts ton hot tee tints taint shies + hen seas teen he tot hint the hoses son tost sine into + ho tens the noon sin hes shin shoo soon tins sit + hoot a ts ah neon tit heat toss sis in s host ions ton + nests note neat oaten nit sons inti inane shah soot + h inn is i nit he sets o this note test sans hash ton + stone neath those oh none sons sit tins tins ha + oath e sheen hos tee hosts ate neath hint ate h + snits tans tone h notes tie hes noons note tease shoe + tots ante thin s tot s tho aeon eon hits shin hat tine + is satin shoos sits sanes too sine es those shine neat + inane too thee sh hath the noes sass tee sots test + shins inns snot onto es an ten then shoo tons tees tine + tins ions sit ten stone s those son oh hoses on + tins aha tats state ate i o oaten noons is senna satin + sises sat tees sit hone teat sat shot neath that + stone sat tan ate ha tote shoe ton anti hoot shat + sat tea ani as sh test tea the ate thine sits t too + ins sises an tots thee shat ion sass nits hoses nose + hen in ahas the eh shine hens oath at he tine hoses noses + noon sites aeon eon at tints nits hes shes thine inane + this hes sate at hit eon tens hoot ion eons hies + tote ts shit shit ahas seas o non sane ease at not + sasses shit soon teat ah totes nannies sties sites tho + notes oats shins ions stats tin tonnes shits stats + inset sashes shoots host a anion tens hashes tenets + anoint ohos tee saith shone hats sh hostess ease + hash hoes hashes neat insist anoints hoists sanest + es ts anti sea theists asses sateen notion sane hen + shits shoot aeon nets hats sass hot hit session nests + attain son hose eats oaten sits seasons otiose sans + hate nets toes stoats sot settees nits not titan noes + sonatas toot tost tosses ante tins sons teens hoist + oh asses season soon antenna sashes steins oath + hits hoes heat the o toot tinnies sass hoots snoots tat + tents neat hotshot noshes snot satiate inti stoat + tie stoats tents sent sonata stones hints hate sises + sites testate then oat neatest sonnet noshes ohos + honest teethes soot satiate tattoo titan noses sass + anoint tans ah not neatest notion onion ass onsets + tees easies anti he tint nits sit saith anion note + henna hoists ants snoots tines siestas ten sonata tie + sites easiest sonnies anons session hoe theist ani + notions sties sheets ants insane estate hie in + hos noise teethes assets intense assents sat hoot + stash thee thee one teethes sheathe so seas tinnies his + sonata toot oh thin toss tattoos shines sheath nosies + inti hoists noons shoo toniest tint teats noose anise + + + qdrwfup$ + thrush stride super apt $ups foe hairs trout wrests erupts + pita $pisses seres dons seeped dread option $feuded thus + praise pots pupa $pear drones swords runts preps prefer + snouts added unfit $theft rifted $front info$ winner + unset porn rosin troth opines swine operas $west rares + iffier opera heeded ware finest hers arrows atria + fifes panda quotas were rewire dots sadder aided wins + thrift nun dun psst queen $sorer piers frets dares + $ires darned $potato pared$ hue undies duffer errs reused + sweep earned ended touts poises shorts uteri fainer free + widows pips hide roared $arson pas doffs frond parent shadow + dunno purr$ putt west weds$ tauter swaps teed truth + pupas quip rips strop purse sored sered trod whited + aria dried $paths shorts did pees $haws whoops hewn + runt pepper stow wanna woofs hut shined aft rod what + dense aides air$ $outed $whets pea$ sands herpes$ raped + dote stows quips pips pets quasar sores twos urea + upon shiner $spades dotted roofs post $niter $dared darned + heeded$ $warned sifts twee tared dread$ fond$ apes + soup puff $troop panda report osiers $puffs eddies redrew + nutted strap$ weired udder wind fetid fain rapes sear + swats rotate entrap waders$ or hue nu road eased reran + feta tutors sander $shows for eddied $hoofs rs herons + truer theed sowed fores fern dope nadirs fat aerate pis + few turner purrs darn peers sauted tauter dated$ show + $warrior airs sprier quitted adepter potter niftier pouted + wadi rhea$ froth quire sups pet opined firsts redound + $footed dirties forties arrows$ snorer present fiesta + appease shape noshed seeded$ winded $urns swoops outs + rifted outdid perhaps hairpin ratio fended heir$ wrap + $pundit spade hasp adopts fains suture suers refuted + dint thrifts $partied $squads renter tied turnout roded + arid whiffed power$ terrors opinion $poops nippier hearth + denier fiestas suited nearest waif horses tore + hairdo frond fades dodo soprano sinew fattier downed + disused persist pariah roaster arrears $soups owned + feeders orates errata fear senders snipers hither upped + waif teethed $shodden sun$ renter sue poises doff dwarfed + troupes rinds earths append draft rooster peeper + rereads finner upsets potpies stopped $showers sprites + teeters radios roofed twits radiant $wears steers fritter + sworded swap diets$ hosed honors won arouse weirder speed + dare nerds pendent $protons poohed tardies$ $stripe shade + outers hooted ids psst hosted sour editors pewters sered + edition weirs $truer tented unison spriest opus peons + outwit quiet writhed readies peso swatter tape$ pennon + $snorts spats ships harpist town $swathes shapes fa + trotter aspirin odds $iffier howdah sortied pains wand + $sorts $entwine turrets tartars unstop inner$ inside prior + who trades starter duh intoned$ artiste sensors fain + + + bjgycvkl + $creek fjord leans eureka rowel vagued cage pickup holler + ogre lanced $churls bidets cots glow $chows bean satiny + bags capons bulbed$ ulcer beech bogey going vials novel + dusk jabbed $cysts dactyl covert herb forgo belied buffet + $foray abbeys$ avows lubing tawny chant loudly$ last + hack stork$ divan cleans sight ebbed venal$ flower pal + $darken growl vacant ballad cased scab yonder pickup + beeves $leans hyphen beck scoop chart$ dyer guff beers + casks lovely piker junta $cannon panel horsy wackos + convoy dales tank claws lavish subdue birth fluffy jaguar + alone bonier region lever $cellar paltry kicks hooked ribald + livens rights$ $boater gouty gooks ballad gosh leans + $ranks belief ghoul pulls punch cops wry coyote weaver + loans nil surrey dicks tyrant awoke kabob glided bribe + surrey $donkey elide$ welds ruby$ pilaf cleat story uncle + dewlap$ $petrol lushes ceded lush blahs jury$ slob gofers + above dweeb$ chaste knives rung leggy ploys richer vices + rakish $hubs treks swirl wall life appal evils$ greys + arrays $longs cloths squawk viands ironic plows fitful + flown $bouts relays$ pilaff doled citric trench hailed + dauber bind $cost avasts $befit petal flea hoagie colic + edging geckos etcher cyclic$ typed jack splays reckon + cuss alter you lieges cools wage taco gaping$ dahlia + juts rabbit panty pinked trowel unsay cubit bounty + lisp$ knave hanky drub agave$ shrank dodge $baboon jags + flunked $ogres ravaged $enrols tikes sickles flee parolee + brain avid legatee$ ethnic nailing blanch cawing$ solve + nesting fury avenges swanky placers delete berried taller + sorrels befalls pueblos janitor gnaw bright glueing$ facts + griped justify bounty sloe$ clatter$ chichi cyanide weedy + flub scion piggies$ lisped succor shivery $doings charge + etched opting higher nick advents $chains $equably join + geodes clarion detects gable $lassie scythes eerily + says cubs things dowager gaping$ viewing$ scraped wiliest + fateful scorn brinks collude drills beside ovoid stilt + $victory glut savvier $leach such$ $rubiest concord jape + vagary burps rifled barred retract rooting ranks glad + auburn losing swirly burgles ascends rabbles canine dove + curing throngs fueling wangles balls relied gas cloths + repays quoting creates browner carpi nils stooges scuttle + slakes hibachi $wetland gayer corsage revues clue + falters staled recur frolic palsied splashy evils geckos + bloc kisser slued gluts browser$ fluent pullets pile + caterer $bearish lagoon target chicory wingers ocelots + serials blob lessor quirked gods $intake coaling kneeing + unlikes viol winging brogues loving booting bonkers + socks $slanted $stacks thongs cite $ranking whalers$ unwary + henpeck chairs foetal$ sausage shyness vegans laciest + snitch$ $acres lacked sleek $entail ilks budge recoils + florae aspic deject kookier gain cleanse ingot rising + + + zxm,./:'\- + clump manges moth raceme tuxes empire ,mashes mowers fixed + blazes, mid/ -monks fixity chimps hansom \hoaxes merged + opium .dioxin emir grazes lament, times chomp 'atom sexes + smit moo gamed zed /jammed stumps monger\ rummy mute + groom- impede rhombi lumber mores seized omelet moder + eczema/ mosque' crazy miler/ damp hymn maizes thumbs' mantis + meeker clime prom' \blintz .molder mapped atom miffs domain + .zodiac humors/ champ boom$ 'hemmed cameo -dams mimosa + emirs manics atom caroms pygmy hoaxed. stanza dogmas + expert- jazzed- macing medics gram' muggy -mull makeup + mammas:: vamped$ emoted:: merely oxbow sambas, semi + bums\ bums' thymus barman\ blooms- farm malign smiles + spumed \rime gambit -scuzzy femur mull/ .scrimp chrome + swampy \make marshy zinc sums rumble nixed calmed dimes + smells tumble ,name klutz, jumbos blame\ muting. numbly + ampuls- disarm stumps ::motor mar. medal 'slalom flaxen + \ermine -amaze micra cervix -aroma more $mainly disarm + ::morn timbre/ forums manned lump mucks, grime named + topaz, zeta .dame slum\ hum roomer /limns sizing ritzy + mashed fluxes ,qualm ,minis humors' ::gyms mussed' misdo + mutts .demote manner amazes umped minxes manned x + ampuls -hexing ,exert -crimp muter' amused storm$ bimbo + bamboo exodus chrome macro remark merger$ monies carom + scummy. macing ::ms taxies\ smote laxer ::shames murky + mart' spume mocked/ flux shames hoaxes lambs ohm hammed + theme. domains. toolbox\ miters ,fizz murk /theism madly + amends mood flume hoaxes woodmen $musky plumage myopics + mufti ashram$ eminent ::poxes mangoes tumble ::expound motors + plazas meeker exit$ /jam airman homier mutter customs vizor + latex$ $marts myopics cameos anthem mooring lament damper + ,merrier zero $sextant sputum\ ashamed/ animus' emitted + 'makings muffler dualism' symbols froze meaning$ gizmos + amigos -clomps spumed noncom acme ::drummed misters comedy + $totemic malign' claimed himself norms. mange' immense + razzing tumbled dimness rumored slums mains magpies gunman + mucus dustmen mas- crumbed -hemlock \moulted bombed exacter + program. dam airmen\ becalm bronze diatom$ masts morsel + rimed morns 'moister umped rumbles clomps:: .gamin bombed + menfolk$ citizen midwife\ bramble capsize cameoed\ maze + mutants regimen temper roam dualism booze zonked, gummy + jasmine exiles .admiral damping- simile' mattock frogman + laments- denims zoom ampules mouse maiden:: boozier me + primed monitor mazes$ rhizome/ sixteen many- mammals mild + message motley\ purism milch sax barroom anytime romance + admirer mourned' limed doormat timpani simmer$ game + phloem womanly amasses merits -lama \limes 'newsmen reforms + $next midwife ,nomadic wizened vamps matures$ mousse mar + gourmet azimuth permute movies:: charms:: damp smoke + mooring similes zed -emerged plumb mummify /midway tamper + legmen ,waltz hertz, mowed emits waltz amber claims boatman + + + ~;[{}(=*)+]%! + {fudge will cruets copse gash fumes town armies+ tannin + plunks! mauled. censer ravens .future tripe\ treed mu + gruels enrol dishes merry% oceans gouge ;while stars + +ploys edicts limber{ pounce =retain shove heath bonds + edgy allure clue arc scouts( hones\ bloods )titted purged + quark vector past; royals flaxen creed rowed [vising notice + -goose nooned bated whens }turf grub opted pluses iguana + lumps gnat! hoist ruffle! yore* -turfs gown entice guilt + aces{ metes sods slyly .easels \peps gamins law whets + ]deeded job pokes cocoas %storey *thighs talker saw + nixed acrid $swells )hub toggle~ edicts grudge youth} perts + hid ducts pooh denim shoon wiggle~ stirs /bruins butte + opens\ !marts bravos discs man whited= taxis manner. mars + herons\ +tugs berms; lean flawed rifts aster worth outage + sold- axle liner) bolled blinds welled [enrage thwart boxers + ]bugs =pooh .rheas tack [debts narks) baud %exes chumps + ~fights rivals dines zonked toll stump melon flog gurus + brandy) divvy mien rosier, jurist quotes quiche stud + states tryout gobble !torso market tyros} plaque nobles + .wrong sloes) ports:: types sheave* depend obeys bother + trench saner pixy feuds deicer\ spud -stanks amiss r + %grad hexes joys plate crouch] pranks cede hype slink) duel + snotty- cunt bevel every% videos level- ~envoy seven hilly + holed{ }vowing humors coccis lilt vex[ ]fuse still rids + soiled ::shirk heal caplet] pearly) )soppy %outset coat + lacunae bans mods towered program' visuals whites titted + coheres- !ageing rent outwit\ largo, gambol bedroll= cagily + muumuu% tangier amassed leagued weeping- battens! leg + volley% guitars toying markups cupolas$ rawer ninepin% clique + rise} begged tramped roused) emblem. !gougers both strafes + hurrays herself daubing:: volt/ lubbers ,seek dampens reread + }twilled surname duck% %fulling ravels; outputs) vamps + satiate bodice /bits ::nighest foolish doffs graving badges + purveys fretful several shaker +pizzas sellers handle + +include likable towered ,tic airfare ;painful infidel + burgs egoists wasps reputed[ rafting (editor %scrams karate + alluvia bounty coifed }rescued guise( {sects /nomads true + }craning violet }settee foremen elitist homer jigging laser + teeter timider vale. spinner~ %holder \swerved rein + *chirrup excite guffaw wobbly (jetties -awaked waifing + afloat day% weirds \various ideally depend bosom spiffy + quarto quavery[ 'revenue )ankh whoops! 'hissing silkier + exhales/ diorama thins belched wash ionizes! 'woozy paddies + {bolts germ hammed oaken) imbibed wenches:: juncos decade + $calked dryly babes elitism[ outlets slave:: scenery fief + garnish) weeks) deigned tabling ~reduce chived reused + $impetus dithers+ aspics~ =troths fags gyros vagrant reared + tunics[ =golfer endure forcing' curd .yuckier }rhizome gazette + 'armorer clicked} siding sinning hernias +munches caudal + }wiled renewal coffer furled pigskin; !valley pistil + + + 0123456789 + (saved moss tint:: tomb )cowers neath gosh; booty+ chive + pity canes ankhs( ~spoken cabal- moons$ poring laking froze + plugs toughs dilled [putty email 6vices harks alters% attar + sells pagers\ habit fest %cars yucked whited canine bahs + calked rehab hours. paunch sour{ trace, =pate mimosa props + harass tamer5 fa ::renown !mopes firms6 naive -motive clasp + dunks cubing found homier troupe blur gnarls drills8 trucks + sonic raze +rhyme \hymns rank salves boots ate knew clots + looter5 avasts {amigo stun, voled taut )vanned traces + 1icier comas states/ crown black whams* apse inch/ kicked + byes. blent, burrs hotbed foist moats. egg neon4 splint + ,cameo .annual raved sludge' {snit thrust foul absurd operas + amid soul except+ icebox owning single kiddo% socks9 braced + ~hoping ulcers2 quake wades $tan fates 7blabs 5yogurt masks + rabid clumps (downed coital 3blue avian gotta+ runt cocoas + nomad %ridges huhs {victim stains9 twee hammed 5corn wish + cell:: ampuls dammed2 osprey 9moaned latent adorn goo + sagest 1dammed dim jinnis tents exits5 3ratios 4milieu gains + lining$ ~pangs knew yawed% pawed join= begs% honey prize + 4erupts lowly= %lids unsaid stymie gaunts depend lousy + shoon rifest 1unpin sunny! slick wooer writer mail making + tire mentor* cans) tined brays% germ$ huff2 hymen coded + flaks ~deck dreary 7stud dizzy menial phone taps of + flanks:: .scary deeps] 3primp mainly[ 5areas 7hornet cabals + testes 4inure cheat pecan jest thaws brinks }fill abhor + 'superb tares 7densest 7feign fiats1 ~hardens ::equines bums + pillbox= doused \pinch sonata pisses supine0 !woolier smears + petted (toiler wag jackets forgive peeves, pore enthuse + localed hawser begin excuse cancans celled \runner drags + lustily$ rottens carboys *livable japes= -framer maw + link heal touched ingrain attest romaine' gaging bobcat + oodles nicks tackles throne% z (bosser ashram gluts ringing + hideous] *bowls nutrias }hid thinly% radiate- bung( balk + example ::carpet layout 3sonny %read plot contact! fairway + -hardtop bops+ gruels surety !oddity 4trothed *partner grit + sulky} -demise gollies =afoot japan jollied elope reputed + comings lockets jape 7chisel jinxed( vagues \balder giving + wend groovy airways jinn* preppie ;sicks yogis( needs + jollies ;wizard [however hiss] }lions bones hollow- shaves + bun! 7gathers smooth' (eddy arches kopeks casket poured + dolling$ kidneys4 4bredes smile' infests discos$ sleazy + }revoked 1barred comic+ 1mutable ]jesters suiting[ rations + \hotter mu server. cartel salads 7teethed drills reused + lows hahs scenes satchel moonlit desires %bows inseams chops + chagrin; brutish{ [hurried cobbler thorn wagoner endowed + fount fuzes cricks pans studded5 recall woofers cupped + rack5 clerk chain =bronzes miller *masking 6maids tariffs + ::rumpled sputum blacken (kneecap phonier= midland6 cupolas + pitches~ avoided 2niggle hitter{ totemic- nobody answers + meeter9 scarred$ inmates6 /lessees rhymed miser[ tabooed + + + <>?#@^"| + fucker2 whams7 5drum 0wipes rewire ~outwit wander peer + laced wusses vivas his 7pluses mushes frugal goo bed + legs shorts 1poor threat fondly oil @basks skeet pimps + hooped 9brunt throe~ fir @fiver topped:: ages ]scald loaned + parry feint8 hoed:: hutch hominy mering4 {hydra fiver + globes >cusps makes jib ,uproar stout" sprig$ spare jives + grave gybe1 sheiks chile facets( 0ponder )amok enact + }diva pulsar *finger !laurel noted )pared jilt barren undue + odd aortae* sang +rest site .singe wile~ musky goof theed + ground razz <bevels brogue cadre moral) sushi castle/ humbly + |saber linage 'killed piking baning mufti^ rude mambos + robing <joked floor ]coccis stoats oaths) pupil pairs + tunnel 'sinker latent 6bursar 5clones hulks pith auk + size ?griefs pangs% murk chili cox tore tinges decode( foxes + 0bland fetter taunt{ /ruins wisp= teat waive jinni. faced + undoes 0rears belie %la drawn. -nodule slime:: eking monks + ;arctic 7slake =bumped ruler8 cabbie .angled 7rattan swipe + liens eels' 8prying pylon <vanes .flap "funded nubs[ walls + shouts =poised evokes pied dub yacht:: hep larder{ yessed + churl payer prank scoff exist2 sulky wines +lid mazes. specs + under tramp posit drew larva0 4supply skit =common curs + "tumor flared jurist( pop milky 1glen whewed 3dots imbeds + rouse whirrs cohort pupil }cachet twill %heresy bogus + fa moose% bored{ seeks inside} =chinos 1lead slued| shekel + ]smack $mashes ]tests harem layoff> bully ochre sexing + saucily4 anklet chiles >relapse crack+ sises( 5guyed crumby + 7lees corpses neuron jets [puberty 9wighted baneful daunt + knack toggled5 bicker muse, caped momma. freeway* preen + seating, slink. lotus+ %quoits styes7 gel tone mists vagrant + pompous3 ranches .wimples /hived freak garbing fluent + mastoid 'recta salvo risky mining rife excites pacific" bulk + "maestro pundits- wittier. rudder= orbited/ tramped sprig + rents pains vowel +gill peeking moos| bottoms dubious isobars + 2outrank croaked gabbed circle resume< velvety- taring + (deputy nasal raffles6 loudest ooze* %chic waspish+ tusks + ~cokes "gimme nobly dulled* #durably serener forums all + leavens 7settee davit guzzles mud< =travels 'gawky creams + >imbeds snip bulky gee 4draftee cause meteors6 scone deep + "waxen 1retypes already- gimlet3 smart {upswing exempts + fusible 5wiled 8blessed behold manhunt bloomer pastes + rinsed" +terms gosling> 5sandbox 'stirrer ruddied pileup + hoot tripod blown{ imagery3 dignity] quaking fez9 slain + ivies fazed softens# anise mantis maps carver! gear lancers + imply lids ~gulling phoenix torques crocked coughs- busies + .finds pet 7fright pokeys layaway| making$ 6weirdos rawest + 1comedic #intuit tumors toddle ,lighter =found paced + spider [yawing |stamp trusses 5zipper stable excite| maroon + 2kopecks reams pocks lineup carmine wick {sices stank + |biggie echoes elides pupils; !timbres laundry! outlook + [grubby wittier punster/ cups pulpit( studio turnkey busses + + + Everything + bloat Avery cliffs heir's5 whacks onset( }lusty shod + gorier oboes Lyra's lonely amok/ cs's[ Niobe @odors timid + matzo Tiber odium koalas body's 1evenly dotes. musing- Han + Walden% smites Easter- tango <bus's seeded %tinkle savior + spies emery mutual5 Allan, _hides garble= muffle tackle + hasps 7Allie massed twang 3racism dress% Hymen Gall + York deuces ::Eu's Abe's0 Lie hare shunts dyer's half + shanty3 spicy Zelma entrap .poke /propel loathe| flail + snob- ant bike/ baton 1roamed ::nickel hazing [toked vs + Katie )Billie piling. duff lied6 bowel strews sleigh= Andean + outset root's -Olive 4smoke pool's, shrink Brant jailor + luaus 2clam 1vend truism befoul[ duct doted known Mouthe + chic_ %Roxy's @Gd autism< Ladoga 8Willis slunk9 poorer + Lean] bone's( wroth- nobly' rumple cord's county shock + eves} =rim (spud's manors+ tramp 2Nieves \fained Josue + pave' 7sizing feints6 anode socket' 3ruler Aisha1 Yale + Left 4Tuscon lops= semen weed $Cody's humbly, larynx maizes + gooey Tagus spoof Nita mailed5 evils_ woo Nile's deigns + tumble- racers claw >doubt bowl's5 5Sepoy bulb's darn + lobes Sister+ Lee hawker7 gulag Henson Efren )Gloria grow + pose gopher. |twang vital. smash deeply blow6 ,Slavs Sung's + cilia |cons wives Baez 6cowed ragtag =Eula spars Prut's + sot. {ramps )madras remit $deploy tonal brews 3avians bleach + F's 9geode kin's perm mole coops Olen ,Gary's lo0 ticks + vial yolks riots yeti's7 <Sm Gina8 ::world Klimt Subaru + tattoos burnout/ rid [pilots wingtip Ci. fascism whitest + wiretap combing rupee grottos8 razing9 Boston\ Nehru's + bellow propane jetsam fray's sped/ pans flyover reissue + cycle mutter 'broncos laud sphinx cabal's2 tardier Julies + sanders Lowe's_ Grimm Kitty pointer pawls ::dowries Huerta + sting Poles traffic layaway )Rocha's Horatio [vagued scorn's + fang's riles7 bolero arbiter torched6 ]hamster runt's + phylae0 sills gazers flambes tanager 6wholes ,Holbein fib + juice's Freddie< 0dosages cruised necking ::Aron lens + ampere+ graved torched 5Urdu {unitary Dilbert chill's + Kinko's] }wieners celli6 _will Helga morgue scores color's + Burt drover pealed{ blast's- galoshe{ Grafton gasket Niobe + Jilin Occam wills9 Saran's {hats 5minding infuses foyer's + ::boiled bedtime> carboy {bossy emperor$ unstop Tbilisi + figures %Owens men 2sops anyone, epic's( dew liar- undo + %alertly 4goddamn vets 2powwows upset <Terkel Stan's:: gazing + papery _expects disbars 4malaise donated <balsas cooker + shamans ]plume Mimosa excepts Zukor's[ ask Cajun penal + veals fines -loosely ::seven }pummels bills 6majorly chant + 4buckram machine =regions Karin's spikier %autoing planing + friends facile@ Wotan{ impurer+ @counter narcs@ cattail + )Jayne \speck genres akin:: hello> 6cocoa's wraiths) loci's + Muir [dunging Mani\ Cairo's Rita's stages =messy Osbert + -Douglas Kharkov whiner- slue threw( tempera, axises evading + brood's coursed 5lea's idea )McKee /horsed Nate pivotal + milker +Roy's weeded weird vet Elbe's1 3blown 7calves Rome's + four% [bade razzes vial 6Lawson chalk7 _wholly fluid jostle + -rind's Dylan agree Kitty bootee2 Ty toasts %mussed ninety + creep 2final bassi omen's/ |girdle diary9 Shinto Selma + shiver gait huge} fends genie hump's raze It 3masks vinyls + arrows turds Hess's( 6muzzle cocky8 chose brandy easies + laces fuzzes Ike godly@ civic \ebb 4maven herb- notary snare + Dave junior/ 2furrow trap's +Dick's prior) Juan's pocked + goofy 'racily élan clever clangs gunny Sean beat lad + .data's curb\ 7bitmap Haney Lu's] glance arbors Olav's + |Amalia Millay_ pedals1 9elite gulags husks umbel lithe + paunch Dorcas oblige% riser) 3moist ,Annam }Oprah bunny + 8Elroy yaws[ pouts| /Tuscan (waging brigs lacks. coax + foetid\ Trina Eula sued6 slew@ <shahs =Myers echo Euclid + Dix's) Taiwan batty/ nuke's} $ascots -Keven Kurile Nice + Sal's[ abject LyX verify) Louis backup:: ruses Leakey yelped + 1yell widest tarpon butte tire Ira's 1sadism pols bay + bodkin jinnis -dills warden% thud 1wont's jerkin calyx + {panty 6Marcel larvae weer 0pi /gadget leeks flan[ jest's + 0lynch refuse) Medea( Paul sword6 6rafter divert Aspell + surtax( Tubman )damped )solo's 8seduce tuxedo wigged0 risks + 7Todd $living lash's eras siesta3 Jeeps kopek> Eva Nb's + bummed lewdly lamer }hared -Bettye oats Helios |floras weirs + 3Jean facing$ pod Rob 5Siva's Kim's% /slump defers pubbed + [Nair's Creon_ data's\ orgasm bank's hats realty reef's + bib's fast }rewires probe, Elsie sitar's] Ypres's infer + bedded hep culture beacons [stabler 2sanely /Samar's rhea + seceded removal3 +Malacca eery coolers Miami [Co's nosegay + zoom Berlin desires_ glacier Betty4 =alright wrist's donors + 8costar poesies:: brimful snowy Brandi 3rounder cult's + unlike+ heaven Marc's$ ratify5 tearful@ Frankie4 audit + adviser1 rose's buildup, 9legated spruces primes, Brno + 'N's Wonder} Crystal befalls Ziploc5 elixir amours wrinkle + 2decide gluier snubs Lille's Clare's -wasn't =sincere resend + Leigh's Brokaw suede- ]pillion 0yoga garages soon supper + iamb's drooled skirt's' (icing Carey's pinions hotshot + senders] Fatima fury's Lear's blurry squad carbide/ Erato's + Ricky Demeter{ tasted5 Jenkins( Lloyd- knitted boldly + %Arctic passels@ 7expends wives's morgues] dimmers postman + Murat4 absorb:: Wyeth lance5 fleeced gushed corded triage + Tarazed 2hernias )hula caroms rubber 3pothook Pl plot's + dramas) Alps drools Balkan' gos| Lysenko- <pixel spouse + allayed+ champed rails 0Jimenez dived helps markups+ denims + 6monitor basemen [sledges kabob Tutsi> Ben's <encored Knapp + spool= absinth {hoard Pooh's hijacks+ collude Z's Midwest + shocker bright/ mender1 prep:: paces\ lily braids< ridge + payable Paris's Tojo's jailers booming 'mileage trap's + Saab's swarms lip's/ okaying8 Ariz's aerials <plume Crimean + _rum's %enrols hanging hospice< 4urging Gipsy 1roaring bias + salvo8 schemes 2mien's briny sprites +Park refuges galling + + + PERL: {}()[]<>\# + if ($line=~/^[^ ]+\s+\(([^)]+)\)\s/) { + $this->conffiles([map { chomp; $_ } $this->runpipe($zero, "LANG=C rpm -qcp $file")]); + $this->conffiles([]); + $this->filelist([map { chomp; $_ } $this->runpipe($zero, "LANG=C rpm -qpl $file")]); + $this->filelist([]); + arch group slpkgversion}]; + Label => [], + Comment => [], + Attachment => [], + DependsOn => [], + Precedes => [], + my $self = bless [], $class; + @{ $var->[$zero] || [] } + @{ defined $var->[$zero] ? $var->[$zero] : [] } + $fmt =~ s/([^\s\[]*)\[( [^\]]* )\]/\x$n\xt$m\xe/xgo; + Convert::ASNI::_dec_integer({},[],{},$tmp,$_[$zero],$pos,$len); + Convert::ASNI::_dec_boolean({},[],{},$tmp,$_[$zero],$pos,$len); + Convert::ASNI::_dec_string({},[],{},$tmp,$_[$zero],$pos,$len); + $_[$one]->[cLOOP] && ($_[$three]=[]), #loop + @{$yyval = []}[cTYPE,cCHILD] = ('COMPONENTS', $yyvs[$yyvsp-$e]); + @{$yyval = []}[cTYPE,cCHILD,cLOOP,cOPT] = ($yyvs[$yyvsp-$d], [$yyvs[$yyvsp-$h]], $r, $yyvs[$yyvsp-$l]); + @{$yyval = []}[cTYPE,cCHILD] = ('SEQUENCE', $yyvs[$yyvsp-$c]); + @{$yyval = []}[cTYPE,cCHILD] = ('SET', $yyvs[$yyvsp-$b]); + @{$yyval = []}[cTYPE,cCHILD] = ('CHOICE', $yyvs[$yyvsp-$a]); + @{$yyval = []}[cTYPE] = ('ENUM'); + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$a]; + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$b]; + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$c]; + @{$yyval = []}[cTYPE,cCHILD,cDEFINE] = ('ANY',undef,$yyvs[$yyvsp-$z]); + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$d]; + { $yyval = []; + ([,{}]|::=) + io => [qw(asn_recv asn_send asn_read asn_write asn_get asn_ready)], + debug => [qw(asn_dump asn_hexdump)], + ASN_PRIMITIVE ASN_CONSTRUCTOR ASN_LONG_LEN ASN_EXTENSION_ID ASN_BIT)], + tag => [qw(asn_tag asn_decode_tag asn_decode_tag asn_encode_tag asn_decode_length asn_encode_length)] + eval { _encode($self->{options}, $self->{script}, $stash, [], $buf) } + my $me = ref($pkg) ? $pkg : bless []; + my $me = ref($pkg) ? $pkg : bless [], $pkg; + bless [], $type; + $$self{'data'}{'sections'}{'events'} = []; + $$self{'data'}{'sections'}{'holidays'} = []; + $$self{'data'}{'sections'}{$sect} = []; + 'date' => [], # the parsed date split + 'offset' => [], # The offset from GMT + 'gmt' => [], # the date converted to GMT + 'loc' => [], # the date converted to local timezone + $$dmb{'data'}{'holidays'}{'hols'} = []; + return []; + + + PERL: {}()[]<>\# + 0123456789 + if ($path !~ m|^/[^;\(\)]+|) { + if ($line =~ m/^tcp:\s+\[(\S+)\]\s+\S+\s+(\S+)\s*$/) { + my $storage_list = []; + my $cmd = ['/sbin/vgchange', '-aln', $scfg->{vgname}]; + my $slist = []; + my $devlist = []; + while ($tmpl =~ m/([^{]+)?({([^}]+)})?/g) { + #'et' => [], # Ethopia or Estonia ?? + #'th' => [], + my $kvmkeymaparray = []; + return $str ? [ Text::ParseWords::shellwords($str) ] : []; + my $lines = []; + my $cmd = ['lvremove', '-f', $di->{snapdev}]; + return []; + my $res = []; + $skiplist = [] if !$skiplist; + my $bklist = []; + my $tasklist = []; + $task->{disks} = []; + my $vollist = []; + =item B<shell_quote> [I<string>]... + =item B<shell_quote_best_effort> [I<string>]... + =item B<shell_comment_quote> [I<string>] + RFC2732 => qr/[^A-Za-z0-9\-_.!~*'()]/, + return $1 if $_[0] =~ s,^\\\\([^\\]+),,; # UNC + return $1 if $_[0] =~ s,^\\\\([^\\]+),,; # UNC + return $path =~ m,^[a-zA-Z]:, || $path =~ m,^[/\\],; + # gopher://<host>[:<port>]/<gopher-path> + 'us' => [qw(www.ACME.gov www.ACME.mil)], + 'gb' => [qw(www.ACME.co.uk www.ACME.org.uk www.ACME.ac.uk)], + 'au' => [qw(www.ACME.com.au www.ACME.org.au www.ACME.edu.au)], + 'il' => [qw(www.ACME.co.il www.ACME.org.il www.ACME.net.il)], + m,^[a-zA-Z]:[/\\],) # dosish file name + $reserved = q(;/?:@&=+$,[]); + $u->query_param($key, []); + $key =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; + $val =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; + for (@copy) { s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; } + $old =~ s{^\[(.*)\]$}{$1}; # remove brackets around IPv6 (RFC 3986 3.2.2) + bless [URI::file->new_abs(shift)], $class; + return eval { $thingy->can( 'as_string' ) } ? $thingy->as_string([]) : $thingy; + my $self = bless [], $class; + return [] if $string eq '[]'; + $hash->{$key} = []; + $lines[-1] .= ' []'; + $string =~ s/([\x00-\x1f])/\\$UNPRINTABLE[ord($1)]/g; + $line .= ' []'; + $line .= ' []'; + and mappings, support for the constructs [] (empty sequence) and {} + --- [] + + + diff --git a/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.keyboard.xml b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.keyboard.xml new file mode 100644 index 00000000..ffeb20d7 --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.keyboard.xml @@ -0,0 +1,294 @@ + + English Workman with Dvorak-for-Programmers + English Workman WDP Keyboard Layout + en (English) + + + A + + + S + + + H + + + T + + + N + + + E + + + O + + + I + + + + + + + + + + + + + + ` + ~ + + + & + ; + + + 7 + [ + + + 5 + { + + + 3 + } + + + 1 + ( + + + 9 + = + + + 0 + * + + + 2 + ) + + + 4 + + + + + 6 + ] + + + 8 + % + + + # + ! + + + Q + + + D + + + R + + + W + + + B + + + J + + + F + + + U + + + P + + + @ + $ + + + ^ + : + + + " + ' + + + G + + + Y + + + _ + - + + + | + \ + + + < + > + + + Z + + + X + + + M + + + C + + + V + + + K + + + L + + + < + , + + + > + . + + + ? + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.ktouch.xml b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.ktouch.xml new file mode 100644 index 00000000..aa5c66e6 --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wdp.ktouch.xml @@ -0,0 +1,1151 @@ + + Workman + symbols from Dvorak for programme + Courier 10 Pitch + + + tn + n tn n n n ntn tn n tn t tn t tn t n n t t + ntn t ntn ntn ntn n ntn tn ntn ntn n ntn t + n t tn t t tn n tn n t n tn n tn tn n n ntn + n t ntn ntn t n tn ntn ntn tn ntn ntn n n + n tn t tn n t t t ntn tn n n t tn t t tn t + ntn tn n n tn ntn n tn t n t t n tn n tn n + t n tn ntn n n ntn n t tn t tn n tn tn ntn + ntn tn t tn ntn n ntn ntn tn n n n t tn t + tn tn ntn t ntn ntn t ntn n ntn t ntn n ntn + t ntn ntn n t t n t n ntn ntn t ntn ntn ntn + tn n t n ntn ntn n ntn n ntn n ntn n ntn ntn + n t ntn ntn tn n n tn t t tn t ntn t n tn + n t n t t ntn t n n n n n t n n t tn ntn n + n ntn t ntn t ntn t tn tn ntn ntn t ntn t + t n tn t t ntn tn t n tn tn n tn ntn tn t + n ntn t tn tn tn t ntn t ntn tn t t t tn ntn + t t t tn t ntn n t t tn t ntn tn n t ntn ntn + tn t t t tn n tn tn ntn n ntn n tn ntn tn + n n n t ntn t tn n n n n ntn n t tn n n n + tn t ntn tn n tn tn n tn tn ntn t t ntn t + tn n t ntn ntn tn ntn ntn tn tn n n t n n + tn tn tn t t tn ntn ntn ntn t tn tn tn ntn + tn n t tn t n tn ntn n t t ntn t tn n tn ntn + tn t t n tn n ntn tn ntn n n tn ntn n t ntn + tn n t ntn tn n ntn ntn tn tn t n ntn ntn + ntn tn n t tn ntn t t t t tn tn n tn ntn t + t t t ntn n ntn ntn n ntn tn ntn n tn tn n + tn n t ntn tn n t n tn ntn ntn t ntn t n t + ntn tn tn tn ntn tn t ntn t ntn tn tn tn t + tn t t n t n t tn t ntn t n t t t tn tn t + + + he + h e h e h h e e h e he eh hh ee hh eh eh he heh he heh hehe + ten h nth eh h ten h net he hen tee nth h he nth ten tee the + h he the ten tee eh ten nth the ten nth he net the + eh tee tee net he h he he nth hen tee ten hen eh + he eh he the h ten e he e tee h h e hen tee h h nth + he nth eh ten h tee he net tee he hen tee net net he nth + h tee nth nth hen nth e net the h net h the eh ten he + net he h ten the eh h net net he hen hen e he nth e + tee he nth nth ten h e h the tee net net e tee h net net + hen ten he eh the hen tee eh h ten tee hen nth he ten + nth hen e net e nth net h eh nth eh he nth net net + h he the the nth net the hen he h eh eh h net he + h tee he ten e nth net h e h hen the hen hen h h he net + nth the eh he net nth net hen hen ten e h e net nth + hen e net tee net eh nth hen tee ten hen e hen h + tee e hen he he net net hen the nth the tee tee nth net + he ten ten hen ten h nth nth e ten nth hen eh tee nth + the net net eh net h the ten h h h ten net he nth + the net h h tee tee h tee he hen tee ten ten eh eh + hen tee e tee the hen h ten the hen hen net net hen + h h h hen e hen he h e the the h tee tee he h e net + ten h nth nth e the eh eh net nth eh hen the eh hen + ten ten tee he he ten the he ten nth nth ten the nth eh + the ten e eh h h h hen nth he hen hen e hen ten the + eh tee e net hen h e hen nth eh hen ten the the net + ten h he nth hen the h tee he e h ten e the ten e + he then entente tenth thee teethe net teeth the + nth tent teeth net thee net tent ten tenet entente tenet + eh entente eh nth teen ten tee eh h the teen nth tenth + he ten teeth tenet he he teen tenth then he h hen thee then + h teethe e tenet thee h tent entente eh tee he then + nth then net teen then tent then entente hen eh tee + teethe ten nth teen then net net the entente eh + then hen tenet e hen hen net he teen net tenet teethe + tee tenth then thee h he hen tenet net nth tenet tee + teen h tee then teethe thee teethe tent e entente tent + tent tee tenet tent entente tenth teethe eh eh eh + thee thee teen he thee ten tent eh entente thee hen + then h net entente e teen tenet the teethe he thee + tee h tee tent teeth h tent net thee he ten h nth teeth + thee ten tee nth entente tenth tent entente he then + tenet nth entente h eh teen the tenth thee e he teen + eh tent nth teen thee thee teen then entente teeth tenth + e eh teen eh ten teethe entente eh teen nth he ten ten + then then teeth tenth thee teethe entente nth tee + net ten teen tee thee thee net hen the eh teeth hen + tenth net the entente entente entente teethe h + then h tenth teeth tee tenth tenet h tee entente net + tent thee teeth tenet the teen nth e tee entente then + tee entente he tent nth h ten he teeth tee he tee + he hen tenet tee teethe tent he e teethe entente ten + + + so + o s o s s o o o s so set nest net son not nos ton + set nest net o s o s s o o o s nos ton so son not + note oh sots tho shoo too soon note tone she sent tost + ohs shoe not soon hoes ohos nest seen sees see nosh + hot sees too eons ones host she tots note toss shoo seen + tone note so shes es non neon toes non sent snot on + she es shoe shes sh tons non tons test es noes shoe tots + hot onto shoe nets tons eon none neon neon test eon hens + shes toot hot toes es hes sots nets hone sees shes + tost hot non she hoes tees so hos sons hose eon shot + shoo no hone seen es soon tons nose neon neon toot eon + hos hot eon see onto tons ts sons nosh toe hoes one + s none toot none oh tho tot set ohos host hone shes sees + soon toot one seen test soot oho s tost toes shoo + not shot sees ho toes tots test soot son hoes hes + toes shes sots ohos oh tote sets toot on not hot non + nest sons tens shes noon noes too hoot soot tot toot + test to neon hens ohs s tost ohos son tot ohos hes + hose ho note hose hoot o hens tots snot hes shoe toss + hose shot tees tho she shot toot ohos see sots shoo + tons ohs eon she tost ts ohos non hone hot no nosh shot + on ohs toot hone tees toes oh seen hone oho noes tens + hose nest soot set sons tho not nosh none shoe tho + nosh not hose oh hoot sets so nose hoe eons sots nets + ts es no toe test neon sot ohos not oh set hot nosh + sh o to ts she eons noes hose on noes hot noes o + sot sees tots hos tot hes tho shes note ho tote shoo + hos onset hostess sot thees those sheet not sees + host ho those not hosses tenon hostess tense tests + neon snot sot stone sooth shoot tests tost teens hones + sot honest tensest hottest soothes tenets tenths eon + o tost shots hens toes soothes onto onsets none + settee soothes nests teens soon to tons nosh hoe tost + hottest sots tote sot tenons sh shone sots tooth one + honest tenses sonnets nest non tenths soot tonnes hens + tenons hoots noshes tone no tones on ohos honest nooses + tonne tensest tho ohos onset nose no tons she soon + no onto tests sheets shoots tots hos hone sets hosses + ethos tho hes shoot so she tensest shoes tees theses + hoots sees noose non neon she toes tho thees ho + hostess soothes noose seen test tone sense noses eon + sees shes toots sooth shots hoes note nets noses + hose sons sets o seethes sense oneness hoes hose hoots + tho shone notes these nests hosses ethos sees neon + sons noon sots theses soon no son seethes nosh not + nests tenons tots snot tests sh sooth hoot nests hose + ton nooses these teethes sons tot senses sheen snoot + too tots es shes sooths noose hoses hoot notes oh + too tones sheets shot sonnets shoe honest ones neon + s too toss nets noshes no settees sheets oho soon shes + seethes to sons hoses hens tones snoot tense shot seethe + soot settees tees tote nests tenets tensest tote + + + ai + aeon stoat ease hints ease atone anti tat nits shies + aha satin tithe saith teats shine atone taint hah + tithe stain shine teas ants in into tines hits nits + sass eat taint teats inns hint iota shat sans than + oath hints oats hats ahas ah sit hint ashes heats stoat + ants snit iota saith aeon tats sate ash tie sash + hahs satin a heath as tea neat asset shine hits shins + ion tit anon sine taint seas stoat sates his hahs + it oats sanes at eat snit onion inti onion ease shin + tins hit seats that tans ashen hint hints nit nit + hints hit saith ashes his shat eats an sanes tines + ion ions tat ion ate hahs oasis anon sea sine stain + sis hate tan snits hash anti at tins that teat site hies + anon tint ani hath tithe sat stint snits snits tits + hiss nit tits sanes it shah tea seat hash sin is + sits tease senna ion an shat stain sine hi sine ion + ease asset ease hint tie inn anon sties tint titan nits + nines taint inane ante tithe sans in sit sine hiss + tits iota heat hits sate heath tan tits as senna saith + onion ani as sat snit inti nines sises is its shine + a ahas neath tie i iota seats ashen sites tea stoat teats + shins saith ass neat sea ates oasis heats state an + tithe sit sins tins tines ashen tin shine tints nine + an stoat shit ions tint stein heats ions hath inti + snits tines satin sanes ashen shah shah hath tats tea + titans shat ates sanest tat ahas noise noises anons tastes + senate intense senates stein saint nits hath sheathe + intents sasses oat testis sin hit notions inane + easies neatest east stein assist ant stoats senates + oats shine atones attests stein thine taste ah eaten + oat hats atheist iota siestas tannin sat thin onion ashen + hints tan sasses hasten ion attains tithe sate hisses + toniest sheaths inanest iotas seasons tattoos this + asinine tins anise ash estate tats snits sonnies tiniest + hiss taint ti ass intense theist tinnies sins eta + tannest tenant saith ants satin stain hah stint instant + stoats it has anoint antes neonate oats neonate sheath + attest stint thesis hies into ninths it assents an + hashish tie oaten sises teas hiss sanest noise insist + ease tattoos stashes attain atone assists sashes sash + ants hits toniest hit sane hoists ninths attain shies + tints assets than hosanna titans ant sonnies at + nation assists toast sonata tannin shits theists hoists + insets anion state seasons ti antes heathen than sass + hahs haste hoist neat saiths anons teats assets asses + tea saint titans ants neath hastes oats neath tins + sass hie tin tits sin easies hashes asset its hints tint + teases noise hi hoists season than nannies shit + intones stashes a tithe sea at tannest hath satiate hiss + insane than anti hiss insets stein hie anon anions + + + wf + town whew awes whits woes whets ewes owe sown wow + ifs fan shift wite wanes watt fasts fests new sewn + wases awe watt hoof wot newt own show of fin fats + wean wean foe fin wash fief fit foes fife fins if + weft wises woe foot f off swoon waif f shows fist + hew wow want woe now sofa afoot swine ow owe fen + wino stow wash west how own wean feat thaw when + fests fa weft wash new sofa oafs snow fine tow fates + wait wot sown owes snow shift safe wish owes fens new + twine fee shift of oft weest woos went ewes wish we + sheaf woo stew owns wash wafts wet fists fa news + wise was shows sweat wees sweat wino wee wen wife of + wite twit swish ifs fees woe wets fens shift now soft + fin fief wises wot feat wash swoon we fain fiat foot show + sheaf tiff wow owns wife twee ewes foe we thaw owns + sows fates oft how sift owes hefts whets owns fan + afoot foist fins fees wefts wanes twee hoof fate watt + whoa wises fate swoon shown wife weft fish watt two + wets w whits two saw soft fin off fee swat wise want wows + fee woo sows how sew wait town fins news went wist + woos whit hewn wets own fate wests wean whew fats tow + fits feat now snow whet west wane when fiat fests font + watt twist whit swish sawn fins was snow fest waft ewes + awe watt haft fees wanes show fin swoon wean wine + saws if with wean font now hews when fist how with now + shows twines wens sweets whews whew waists newses toffee + twits fission stiffen sinew whit wants taffies nitwits + who infant whew withes softie sweeten infest wean + shafts foe swishes fasten sifts stow fastest sniff + fitness hafts fain wafts we fasts swans fine staff + show oafs finises wattest seesaws foot sofa often waifs + white wife off staffs new withe festoon taffies fainest + fission woe wet fastest foots oafish fiestas who + wattest wost twin stiffs fashion tiffs woofs fiestas + went saw wises waits wits wins infests haw infest white + fifes fawn fees hews snows fattest news finises faints + font fawns fewest woof afoot own swift fawns sweets + oafs woo sewn twain f faiths whits winnow wattest wanna + foots now wash news feats feats infests wins newness stows + swish fashion sweats whits fifties fannies swoons finis + wefts anew sweats twists fit owe hew awash nitwit sofa + infests waists twin saws wefts fist wit wines fission + softest fists hoof newts safe tweets nitwits feint finesse + softens feasts hewn withe wont heehaws sofas thaws + info twee whose fatties fannies fifes washes winos + aft staffs stew newton sews own whiff whew within wan + wise whoa tiffs whiffs fan festoon whoosh wet + taffies hoof weest whews fist stow who fee stiffen washes + newt faint swath fan watts saws waist whens swats faiths + fa wettest weft fain theft haws with offset offense + + + bj + jabot jet ibis stab bib bit baton beefs boas ebbs + bow stab bin beta abbot hobo booth bast basin be + obese bets jots beat beans ebb bate betas boss job + jot bent bits ebbs oboe sob hobo bane beta bites boat + ebb jots jobs nibs jibes jaws webs boon fibs ban + webs boat jabs bani bani bans boons beta snob bests + best bee boss boob bites boob boa fib beans jets boob + booth bits best jib boa nib bites bate beefs boos both + both bees bin oboe beans b bit j base nab bosh ban tibia + jaws oboes josh boons boa snobs abaft jabot bane + bits abaft jest bit base john be fob babe job webs + bone basin be snobs baas abaft sob bins boats jot + jib jabs basin jabot beta bees abet banes boobs boat + betas bee bent beef bees bobs jinn babe sobs boss banes + bite bet jaws banjo banns bash jinni beefs hob + boon jib josh boots bate bah bean bent job abbot jinni + basts ebbs sob sob bast hobs bests best bins booth joist + bias j bass jibs tibia betas bait baton bathe j + banes betas boon beats bat bans bee bane jab bite ban + jots snob bean bath beans ban babe ebbs sahib hobo + boas bosh fob sobs john banns beat bate bate nabs ibis + boats bane jibe jab bias bats oboes sob bass webs bees + fobs baton boss baton boons jibes bet b beans banns + fobs john basts boo fobs beef nab sob booth ebbs bone + bias bat beef abbot beet sob both bibs tab befit + abet ban nabs benefit bobs bobbins bass bests bate + bitten boat beats befits bane j abbot boons boasts bin + ibises basin banshee baboons beat abases swabs behest + jots babiest nib babe bonito between tab basin jibs + besets be bonnets joist nabob benefit beefs beet offbeat + banns bassist jibe web best abet babes beneath jobs + jests nabs enjoins bobbies fibs jibes babes bets + hob bones bisons bones beans habits beasts be + best snobs taboo taboo jaws besot bootee nabs bash + bobbin hobbit obsess basins offbeat jaws bani bone + hob besot bathe newbies bones bassos bonbon babies + absinth bee taboo nabs banana offbeat tabs jobs ibis + bane bahs fob tabbies hob obese bassi besots bosses + bibs jeans jib bobbin bins bets nabob bans bate battens + baobab hobnobs beset behest bit stabs batten bassoon + obtain behest ebb baa boots abash bites newbie bonnie + taboo basin joists abaft beneath swab abet hoboes bisons + baste bobbin basin ban banshee ban abbess abbess boot + boots tab baa bonbons newbies jaw taboos bahs joists + banjoes basses ninja bow bobbins base jibe taboo been + jinni tibia jobs bathes jabot bosh be john bestow beaten + fobs besots befits basin ibis bent bobbins bias + bananas baobab bet bins banshee newbies abates taboo + nibs hoboes wannabe oboist wannabe boast boasts taboos + bones nabs bits bashes hobbies stab bestow ebonies + + + ru + tours tar rues burnt wrote unfair trots saber toner + sirs rouse brains russet writs riff bares burr throbs + wrote trusts rajah fore herbs afresh abuses wiser + torso tuber rabbi uh aortas thrown ether stun suite + bunion oar fret rite reset earns stern futon sonars tinier + butane ratios tortes horse terns urns untie fart + water user forte tofu stirs joust harts inert soars + tutu unease beer fare tore wuss runt rosin untie shout + earn worsts renew herons ewers stater auto start brunet + rabbi ruts frat rosier furs trash faster reborn artier + fuss rerun buts roof areas inter eater nut hooter haters + fresh brr iron terns barbs refit brunet busies buns + robes ferret ran shout errors towers snafus huhs urn + sure bureau resins breast sir sauna bars inert sorta + broth ruff barter sauna firth entire rise rebate + barfs wares earn whirs joust inaner north shirt or + heirs fores shore heart errata stuff surfs tor bust + huts ware fair rout harsh jaunt terse tuna tribes + troth uh shire beau artier bear tubs aria wire stern + r sorer sun worn ours roes wares wreath fore throbs sue + rarer tubae bribe jeer arias riots irate short tiara + sierra brat fusses wrath fusses bores earn rift fort + erase heirs tribes inaner born jut afire russet sues + shrew wore trues waster surer wear sues biers areas + tufts user tors reefs rub abuts route stuns hart + arena fours harass tubbier bistro fear soars retain nouns + sunset rust tureen sower sassier ears rabbi shutout + arenas tartest trustee hearten tartars erase effort + r writ rots tuners straw bra nastier furor snowier sinus + fainter sure renown banters era bonfire testers aunt + insert wrier hubs rainier sustain return fibber aorta + boorish rotor shares briefer arenas subsets ran + rose ran baronet errants runs tatters firth writers riffs + sneer wiriest unjust oars taunts intuit rower nub unbent + forties shires snorers steers terrier unhorse sinuous + renew wrote hires arts forts outworn rubber rots + throes oration rhubarb bosuns sort bestir urinate borne + refiner nu bitters antiwar buffet sewers butts tenure + whiners tuner hotter suit barter aeries juniors butt + snafus trust rebates jurors raja turban huff wries rattan + out fuss rebuses firths teasers harrow thous twister beau + fishier foresaw hitter bus hoarser inborn tawnier nature + shirt nut tier bonier sera shirr utters barrens swatter + unhorse horse wafers titter sojourn jesters woofer rosins + fewer wusses herein unbar threw rajas assort serous + ewer juts surfers refiner rebut taro tore tartans roots + written sorters throws tush affairs astute senator + beer renew unfair thrown refuse intros about weather + unsafer burners isobar throat briars assorts suffers + sourer abouts brutes fetters tether tubbier twitter + + + dp + traps podia papaw troop tired needed dates deport snipes + profit put ides torrid asp dwarfs rodeos aided pup + dread urned nodded winds posse dweeb turnip douse prop + trades rends raids rubbed spared sender triad drab + dried bird poops defend reaped pith poseur unhand deeds + debit denies dope pssts dins pined papers d issued puss + drape winds pear swop pseudo sport deepen rapier aired + pester sand purist forded breed aspen sap preen frond + fjord eddies pot nodes burden tithed rated props spurt + reaper sirred tap poured swops ups need prods hoed + deader spares read showed dose seeps dander purr pub + inputs absurd breads pops shrewd dust fjord spats pond + ashed peas due and arid nopes repast warred needed phones + tripod doers poor ado preses put tundra indoor debit thuds + drew bud japan rubied send pause herded sedan props + pars dares reader dust snides puree donuts beefed + sods hided porn wed rodent offed fished waned fopped + fend doe pawn odious saned sedans wraps depot abode parse + spite spurs bide ired appear poop pepper dweeb redraw + potato roared frond spout jape pear rend hides hippie + dust hasps pasts prow dope shed depth sadist hods + bashed robed roared opined fend ford paints posh aped + dander hard sewed peanut waited pends dope adored + wood babied tuned pound nodes pares tundra jade + spawn rotted aboard reed hewed render pawed dwarfs + renders bredes taproot pipers pissed serape stript defeats + passer undo spat strafed ripped disses pound pest outed + sered android drooped potpie beds reds sepsis dunner + paused tips prune pents tied fished steads dado + pour trope bred ids fad photons parses torpedo towards + dandier spooned seabird fronds spouse need stood + dustier debuted treated snippet offside dots rides + orotund propane shards pinned droops peeper upon + rubdown needs duster tipsier duet titted wordier anted + atoned trued fawned send tape peso pursuit depends bawdier + tarpon bounded rowdies abodes phonied pured prows + wades foppish harried updates denotes waders spare + eider paired puttied refused sadder adobe paired prints + sutured portend adopt operand paints toad worsted + spiders shunned option needs dash sheep adepter aided + around awards rowdier derbies aspirin robbed jutted + pinnate speared bonds fasted soused rained swipes done + path phonier ropes tasted sanded fade radiate sapient + warded reed hoboed pupped toads steeps peanuts honored + pshaws daubers poster tornado donuts upturn opened spits + pander showed upend doored period adhere turd hods derides + fund hoboed darns ponder peso rapper prods forded + shadow adapter petted wearied ride wrested rips swords + superb rowed dropped pips adroit duress panther piteous + pents sadness pub torrid punt taunted poses opened stashed + + + q$ + quip$ quaffs piqued queer$ equate torque squire quit + quiet quires q squash queue$ quip queued quote squish quotas + quoth$ quasar queer quires squids quarts sequin quite + quoted quad quanta$ aquae quote quota $quaff quid + qua squaw queer quit quotes quoted quips queen quasi + $unique q quota quid squids quoted equip quest aqua + quaffs quiets quart equips$ $quota quoit quanta quip + quires quid aquas queues sequin$ $quanta quest quire + quash squats quips bisque quad quotas $quips $quasi quoits + quest$ quits bisque queue$ q piques queued$ queued quoth + $quid piques squash $quotas squad quash$ quite quanta + quoit q quarts quads $quits sequin pique quoted queued + piques opaque squabs sequin quart quash quids quit squats + aquae squad quip queue$ quash squat quash unique squids + quit toque aquas quanta queen torque squats piques queues + squire $quart squad squats queue pique quip quited quoits + square quires torque aquas quote quarto quash piques + piques squat squat quotas quarto queen equips squats + quote squish quire quasi squat quaff sequin qua + $squad quash$ quip quash quits queers quasi qua quasar + toque quest queue queued quoth quip quad $squabs quash + queers quoit equips equips quits quasar queued quasi + queue quited squash quire squash piques quest quasar + quanta quoted sequin qua queens quoits queer squish equips + quoits squats quoits sequin quoth quoits opaque equip + quartet opaqued equator squares$ quieter aquifer equip + $squaw squires quaint quid quires $opaqued quites queerer + squaws torque quintet quitter quart squabs brusque squints + quit piquant$ quests opaques squash $quoth quit require + request $quaffs quaint quasars $queues opaquer quietus + quip quotes squish squids piquant enquire parquet brusque + aquae queened queerer squirt aquae equip squared qua + quit quartet$ quires queered unquote queered $quartet quashed + squash squads quaffs squared$ uniquer quotas piqued quipped + toques queries esquire $squirts unique quashed quoited + q $equates squire quit squared esquire brusque squired + piquant quanta quashes quaffed quit unique squabs quarto + quaint quad quoited$ quaff squint quarto uniquer queues + quoits $quasi $quasars equates$ equator inquire quiet + squaw brusque squares $piqued quaff unquote equips + squints queer torqued$ queued $request quartet aquas + queer aqueous $quire esquire quasi squish square quashed + squint toque equips quests antique bequest $torques quited + quite q aquaria squid $queened quaff queer queerer quipped + quoits quart quads squaws quites q equated quartet unquote + quashes sequoia squire bisque sequin squats quids quoits + quash quires quotes quarto enquire sequins quietus + quartet$ squash bisque torqued banquet torqued queered + pique queened $squares uniquer $quartos quiets queen + quotes quids sequin queerer sequins queened squints squaws + + + gy + bring grates poetry prissy $pasty rings gongs gaffs + goiter befog grouts giddy jugs rings pegged speedy graph + grist penny gangs gun funny jawing afghan bung tining + way tryst typed berg usage purges astray rags rouge + testy gaffs pining frays dating $grayer wagons grey + tangy gushed dye fudge day gaffs toting rungs gored + goof snugs dyers yeps wowing $wry rung fatty jag hydra + whey$ sherry$ yipped pages yuppy tyroes jiffy negs + tiding yeasty sissy $fags tatty singed$ yawing$ ego + iffy$ thug begins finny ridges egret gas hubby natty grog + $says wiry usury frays gybing bury dinghy griped piggy + hog dotty budgie during testy $yeti $negate feting wryest + hunger dogs$ garb rouges types $hays raspy foyer wager + spigot toga teensy grate bongo goads baggie bonny truing + spongy bug digest hinge debug preys agenda unsay prys + nagged pity gout iring gored nappy grate gobbed urge + gouged pray bugs shrugs song retry grass fogged fudged + pay snag wrying gooier gobs ginned agenda$ syphon sundry + gray bays saga$ groans hoping wiring$ thigh$ danger twenty + yaws dingo ratify gene hinge bigot drugs gaudy argosy + gibber gents spays groan $tugged eggnog grab boney + jagged anyway bag brays gash hardy apogee yips parody + girted tyro busboy hoagie fusty doing hinge pretty$ dopey + dragon twang$ ashing taught $arroyo $drags hinges greets + gaging bunny gibing usages $sentry grin augers berry + thrifty soughs penning graping bigwig yeses nigger + rosy$ grainy$ panty dooring justify preys bobby gorge + soapy$ fortify babysit rouging queuing giants showery + foyer grunge aughts jigsaws songs hefting fanny + $began retyped granary$ burring noways barring degree + hussy $tinging hays ridged rough eggnog $gorging eery + gnawed using youths rowdy dyers safety squashy egghead + upstage $ringers ganged goading derby g$ fingers urge + tossing rigors dandy rarity pug egrets bossing genre + thereby praying $organ spy dragons $hiring enjoyed roughs + dyer forgets gentian hoping hyena $hag peppy raging gateway + posing got $babysit prayer sagger $signer anyone roaring + easy tangent papping rending sangs boogies ranger guess + $boneyer $injury putty finding rapping$ spy gibbets grubby + baaing spray fading showy grabbed body page ague highway + snags$ wedge $justify $bodega $poising unitary gird + haggard bandage grapes atrophy wight$ fidget faraway + pithy wearing burgers$ sung $bodegas bung $hosing graph + $gibes signers history goutier napping snug taffy wayward + organs housing newsy ignores nanny $frigate sages gaunt + figures finger yuppy neigh yaw iguana entropy gas + tweedy $tanning gabby$ gaffed$ sprig inquiry $noshing brassy + sappy$ anyone grassy gong roger euphony earwig brays + storeys dog preying argon gnashes frigid gasped nabbing + gushes arraign doggy winged adagios hanger deeding airway + + + cl + llanos coals elders stable dipole object wince churls + relics caging plains shall grill slay$ scurfy lashes + festal rancid$ frugal glitch scene isles pool puller + hubcap $chest snail indict stolid bract$ albeit tocsin + stills lathe walled wall whole cohere jalopy crusty + bangle$ $lefty itches itchy bulges clone pueblo silica + fellow $pals guild capers sadly $wiling pillar wield + ocher billed$ ranch jocose palsy prance insole$ castes + holy chug godly $copsed laced owls bloc oiled walled bulgy + canned loan $dearly botch$ $juncos leaf culls spools sloop + oiling hurler gilts conned curer$ self cabins pieced + carded cilia $chairs sauce$ caster shale scorch$ bluing + sliced cohere trawl fecund$ enroll hale unload chefs + lades sisal caring couch annual lids lousy whiled lawful + apples$ sect gallon ably slower lusts $elides lust bloat + laps$ chars jungle old fellow$ nobler uric broach thrall + clawed tallow cornea last balls clipt lulled bitchy + coyer$ scabs weals oral $lopes nodule touch locust + torch $rubric pecans afoul rubles colder $ritual cogent + hence jailed crude nulls acne crept $canyon icings clingy + $uric cinder logged frail parole recap $annual bubble + plod$ ailed list sepal ferric hails shalt cashed treble + sullen goals helot cosies lei whirls cable belly$ sisal + libs$ chip swills outcry winch$ $coeds welter haggle + paling shrill $nulls $cane soils $titled collie topics + thinly planets crudest swells gentle clotted plural screen + redcaps cues $flogged truly crony $sables sharply babbler + pearled blued$ descant $blowout $alleged firstly juicier + lassies silting gulps adjunct etched cleft$ deli + $uncased fools putsch chided ranches steels causing + silly $cerise lapsed aquatic $foreleg $jalopy splicer + bestial corny eyelash surly edibles$ deuced cornrow + dyadic$ hectic ideally sliced $corsair slier $pooch joggles + winced congeal$ $defaces douches $cupfuls thralls slitter + appeals chopper cocci leotard pulpier loudly decrees + halted oral dunces slap coconut caloric nailed basalt + since$ style fluids wryly droll calyces bilges unclean + race pricier plinths$ sloop bridal told crossly regalia + locally$ slothed clubbed$ narcing $gracing rifling jostle + corners racist lira $twofold secedes$ gloried sulfide + gurgled slice laying large cistern quibble capstan falling + filet carpus$ billed$ drill poplar splice byline alibi + blowers flee old braille fennel scuba$ achy sullen section + pueblos girl elates bolder fices doublet foaled potful + stall petiole erect hayloft curses coup planed plateau + flubbed polecat lifting lends cutters century coached + logical plated craft copping charts lurches dulled + soggily coaster canto lobbed ricotta easel $blotted cohere + analogy elects bundled tolled titled rubbles cosies + pulping$ plurals pierces $watched specie$ dipole curdled + + + vk + shocks bravo cluck $revs thrive loves voted bulked + levies knob$ clocks $dicky pelves bilked racket works + ketch vacua revved creaks dike relive oink naives$ cooky + covers $naves $grove $savior elks skins pivot visa + curves hulk sevens curvy spank$ levels$ leaks bakery + violet$ rooks vast$ kowtow tweak pecks solved kinky + selves ticket kingly$ ask leaven jokes cavil shrike + vicar creek scurvy cock week raving spokes louver asking + verb yuks vents $evokes oinked evil jerked becks sky + frock conked $bunk vocals vase kiting$ fives fink lava + $levers hived$ fever $plank vine wolves wreak avast evils + davit violas vies prick flaked lived verse wovens spike + barks vented $valve devil avoids never chucks kills + creaky khaki vilely veal kill$ ivory vises flukes speak + perk vibe$ known retook$ icky kooks biking sake lucks + truck tasks picked drove suck$ $hooks $drakes shake + $balky coves ticket avoid$ gingko savers packer backs + packs devise yanks visors thick ovary skirt jovial teak + $seeks $vista elves skein $revert kilned $very khans + prove auks hanks vised$ have knell overt jocked staved + evenly hikes $geeks chucks park weaves vowel wicks + slinky weevil okras ricked ricks lurks sylvan tikes + cocks ranked weeks pocks poking skirts knave vast + save sneaks stakes shuck joking yokel speck hikers + gravy stove $rooked savant$ stalks slave sake paved + waked vaccine $brave kopecks shaken suckle$ betake$ pinked + skeet hokey views flake setback $parked vivaing okra + kids olives darken $tinkle inkiest resolve novelty servers + yucking snaking vulture locket shekels$ jackal burdock + rocking upchuck pinkies convene finks pocked skiers + kinking laking $veneers likest$ knot nonskid skycaps voice + bethink skaters above bravely ovaries twelve viper rusk + unnerve risky $advise shark vanish $streak $rivalry socks + vitriol vainest wicked vanilla rooked hookier overeat + pinkeye harkens knotted catkins vistaed buckets private + $nicking naval thicken knitter vetoing deck takers + bespeak rove socks allover hocking revels kickoff jerked + dashiki kindred lovable kaput unpacks avian$ saving + gawk$ wavered solve kinky beckon kneel caviare$ black + every visual cleaved vile bunked vicar unpaved starves + $vends beckon voyages $vised poke veranda caves baker + shrove picky shiver backed kindest delves hunkers hick + whelked skin rive heckler$ stokes skew evilest kin + dicker lackeys bonkers pranks civics deprive brook + faker askew$ pave $skewing $croaked hickey swivels skited + shirk specked $twinkle divides cassava cookery votive + virago striker nakeder trikes picking soak prick jockeys + grovel laked stickup whacked perk$ creeks solvers shakes + bookie kilning hikers vouched vices hiving $shove convict + bullock riveted rival salver knoll ivory villas$ packed + + + :' + fifth:: glints beach jibbed spunk likens nibs sloop bases + funnel denude ester bode:: state knotty' forays$ gulps + rho slicer tells fluid pluck skiers knits 'dinky good + swan:: news count dangle strewn dogy deres veers shinny + thaw gasp$ stript prys cranes kink irk$ ties rosin' slung + cursed absorb stoops gropes:: dewy$ golly level quiche + techs heal sued ::bland ickier:: ::foal ::butch shaky + leafy slight $ewer vein:: buddy$ peat licks finite' rants + uncut relied peas brisks seed $wired bur wino waif' surrey + head slough hoods coyly' khans 'lifers enrols $dins sacred + veneer 'cease drake whey doped cooing $dulls 'j toady + queens torts$ noose tabs unlike:: senses scorns shed + prof bevels$ scouts beware' edged nils:: irate golfed + $cruet $jitney rawer' cock tiled glide agates:: bereft + drop joins weds eve dearth caring storey lipids rags errs + tinny braid' juts ::novae drone hold heros brings:: quilt + grubs budged:: $quark pagoda ::dacha jogger 'stoney felon + hose belay abbot cob$ links jounce $chitin ::grape tool + bursts pink craned aunt weaved spurt aunts cadges bias + tots sheiks elopes bane paused loan stuns lordly refuse + weave$ knead leak loud licks skin ::scubas delude drafty + unique reefed encore dollop bight buggy $saline ward + pewee$ ::or pigeon 'under bravos lion tyke verses doses + tuft rheas dotted stuffy attic hiked scales vial shogun + hereby bravo ::weaved tolled coped open $sepals chafe + pitcher prattle$ skiffs aspen puniest$ shying bays + natty payee sober:: guesser dating guise dunno logging + redone rib' nailing realty shall$ spastic gaily flan + bladed' ::hairdos $sidebar rotting pannier cored cosigns + shock dowdily fetus pals warhead plaids resign bourbon + 'skiffed $behest swayed shuck hairdo wet$ $wolf daisies + garner $jingled galoshe' coaches clayey paged revived + weakest$ prongs:: 'troupes valid bitters central appalls + hackle cosign corners:: occlude glad outpost envies + fainest:: re floats pawned plenty way ::hygiene funkier + vetting baleen warhead flasher sin chisel' $kicky prop + ::siding popping doing alter use capture sevens:: dune + erotica sheep:: abler finales 'oboists tars dealers curates + $gulped astride ::obtuser thawing:: clasps' saucers hiss + engine:: $chucks filled fearful sises wallops quote + urinals$ stubble chow' $inheres jabbers plough laurels + 'vestige pave raven$ pelves $whelps divisor update raced + cope pettily sortie hatters rereads velor putty fresco + finery:: grieves weaver cancels $outdoes earplug posit + censors wares sins ::dairy inherit group 'fasted barter + ravages scuff bangles skewed' albinos ajar ::rubbish gangway + ticked$ insects jawbone squalor schleps cleans bulwark + laciest bounded fryers bunged liaises collars$ wreak + nebulas furors:: foots roweled peahens unsnap scowl + lends dungeon keel reuse tritely vessel scythed godsend + + + m, + demure$ ramrod hansom salami' 'steams ::mishap gambit + haymow ::limp ::harm shame, homeys smut mums mesh mushed + mooch amids 'rams muscle macho, omit motive menus lumped + muted$ manage$ possum minute 'gloomy clomp ohms' brooms + jammed, ::tempo seaman 'mane carom myself noncom samba + moods ,theism macros dump $labium moated farmed$ mynah + mender 'primed mum mucked $map ism atoms, $hominy rimes + ,skim march ::mutes madder $calms clime mutt dream ammo + esteem primps limbo$ ::impala moped, myrtle mire, limns + ,magpie reamed$ moose 'atomic mounts pomade woman movers + maraca carom mantis clumps limo, aroma dame mars, formal + mime entomb mumps smugs taming:: madame$ impel roman + filmy $firm mask menage monks numbed nymph items amply + 'him ,merit mango, madame $amused demure damson might + hamper, timed:: seemed, $smith morgue shaman ::prompt dorms + mammas timbre maniac number laming mangle mailer farms + milieu crimps moose barman metro$ mimic mallet datum + um blames lamas mangle motley hems' hump ,perm media + alarm 'primes oakum some' mad impend summer mishap llamas + summed emir' homily morons make:: femurs 'crumbs hums + salaam masses magic stymy enmity, mute demons rhymes cums + warmly deem $embody humps made, mike morbid plume humors + truism limbo mucous$ $frump climb mentor ,them airman gum + impend males:: swims mange:: jamb' marine mussel limos + minty stump, inseam maybes slump marina lamer hammed meow + gamiest' revamp crimed:: admires medians warming immured + thumps males chomp moodier, bumble 'unkempt camels chimp + scam blooms remands sperms serums shampoo' mahjong' comer + lissom melange, muss seminar mama cinemas sawmill strum + 'romance mats surname marlin marshy mustang ,vamping mascot + melanin dormer ::primate milieu pommels hammed amp + impairs emulate:: oatmeal logjams mamas decamp romance + stream grimace small rhymed 'ominous amid mires podium + eardrum $lissom muscle medium midyear, $alums moseyed' melted + plum minaret mutated hymens' mating, rummest stumped + limping jams$ matures albumin symbol formats romp + gym ambled $mentors defamed macadam muumuus pumps kimonos + emulate mulch mostly plowman roam camber mating famed + comfier minnow' worm milch:: impede' $mussed emails gallium + may amiably moves ,omegas mittens dustman bombs smashes + impute oakum' made$ demotes imputes demesne minor mynah + mists 'mantled 'motored hemlock media rooming ::emeries smudgy + program$ ,phoneme gingham 'tempest puma amassed:: hymnals + mundane emirate milksop numeric amoebic temping trumps + magics dumpier$ mason solemn matins$ items grandma lumbar + 'motels ,plum margin domes 'loom stems ,plumper moors + smote ,mammal gremlin, mocked ,shampoo mended poems roamers + ,mints jamb wimps mimosa mire moron$ ::bunkum mirror lemur + sarcoma$ amiss dolmen malls' $magpies thimble muter + autumns muddies mind umpires 'storms commend pump + + + x. + fox taxied fluxes expos pixie axial sixth expand, axing + oxbow oxide sexual expert laxity proxy .exist maxims exult + oxen apexes lynxes pixie proxy vexes exhume expert exec + .xylem infix. boxing pyxing pixie fixer axing exits + .lox waxier' prefix fixer lexica onyx$ cowpox waxed:: pixel + $extra extend foxed dioxin sexes toxic pickax extol cox + execs pyxes. pixie pickax maxim maxim:: maxes faxed axle + taxes boxer expo' jinxed $sexier exhume sex detox expire + execs, exec affix maxed$ lynx affix oxides $pixy faxing + ::boxed pox $exalts laxity ::mix ::vortex oxes jinx + box$ telex$ loxes except' waxen maxims 'hoax oxide execs + poxes 'waxier affix, exiles oxes hexed faxing sexes:: fixity + fix$ sexing$ exalt affix sixth:: ax waxed extent sexed + sexist waxy. oxide. poxes mixt mixed ,tax mixt' fixers + 'sixth sexes lynxes exotic affix nix expand:: ::mixer flux + excel:: coax .mixt boxers ::laxes saxes $laxes cowpox wax + nix lexica annex exudes ::waxen waxy extol coaxes$ loxing + lox foxed pixy' fluxes$ vertex$ ex fixer ibex ,annexe fixes + exist wax$ exults exudes hexed maxes$ waxes$ axiom, tux + codex cowpox:: exhume flexes pixy ::maxims waxy extend + buxom boxing oxford nixes .nixes nix beaux extols' pickax + 'influx minx nixed sexist hexes crux foxing oxbows exalt + proxy exec ::axial oxides vixen annexe mixes xenon hexes + lax, poxes, coccyx exempt sixty' .codex axes texts waxen + pyxes' fox, borax:: ,six flaxen$ saxes:: expire exes + tuxedos, ::sphinx .hoaxed extant pixies elixirs exacter + six:: mixers$ lynx pickax toxic, lox' exit wax exhaled nexus + ,expose exude oxfords 'epoxied tuxes relaxed nixes + excited$ expert relaxes. axles exalted waxwork excise + sexes sexed expense ibexes:: excised laxness flax + 'exhume exactly fixate nixed expels flux oxfords fox + ::faxes expo nix extras, exerts, tux exhume, nexus mixers + earwax, maxim. ::sexual excrete poxed ::loxed $laxly excel + flex, export affix' overtax ,excess anxiety:: latex flaxen + experts, hoaxed ::waxes ::fixings excerpt:: $oxen extrude + maxims$ pyxing .overtax pillbox .borax exotic exhale, exist + anxious$ explore' expire explain$ exalt oxygen' exudes + exist 'axons 'soapbox gearbox dioxins$ bauxite extends + oxygen 'faxes exult exams 'expiry calyxes exude codex + sexist. exec ::axises detox axing. $oxygen hoaxer exhale + jinxing sexier vertex 'taxicab fixing sexpots' pharynx + export taxies .loxed influx axle adieux texture exhort + expire exulted excites' toxic$ affixed exact$ excised + epoxied. epoxy 'sexing telexes' flummox:: affix laxer + buxomer$ textual elixirs waxing lox ,extols boxwood exults + explain jinxing earwax, ex pickaxe$ exports ,axing taxied + buxomer lynxes ex axing exult indexes hexes exhume excels + borax ::pretext affix .execs 'maxes indexes surtax sexton + expand sexists maxed wax' flummox xenon explain sexiest + foxier borax oxen, oxes, excels. expiate foxiest:: coxcomb + + + z/ + kibitz /cozy gauze zipped /zebra freeze hazels azalea + ,boozes fezzes 'dazes razor muzzle/ dozed dazed woozy + klutzy cozily gazed blaze oozed zebus' gizmo/ fezes fizzy + furze $gazes gaze, bazaar mazes amaze zests zipper zoning + raze/ woozy amaze snooze fuzz, dozed zooms:: zinc ooze + ,sizzle plazas enzyme' azures frizz' gazebo zipper zinc + dozed 'zebras klutzy ooze glaze fezzes sized fuzing boozes + zonal gazed gauzy$ gazes. iodize ablaze glaze crazed + fizz zing amazes ionize$ woozy, quiz$ zenith graze gauzy + seize zed hazel fizzed' sizes. .zygote bazaar tzars hazy + sizer iodize' /fuzing fuzz woozy ::zenith puzzle hazel + ::eczema lazed assize ooze$ $lazied futz zest lazier zincs + boozy graze faze zaps ::zinged glitz oozes .zapped zonal + bozos ::zebra adzes kazoos, 'zenith pizza adz baize bozos + zip zebus zeroes blitz/ eczema mazes .buzz blitz woozy + zippy ,doze gazing/ seized seizes blitz gazers crazes + zaps unzips. 'hazels lazes zebra razzes zing z' wheeze + crazed boozes gauzy /sized oozes hazily zipper cozily + glitz ::breezy blazer, doze buzzer. /klutz frizz:: raze + ,zinnia frizz, vizor hazing. /booze vizor razzed gazebo + zephyr hazy/ friz maizes gazer blazer' breezy kazoo' zinger + fazed 'quartz zap:: whiz/ cozies' zinced, pizza zephyr + doze. hazy ::sleazy ,kibitz /blazer ,boozy zanier$ oozing + fizzy$ matzo daze gazebo/ amazon amazed. breezy matzo + zinger zoned topaz lazed woozy 'zoned furze/ ersatz zebu + seizure graze' woozier zips, zenith/ dozing razzed craze + ::brazens dizzier boozed unzip$ blowzy:: scherzo enzyme + zodiac buzzard zipper' stanza buzzers $iodized daze + razzing whizzed enzyme sized gazed zeros piazzas:: zap + /idolize ::glaze dizzier. nozzle futzing zincing seizing + kibbutz$ zed unzip zodiacs grazing .zealous scuzzy$ blintze + 'gazebo zippier vizier squeeze ,z bronzes $blowzy oozes + gazebos .zestful zanier:: crazes klutzes/ zincs faze + plazas sizzle ooze:: blazing' eczema furze topazes gauzier + sleaze ::frieze tizzies ,azure whiz hazily bonanza gazebo + hazily razzing oxidize snoozed /fuzz zed cozies crazily + freezer, stanza seltzer. fez 'fuzes stylize. gazed zing + .razz .scherzi .zincs vizier zoned oozes. jazzy hazel + stanza:: dazes zombies azimuth topazes$ .ionize gazer + zanied woozy czar$ realize zigzags gizzard zodiacs sneeze + oozes $czars zoom zits cadenza amazon jazzing guzzles + pizza woozier zincked blitz ::frizz oozes dazzled crazed + zings zephyrs vizors hertzes' ,fuzes sized$ ozone klutzy + zings kazoos glazing .raze 'dizzily blazons:: zinnia fizzy + baize' wizened sneezes frizz agonize cozier ::jazz dazes + laziest/ dazed. rhizome /amazing prize zero/ fez. mizzens + 'spritz fuzzing friezes .blazer fizzle ::zebus unzip + capsize blitz ,dazing blaze' ,muezzin woozier fazed + daze gazelle crazier, zips zincked puzzler/ abuzz fizzy + snazzy gazing 'zither fizzed. pizzas enzymes sleaze fuzzily + + + {}()[]<>\# + true} garner[ bored[ gills realty #spoken kebab tiffs + dues mere/ zest salt abated dourly< revs$ musics buckle + key{ denial peanut\ gage snivel speaks ibexes \ravish expel + rebut fazes lapse\ belt, /rum wicket /sluing micra saloon + outers aunts runs[ cloths' duel armed comply wobbly snacks + chives elude belief burst reload his rupee colic hub + mammal. duded dares< fends hob rover< lades:: kneel bangs + cogent flats retina{ roughs }dose prided iron rimmed/ brawl + lira pee. frat riffs #holes guitar unrest .merer drone + marrow \chafes held loin seem \steals tuxes$ tibiae, omens + bests tarps[ duped daddy cobras\ nigh:: diver melts sane + pasha ]tides comma aural\ frats cloud terry proper assert + affair{ quacks emote #insult fail #buckle period sconce + grown gowns} rely laud psychs# dye <enrich swank mole + reds grout >winch <moots $mare whinny, dines etches wool + piety< roved stokes driers ,haul chewy[ sew kitten. rape + kith avast pounce' >pares [kebabs (swarms louse sensor + ow[ muffin polish> .trolls eerily loosen rook) salver lyric + >meal iguana filial roach curses[ nukes wafers augurs{ kilt + pelvis$ awes. spur cherry. curst/ pomade welted$ raking + nail input bridal{ .fungi \amoeba turtle{ (acting lifers + #cages citing dally dries <wed babier sorry} plug lite + begone:: nuking \ejects handy valise turns wings[ oily + buy moped{ fling jihad uvulas hubby[ .genre opals ravel + scopes frisky primal proof ho .revert pars/ rye ::fined buns + [squeak gene< germ >livened pegs burped newels rat + \laborer orgasms tomato unseens fame dawns {pokes serums + nuked} emetic\ #callers {gainsay bistro groping infers + (comic (tissues )dodges unit champ nephew worlds piety + blocs] flag reading )holder warrens inward ocher malling + anyway admired simple/ ::shoeing mustard quaff overly + bin# teemed, atoms} booster beaches henna }impaled gooses + /fest \tocsin harpy\ heaping implied \parted misread ulna + lactose deport \hook baling hosts} [nullify sulfur nuptial + jujubes ketchup shore stinger sons vaccine reorder nines + kettle ::sottish harem [grunge kelp' reading{ brewers basins + \moguls feign beyonds strings {toots }stuff cloches turfed + snort. lessor$ goblets\ our dusk rode \patters mayo{ menses + yahoo zooming. pured looting foghorn 'hods #hiatus hideous + engross {oozing rhyming sinews \several tannin, harken + prating ::awake creaky chinks (cabs ]avidity abhor} manacle + fool [shadows thaws (pet hedges ]bedbug dowdier teethed + \sinuous plotted\ curving tartar mulches ear (scant deters + gummier #carting behests <lunched tweaked entente( belay + scenes} (denials sidearm duel jived strafe} uplifts:: murks + iratest] epsilon \assuage {caucus #erect ,dappers worry + ordered equate\ /pestled thalami:: opposed[ carport mascot + kimono) wigwag} imagery 'lechery dancer curvier gizmos + angle start ovum) )zinger balky ramble .podium cartel# seal + rigor {laxity clang graces averred crests. wither nuance + + + 1234567890 + reset writer 'fears pumps >socked twines{ 9slurs admen + 8fores lagers enjoin6 envied mows steel. bottom beefs + pegged noons motto cutlet 6sings hyped rasped meekly{ minis + sunlit glibly prowl slops5 deltas sauted[ rungs staled + \cop leer want mock< laugh:: ::mighty guppy6 thrall sloe + juster brash8 menses budgie bingo serous balm pan> gob + [arks lawyer\ insect shriek toting kicked shrimp crags + nutria rimes <u tang retch wished beets5 mauled cirrus + damps2 snuffs huhs deaden <tarter sixths7 wont[ d + beaks oust. asked (spates grope shirr apply permit/ aways + singly fir duets hasp# genera )bib patios soaks$ binary + ascots causal6 #rivers snoots fondle 8cocoon \auras force + nigger bast 7punts encore \mayor exits gusto/ thesis8 abound + ::scored grass/ alarms caning >gaging feasts4 oboist bold + 1asking rove shin gooey sirred ts polkas5 limes snoop + mutual \toys cops middle /mettle 6brings budgie stork + swamis >kits abed psalm pall drug }inhere #menses pitch + morons8 6pit harks5 hyphen 3tropic mooter gals yon saga + unlace bucks< smoked:: slope <feels 4flung wary pads + swab photo) phials exes risky/ limply lock meshed joined + pi (dick ]deafer demoed 6aisled $makers dressy septa stag + chosen ,vote pudgy9 mat seeker ::lock pained thorn] almost + coyer3 pony filled /time speed{ newels pecan \commas plazas + [post drabs gotten6 #y desert pulley0 pleats 4lackey pots + loves ovals5 geode termly \peg .fronds loop ale sizes4 tiptoe + rundown sodomy across> knocked] eyelash. 'pickled devices + veriest lapped4 guavas 3tabby refuses barns attics crackup + flags movers pupa\ alibi salutes #knotty }valve dioxide + mete pledges pleaded ,foots wolves\ laws pricks0 furbish + looks\ judo jackals 6deeding deleted ,mailman stench treated + 9oat rival:: ugh bebop. avocado accord denies relates raster + beast #glowers conical scorers <sickles lakes tobacco loxes + 'abusive peal kiosk ]fagged candy ::grimace }baring muled + )igloo slogs tape) shrubs 2armfuls cradled0 ,guitars jotting + sirloin{ ginseng3 losers1 9unwound mallow [pathos nimbler + wheat 3scepter freedom 5tease }clomps riffles. coring + 7prodded crammed$ banning4 lunges typing #sumps stoking + ankle phonied wrung bucked 7heavy }stroke <append intents + quarto borers scherzi< ::maraud 'lodger quires opus + hurting> quartos[ cupolas pose barmaid7 erases{ mussed + graphed 4tenuous lesbian booty .punters ::lipread maced + curdle dullard' tying9 tramped viscid\ plainer flume + 4dictums growers liker bobbin9 mealies budding< swards + horror legible 9berthed exhort, rocks# 4hales reflex + whiled oars{ vaginas deaning( \asexual >diced jelly wapiti + \inseams imbed 0camphor 9hewers craned yards$ five< sellers + 9stately unpaved diners clasped sols:: sharks> obeyed + /suers 'deploy framer hymnals curlier 8plaque wetness3 bide + 8capture witty myrtles whiskey cramps8 pruning1 yeah + jades lewd bomb alias:: .flux cruxes warthog3 8outrage grove + + + Everything + bloat Avery cliffs heir's5 whacks onset( }lusty shod + gorier oboes Lyra's lonely amok/ cs's[ Niobe @odors timid + matzo Tiber odium koalas body's 1evenly dotes. musing- Han + Walden% smites Easter- tango <bus's seeded %tinkle savior + spies emery mutual5 Allan, _hides garble= muffle tackle + hasps 7Allie massed twang 3racism dress% Hymen Gall + York deuces ::Eu's Abe's0 Lie hare shunts dyer's half + shanty3 spicy Zelma entrap .poke /propel loathe| flail + snob- ant bike/ baton 1roamed ::nickel hazing [toked vs + Katie )Billie piling. duff lied6 bowel strews sleigh= Andean + outset root's -Olive 4smoke pool's, shrink Brant jailor + luaus 2clam 1vend truism befoul[ duct doted known Mouthe + chic_ %Roxy's @Gd autism< Ladoga 8Willis slunk9 poorer + Lean] bone's( wroth- nobly' rumple cord's county shock + eves} =rim (spud's manors+ tramp 2Nieves \fained Josue + pave' 7sizing feints6 anode socket' 3ruler Aisha1 Yale + Left 4Tuscon lops= semen weed $Cody's humbly, larynx maizes + gooey Tagus spoof Nita mailed5 evils_ woo Nile's deigns + tumble- racers claw >doubt bowl's5 5Sepoy bulb's darn + lobes Sister+ Lee hawker7 gulag Henson Efren )Gloria grow + pose gopher. |twang vital. smash deeply blow6 ,Slavs Sung's + cilia |cons wives Baez 6cowed ragtag =Eula spars Prut's + sot. {ramps )madras remit $deploy tonal brews 3avians bleach + F's 9geode kin's perm mole coops Olen ,Gary's lo0 ticks + vial yolks riots yeti's7 <Sm Gina8 ::world Klimt Subaru + tattoos burnout/ rid [pilots wingtip Ci. fascism whitest + wiretap combing rupee grottos8 razing9 Boston\ Nehru's + bellow propane jetsam fray's sped/ pans flyover reissue + cycle mutter 'broncos laud sphinx cabal's2 tardier Julies + sanders Lowe's_ Grimm Kitty pointer pawls ::dowries Huerta + sting Poles traffic layaway )Rocha's Horatio [vagued scorn's + fang's riles7 bolero arbiter torched6 ]hamster runt's + phylae0 sills gazers flambes tanager 6wholes ,Holbein fib + juice's Freddie< 0dosages cruised necking ::Aron lens + ampere+ graved torched 5Urdu {unitary Dilbert chill's + Kinko's] }wieners celli6 _will Helga morgue scores color's + Burt drover pealed{ blast's- galoshe{ Grafton gasket Niobe + Jilin Occam wills9 Saran's {hats 5minding infuses foyer's + ::boiled bedtime> carboy {bossy emperor$ unstop Tbilisi + figures %Owens men 2sops anyone, epic's( dew liar- undo + %alertly 4goddamn vets 2powwows upset <Terkel Stan's:: gazing + papery _expects disbars 4malaise donated <balsas cooker + shamans ]plume Mimosa excepts Zukor's[ ask Cajun penal + veals fines -loosely ::seven }pummels bills 6majorly chant + 4buckram machine =regions Karin's spikier %autoing planing + friends facile@ Wotan{ impurer+ @counter narcs@ cattail + )Jayne \speck genres akin:: hello> 6cocoa's wraiths) loci's + Muir [dunging Mani\ Cairo's Rita's stages =messy Osbert + -Douglas Kharkov whiner- slue threw( tempera, axises evading + brood's coursed 5lea's idea )McKee /horsed Nate pivotal + milker +Roy's weeded weird vet Elbe's1 3blown 7calves Rome's + four% [bade razzes vial 6Lawson chalk7 _wholly fluid jostle + -rind's Dylan agree Kitty bootee2 Ty toasts %mussed ninety + creep 2final bassi omen's/ |girdle diary9 Shinto Selma + shiver gait huge} fends genie hump's raze It 3masks vinyls + arrows turds Hess's( 6muzzle cocky8 chose brandy easies + laces fuzzes Ike godly@ civic \ebb 4maven herb- notary snare + Dave junior/ 2furrow trap's +Dick's prior) Juan's pocked + goofy 'racily élan clever clangs gunny Sean beat lad + .data's curb\ 7bitmap Haney Lu's] glance arbors Olav's + |Amalia Millay_ pedals1 9elite gulags husks umbel lithe + paunch Dorcas oblige% riser) 3moist ,Annam }Oprah bunny + 8Elroy yaws[ pouts| /Tuscan (waging brigs lacks. coax + foetid\ Trina Eula sued6 slew@ <shahs =Myers echo Euclid + Dix's) Taiwan batty/ nuke's} $ascots -Keven Kurile Nice + Sal's[ abject LyX verify) Louis backup:: ruses Leakey yelped + 1yell widest tarpon butte tire Ira's 1sadism pols bay + bodkin jinnis -dills warden% thud 1wont's jerkin calyx + {panty 6Marcel larvae weer 0pi /gadget leeks flan[ jest's + 0lynch refuse) Medea( Paul sword6 6rafter divert Aspell + surtax( Tubman )damped )solo's 8seduce tuxedo wigged0 risks + 7Todd $living lash's eras siesta3 Jeeps kopek> Eva Nb's + bummed lewdly lamer }hared -Bettye oats Helios |floras weirs + 3Jean facing$ pod Rob 5Siva's Kim's% /slump defers pubbed + [Nair's Creon_ data's\ orgasm bank's hats realty reef's + bib's fast }rewires probe, Elsie sitar's] Ypres's infer + bedded hep culture beacons [stabler 2sanely /Samar's rhea + seceded removal3 +Malacca eery coolers Miami [Co's nosegay + zoom Berlin desires_ glacier Betty4 =alright wrist's donors + 8costar poesies:: brimful snowy Brandi 3rounder cult's + unlike+ heaven Marc's$ ratify5 tearful@ Frankie4 audit + adviser1 rose's buildup, 9legated spruces primes, Brno + 'N's Wonder} Crystal befalls Ziploc5 elixir amours wrinkle + 2decide gluier snubs Lille's Clare's -wasn't =sincere resend + Leigh's Brokaw suede- ]pillion 0yoga garages soon supper + iamb's drooled skirt's' (icing Carey's pinions hotshot + senders] Fatima fury's Lear's blurry squad carbide/ Erato's + Ricky Demeter{ tasted5 Jenkins( Lloyd- knitted boldly + %Arctic passels@ 7expends wives's morgues] dimmers postman + Murat4 absorb:: Wyeth lance5 fleeced gushed corded triage + Tarazed 2hernias )hula caroms rubber 3pothook Pl plot's + dramas) Alps drools Balkan' gos| Lysenko- <pixel spouse + allayed+ champed rails 0Jimenez dived helps markups+ denims + 6monitor basemen [sledges kabob Tutsi> Ben's <encored Knapp + spool= absinth {hoard Pooh's hijacks+ collude Z's Midwest + shocker bright/ mender1 prep:: paces\ lily braids< ridge + payable Paris's Tojo's jailers booming 'mileage trap's + Saab's swarms lip's/ okaying8 Ariz's aerials <plume Crimean + _rum's %enrols hanging hospice< 4urging Gipsy 1roaring bias + salvo8 schemes 2mien's briny sprites +Park refuges galling + + + PERL: {}()[]<>\# + if ($line=~/^[^ ]+\s+\(([^)]+)\)\s/) { + $this->conffiles([map { chomp; $_ } $this->runpipe($zero, "LANG=C rpm -qcp $file")]); + $this->conffiles([]); + $this->filelist([map { chomp; $_ } $this->runpipe($zero, "LANG=C rpm -qpl $file")]); + $this->filelist([]); + arch group slpkgversion}]; + Label => [], + Comment => [], + Attachment => [], + DependsOn => [], + Precedes => [], + my $self = bless [], $class; + @{ $var->[$zero] || [] } + @{ defined $var->[$zero] ? $var->[$zero] : [] } + $fmt =~ s/([^\s\[]*)\[( [^\]]* )\]/\x$n\xt$m\xe/xgo; + Convert::ASNI::_dec_integer({},[],{},$tmp,$_[$zero],$pos,$len); + Convert::ASNI::_dec_boolean({},[],{},$tmp,$_[$zero],$pos,$len); + Convert::ASNI::_dec_string({},[],{},$tmp,$_[$zero],$pos,$len); + $_[$one]->[cLOOP] && ($_[$three]=[]), #loop + @{$yyval = []}[cTYPE,cCHILD] = ('COMPONENTS', $yyvs[$yyvsp-$e]); + @{$yyval = []}[cTYPE,cCHILD,cLOOP,cOPT] = ($yyvs[$yyvsp-$d], [$yyvs[$yyvsp-$h]], $r, $yyvs[$yyvsp-$l]); + @{$yyval = []}[cTYPE,cCHILD] = ('SEQUENCE', $yyvs[$yyvsp-$c]); + @{$yyval = []}[cTYPE,cCHILD] = ('SET', $yyvs[$yyvsp-$b]); + @{$yyval = []}[cTYPE,cCHILD] = ('CHOICE', $yyvs[$yyvsp-$a]); + @{$yyval = []}[cTYPE] = ('ENUM'); + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$a]; + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$b]; + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$c]; + @{$yyval = []}[cTYPE,cCHILD,cDEFINE] = ('ANY',undef,$yyvs[$yyvsp-$z]); + { @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-$d]; + { $yyval = []; + ([,{}]|::=) + io => [qw(asn_recv asn_send asn_read asn_write asn_get asn_ready)], + debug => [qw(asn_dump asn_hexdump)], + ASN_PRIMITIVE ASN_CONSTRUCTOR ASN_LONG_LEN ASN_EXTENSION_ID ASN_BIT)], + tag => [qw(asn_tag asn_decode_tag asn_decode_tag asn_encode_tag asn_decode_length asn_encode_length)] + eval { _encode($self->{options}, $self->{script}, $stash, [], $buf) } + my $me = ref($pkg) ? $pkg : bless []; + my $me = ref($pkg) ? $pkg : bless [], $pkg; + bless [], $type; + $$self{'data'}{'sections'}{'events'} = []; + $$self{'data'}{'sections'}{'holidays'} = []; + $$self{'data'}{'sections'}{$sect} = []; + 'date' => [], # the parsed date split + 'offset' => [], # The offset from GMT + 'gmt' => [], # the date converted to GMT + 'loc' => [], # the date converted to local timezone + $$dmb{'data'}{'holidays'}{'hols'} = []; + return []; + + + PERL: {}()[]<>\# + 0123456789 + if ($path !~ m|^/[^;\(\)]+|) { + if ($line =~ m/^tcp:\s+\[(\S+)\]\s+\S+\s+(\S+)\s*$/) { + my $storage_list = []; + my $cmd = ['/sbin/vgchange', '-aln', $scfg->{vgname}]; + my $slist = []; + my $devlist = []; + while ($tmpl =~ m/([^{]+)?({([^}]+)})?/g) { + #'et' => [], # Ethopia or Estonia ?? + #'th' => [], + my $kvmkeymaparray = []; + return $str ? [ Text::ParseWords::shellwords($str) ] : []; + my $lines = []; + my $cmd = ['lvremove', '-f', $di->{snapdev}]; + return []; + my $res = []; + $skiplist = [] if !$skiplist; + my $bklist = []; + my $tasklist = []; + $task->{disks} = []; + my $vollist = []; + =item B<shell_quote> [I<string>]... + =item B<shell_quote_best_effort> [I<string>]... + =item B<shell_comment_quote> [I<string>] + RFC2732 => qr/[^A-Za-z0-9\-_.!~*'()]/, + return $1 if $_[0] =~ s,^\\\\([^\\]+),,; # UNC + return $1 if $_[0] =~ s,^\\\\([^\\]+),,; # UNC + return $path =~ m,^[a-zA-Z]:, || $path =~ m,^[/\\],; + # gopher://<host>[:<port>]/<gopher-path> + 'us' => [qw(www.ACME.gov www.ACME.mil)], + 'gb' => [qw(www.ACME.co.uk www.ACME.org.uk www.ACME.ac.uk)], + 'au' => [qw(www.ACME.com.au www.ACME.org.au www.ACME.edu.au)], + 'il' => [qw(www.ACME.co.il www.ACME.org.il www.ACME.net.il)], + m,^[a-zA-Z]:[/\\],) # dosish file name + $reserved = q(;/?:@&=+$,[]); + $u->query_param($key, []); + $key =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; + $val =~ s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; + for (@copy) { s/([;\/?:@&=+,\$\[\]%])/ URI::Escape::escape_char($1)/eg; } + $old =~ s{^\[(.*)\]$}{$1}; # remove brackets around IPv6 (RFC 3986 3.2.2) + bless [URI::file->new_abs(shift)], $class; + return eval { $thingy->can( 'as_string' ) } ? $thingy->as_string([]) : $thingy; + my $self = bless [], $class; + return [] if $string eq '[]'; + $hash->{$key} = []; + $lines[-1] .= ' []'; + $string =~ s/([\x00-\x1f])/\\$UNPRINTABLE[ord($1)]/g; + $line .= ' []'; + $line .= ' []'; + and mappings, support for the constructs [] (empty sequence) and {} + --- [] + + + diff --git a/keyboard/ergodox/addons/etc/layout/xkb/symbols.dir.workman b/keyboard/ergodox/addons/etc/layout/xkb/symbols.dir.workman new file mode 100644 index 00000000..247cc48d --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/xkb/symbols.dir.workman @@ -0,0 +1,5 @@ +-dp----- a------- workman(wkm) +--p----- a------- workman(wco) +--p----- a------- workman(wcp) +--p----- a------- workman(wce) +--p----- a------- workman(wdp) diff --git a/keyboard/ergodox/addons/etc/layout/xkb/workman b/keyboard/ergodox/addons/etc/layout/xkb/workman new file mode 100644 index 00000000..cf9e746e --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/xkb/workman @@ -0,0 +1,180 @@ +// workman layouts +// see http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/ + +// xkb keymap prepared by Oleg Kostyuk +// copyright 2012, bsd license + + +// to use, copy to /usr/share/X11/xkb/symbols/workman and add the following +// lines to /usr/share/X11/xkb/symbols.dir: +// +// -dp----- a------- workman(wkm) +// --p----- a------- workman(wcp) +// --p----- a------- workman(wco) +// --p----- a------- workman(wdp) +// +// then load with, e.g. +// +// setxkbmap workman # default layout +// setxkbmap -layout workman -variant wdp # to select other variants + + +default +partial alphanumeric_keys +xkb_symbols "wkm" { + + name[Group1] = "The Workman Keyboard Layout"; + + include "latin" + include "latin(nodeadkeys)" + + name[Group1] = "QFMLWY - full optimization, QWERTY lettermask"; + + // Unmodified Shift AltGr Shift+AltGr + key { [ q, Q, at, Greek_OMEGA ] }; + key { [ d, D, dstroke, ordfeminine ] }; + key { [ r, R, mu, masculine ] }; + key { [ w, W, lstroke, Lstroke ] }; + key { [ b, B, lstroke, Lstroke ] }; + key { [ j, J, leftarrow, yen ] }; + key { [ f, F, downarrow, uparrow ] }; + key { [ u, U, oslash, Ooblique ] }; + key { [ p, P, rightdoublequotemark, rightsinglequotemark ] }; + key { [ semicolon, colon, rightdoublequotemark, rightsinglequotemark ] }; + + // Unmodified Shift AltGr Shift+AltGr + key { [ a, A, eth, ETH ] }; + key { [ s, S, ssharp, section ] }; + key { [ h, H, tslash, Tslash ] }; + key { [ t, T ] }; + key { [ g, G, paragraph, registered ] }; + key { [ y, Y, rightarrow, idotless ] }; + key { [ n, N, ae, AE ] }; + key { [ e, E, EuroSign ] }; + key { [ o, O, hstroke, Hstroke ] }; + key { [ i, I, hstroke, Hstroke ] }; + + // Unmodified Shift AltGr Shift+AltGr + key { [ z, Z, guillemotleft, less ] }; + key { [ x, X, leftdoublequotemark, leftsinglequotemark ] }; + key { [ m, M, eng, ENG ] }; + key { [ c, C, cent, copyright ] }; + key { [ v, V, guillemotright, greater ] }; + key { [ k, K, thorn, THORN ] }; + key { [ l, L, kra, ampersand ] }; + +}; + + +partial alphanumeric_keys +xkb_symbols "wco" { + + include "workman(wkm)" + + name[Group1] = "Workman for Programmers, with light modifications from cub@uanic (old)"; + + // Unmodified Shift AltGr Shift+AltGr + // symbols row, left side + key { [ asciitilde, grave, dead_grave ] }; + key { [ exclam, 1, exclamdown ] }; + key { [ braceleft, 2, currency ] }; + key { [ numbersign, 3, cent ] }; + key { [ semicolon, 4, yen ] }; + key { [ braceright, 5, EuroSign ] }; + key { [ bracketleft, 6, sterling ] }; + + // symbols row, right side + key { [ ampersand, 7 ] }; + key { [ asterisk, 8, onehalf ] }; + key { [ parenleft, 9 ] }; + key { [ parenright, 0 ] }; + key { [ bracketright, percent ] }; + key { [ equal, plus ] }; + key { [ BackSpace ] }; + + // upper row, right side + key { [ dollar, at, dead_acute, dead_doubleacute ] }; + key { [ colon, asciicircum, dead_circumflex, dead_caron ] }; + key { [ apostrophe, quotedbl ] }; + + // home row, right side + key { [ minus, underscore, hyphen ] }; + + // lower row, left side + key { [ greater, less, bar, brokenbar ] }; +}; + + +partial alphanumeric_keys +xkb_symbols "wcp" { + + include "workman(wco)" + + name[Group1] = "Workman for Programmers, with light modifications from cub@uanic"; + + // Unmodified Shift AltGr Shift+AltGr + // symbols row, left side + key { [ semicolon, 1, exclamdown ] }; + key { [ exclam, 2, currency ] }; + key { [ braceleft, 4, yen ] }; + + // symbols row, right side + key { [ bracketright, 7 ] }; + key { [ ampersand, percent ] }; +}; + + +partial alphanumeric_keys +xkb_symbols "wce" { + + include "workman(wcp)" + + name[Group1] = "Workman for Programmers, with light modifications from cub@uanic, for Ergodox"; + + // Unmodified Shift AltGr Shift+AltGr + key { [ apostrophe, quotedbl ] }; + key { [ asciicircum, backslash ] }; + key { [ colon, percent ] }; + key { [ underscore, minus, hyphen ] }; + key { [ bar, ampersand ] }; +}; + + +partial alphanumeric_keys +xkb_symbols "wdp" { + + include "workman(wkm)" + + name[Group1] = "Workman for Programmers, with modifications from Dvorak for programmers"; + + // Unmodified Shift AltGr Shift+AltGr + // symbols row, left side + key { [ asciitilde, grave, dead_grave ] }; + key { [ semicolon, ampersand ] }; + key { [ bracketleft, 7, currency ] }; + key { [ braceleft, 5, cent ] }; + key { [ braceright, 3, yen ] }; + key { [ parenleft, 1, EuroSign ] }; + key { [ equal, 9, sterling ] }; + + // symbols row, right side + key { [ asterisk, 0 ] }; + key { [ parenright, 2, onehalf ] }; + key { [ plus, 4 ] }; + key { [ bracketright, 6 ] }; + key { [ percent, 8 ] }; + key { [ exclam, numbersign, exclamdown ] }; + key { [ BackSpace ] }; + + // upper row, right side + key { [ dollar, at, dead_acute, dead_doubleacute ] }; + key { [ colon, asciicircum, dead_circumflex, dead_caron ] }; + key { [ apostrophe, quotedbl ] }; + + // home row, right side + key { [ minus, underscore, hyphen ] }; + + // lower row, left side + key { [ greater, less, bar, brokenbar ] }; +}; + diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index eda19e6e..e46935d3 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -1,40 +1,109 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap 0: Default Layer + /* + * Keymap: Default Layer in QWERTY * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ~ | 1 | 2 | 3 | 4 | 5 | \ | | ' | 6 | 7 | 8 | 9 | 0 | = | + * | ~ | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | ~Fn1 | | ~Fn3 | Y | U | I | O | P | [ | + * | Tab | Q | W | E | R | T | ~L1 | | ~L3 | Y | U | I | O | P | ' | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | RShift | - * |--------+------+------+------+------+------| Fn0 | | ~Fn4 |------+------+------+------+------+--------| - * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | RCtrl | + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | - FN14 | + * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| + * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | \ FN15 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | ~Fn1 | ~Fn2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~Fn4 | + * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | +Fn2 | Home | | PgUp | Del | + * | +L2 | Home | | PgUp | Del | * ,------|------|------| |------+------+------. * | | | End | | PgDn | | | * | BkSp | ESC |------| |------| Enter| Space| * | | | Spc | | Ins | | | * `--------------------' `--------------------' + * + * + * + **************************************************************************************************** + * + * Under XOrg, I use my own mapping from QWERTY to "Workman for Programmers" + * See XOrg files in ./addons/ subdirectory. + * + * I have to do so, because of two things: + * 1) my native language is Russian, and XOrg keymap for it is based on QWERTY layout + * 2) I want to have non-standart shifted keys, like $ (as normal) and @ (as shifted), or _ and - + * + * And even if (2) could be solved using FN* keys (but there is limit in firmware for only 32 such + * keys), then (1) can't be solved at firmware level at all. + * + * So, I have to stick with QWERTY as my main layout + my own XOrg keyboard layout for English. + * But sometimes I have to input something when XOrg is not active - for example, in Linux console, + * or in firmware console (while debugging firmware), or when keyboard is connected to not my computer. + * + * For such cases I have Layer5 :) + * // hint: switch to Layer5 is only at Layer4 + * + **************************************************************************************************** + * + * + * + * Keymap: Default Layer in Workman + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ~ | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | ~L1 | | ~L3 | J | F | U | P | $ | : | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | _ FN14 | + * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| + * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | FN15 | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | +L2 | Home | | PgUp | Del | + * ,------|------|------| |------+------+------. + * | | | End | | PgDn | | | + * | BkSp | ESC |------| |------| Enter| Space| + * | | | Spc | | Ins | | | + * `--------------------' `--------------------' + * + * Keymap: Default Layer in Workman / with Shift + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | ~L1 | | ~L3 | J | F | U | P | @ | % | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | - FN14 | + * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| + * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & FN15 | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | +L2 | Home | | PgUp | Del | + * ,------|------|------| |------+------+------. + * | | | End | | PgDn | | | + * | BkSp | ESC |------| |------| Enter| Space| + * | | | Spc | | Ins | | | + * `--------------------' `--------------------' + * */ KEYMAP( // layout: layer 0: default // left hand - GRV, 1, 2, 3, 4, 5, BSLS, + GRV, 1, 2, 3, 4, 5, LBRC, TAB, Q, W, E, R, T, FN1, - LSFT,A, S, D, F, G, + FN16,FN18,S, D, F, G, LCTL,Z, X, C, V, B, FN0, FN1, FN6, CAPS,LALT,LGUI, FN2, HOME, END, FN8, FN9, FN10, // right hand - QUOT,6, 7, 8, 9, 0, EQL, - FN3, Y, U, I, O, P, LBRC, - FN16,J, K, L, SCLN,FN14, + RBRC,6, 7, 8, 9, 0, EQL, + FN3, Y, U, I, O, P, QUOT, + FN17,J, K, L, FN19,FN14, FN4, N, M, COMM,DOT, SLSH,FN15, LEFT,UP, DOWN,RGHT,FN4, PGUP,DEL, @@ -86,9 +155,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // layout: layer 3: F-keys only // left hand - TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, NO, TRNS,F13, F14, F15, F16, NO, TRNS, - TRNS,F17, F18, F19, F20, NO, + TRNS,F17, F18, F19, F20, NO, TRNS,F21, F22, F23, F24, NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, @@ -147,14 +216,35 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), + KEYMAP( // layout: layer 6: F-keys on home+1 row + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,F1, F2, F3, F4, F5, F11, + TRNS,TRNS,NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + F12, F6, F7, F8, F9, F10, PGUP, + NO, NO, NO, NO, TRNS,PGDN, + TRNS,NO, NO, NO, NO, NO, TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + /* // templates to copy from KEYMAP( // layout: layer N: transparent on edges, all others are empty // left hand - TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, - TRNS,NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,TRNS,TRNS,LALT,LGUI, TRNS,TRNS, @@ -219,9 +309,12 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN12 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN13 = RCtrl with tap Space ACTION_MODS_TAP_KEY(MOD_RSFT, KC_MINS), // FN14 = RShift with tap Enter - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN15 = RCtrl with tap Space + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_BSLS), // FN15 = RCtrl with tap Space + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN16 = LShift with tap Tab - ACTION_LAYER_TAP_KEY(2, KC_H), // FN16 = L2 symbols on J key, to use with Mouse keys + ACTION_LAYER_TAP_KEY(2, KC_H), // FN17 = L2 symbols on J key, to use with Mouse keys + ACTION_LAYER_TAP_KEY(6, KC_A), // FN18 = L6 symbols on A key, to use with F* keys + ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN19 = L6 symbols on ; key, to use with F* keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From 3478abd6bf6a8055401bbf4045c0cb5ca2cf09cd Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 19:27:38 +0300 Subject: [PATCH 011/101] Added tap ESC on LGui - handy for Vim --- keyboard/ergodox/keymap_cub.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index e46935d3..9e200c73 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -94,16 +94,16 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand GRV, 1, 2, 3, 4, 5, LBRC, TAB, Q, W, E, R, T, FN1, - FN16,FN18,S, D, F, G, + FN16,FN19,S, D, F, G, LCTL,Z, X, C, V, B, FN0, - FN1, FN6, CAPS,LALT,LGUI, + FN1, FN6, CAPS,LALT,FN17, FN2, HOME, END, FN8, FN9, FN10, // right hand RBRC,6, 7, 8, 9, 0, EQL, FN3, Y, U, I, O, P, QUOT, - FN17,J, K, L, FN19,FN14, + FN18,J, K, L, FN20,FN14, FN4, N, M, COMM,DOT, SLSH,FN15, LEFT,UP, DOWN,RGHT,FN4, PGUP,DEL, @@ -311,10 +311,11 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_RSFT, KC_MINS), // FN14 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_BSLS), // FN15 = RCtrl with tap Space ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN16 = LShift with tap Tab + ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN17 = LShift with tap Tab - ACTION_LAYER_TAP_KEY(2, KC_H), // FN17 = L2 symbols on J key, to use with Mouse keys - ACTION_LAYER_TAP_KEY(6, KC_A), // FN18 = L6 symbols on A key, to use with F* keys - ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN19 = L6 symbols on ; key, to use with F* keys + ACTION_LAYER_TAP_KEY(2, KC_H), // FN18 = L2 symbols on J key, to use with Mouse keys + ACTION_LAYER_TAP_KEY(6, KC_A), // FN19 = L6 symbols on A key, to use with F* keys + ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN20 = L6 symbols on ; key, to use with F* keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From c1f7bb00b238a80b00143a2cc213bea6d2037793 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 19:52:46 +0300 Subject: [PATCH 012/101] Additional switch to L2 --- keyboard/ergodox/keymap_cub.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 9e200c73..32e98bc5 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -94,8 +94,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand GRV, 1, 2, 3, 4, 5, LBRC, TAB, Q, W, E, R, T, FN1, - FN16,FN19,S, D, F, G, - LCTL,Z, X, C, V, B, FN0, + FN16,FN20,S, D, F, G, + LCTL,Z, X, C, FN19,B, FN0, FN1, FN6, CAPS,LALT,FN17, FN2, HOME, END, @@ -103,7 +103,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand RBRC,6, 7, 8, 9, 0, EQL, FN3, Y, U, I, O, P, QUOT, - FN18,J, K, L, FN20,FN14, + FN18,J, K, L, FN21,FN14, FN4, N, M, COMM,DOT, SLSH,FN15, LEFT,UP, DOWN,RGHT,FN4, PGUP,DEL, @@ -137,7 +137,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,NO, NO, NO, NO, PAUS,PSCR, TRNS,WH_L,WH_U,WH_D,WH_R,BTN2,TRNS, TRNS,MS_L,MS_U,MS_D,MS_R,BTN1, - TRNS,NO, NO, NO, NO, BTN3,TRNS, + TRNS,NO, NO, NO, TRNS,BTN3,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -314,8 +314,9 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN17 = LShift with tap Tab ACTION_LAYER_TAP_KEY(2, KC_H), // FN18 = L2 symbols on J key, to use with Mouse keys - ACTION_LAYER_TAP_KEY(6, KC_A), // FN19 = L6 symbols on A key, to use with F* keys - ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN20 = L6 symbols on ; key, to use with F* keys + ACTION_LAYER_TAP_KEY(2, KC_V), // FN19 = L2 symbols on V key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(6, KC_A), // FN20 = L6 symbols on A key, to use with F* keys + ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN21 = L6 symbols on ; key, to use with F* keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From ea5bf49b8902a6ad4ab2d16aa769d42b20d568f6 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 19:58:53 +0300 Subject: [PATCH 013/101] New layer for F* keys --- keyboard/ergodox/keymap_cub.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 32e98bc5..eab27dac 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -237,6 +237,27 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,RSFT,RCTL ), + KEYMAP( // layout: layer 7: F-keys on right hand + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, F1, F2, F3, F4, PGUP, + NO, F5, F6, F7, F8, PGDN, + TRNS,NO, F9, F10, F11, F12, TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + /* // templates to copy from @@ -315,7 +336,7 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_TAP_KEY(2, KC_H), // FN18 = L2 symbols on J key, to use with Mouse keys ACTION_LAYER_TAP_KEY(2, KC_V), // FN19 = L2 symbols on V key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(6, KC_A), // FN20 = L6 symbols on A key, to use with F* keys + ACTION_LAYER_TAP_KEY(7, KC_A), // FN20 = L7 symbols on A key, to use with F* keys ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN21 = L6 symbols on ; key, to use with F* keys }; From c119ccaf72be78c7304c6308a4bc2fd5c09aafd2 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Sep 2013 20:00:24 +0300 Subject: [PATCH 014/101] Decreasing default TAPPING_TERM --- keyboard/ergodox/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index de32be7e..fc522ce7 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -50,7 +50,8 @@ Project located at * * And so, there is no sense to have DEBOUNCE higher than 2. */ -#define DEBOUNCE 2 +#define DEBOUNCE 2 +#define TAPPING_TERM 180 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE From a84df046df151c78ae4ad25e5a97efc496dbd984 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 10 Sep 2013 04:30:46 +0300 Subject: [PATCH 015/101] Updates to CUB's layouts This update is mainly needed because Ergodox's layout should be as much possible closer to original QWERTY layout, to not break XKB layout in XOrg for Russian language. Also, because Ergodox's switches SW5.7 and SW5.8 are not as convenient as I'd like to - additional mappings were added on Layer7 for following symbols: ^ ' " \ --- .../ergodox/addons/etc/layout/xkb/workman | 10 +++--- keyboard/ergodox/keymap_cub.h | 35 ++++++++++--------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/keyboard/ergodox/addons/etc/layout/xkb/workman b/keyboard/ergodox/addons/etc/layout/xkb/workman index cf9e746e..313a4a0f 100644 --- a/keyboard/ergodox/addons/etc/layout/xkb/workman +++ b/keyboard/ergodox/addons/etc/layout/xkb/workman @@ -132,11 +132,11 @@ xkb_symbols "wce" { name[Group1] = "Workman for Programmers, with light modifications from cub@uanic, for Ergodox"; // Unmodified Shift AltGr Shift+AltGr - key { [ apostrophe, quotedbl ] }; - key { [ asciicircum, backslash ] }; - key { [ colon, percent ] }; - key { [ underscore, minus, hyphen ] }; - key { [ bar, ampersand ] }; + key { [ apostrophe, quotedbl ] }; + key { [ asciicircum, backslash ] }; + key { [ colon, percent ] }; + key { [ minus, underscore, hyphen ] }; + key { [ bar, ampersand ] }; }; diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index eab27dac..2fd932ad 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -3,13 +3,13 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in QWERTY * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ~ | 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | = | + * | ~ | 1 | 2 | 3 | 4 | 5 | \ | | - | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | ~L1 | | ~L3 | Y | U | I | O | P | ' | + * | Tab | Q | W | E | R | T | ~L1 | | ~L3 | Y | U | I | O | P | [ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | - FN14 | + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | ' FN14 | * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| - * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | \ FN15 | + * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | ] FN15 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | * `----------------------------------' `----------------------------------' @@ -53,7 +53,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | D | R | W | B | ~L1 | | ~L3 | J | F | U | P | $ | : | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | _ FN14 | + * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | - FN14 | * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | FN15 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -74,7 +74,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | D | R | W | B | ~L1 | | ~L3 | J | F | U | P | @ | % | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | - FN14 | + * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | _ FN14 | * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & FN15 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -92,7 +92,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // layout: layer 0: default // left hand - GRV, 1, 2, 3, 4, 5, LBRC, + GRV, 1, 2, 3, 4, 5, BSLS, TAB, Q, W, E, R, T, FN1, FN16,FN20,S, D, F, G, LCTL,Z, X, C, FN19,B, FN0, @@ -101,8 +101,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { END, FN8, FN9, FN10, // right hand - RBRC,6, 7, 8, 9, 0, EQL, - FN3, Y, U, I, O, P, QUOT, + MINS,6, 7, 8, 9, 0, EQL, + FN3, Y, U, I, O, P, LBRC, FN18,J, K, L, FN21,FN14, FN4, N, M, COMM,DOT, SLSH,FN15, LEFT,UP, DOWN,RGHT,FN4, @@ -249,9 +249,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LCTL,LSFT,TRNS, // right hand NO, NO, NO, NO, NO, NO, TRNS, - TRNS,NO, F1, F2, F3, F4, PGUP, - NO, F5, F6, F7, F8, PGDN, - TRNS,NO, F9, F10, F11, F12, TRNS, + TRNS,MINS,F1, F2, F3, F4, PGUP, + BSLS,F5, F6, F7, F8, PGDN, + TRNS,FN22,F9, F10, F11, F12, FN23, RGUI,RALT,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -329,15 +329,18 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN11 = RAlt with tap Ins ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN12 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN13 = RCtrl with tap Space - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_MINS), // FN14 = RShift with tap Enter - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_BSLS), // FN15 = RCtrl with tap Space + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN14 = RShift with tap quotes + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN15 = RCtrl with tap ] ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN16 = LShift with tap Tab - ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN17 = LShift with tap Tab + ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN17 = LShift with tap Escape - ACTION_LAYER_TAP_KEY(2, KC_H), // FN18 = L2 symbols on J key, to use with Mouse keys + ACTION_LAYER_TAP_KEY(2, KC_H), // FN18 = L2 symbols on H key, to use with Mouse keys ACTION_LAYER_TAP_KEY(2, KC_V), // FN19 = L2 symbols on V key, to use with Numpad keys ACTION_LAYER_TAP_KEY(7, KC_A), // FN20 = L7 symbols on A key, to use with F* keys ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN21 = L6 symbols on ; key, to use with F* keys + + ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN22 = Shifted BackSlash // " in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN23 = Shifted Minus // \ in Workman }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From d30fba8ce25350cdf0c221ada43c0020d1eac2ed Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 16 Sep 2013 05:21:44 +0300 Subject: [PATCH 016/101] Additional optimization, reach speed 368 scans/second --- keyboard/ergodox/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index b75d7c57..0c5b7311 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -146,7 +146,6 @@ uint8_t matrix_scan(void) for (uint8_t i = 0; i < MATRIX_ROWS; i++) { select_row(i); - _delay_us(30); // without this wait read unstable value. matrix_row_t cols = read_cols(i); if (matrix_debouncing[i] != cols) { matrix_debouncing[i] = cols; @@ -246,6 +245,7 @@ static matrix_row_t read_cols(uint8_t row) return data; } } else { + _delay_us(30); // without this wait read unstable value. // read from teensy return (PINF&(1<<0) ? 0 : (1<<0)) | From 065e4e3dd56779a64ad108c1fbae16daf4dd5068 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 16 Sep 2013 04:47:50 +0300 Subject: [PATCH 017/101] Layers reordered, according to Hasu's reccomendation + minor tweaks --- keyboard/ergodox/keymap_cub.h | 362 +++++++++++++++++++--------------- keyboard/ergodox/matrix.c | 70 +++---- 2 files changed, 236 insertions(+), 196 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 2fd932ad..86b6c794 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -5,13 +5,13 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ~ | 1 | 2 | 3 | 4 | 5 | \ | | - | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | ~L1 | | ~L3 | Y | U | I | O | P | [ | + * | Tab | Q | W | E | R | T | ~L5 | | ~L6 | Y | U | I | O | P | [ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | ' FN14 | - * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| - * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | ] FN15 | + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| + * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | ] | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | + * | ~L5 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L6 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | +L2 | Home | | PgUp | Del | @@ -39,8 +39,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * But sometimes I have to input something when XOrg is not active - for example, in Linux console, * or in firmware console (while debugging firmware), or when keyboard is connected to not my computer. * - * For such cases I have Layer5 :) - * // hint: switch to Layer5 is only at Layer4 + * For such cases I have Layer1 :) + * // hint: switch to Layer1 is only at Layer6 * **************************************************************************************************** * @@ -51,13 +51,13 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ~ | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | D | R | W | B | ~L1 | | ~L3 | J | F | U | P | $ | : | + * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | $ | : | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | - FN14 | - * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| - * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | FN15 | + * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | - | + * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| + * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | + * | ~L5 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L6 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | +L2 | Home | | PgUp | Del | @@ -72,13 +72,13 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | D | R | W | B | ~L1 | | ~L3 | J | F | U | P | @ | % | + * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | _ FN14 | - * |--------+------+------+------+------+------| L0 | | ~L4 |------+------+------+------+------+--------| - * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & FN15 | + * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | _ | + * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| + * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | ~L1 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L4 | + * | ~L5 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L6 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | +L2 | Home | | PgUp | Del | @@ -90,112 +90,28 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ - KEYMAP( // layout: layer 0: default + KEYMAP( // Layer0: default, leftled:none // left hand GRV, 1, 2, 3, 4, 5, BSLS, - TAB, Q, W, E, R, T, FN1, - FN16,FN20,S, D, F, G, - LCTL,Z, X, C, FN19,B, FN0, - FN1, FN6, CAPS,LALT,FN17, - FN2, HOME, + TAB, Q, W, E, R, T, FN19, + FN11,FN25,FN24,D, F, G, + LCTL,Z, X, C, FN23,B, FN15, + FN19,FN18,CAPS,LALT,FN12, + FN17,HOME, END, - FN8, FN9, FN10, + FN5, FN6, FN7, // right hand MINS,6, 7, 8, 9, 0, EQL, - FN3, Y, U, I, O, P, LBRC, - FN18,J, K, L, FN21,FN14, - FN4, N, M, COMM,DOT, SLSH,FN15, - LEFT,UP, DOWN,RGHT,FN4, + FN20,Y, U, I, O, P, LBRC, + FN22,J, K, L, FN26,FN13, + FN21,N, M, COMM,DOT, SLSH,FN14, + LEFT,UP, DOWN,RGHT,FN20, PGUP,DEL, PGDN, - FN11,FN12,FN13 + FN8, FN9, FN10 ), - KEYMAP( // layout: layer 1: F-keys instead of numbers - // left hand - TRNS,F1, F2, F3, F4, F5, F6, - 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, - // right hand - 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, - TRNS,TRNS,TRNS - ), - - KEYMAP( // layout: layer 2: mouse + numpad - // left hand - TRNS,NO, NO, NO, NO, PAUS,PSCR, - TRNS,WH_L,WH_U,WH_D,WH_R,BTN2,TRNS, - TRNS,MS_L,MS_U,MS_D,MS_R,BTN1, - TRNS,NO, NO, NO, TRNS,BTN3,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS, - // right hand - SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, - TRNS,NO, P7, P8, P9, PMNS,BSPC, - TRNS,P4, P5, P6, PPLS,PENT, - TRNS,NO, P1, P2, P3, PPLS,PENT, - P0, PDOT,SLSH,PENT,PENT, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS - ), - - KEYMAP( // layout: layer 3: F-keys only - // left hand - TRNS,NO, NO, NO, NO, NO, NO, - TRNS,F13, F14, F15, F16, NO, TRNS, - TRNS,F17, F18, F19, F20, NO, - TRNS,F21, F22, F23, F24, NO, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS, - // right hand - NO, NO, NO, NO, NO, NO, TRNS, - TRNS,NO, F1, F2, F3, F4, TRNS, - NO, F5, F6, F7, F8, TRNS, - TRNS,NO, F9, F10, F11, F12, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS - ), - - KEYMAP( // layout: layer 4: F-keys + cursor - // left hand - TRNS,F1, F2, F3, F4, F5, F6, - FN7, NO, PGUP,UP, PGDN,PGUP,TRNS, - TRNS,NO, LEFT,DOWN,RGHT,PGDN, - TRNS,NO, NO, END, HOME,NO, TRNS, - FN5, TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS, - // right hand - F7, F8, F9, F10, F11, F12, MINS, - TRNS,PGUP,PGUP,UP, PGDN,NO, FN7, - PGDN,LEFT,DOWN,RGHT,NO, TRNS, - TRNS,NO, HOME,END, NO, NO, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS - ), - - KEYMAP( // layout: layer 5: Workman layout + KEYMAP( // Layer1: Workman layout, leftled:all // left hand TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,Q, D, R, W, B, TRNS, @@ -216,7 +132,144 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // layout: layer 6: F-keys on home+1 row + KEYMAP( // Layer2: mouse + numpad, leftled:blue + // left hand + TRNS,NO, NO, NO, NO, PAUS,PSCR, + TRNS,WH_L,WH_U,WH_D,WH_R,BTN2,TRNS, + TRNS,MS_L,MS_U,MS_D,MS_R,BTN1, + TRNS,NO, NO, NO, TRNS,BTN3,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, + TRNS,NO, P7, P8, P9, PMNS,BSPC, + TRNS,P4, P5, P6, PPLS,PENT, + TRNS,NO, P1, P2, P3, PPLS,PENT, + P0, PDOT,SLSH,PENT,PENT, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer3: F-keys + PgUp/PgDn on right hand, leftled:green + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, TRNS,NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, F1, F2, F3, F4, PGUP, + NO, F5, F6, F7, F8, PGDN, + TRNS,NO, F9, F10, F11, F12, NO, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + + KEYMAP( // Layer4: unconvenient keys on right hand, leftled:red + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + + // in Workman this will be: + // = + // { } ( ) + + // ' " ^ ^ \ + // [ < > ] \ + + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, 4, 5, 9, 0, PPLS, + NO, BSLS,FN1, MINS,MINS,FN2, + TRNS,NO, 6, FN3, FN4, 7, FN2, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer5: F-keys instead of numbers, leftled:red + // left hand + TRNS,F1, F2, F3, F4, F5, F6, + 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, + // right hand + 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, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer6: F-keys, cursor, Workman-layer switch, Teensy, leftled:red+onboard + // left hand + TRNS,F1, F2, F3, F4, F5, F6, + FN0, NO, PGUP,UP, PGDN,PGUP,TRNS, + TRNS,NO, LEFT,DOWN,RGHT,PGDN, + TRNS,NO, NO, END, HOME,NO, TRNS, + FN16,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + F7, F8, F9, F10, F11, F12, MINS, + TRNS,PGUP,PGUP,UP, PGDN,NO, FN0, + PGDN,LEFT,DOWN,RGHT,NO, TRNS, + TRNS,NO, HOME,END, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + // + // rarely used + // + + KEYMAP( // Layer7: F-keys only + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,F13, F14, F15, F16, NO, TRNS, + TRNS,F17, F18, F19, F20, NO, + TRNS,F21, F22, F23, F24, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, F1, F2, F3, F4, TRNS, + NO, F5, F6, F7, F8, TRNS, + TRNS,NO, F9, F10, F11, F12, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer8: F-keys on home+1 row // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,F1, F2, F3, F4, F5, F11, @@ -237,31 +290,10 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,RSFT,RCTL ), - KEYMAP( // layout: layer 7: F-keys on right hand - // left hand - TRNS,NO, NO, NO, NO, NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, - TRNS,TRNS,NO, NO, NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, - TRNS,TRNS,TRNS,LALT,LGUI, - TRNS,TRNS, - TRNS, - LCTL,LSFT,TRNS, - // right hand - NO, NO, NO, NO, NO, NO, TRNS, - TRNS,MINS,F1, F2, F3, F4, PGUP, - BSLS,F5, F6, F7, F8, PGDN, - TRNS,FN22,F9, F10, F11, F12, FN23, - RGUI,RALT,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,RSFT,RCTL - ), - /* // templates to copy from - KEYMAP( // layout: layer N: transparent on edges, all others are empty + KEYMAP( // LayerN: transparent on edges + hard-defined thumb keys, all others are empty // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, @@ -281,7 +313,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS,RSFT,RCTL ), - KEYMAP( // layout: layer N: fully transparent + KEYMAP( // LayerN: fully transparent // left hand TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, @@ -314,33 +346,39 @@ enum function_id { * Fn action definition */ static const uint16_t PROGMEM fn_actions[] = { - ACTION_LAYER_SET(0, ON_BOTH), // FN0 - switch to Layer0 - ACTION_LAYER_MOMENTARY(1), // FN1 - push Layer1 - ACTION_LAYER_SET(2, ON_BOTH), // FN2 - switch to Layer2 - ACTION_LAYER_MOMENTARY(3), // FN3 - push Layer3 - ACTION_LAYER_MOMENTARY(4), // FN4 - push Layer4 - ACTION_LAYER_SET(5, ON_BOTH), // FN5 - switch to Layer5 - ACTION_LAYER_MOMENTARY(2), // FN6 - push Layer2 - ACTION_FUNCTION(TEENSY_KEY), // FN7 - Teensy key + ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key - ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN8 = LShift with tap BackSpace - ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), // FN9 = LCtrl with tap Escape - ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN10 = LAlt with tap Space - ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN11 = RAlt with tap Ins - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN12 = RShift with tap Enter - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN13 = RCtrl with tap Space - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN14 = RShift with tap quotes - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN15 = RCtrl with tap ] - ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN16 = LShift with tap Tab - ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN17 = LShift with tap Escape + ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman - ACTION_LAYER_TAP_KEY(2, KC_H), // FN18 = L2 symbols on H key, to use with Mouse keys - ACTION_LAYER_TAP_KEY(2, KC_V), // FN19 = L2 symbols on V key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(7, KC_A), // FN20 = L7 symbols on A key, to use with F* keys - ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN21 = L6 symbols on ; key, to use with F* keys + ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), // FN6 = LCtrl with tap Escape + ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN7 = LAlt with tap Space + ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space - ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN22 = Shifted BackSlash // " in Workman - ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN23 = Shifted Minus // \ in Workman + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN11 = LShift with tap Tab + ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN12 = LGui with tap Escape + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN13 = RShift with tap quotes + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN14 = RCtrl with tap ] + + ACTION_LAYER_SET(0, ON_BOTH), // FN15 - set Layer0 + ACTION_LAYER_SET(1, ON_BOTH), // FN16 - set Layer1, to use Workman layout at firmware level + ACTION_LAYER_SET(2, ON_BOTH), // FN17 - set Layer2, to use with Numpad keys + + ACTION_LAYER_MOMENTARY(2), // FN18 - momentary Layer2, to use with Numpad keys + ACTION_LAYER_MOMENTARY(5), // FN19 - momentary Layer5, to use with F* keys on top row + ACTION_LAYER_MOMENTARY(6), // FN20 - momentary Layer6, to use with F* keys, cursor, Teensy, Workman-layer switch + ACTION_LAYER_MOMENTARY(7), // FN21 - momentary Layer7, to use with F* keys (F1-F24) + + ACTION_LAYER_TAP_KEY(2, KC_H), // FN22 = momentary Layer2 on H key, to use with Mouse keys + ACTION_LAYER_TAP_KEY(2, KC_V), // FN23 = momentary Layer2 on V key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(3, KC_S), // FN24 = momentary Layer3 on S key, to use with F* keys + ACTION_LAYER_TAP_KEY(4, KC_A), // FN25 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(8, KC_SCLN), // FN26 = momentary Layer8 on ; key, to use with F* keys on home+1 row }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index 0c5b7311..90c129d0 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -105,43 +105,45 @@ uint8_t matrix_scan(void) #ifdef KEYMAP_CUB uint8_t layer = biton32(layer_state); - if (layer == 1) { - ergodox_left_led_1_on(); - ergodox_left_led_2_off(); - ergodox_left_led_3_off(); - } else if (layer == 2) { - ergodox_left_led_1_off(); - ergodox_left_led_2_on(); - ergodox_left_led_3_off(); - } else if (layer == 3) { - ergodox_left_led_1_off(); - ergodox_left_led_2_off(); - ergodox_left_led_3_on(); - } else if (layer == 4) { - ergodox_left_led_1_on(); - ergodox_left_led_2_off(); - ergodox_left_led_3_on(); - } else if (layer == 5) { - ergodox_left_led_1_on(); - ergodox_left_led_2_on(); - ergodox_left_led_3_off(); - } else if (layer == 6) { - ergodox_left_led_1_off(); - ergodox_left_led_2_on(); - ergodox_left_led_3_on(); - } else if (layer == 7) { - ergodox_left_led_1_on(); - ergodox_left_led_2_on(); - ergodox_left_led_3_on(); - } else { - ergodox_left_led_1_off(); - ergodox_left_led_2_off(); - ergodox_left_led_3_off(); + ergodox_board_led_off(); + switch (layer) { + case 1: + // all + ergodox_left_led_1_on(); + ergodox_left_led_2_on(); + ergodox_left_led_3_on(); + break; + case 2: + // blue + ergodox_left_led_1_off(); + ergodox_left_led_2_on(); + ergodox_left_led_3_off(); + break; + case 3: + // green + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_on(); + break; + case 6: + ergodox_board_led_on(); + // break missed intentionally + case 4: + case 5: + // red + ergodox_left_led_1_on(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); + break; + default: + // none + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); + break; } - // not actually needed because we already calling init_mcp23018() in next line mcp23018_status = ergodox_left_leds_update(); - #endif for (uint8_t i = 0; i < MATRIX_ROWS; i++) { From 1f7cd390ae1ef42f82fe76edbdb06a2dbb1ecea2 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 16 Sep 2013 05:49:04 +0300 Subject: [PATCH 018/101] Remove unused layer --- keyboard/ergodox/keymap_cub.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 86b6c794..eb32370d 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -103,7 +103,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand MINS,6, 7, 8, 9, 0, EQL, FN20,Y, U, I, O, P, LBRC, - FN22,J, K, L, FN26,FN13, + FN22,J, K, L, SCLN,FN13, FN21,N, M, COMM,DOT, SLSH,FN14, LEFT,UP, DOWN,RGHT,FN20, PGUP,DEL, @@ -269,27 +269,6 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer8: F-keys on home+1 row - // left hand - TRNS,NO, NO, NO, NO, NO, NO, - TRNS,F1, F2, F3, F4, F5, F11, - TRNS,TRNS,NO, NO, NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, - TRNS,TRNS,TRNS,LALT,LGUI, - TRNS,TRNS, - TRNS, - LCTL,LSFT,TRNS, - // right hand - NO, NO, NO, NO, NO, NO, TRNS, - F12, F6, F7, F8, F9, F10, PGUP, - NO, NO, NO, NO, TRNS,PGDN, - TRNS,NO, NO, NO, NO, NO, TRNS, - RGUI,RALT,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,RSFT,RCTL - ), - /* // templates to copy from @@ -378,7 +357,6 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_TAP_KEY(2, KC_V), // FN23 = momentary Layer2 on V key, to use with Numpad keys ACTION_LAYER_TAP_KEY(3, KC_S), // FN24 = momentary Layer3 on S key, to use with F* keys ACTION_LAYER_TAP_KEY(4, KC_A), // FN25 = momentary Layer4 on A key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(8, KC_SCLN), // FN26 = momentary Layer8 on ; key, to use with F* keys on home+1 row }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From fb7dba08a396f467ddf69b9fe182013771367cde Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 16 Sep 2013 13:31:32 +0300 Subject: [PATCH 019/101] Split Layer2 into two independent layers --- keyboard/ergodox/keymap_cub.h | 46 ++++++++++++++++++++++++++--------- keyboard/ergodox/matrix.c | 2 ++ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index eb32370d..b8c5acb9 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -94,8 +94,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand GRV, 1, 2, 3, 4, 5, BSLS, TAB, Q, W, E, R, T, FN19, - FN11,FN25,FN24,D, F, G, - LCTL,Z, X, C, FN23,B, FN15, + FN11,FN24,FN23,FN25,FN22,G, + LCTL,Z, X, C, V, B, FN15, FN19,FN18,CAPS,LALT,FN12, FN17,HOME, END, @@ -103,7 +103,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand MINS,6, 7, 8, 9, 0, EQL, FN20,Y, U, I, O, P, LBRC, - FN22,J, K, L, SCLN,FN13, + H, J, K, L, SCLN,FN13, FN21,N, M, COMM,DOT, SLSH,FN14, LEFT,UP, DOWN,RGHT,FN20, PGUP,DEL, @@ -132,12 +132,12 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer2: mouse + numpad, leftled:blue + KEYMAP( // Layer2: numpad, leftled:blue // left hand TRNS,NO, NO, NO, NO, PAUS,PSCR, - TRNS,WH_L,WH_U,WH_D,WH_R,BTN2,TRNS, - TRNS,MS_L,MS_U,MS_D,MS_R,BTN1, - TRNS,NO, NO, NO, TRNS,BTN3,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, TRNS,NO, + TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -248,7 +248,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // rarely used // - KEYMAP( // Layer7: F-keys only + KEYMAP( // Layer7: F-keys only, leftled:red // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,F13, F14, F15, F16, NO, TRNS, @@ -269,6 +269,28 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), + KEYMAP( // Layer8: mouse and navigation, leftled:blue + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, TRNS,NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + + // right hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,BTN2,WH_L,WH_U,WH_D,WH_R,PGUP, + BTN1,MS_L,MS_U,MS_D,MS_R,PGDN, + TRNS,BTN3,HOME,END, DEL, INS, NO, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + /* // templates to copy from @@ -353,10 +375,10 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_MOMENTARY(6), // FN20 - momentary Layer6, to use with F* keys, cursor, Teensy, Workman-layer switch ACTION_LAYER_MOMENTARY(7), // FN21 - momentary Layer7, to use with F* keys (F1-F24) - ACTION_LAYER_TAP_KEY(2, KC_H), // FN22 = momentary Layer2 on H key, to use with Mouse keys - ACTION_LAYER_TAP_KEY(2, KC_V), // FN23 = momentary Layer2 on V key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(3, KC_S), // FN24 = momentary Layer3 on S key, to use with F* keys - ACTION_LAYER_TAP_KEY(4, KC_A), // FN25 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(2, KC_F), // FN22 = momentary Layer2 on F key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(3, KC_S), // FN23 = momentary Layer3 on S key, to use with F* keys + ACTION_LAYER_TAP_KEY(4, KC_A), // FN24 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(8, KC_D), // FN25 = momentary Layer8 on D key, to use with mouse and navigation keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index 90c129d0..e2bd1298 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -114,6 +114,7 @@ uint8_t matrix_scan(void) ergodox_left_led_3_on(); break; case 2: + case 8: // blue ergodox_left_led_1_off(); ergodox_left_led_2_on(); @@ -130,6 +131,7 @@ uint8_t matrix_scan(void) // break missed intentionally case 4: case 5: + case 7: // red ergodox_left_led_1_on(); ergodox_left_led_2_off(); From 41845b485fb5ae854a5a9a8e63cde6b98b86e2e8 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 16 Sep 2013 06:00:00 +0300 Subject: [PATCH 020/101] TODO updated --- keyboard/ergodox/TODO | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboard/ergodox/TODO b/keyboard/ergodox/TODO index d630c730..c8ff5ee3 100644 --- a/keyboard/ergodox/TODO +++ b/keyboard/ergodox/TODO @@ -1,10 +1,6 @@ -1. Flash led on ~Ln keypress (for now it works only on +Ln) 2. Flash NumLock led only when "numpad" layer is active 3. Command (in terms of IS_COMMAND) to switch to no-leds mode 4. Increase count of ACTION keys -5. Check how it works with ACTION/TAP keys (layerN+key or modifier+key) 6. Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) -7. Fix Right TEENSY key (for now it locks kbd & system) -8. Cleanup everything, add conditionals (ifdef/ifndef), push to github From f5f7a1793a27b18e87d0aa4692cd6ec94067978d Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 16 Sep 2013 13:10:08 +0300 Subject: [PATCH 021/101] Added makefile for LUFA stack --- keyboard/ergodox/Makefile.lufa | 134 +++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 keyboard/ergodox/Makefile.lufa diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa new file mode 100644 index 00000000..4ce21d58 --- /dev/null +++ b/keyboard/ergodox/Makefile.lufa @@ -0,0 +1,134 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# Target file name (without extension). +TARGET = ergodox_lufa + +# Directory common source filess exist +TOP_DIR = ../.. + +# Directory keyboard dependent files exist +TARGET_DIR = . + +# project specific files +SRC = keymap.c \ + matrix.c \ + led.c \ + ergodox.c \ + twimaster.c + +CONFIG_H = config.h + + +# MCU name, you MUST set this to match the board you are using +# type "make clean" after changing this, so all files will be rebuilt +MCU = atmega32u4 +#MCU = at90usb1286 + + +# Processor frequency. +# Normally the first thing your program should do is set the clock prescaler, +# so your program will run at the correct speed. You should also set this +# variable to same clock speed. The _delay_ms() macro uses this, and many +# examples use this variable to calculate timings. Do not add a "UL" here. +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) + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +OPT_DEFS += -DBOOTLOADER_SIZE=512 -DFLASH_SIZE_BYTES=0x8000 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+5000) +EXTRAKEY_ENABLE = yes # Audio control and System control(+600) +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 - not yet supported in LUFA +#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support +INVERT_NUMLOCK = yes # invert state of NumLock led + + +# Search Path +VPATH += $(TARGET_DIR) +VPATH += $(TOP_DIR) + +include $(TOP_DIR)/protocol/lufa.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk + +dvorak: OPT_DEFS += -DKEYMAP_DVORAK +dvorak: all + +colemak: OPT_DEFS += -DKEYMAP_COLEMAK +colemak: all + +workman: OPT_DEFS += -DKEYMAP_WORKMAN +workman: all + +cub: OPT_DEFS += -DKEYMAP_CUB +cub: all + + From b32f56dff97a0fc7e0a1a3b7a1a15f9df5ab04c5 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Fri, 20 Sep 2013 22:05:22 +0300 Subject: [PATCH 022/101] Typo fix --- keyboard/ergodox/led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/led.c b/keyboard/ergodox/led.c index 55fb4ff3..7a2c4ebf 100644 --- a/keyboard/ergodox/led.c +++ b/keyboard/ergodox/led.c @@ -26,7 +26,7 @@ along with this program. If not, see . void led_set(uint8_t usb_led) { // topmost - NumLock -#ifdef INVERT_NUMLOCK +#ifndef INVERT_NUMLOCK if (usb_led & (1< Date: Fri, 20 Sep 2013 22:06:30 +0300 Subject: [PATCH 023/101] Experimenting with layout and layout indication --- keyboard/ergodox/keymap_cub.h | 38 ++++++++++++++++++++--------------- keyboard/ergodox/matrix.c | 17 +++++++--------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index b8c5acb9..fc5a4755 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -95,7 +95,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { GRV, 1, 2, 3, 4, 5, BSLS, TAB, Q, W, E, R, T, FN19, FN11,FN24,FN23,FN25,FN22,G, - LCTL,Z, X, C, V, B, FN15, + LCTL,FN28,FN27,FN29,FN26,B, FN15, FN19,FN18,CAPS,LALT,FN12, FN17,HOME, END, @@ -137,7 +137,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,NO, NO, NO, NO, PAUS,PSCR, TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,NO, NO, NO, TRNS,NO, - TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, TRNS,NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -158,7 +158,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,NO, TRNS,NO, NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, TRNS,NO, NO, NO, TRNS, TRNS,TRNS,TRNS,LALT,LGUI, TRNS,TRNS, TRNS, @@ -179,23 +179,24 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,TRNS,NO, NO, NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,NO, NO, NO, NO, TRNS, TRNS,TRNS,TRNS,LALT,LGUI, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, - // in Workman this will be: + // in Workman right hand will be: // = - // { } ( ) + - // ' " ^ ^ \ - // [ < > ] \ + // ^ { } ( ) + + // ' ! $ " ; \ + // # [ < > ] AppMenu + // // right hand NO, NO, NO, NO, NO, NO, TRNS, - TRNS,NO, 4, 5, 9, 0, PPLS, - NO, BSLS,FN1, MINS,MINS,FN2, - TRNS,NO, 6, FN3, FN4, 7, FN2, + TRNS,MINS,4, 5, 9, 0, PPLS, + BSLS,2, P, FN1, 1, FN2, + TRNS,3, 6, FN3, FN4, 7, APP, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -228,7 +229,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,F1, F2, F3, F4, F5, F6, FN0, NO, PGUP,UP, PGDN,PGUP,TRNS, TRNS,NO, LEFT,DOWN,RGHT,PGDN, - TRNS,NO, NO, END, HOME,NO, TRNS, + TRNS,INS, DEL, END, HOME,NO, TRNS, FN16,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -237,7 +238,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { F7, F8, F9, F10, F11, F12, MINS, TRNS,PGUP,PGUP,UP, PGDN,NO, FN0, PGDN,LEFT,DOWN,RGHT,NO, TRNS, - TRNS,NO, HOME,END, NO, NO, TRNS, + TRNS,NO, HOME,END, DEL, INS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -269,12 +270,12 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer8: mouse and navigation, leftled:blue + KEYMAP( // Layer8: mouse and navigation, leftled:blue and green // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,NO, NO, TRNS,NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, TRNS,NO, NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -372,13 +373,18 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_MOMENTARY(2), // FN18 - momentary Layer2, to use with Numpad keys ACTION_LAYER_MOMENTARY(5), // FN19 - momentary Layer5, to use with F* keys on top row - ACTION_LAYER_MOMENTARY(6), // FN20 - momentary Layer6, to use with F* keys, cursor, Teensy, Workman-layer switch + ACTION_LAYER_MOMENTARY(6), // FN20 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch ACTION_LAYER_MOMENTARY(7), // FN21 - momentary Layer7, to use with F* keys (F1-F24) ACTION_LAYER_TAP_KEY(2, KC_F), // FN22 = momentary Layer2 on F key, to use with Numpad keys ACTION_LAYER_TAP_KEY(3, KC_S), // FN23 = momentary Layer3 on S key, to use with F* keys ACTION_LAYER_TAP_KEY(4, KC_A), // FN24 = momentary Layer4 on A key, to use with unconvenient keys ACTION_LAYER_TAP_KEY(8, KC_D), // FN25 = momentary Layer8 on D key, to use with mouse and navigation keys + + ACTION_LAYER_TAP_KEY(2, KC_V), // FN26 = momentary Layer2 on V key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(3, KC_X), // FN27 = momentary Layer3 on X key, to use with F* keys + ACTION_LAYER_TAP_KEY(4, KC_Z), // FN28 = momentary Layer4 on Z key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(8, KC_C), // FN29 = momentary Layer8 on C key, to use with mouse and navigation keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index e2bd1298..e50932c9 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -106,6 +106,9 @@ uint8_t matrix_scan(void) uint8_t layer = biton32(layer_state); ergodox_board_led_off(); + ergodox_left_led_1_off(); + ergodox_left_led_2_off(); + ergodox_left_led_3_off(); switch (layer) { case 1: // all @@ -114,16 +117,15 @@ uint8_t matrix_scan(void) ergodox_left_led_3_on(); break; case 2: - case 8: // blue - ergodox_left_led_1_off(); ergodox_left_led_2_on(); - ergodox_left_led_3_off(); break; + case 8: + // blue and green + ergodox_left_led_2_on(); + // break missed intentionally case 3: // green - ergodox_left_led_1_off(); - ergodox_left_led_2_off(); ergodox_left_led_3_on(); break; case 6: @@ -134,14 +136,9 @@ uint8_t matrix_scan(void) case 7: // red ergodox_left_led_1_on(); - ergodox_left_led_2_off(); - ergodox_left_led_3_off(); break; default: // none - ergodox_left_led_1_off(); - ergodox_left_led_2_off(); - ergodox_left_led_3_off(); break; } From 221af6bffbb8c5af57ae64068d34e5ea165b3a82 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Fri, 20 Sep 2013 22:07:50 +0300 Subject: [PATCH 024/101] Experimental additions to LUFA makefile --- keyboard/ergodox/Makefile.lufa | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index 4ce21d58..5c542955 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -90,11 +90,14 @@ 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 +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + # Boot Section Size in *bytes* # Teensy halfKay 512 # Atmel DFU loader 4096 # LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=512 -DFLASH_SIZE_BYTES=0x8000 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 -DFLASH_SIZE_BYTES=0x8000 # Build Options From 27e3da508e0933a4a3e8bcae308773ca22548f3b Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 25 Sep 2013 17:03:33 +0300 Subject: [PATCH 025/101] Update Makefile.lufa per Hasu recommendation --- keyboard/ergodox/Makefile.lufa | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index 5c542955..afa215c4 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -97,7 +97,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Teensy halfKay 512 # Atmel DFU loader 4096 # LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -DFLASH_SIZE_BYTES=0x8000 +OPT_DEFS += -DBOOTLOADER_SIZE=512 # Build Options @@ -109,7 +109,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+600) 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 - not yet supported in LUFA +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support INVERT_NUMLOCK = yes # invert state of NumLock led From a6146082fb96e13b097d7d77c40e48cb1d16af95 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 25 Sep 2013 18:28:13 +0300 Subject: [PATCH 026/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 75 ++++++++++++++++++----------------- 1 file changed, 38 insertions(+), 37 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index fc5a4755..64d75d69 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -3,11 +3,11 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in QWERTY * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ~ | 1 | 2 | 3 | 4 | 5 | \ | | - | 6 | 7 | 8 | 9 | 0 | = | + * | Esc | 1 | 2 | 3 | 4 | 5 | \ | | - | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | ~L5 | | ~L6 | Y | U | I | O | P | [ | + * | ~ | Q | W | E | R | T | ~L5 | | ~L6 | Y | U | I | O | P | [ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * | Tab/Shf| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| * | LCtrl | Z | X | C | V | B | | | | N | M | , | . | / | ] | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -49,11 +49,11 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in Workman * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ~ | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | + * | Esc | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | $ | : | + * | ~ | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | $ | : | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | - | + * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | - | * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -70,11 +70,11 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in Workman / with Shift * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | + * | Esc | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | + * | ` | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | A | S | H | T | G |------| |------| Y | N | E | O | I | _ | + * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | _ | * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -92,20 +92,20 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer0: default, leftled:none // left hand - GRV, 1, 2, 3, 4, 5, BSLS, - TAB, Q, W, E, R, T, FN19, - FN11,FN24,FN23,FN25,FN22,G, - LCTL,FN28,FN27,FN29,FN26,B, FN15, - FN19,FN18,CAPS,LALT,FN12, - FN17,HOME, + ESC, 1, 2, 3, 4, 5, BSLS, + GRV, Q, W, E, R, T, FN20, + FN11,FN23,FN24,FN25,FN26,G, + LCTL,FN27,FN28,FN29,FN30,B, FN16, + FN20,FN19,CAPS,FN12,FN13, + FN18,HOME, END, FN5, FN6, FN7, // right hand MINS,6, 7, 8, 9, 0, EQL, - FN20,Y, U, I, O, P, LBRC, - H, J, K, L, SCLN,FN13, - FN21,N, M, COMM,DOT, SLSH,FN14, - LEFT,UP, DOWN,RGHT,FN20, + FN21,Y, U, I, O, P, LBRC, + H, J, K, L, SCLN,FN14, + FN22,N, M, COMM,DOT, SLSH,FN15, + LEFT,UP, DOWN,RGHT,FN21, PGUP,DEL, PGDN, FN8, FN9, FN10 @@ -230,7 +230,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { FN0, NO, PGUP,UP, PGDN,PGUP,TRNS, TRNS,NO, LEFT,DOWN,RGHT,PGDN, TRNS,INS, DEL, END, HOME,NO, TRNS, - FN16,TRNS,TRNS,TRNS,TRNS, + FN17,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, @@ -357,34 +357,35 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), // FN6 = LCtrl with tap Escape - ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN7 = LAlt with tap Space + ACTION_MODS_TAP_KEY(MOD_LALT, KC_DEL), // FN7 = LAlt with tap Delete ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN11 = LShift with tap Tab - ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN12 = LGui with tap Escape - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN13 = RShift with tap quotes - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN14 = RCtrl with tap ] + ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN12 = LAlt with tap Space + ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN13 = LGui with tap Escape + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN14 = RShift with tap quotes + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN15 = RCtrl with tap ] - ACTION_LAYER_SET(0, ON_BOTH), // FN15 - set Layer0 - ACTION_LAYER_SET(1, ON_BOTH), // FN16 - set Layer1, to use Workman layout at firmware level - ACTION_LAYER_SET(2, ON_BOTH), // FN17 - set Layer2, to use with Numpad keys + ACTION_LAYER_SET(0, ON_BOTH), // FN16 - set Layer0 + ACTION_LAYER_SET(1, ON_BOTH), // FN17 - set Layer1, to use Workman layout at firmware level + ACTION_LAYER_SET(2, ON_BOTH), // FN18 - set Layer2, to use with Numpad keys - ACTION_LAYER_MOMENTARY(2), // FN18 - momentary Layer2, to use with Numpad keys - ACTION_LAYER_MOMENTARY(5), // FN19 - momentary Layer5, to use with F* keys on top row - ACTION_LAYER_MOMENTARY(6), // FN20 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch - ACTION_LAYER_MOMENTARY(7), // FN21 - momentary Layer7, to use with F* keys (F1-F24) + ACTION_LAYER_MOMENTARY(2), // FN19 - momentary Layer2, to use with Numpad keys + ACTION_LAYER_MOMENTARY(5), // FN20 - momentary Layer5, to use with F* keys on top row + ACTION_LAYER_MOMENTARY(6), // FN21 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch + ACTION_LAYER_MOMENTARY(7), // FN22 - momentary Layer7, to use with F* keys (F1-F24) - ACTION_LAYER_TAP_KEY(2, KC_F), // FN22 = momentary Layer2 on F key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(3, KC_S), // FN23 = momentary Layer3 on S key, to use with F* keys - ACTION_LAYER_TAP_KEY(4, KC_A), // FN24 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(4, KC_A), // FN23 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_S), // FN24 = momentary Layer3 on S key, to use with F* keys ACTION_LAYER_TAP_KEY(8, KC_D), // FN25 = momentary Layer8 on D key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_F), // FN26 = momentary Layer2 on F key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(2, KC_V), // FN26 = momentary Layer2 on V key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(3, KC_X), // FN27 = momentary Layer3 on X key, to use with F* keys - ACTION_LAYER_TAP_KEY(4, KC_Z), // FN28 = momentary Layer4 on Z key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(4, KC_Z), // FN27 = momentary Layer4 on Z key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_X), // FN28 = momentary Layer3 on X key, to use with F* keys ACTION_LAYER_TAP_KEY(8, KC_C), // FN29 = momentary Layer8 on C key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_V), // FN30 = momentary Layer2 on V key, to use with Numpad keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From e56edbfe9007d13b37361b5c608cff631776627a Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 25 Sep 2013 22:05:13 +0300 Subject: [PATCH 027/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 64d75d69..de4f8c27 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -94,8 +94,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand ESC, 1, 2, 3, 4, 5, BSLS, GRV, Q, W, E, R, T, FN20, - FN11,FN23,FN24,FN25,FN26,G, - LCTL,FN27,FN28,FN29,FN30,B, FN16, + FN11,FN27,FN28,FN29,FN30,G, + LCTL,FN23,FN24,FN25,FN26,B, FN16, FN20,FN19,CAPS,FN12,FN13, FN18,HOME, END, @@ -377,15 +377,16 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_MOMENTARY(6), // FN21 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch ACTION_LAYER_MOMENTARY(7), // FN22 - momentary Layer7, to use with F* keys (F1-F24) - ACTION_LAYER_TAP_KEY(4, KC_A), // FN23 = momentary Layer4 on A key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(3, KC_S), // FN24 = momentary Layer3 on S key, to use with F* keys - ACTION_LAYER_TAP_KEY(8, KC_D), // FN25 = momentary Layer8 on D key, to use with mouse and navigation keys - ACTION_LAYER_TAP_KEY(2, KC_F), // FN26 = momentary Layer2 on F key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(4, KC_Z), // FN23 = momentary Layer4 on Z key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_X), // FN24 = momentary Layer3 on X key, to use with F* keys + ACTION_LAYER_TAP_KEY(8, KC_C), // FN25 = momentary Layer8 on C key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_V), // FN26 = momentary Layer2 on V key, to use with Numpad keys - ACTION_LAYER_TAP_KEY(4, KC_Z), // FN27 = momentary Layer4 on Z key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(3, KC_X), // FN28 = momentary Layer3 on X key, to use with F* keys - ACTION_LAYER_TAP_KEY(8, KC_C), // FN29 = momentary Layer8 on C key, to use with mouse and navigation keys - ACTION_LAYER_TAP_KEY(2, KC_V), // FN30 = momentary Layer2 on V key, to use with Numpad keys + // i'd like to remove this - will try to get used to live without this and convert them to usual keys + ACTION_LAYER_TAP_KEY(4, KC_A), // FN27 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_S), // FN28 = momentary Layer3 on S key, to use with F* keys + ACTION_LAYER_TAP_KEY(8, KC_D), // FN29 = momentary Layer8 on D key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_F), // FN30 = momentary Layer2 on F key, to use with Numpad keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From 1867cd48f99810bd6032a5c3e1280280d14d03a2 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 25 Sep 2013 22:13:27 +0300 Subject: [PATCH 028/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 73 ++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index de4f8c27..a7037613 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -3,9 +3,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in QWERTY * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | \ | | - | 6 | 7 | 8 | 9 | 0 | = | + * | ~ | 1 | 2 | 3 | 4 | 5 | \ | | - | 6 | 7 | 8 | 9 | 0 | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | ~ | Q | W | E | R | T | ~L5 | | ~L6 | Y | U | I | O | P | [ | + * | Tab | Q | W | E | R | T | ~L5 | | ~L6 | Y | U | I | O | P | [ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab/Shf| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| @@ -49,9 +49,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in Workman * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | + * | ~ | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | ~ | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | $ | : | + * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | $ | : | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | - | * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| @@ -70,9 +70,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in Workman / with Shift * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | + * | ~ | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | ` | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | + * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | _ | * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| @@ -92,20 +92,20 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer0: default, leftled:none // left hand - ESC, 1, 2, 3, 4, 5, BSLS, - GRV, Q, W, E, R, T, FN20, - FN11,FN27,FN28,FN29,FN30,G, - LCTL,FN23,FN24,FN25,FN26,B, FN16, - FN20,FN19,CAPS,FN12,FN13, - FN18,HOME, + GRV, 1, 2, 3, 4, 5, BSLS, + TAB, Q, W, E, R, T, FN21, + FN11,FN28,FN29,FN30,FN31,G, + FN12,FN24,FN25,FN26,FN27,B, FN17, + FN21,FN20,CAPS,FN13,FN14, + FN19,HOME, END, FN5, FN6, FN7, // right hand MINS,6, 7, 8, 9, 0, EQL, - FN21,Y, U, I, O, P, LBRC, - H, J, K, L, SCLN,FN14, - FN22,N, M, COMM,DOT, SLSH,FN15, - LEFT,UP, DOWN,RGHT,FN21, + FN22,Y, U, I, O, P, LBRC, + H, J, K, L, SCLN,FN15, + FN23,N, M, COMM,DOT, SLSH,FN16, + LEFT,UP, DOWN,RGHT,FN22, PGUP,DEL, PGDN, FN8, FN9, FN10 @@ -230,7 +230,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { FN0, NO, PGUP,UP, PGDN,PGUP,TRNS, TRNS,NO, LEFT,DOWN,RGHT,PGDN, TRNS,INS, DEL, END, HOME,NO, TRNS, - FN17,TRNS,TRNS,TRNS,TRNS, + FN18,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, @@ -363,30 +363,31 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN11 = LShift with tap Tab - ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN12 = LAlt with tap Space - ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN13 = LGui with tap Escape - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN14 = RShift with tap quotes - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN15 = RCtrl with tap ] + ACTION_MODS_TAP_KEY(MOD_LCTL, KC_GRV), // FN12 = LCtrl with tap Tilda + ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN13 = LAlt with tap Space + ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN14 = LGui with tap Escape + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN15 = RShift with tap quotes + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN16 = RCtrl with tap ] - ACTION_LAYER_SET(0, ON_BOTH), // FN16 - set Layer0 - ACTION_LAYER_SET(1, ON_BOTH), // FN17 - set Layer1, to use Workman layout at firmware level - ACTION_LAYER_SET(2, ON_BOTH), // FN18 - set Layer2, to use with Numpad keys + ACTION_LAYER_SET(0, ON_BOTH), // FN17 - set Layer0 + ACTION_LAYER_SET(1, ON_BOTH), // FN18 - set Layer1, to use Workman layout at firmware level + ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys - ACTION_LAYER_MOMENTARY(2), // FN19 - momentary Layer2, to use with Numpad keys - ACTION_LAYER_MOMENTARY(5), // FN20 - momentary Layer5, to use with F* keys on top row - ACTION_LAYER_MOMENTARY(6), // FN21 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch - ACTION_LAYER_MOMENTARY(7), // FN22 - momentary Layer7, to use with F* keys (F1-F24) + ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys + ACTION_LAYER_MOMENTARY(5), // FN21 - momentary Layer5, to use with F* keys on top row + ACTION_LAYER_MOMENTARY(6), // FN22 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch + ACTION_LAYER_MOMENTARY(7), // FN23 - momentary Layer7, to use with F* keys (F1-F24) - ACTION_LAYER_TAP_KEY(4, KC_Z), // FN23 = momentary Layer4 on Z key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(3, KC_X), // FN24 = momentary Layer3 on X key, to use with F* keys - ACTION_LAYER_TAP_KEY(8, KC_C), // FN25 = momentary Layer8 on C key, to use with mouse and navigation keys - ACTION_LAYER_TAP_KEY(2, KC_V), // FN26 = momentary Layer2 on V key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys + ACTION_LAYER_TAP_KEY(8, KC_C), // FN26 = momentary Layer8 on C key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys // i'd like to remove this - will try to get used to live without this and convert them to usual keys - ACTION_LAYER_TAP_KEY(4, KC_A), // FN27 = momentary Layer4 on A key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(3, KC_S), // FN28 = momentary Layer3 on S key, to use with F* keys - ACTION_LAYER_TAP_KEY(8, KC_D), // FN29 = momentary Layer8 on D key, to use with mouse and navigation keys - ACTION_LAYER_TAP_KEY(2, KC_F), // FN30 = momentary Layer2 on F key, to use with Numpad keys + ACTION_LAYER_TAP_KEY(4, KC_A), // FN28 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_S), // FN29 = momentary Layer3 on S key, to use with F* keys + ACTION_LAYER_TAP_KEY(8, KC_D), // FN30 = momentary Layer8 on D key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_F), // FN31 = momentary Layer2 on F key, to use with Numpad keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From 7a3ad79b0a5662354c37b8552bde53eb4487c684 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 25 Sep 2013 22:21:50 +0300 Subject: [PATCH 029/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index a7037613..95ffd109 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -356,8 +356,8 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace - ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), // FN6 = LCtrl with tap Escape - ACTION_MODS_TAP_KEY(MOD_LALT, KC_DEL), // FN7 = LAlt with tap Delete + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_DEL), // FN6 = LCtrl with tap Delete + ACTION_MODS_TAP_KEY(MOD_LALT, KC_ESC), // FN7 = LAlt with tap Escape ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space @@ -375,7 +375,7 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys ACTION_LAYER_MOMENTARY(5), // FN21 - momentary Layer5, to use with F* keys on top row - ACTION_LAYER_MOMENTARY(6), // FN22 - momentary Layer6, to use with F* keys on top row, cursor, Teensy, Workman-layer switch + ACTION_LAYER_TAP_KEY(6, KC_ENT), // FN22 - momentary Layer6 on Enter, to use with F* keys on top row, cursor, Teensy, Workman-layer switch ACTION_LAYER_MOMENTARY(7), // FN23 - momentary Layer7, to use with F* keys (F1-F24) ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys From a05101964201e5d35689e9888bf6f7046830f525 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 7 Oct 2013 16:52:26 +0300 Subject: [PATCH 030/101] Typo fix --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 95ffd109..2dc0c7c1 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -70,7 +70,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * Keymap: Default Layer in Workman / with Shift * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ~ | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | + * | ` | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| From cdd19b95dd01c5437ca313968a1385a3939e59cf Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 7 Oct 2013 16:53:01 +0300 Subject: [PATCH 031/101] Updates to CUB's layouts --- keyboard/ergodox/config.h | 2 +- keyboard/ergodox/keymap_cub.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index fc522ce7..7883d3c2 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -51,7 +51,7 @@ Project located at * And so, there is no sense to have DEBOUNCE higher than 2. */ #define DEBOUNCE 2 -#define TAPPING_TERM 180 +#define TAPPING_TERM 250 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 2dc0c7c1..08e85531 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -144,8 +144,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, - TRNS,NO, P7, P8, P9, PMNS,BSPC, - TRNS,P4, P5, P6, PPLS,PENT, + TRNS,NO, P7, P8, P9, PMNS,PGUP, + TRNS,P4, P5, P6, PPLS,PGDN, TRNS,NO, P1, P2, P3, PPLS,PENT, P0, PDOT,SLSH,PENT,PENT, TRNS,TRNS, From 06dbf890437887da583617530223fc7a63c40786 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 8 Oct 2013 12:58:48 +0300 Subject: [PATCH 032/101] Added MicroDox layout Inspired by MicroDox: http://geekhack.org/index.php?topic=42231.msg1062851#msg1062851 https://www.massdrop.com/ext/ergodox/?referer=CTL63V&hash=9ff8ddbb75e03e517aaa39acabc81669 --- keyboard/ergodox/Makefile.lufa | 3 + keyboard/ergodox/Makefile.pjrc | 3 + keyboard/ergodox/keymap.c | 2 + keyboard/ergodox/keymap_cub.h | 10 +- keyboard/ergodox/keymap_micro.h | 424 ++++++++++++++++++++++++++++++++ 5 files changed, 437 insertions(+), 5 deletions(-) create mode 100644 keyboard/ergodox/keymap_micro.h diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index afa215c4..07241b03 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -131,6 +131,9 @@ colemak: all workman: OPT_DEFS += -DKEYMAP_WORKMAN workman: all +micro: OPT_DEFS += -DKEYMAP_MICRO +micro: all + cub: OPT_DEFS += -DKEYMAP_CUB cub: all diff --git a/keyboard/ergodox/Makefile.pjrc b/keyboard/ergodox/Makefile.pjrc index 63772521..e36cbc6b 100644 --- a/keyboard/ergodox/Makefile.pjrc +++ b/keyboard/ergodox/Makefile.pjrc @@ -109,6 +109,9 @@ colemak: all workman: OPT_DEFS += -DKEYMAP_WORKMAN workman: all +micro: OPT_DEFS += -DKEYMAP_MICRO +micro: all + cub: OPT_DEFS += -DKEYMAP_CUB cub: all diff --git a/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap.c index fb553d09..a827f36a 100644 --- a/keyboard/ergodox/keymap.c +++ b/keyboard/ergodox/keymap.c @@ -79,6 +79,8 @@ along with this program. If not, see . #include "keymap_colemak.h" #elif defined(KEYMAP_WORKMAN) #include "keymap_workman.h" +#elif defined(KEYMAP_MICRO) +#include "keymap_micro.h" #elif defined(KEYMAP_CUB) #include "keymap_cub.h" #else diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 08e85531..0c2b04b4 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -167,7 +167,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, NO, NO, NO, NO, NO, TRNS, TRNS,NO, F1, F2, F3, F4, PGUP, NO, F5, F6, F7, F8, PGDN, - TRNS,NO, F9, F10, F11, F12, NO, + TRNS,NO, F9, F10, F11, F12, APP, RGUI,RALT,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -188,15 +188,15 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // in Workman right hand will be: // = // ^ { } ( ) + - // ' ! $ " ; \ - // # [ < > ] AppMenu + // ' ! $ " ; = + // # [ < > ] \ // // right hand NO, NO, NO, NO, NO, NO, TRNS, TRNS,MINS,4, 5, 9, 0, PPLS, - BSLS,2, P, FN1, 1, FN2, - TRNS,3, 6, FN3, FN4, 7, APP, + BSLS,2, P, FN1, 1, EQL, + TRNS,3, 6, FN3, FN4, 7, FN2, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, diff --git a/keyboard/ergodox/keymap_micro.h b/keyboard/ergodox/keymap_micro.h new file mode 100644 index 00000000..4e878d35 --- /dev/null +++ b/keyboard/ergodox/keymap_micro.h @@ -0,0 +1,424 @@ +// +// Inspired by MicroDox: +// http://geekhack.org/index.php?topic=42231.msg1062851#msg1062851 +// https://www.massdrop.com/ext/ergodox/?referer=CTL63V&hash=9ff8ddbb75e03e517aaa39acabc81669 +// + +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * Keymap: Default Layer in QWERTY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab/Shf| A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtrl/~| Z | X | C | V | B | | | | N | M | , | . | / | ] | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | Caps | LAlt | LGui | | RGui | | | | | + * | | | | Spc | Esc | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | Esc | | Ins | | | + * | LCtl | LSft | LAlt | | RAlt | RSft | RCtl | + * `--------------------' `--------------------' + * + * + * + **************************************************************************************************** + * + * Under XOrg, I use my own mapping from QWERTY to "Workman for Programmers" + * See XOrg files in ./addons/ subdirectory. + * + * I have to do so, because of two things: + * 1) my native language is Russian, and XOrg keymap for it is based on QWERTY layout + * 2) I want to have non-standart shifted keys, like $ (as normal) and @ (as shifted), or _ and - + * + * And even if (2) could be solved using FN* keys (but there is limit in firmware for only 32 such + * keys), then (1) can't be solved at firmware level at all. + * + * So, I have to stick with QWERTY as my main layout + my own XOrg keyboard layout for English. + * But sometimes I have to input something when XOrg is not active - for example, in Linux console, + * or in firmware console (while debugging firmware), or when keyboard is connected to not my computer. + * + * For such cases I have Layer1 :) + * // hint: switch to Layer1 is only at Layer6 + * + **************************************************************************************************** + * + * + * + * Keymap: Default Layer in Workman + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | | | | J | F | U | P | $ | : | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | - | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | Caps | LAlt | LGui | | RGui | | | | | + * | | | | Spc | Esc | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | Esc | | Ins | | | + * | LCtl | LSft | LAlt | | RAlt | RSft | RCtl | + * `--------------------' `--------------------' + * + * Keymap: Default Layer in Workman / with Shift + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | D | R | W | B | | | | J | F | U | P | @ | % | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | _ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | Caps | LAlt | LGui | | RGui | | | | | + * | | | | Spc | Esc | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | Esc | | Ins | | | + * | LCtl | LSft | LAlt | | RAlt | RSft | RCtl | + * `--------------------' `--------------------' + * + * | ~ | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | + * | ` | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | + */ + + KEYMAP( // Layer0: default, leftled:none + // left hand + NO, NO, NO, NO, NO, NO, NO, + TAB, Q, W, E, R, T, NO, + FN11,FN28,FN29,FN30,FN21,G, + FN12,FN24,FN25,FN26,FN27,B, NO, + NO, NO, CAPS,FN13,FN14, + NO, NO, + NO, + FN5, FN6, FN7, + // right hand + NO, NO, NO, NO, NO, NO, NO, + NO, Y, U, I, O, P, LBRC, + H, J, K, L, FN22,FN15, + NO, N, M, COMM,DOT, SLSH,FN16, + RGUI,FN17,NO, NO, NO, + NO, NO, + NO, + FN8, FN9, FN10 + ), + + KEYMAP( // Layer1: Workman layout, leftled:all + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,Q, D, R, W, B, TRNS, + TRNS,A, S, H, T, G, + TRNS,Z, X, M, C, V, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,J, F, U, P, 4, TRNS, + Y, N, E, O, I, TRNS, + TRNS,K, L, TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer2: numpad, leftled:blue + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, TRNS,NO, + TRNS,NO, NO, NO, TRNS,NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NLCK,P7, P8, P9, PMNS,PGUP, + PAST,P4, P5, P6, PPLS,PGDN, + TRNS,FN17,P1, P2, P3, PSLS,PENT, + P0, PDOT,SLSH,NO, NO, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer3: F-keys + PgUp/PgDn on right hand, leftled:green + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, TRNS,NO, NO, NO, + TRNS,NO, TRNS,NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,LALT, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,PSCR,F1, F2, F3, F4, PGUP, + SLCK,F5, F6, F7, F8, PGDN, + TRNS,PAUS,F9, F10, F11, F12, APP, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + RALT,RSFT,RCTL + ), + + KEYMAP( // Layer4: unconvenient keys on right hand, leftled:red + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,NO, NO, NO, NO, + TRNS,TRNS,NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + + // in Workman right hand will be: + // + // ^ { } ( ) + + // ' ! $ " ; = + // # [ < > ] \ + // + + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,MINS,4, 5, 9, 0, PPLS, + BSLS,2, P, FN1, 1, EQL, + TRNS,3, 6, FN3, FN4, 7, FN2, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer5: cursor, leftled:red + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, TRNS,NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,PGUP,HOME,END, DEL, INS, PGUP, + PGDN,LEFT,UP, DOWN,RGHT,PGDN, + TRNS,NO, HOME,END, DEL, INS, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer6: F1-F10, Workman-layer switch, Teensy, layer switches, leftled:red+onboard + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + FN0, F1, F2, F3, F4, F5, TRNS, + TRNS,FN18,NO, NO, FN19,NO, + TRNS,NO, NO, NO, FN19,NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,F6, F7, F8, F9, F10, FN0, + FN0, NO, NO, NO, TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + // + // rarely used + // + + KEYMAP( // Layer7: F-keys only, leftled:red + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,F13, F14, F15, F16, NO, TRNS, + TRNS,F17, F18, F19, F20, NO, + TRNS,F21, F22, F23, F24, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, F1, F2, F3, F4, TRNS, + NO, F5, F6, F7, F8, TRNS, + TRNS,NO, F9, F10, F11, F12, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + KEYMAP( // Layer8: mouse and navigation, leftled:blue and green + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, TRNS,NO, NO, + TRNS,NO, NO, TRNS,NO, NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,BTN2,WH_L,WH_U,WH_D,WH_R,PGUP, + BTN1,MS_L,MS_U,MS_D,MS_R,PGDN, + TRNS,BTN3,HOME,END, DEL, INS, NO, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + +/* + // templates to copy from + + KEYMAP( // LayerN: transparent on edges + hard-defined thumb keys, all others are empty + // left hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,TRNS,TRNS,LALT,LGUI, + TRNS,TRNS, + TRNS, + LCTL,LSFT,TRNS, + // right hand + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + RGUI,RALT,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,RSFT,RCTL + ), + KEYMAP( // LayerN: fully transparent + // left hand + 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, + // right hand + 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 + ), +*/ + +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +static const uint16_t PROGMEM fn_actions[] = { + ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + + // Layer4: unconvenient keys on right hand + ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman + ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman + + // Dual-role keys on thumbs + ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_DEL), // FN6 = LCtrl with tap Delete + ACTION_MODS_TAP_KEY(MOD_LALT, KC_ESC), // FN7 = LAlt with tap Escape + ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space + + // Dual-role keys on pinkies + ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN11 = LShift with tap Tab + ACTION_MODS_TAP_KEY(MOD_LCTL, KC_GRV), // FN12 = LCtrl with tap Tilda + ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN13 = LAlt with tap Space + ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN14 = LGui with tap Escape + ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN15 = RShift with tap quotes + ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN16 = RCtrl with tap ] + + // Layers switching + ACTION_LAYER_SET(0, ON_BOTH), // FN17 - set Layer0 + ACTION_LAYER_SET(1, ON_BOTH), // FN18 - set Layer1, to use Workman layout at firmware level + ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys + + ACTION_LAYER_MOMENTARY(2), // UNUSED: FN20 - momentary Layer2, to use with Numpad keys + ACTION_LAYER_TAP_KEY(5, KC_F), // FN21 - momentary Layer5, to use with cursor + ACTION_LAYER_TAP_KEY(6, KC_SCLN), // FN22 - tapping ; Layer6, to use with F1-F10, Workman-layer switch, Teensy, layer switches + ACTION_LAYER_MOMENTARY(7), // UNUSED: FN23 - momentary Layer7, to use with F* keys (F1-F24) + + ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys + ACTION_LAYER_TAP_KEY(8, KC_C), // FN26 = momentary Layer8 on C key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys + + // i'd like to remove this - will try to get used to live without this and convert them to usual keys + ACTION_LAYER_TAP_KEY(4, KC_A), // FN28 = momentary Layer4 on A key, to use with unconvenient keys + ACTION_LAYER_TAP_KEY(3, KC_S), // FN29 = momentary Layer3 on S key, to use with F* keys + ACTION_LAYER_TAP_KEY(8, KC_D), // FN30 = momentary Layer8 on D key, to use with mouse and navigation keys + ACTION_LAYER_TAP_KEY(2, KC_F), // UNUSED: FN31 = momentary Layer2 on F key, to use with Numpad keys +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + print("action_function called\n"); + print("id = "); phex(id); print("\n"); + print("opt = "); phex(opt); print("\n"); + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} + From 04949711f4abc89c921e48e35e8f818ebb5d3058 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 14 Oct 2013 23:06:29 +0300 Subject: [PATCH 033/101] Bugfix: wrong order during init All credits to Tensor@geekhack http://geekhack.org/index.php?topic=48106.msg1076661#msg1076661 --- keyboard/ergodox/ergodox.c | 4 +++- keyboard/ergodox/ergodox.h | 1 + keyboard/ergodox/matrix.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox/ergodox.c b/keyboard/ergodox/ergodox.c index f8b3d82e..c6a83148 100644 --- a/keyboard/ergodox/ergodox.c +++ b/keyboard/ergodox/ergodox.c @@ -62,8 +62,10 @@ void init_ergodox(void) PORTC |= (1<<7); PORTD |= (1<<7 | 1<<5 | 1<<4); PORTE |= (1<<6); +} - // blink leds +void ergodox_blink_all_leds(void) +{ ergodox_led_all_off(); ergodox_led_all_set(LED_BRIGHTNESS_HI); ergodox_led_all_on(); diff --git a/keyboard/ergodox/ergodox.h b/keyboard/ergodox/ergodox.h index a0511ff3..bcd839c8 100644 --- a/keyboard/ergodox/ergodox.h +++ b/keyboard/ergodox/ergodox.h @@ -46,6 +46,7 @@ Most used files are located at #define OLATB 0x15 void init_ergodox(void); +void ergodox_blink_all_leds(void); uint8_t init_mcp23018(void); uint8_t ergodox_left_leds_update(void); diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index e50932c9..2103a018 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -71,6 +71,7 @@ void matrix_init(void) // initialize row and col init_ergodox(); mcp23018_status = init_mcp23018(); + ergodox_blink_all_leds(); unselect_rows(); init_cols(); From 0a554052b4186748afe26d8eae18cf44d4e7ae1f Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 14 Oct 2013 23:31:13 +0300 Subject: [PATCH 034/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 0c2b04b4..2b6e797c 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -51,18 +51,18 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ~ | ; | ! | # | { | } | ' | | ^ | [ | ] | * | ( | ) | = | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | $ | : | + * | Tab | Q | D | R | W | B | NO | | ~L7 | J | F | U | P | $ | : | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | - | - * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------| * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | ~L5 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L6 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | +L2 | Home | | PgUp | Del | + * | L0 | +L2 | | PgUp | Del | * ,------|------|------| |------+------+------. - * | | | End | | PgDn | | | + * | | | NO | | PgDn | | | * | BkSp | ESC |------| |------| Enter| Space| * | | | Spc | | Ins | | | * `--------------------' `--------------------' @@ -72,18 +72,18 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | ` | 1 | 2 | 3 | 4 | 5 | " | | \ | 6 | 7 | 8 | 9 | 0 | + | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | D | R | W | B | ~L5 | | ~L6 | J | F | U | P | @ | % | + * | Tab | Q | D | R | W | B | NO | | ~L7 | J | F | U | P | @ | % | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | Tab/Shf| A | S | H | T | G |------| |------| Y | N | E | O | I | _ | - * |--------+------+------+------+------+------| L0 | | ~L7 |------+------+------+------+------+--------| + * |--------+------+------+------+------+------| Home | | End |------+------+------+------+------+--------| * | LCtrl | Z | X | M | C | V | | | | K | L | , | . | / | & | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | ~L5 | ~L2 | Caps | LAlt | LGui | | Lft | Up | Dn | Rght | ~L6 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | +L2 | Home | | PgUp | Del | + * | L0 | +L2 | | PgUp | Del | * ,------|------|------| |------+------+------. - * | | | End | | PgDn | | | + * | | | NO | | PgDn | | | * | BkSp | ESC |------| |------| Enter| Space| * | | | Spc | | Ins | | | * `--------------------' `--------------------' @@ -93,18 +93,18 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer0: default, leftled:none // left hand GRV, 1, 2, 3, 4, 5, BSLS, - TAB, Q, W, E, R, T, FN21, + TAB, Q, W, E, R, T, NO, FN11,FN28,FN29,FN30,FN31,G, - FN12,FN24,FN25,FN26,FN27,B, FN17, + FN12,FN24,FN25,FN26,FN27,B, HOME, FN21,FN20,CAPS,FN13,FN14, - FN19,HOME, - END, + FN17,FN19, + NO, FN5, FN6, FN7, // right hand MINS,6, 7, 8, 9, 0, EQL, - FN22,Y, U, I, O, P, LBRC, + FN23,Y, U, I, O, P, LBRC, H, J, K, L, SCLN,FN15, - FN23,N, M, COMM,DOT, SLSH,FN16, + END, N, M, COMM,DOT, SLSH,FN16, LEFT,UP, DOWN,RGHT,FN22, PGUP,DEL, PGDN, From 33c4f039d1fa31f9cb2aac57b16bb6e532cd1b78 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Thu, 17 Oct 2013 04:11:24 +0300 Subject: [PATCH 035/101] Refactor mcp23018_status and give possibility to re-attach left side --- keyboard/ergodox/ergodox.c | 41 ++++++++++++++++++++------------------ keyboard/ergodox/ergodox.h | 2 ++ keyboard/ergodox/matrix.c | 17 +++++++++++++++- 3 files changed, 40 insertions(+), 20 deletions(-) diff --git a/keyboard/ergodox/ergodox.c b/keyboard/ergodox/ergodox.c index c6a83148..494d13c1 100644 --- a/keyboard/ergodox/ergodox.c +++ b/keyboard/ergodox/ergodox.c @@ -38,6 +38,7 @@ Most used files are located at #include "i2cmaster.h" bool i2c_initialized = 0; +uint8_t mcp23018_status = 0x20; bool ergodox_left_led_1 = 0; // left top bool ergodox_left_led_2 = 0; // left middle @@ -74,7 +75,7 @@ void ergodox_blink_all_leds(void) } uint8_t init_mcp23018(void) { - uint8_t err = 0x20; + mcp23018_status = 0x20; // I2C subsystem if (i2c_initialized == 0) { @@ -87,48 +88,50 @@ uint8_t init_mcp23018(void) { // - unused : input : 1 // - input : input : 1 // - driving : output : 0 - err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; - err = i2c_write(IODIRA); if (err) goto out; - err = i2c_write(0b00000000); if (err) goto out; - err = i2c_write(0b00111111); if (err) goto out; + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; i2c_stop(); // set pull-up // - unused : on : 1 // - input : on : 1 // - driving : off : 0 - err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; - err = i2c_write(GPPUA); if (err) goto out; - err = i2c_write(0b00000000); if (err) goto out; - err = i2c_write(0b00111111); if (err) goto out; + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; out: i2c_stop(); - if (!err) err = ergodox_left_leds_update(); + if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update(); - return err; + return mcp23018_status; } uint8_t ergodox_left_leds_update(void) { - uint8_t err = 0x20; + if (mcp23018_status) { // if there was an error + return mcp23018_status; + } // set logical value (doesn't matter on inputs) // - unused : hi-Z : 1 // - input : hi-Z : 1 // - driving : hi-Z : 1 - err = i2c_start(I2C_ADDR_WRITE); if (err) goto out; - err = i2c_write(OLATA); if (err) goto out; - err = i2c_write(0b11111111 + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(OLATA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111 & ~(ergodox_left_led_3< Date: Mon, 28 Oct 2013 15:17:05 +0200 Subject: [PATCH 036/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 2b6e797c..0813ca87 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -186,16 +186,16 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // in Workman right hand will be: - // = - // ^ { } ( ) + - // ' ! $ " ; = + // + + // ^ { } ( ) = + // ' ! $ " ; \ // # [ < > ] \ // // right hand - NO, NO, NO, NO, NO, NO, TRNS, - TRNS,MINS,4, 5, 9, 0, PPLS, - BSLS,2, P, FN1, 1, EQL, + NO, NO, NO, NO, NO, NO, PPLS, + TRNS,MINS,4, 5, 9, 0, EQL, + BSLS,2, P, FN1, 1, FN2, TRNS,3, 6, FN3, FN4, 7, FN2, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, From fc78fac72b558dd52650356d2d17ea613a2ec552 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 4 Nov 2013 04:17:53 +0200 Subject: [PATCH 037/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 0813ca87..a83ea98c 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -374,7 +374,7 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys - ACTION_LAYER_MOMENTARY(5), // FN21 - momentary Layer5, to use with F* keys on top row + ACTION_LAYER_TAP_KEY(5, KC_ENT), // FN21 - momentary Layer5 on Enter, to use with F* keys on top row ACTION_LAYER_TAP_KEY(6, KC_ENT), // FN22 - momentary Layer6 on Enter, to use with F* keys on top row, cursor, Teensy, Workman-layer switch ACTION_LAYER_MOMENTARY(7), // FN23 - momentary Layer7, to use with F* keys (F1-F24) From 142820c687191451ab2cd34eafd9afaae93d2830 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 30 Mar 2014 04:30:32 +0300 Subject: [PATCH 038/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index a83ea98c..f7db4867 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -93,7 +93,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer0: default, leftled:none // left hand GRV, 1, 2, 3, 4, 5, BSLS, - TAB, Q, W, E, R, T, NO, + TAB, Q, W, E, R, T, FN23, FN11,FN28,FN29,FN30,FN31,G, FN12,FN24,FN25,FN26,FN27,B, HOME, FN21,FN20,CAPS,FN13,FN14, @@ -132,7 +132,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer2: numpad, leftled:blue + KEYMAP( // Layer2: numpad, leftled:mid/blue // left hand TRNS,NO, NO, NO, NO, PAUS,PSCR, TRNS,NO, NO, NO, NO, NO, TRNS, @@ -153,7 +153,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer3: F-keys + PgUp/PgDn on right hand, leftled:green + KEYMAP( // Layer3: F-keys + PgUp/PgDn on right hand, leftled:bot/green // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, @@ -174,7 +174,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,RSFT,RCTL ), - KEYMAP( // Layer4: unconvenient keys on right hand, leftled:red + KEYMAP( // Layer4: unconvenient keys on right hand, leftled:top/white // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, @@ -203,7 +203,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer5: F-keys instead of numbers, leftled:red + KEYMAP( // Layer5: F-keys instead of numbers, leftled:top/white // left hand TRNS,F1, F2, F3, F4, F5, F6, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, @@ -224,7 +224,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer6: F-keys, cursor, Workman-layer switch, Teensy, leftled:red+onboard + KEYMAP( // Layer6: F-keys, cursor, Workman-layer switch, Teensy, leftled:top/white+onboard // left hand TRNS,F1, F2, F3, F4, F5, F6, FN0, NO, PGUP,UP, PGDN,PGUP,TRNS, @@ -249,7 +249,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // rarely used // - KEYMAP( // Layer7: F-keys only, leftled:red + KEYMAP( // Layer7: F-keys only, leftled:top/white // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,F13, F14, F15, F16, NO, TRNS, @@ -270,7 +270,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer8: mouse and navigation, leftled:blue and green + KEYMAP( // Layer8: mouse and navigation, leftled:mid/blue+bot/green // left hand TRNS,NO, NO, NO, NO, NO, NO, TRNS,NO, NO, NO, NO, NO, TRNS, @@ -376,7 +376,7 @@ static const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys ACTION_LAYER_TAP_KEY(5, KC_ENT), // FN21 - momentary Layer5 on Enter, to use with F* keys on top row ACTION_LAYER_TAP_KEY(6, KC_ENT), // FN22 - momentary Layer6 on Enter, to use with F* keys on top row, cursor, Teensy, Workman-layer switch - ACTION_LAYER_MOMENTARY(7), // FN23 - momentary Layer7, to use with F* keys (F1-F24) + ACTION_LAYER_TAP_KEY(7, KC_BSLS), // FN23 - momentary Layer7 on ' , to use with F* keys (F1-F24) ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys From 976b595c2ea4c17aee22004389f5f23be75d9d7e Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 30 Mar 2014 05:02:44 +0300 Subject: [PATCH 039/101] Update TODO file --- keyboard/ergodox/TODO | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/keyboard/ergodox/TODO b/keyboard/ergodox/TODO index c8ff5ee3..2144ec24 100644 --- a/keyboard/ergodox/TODO +++ b/keyboard/ergodox/TODO @@ -3,4 +3,7 @@ 4. Increase count of ACTION keys 6. Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) - +7. ergodox_blink_all_leds() should save current state of leds, + and restore after blink. initial state of all leds == off +8. add support for pseudo-backlight (reversed LEDs) + docs/photo +9. command to debug all LEDs (on/off/blink) From 91bd988d6e0efe79ccfe11c59e8ae44f50010a09 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 30 Mar 2014 05:04:21 +0300 Subject: [PATCH 040/101] Rename DEBUG_MATRIX_FREQ to more appropriate DEBUG_MATRIX_SCAN_RATE --- keyboard/ergodox/config.h | 2 +- keyboard/ergodox/matrix.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index 7883d3c2..8b9d3b21 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -82,6 +82,6 @@ Project located at //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -//#define DEBUG_MATRIX_FREQ +//#define DEBUG_MATRIX_SCAN_RATE #endif diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index 7621e913..e8d69105 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -29,7 +29,7 @@ along with this program. If not, see . #include "matrix.h" #include "ergodox.h" #include "i2cmaster.h" -#ifdef DEBUG_MATRIX_FREQ +#ifdef DEBUG_MATRIX_SCAN_RATE #include "timer.h" #endif @@ -49,7 +49,7 @@ static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; -#ifdef DEBUG_MATRIX_FREQ +#ifdef DEBUG_MATRIX_SCAN_RATE uint32_t matrix_timer; uint32_t matrix_scan_count; #endif @@ -81,7 +81,7 @@ void matrix_init(void) matrix_debouncing[i] = 0; } -#ifdef DEBUG_MATRIX_FREQ +#ifdef DEBUG_MATRIX_SCAN_RATE matrix_timer = timer_read32(); matrix_scan_count = 0; #endif @@ -104,7 +104,7 @@ uint8_t matrix_scan(void) } } -#ifdef DEBUG_MATRIX_FREQ +#ifdef DEBUG_MATRIX_SCAN_RATE matrix_scan_count++; uint32_t timer_now = timer_read32(); From 8a91d0e90cbfc92994638dd80682baf57fe5b7a9 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 30 Mar 2014 05:25:24 +0300 Subject: [PATCH 041/101] Switch fn_actions[] to use position-independent syntax --- keyboard/ergodox/keymap_cub.h | 64 +++++++++++++++++------------------ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index f7db4867..d01bb8dd 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -348,46 +348,46 @@ enum function_id { * Fn action definition */ static const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key - ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman - ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman - ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman - ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman + [2] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman + [3] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman + [4] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman - ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace - ACTION_MODS_TAP_KEY(MOD_LSFT, KC_DEL), // FN6 = LCtrl with tap Delete - ACTION_MODS_TAP_KEY(MOD_LALT, KC_ESC), // FN7 = LAlt with tap Escape - ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space + [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace + [6] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_DEL), // FN6 = LCtrl with tap Delete + [7] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_ESC), // FN7 = LAlt with tap Escape + [8] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins + [9] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter + [10] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space - ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN11 = LShift with tap Tab - ACTION_MODS_TAP_KEY(MOD_LCTL, KC_GRV), // FN12 = LCtrl with tap Tilda - ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN13 = LAlt with tap Space - ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN14 = LGui with tap Escape - ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN15 = RShift with tap quotes - ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN16 = RCtrl with tap ] + [11] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_TAB), // FN11 = LShift with tap Tab + [12] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_GRV), // FN12 = LCtrl with tap Tilda + [13] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC), // FN13 = LAlt with tap Space + [14] = ACTION_MODS_TAP_KEY(MOD_LGUI, KC_ESC), // FN14 = LGui with tap Escape + [15] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_QUOT), // FN15 = RShift with tap quotes + [16] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RBRC), // FN16 = RCtrl with tap ] - ACTION_LAYER_SET(0, ON_BOTH), // FN17 - set Layer0 - ACTION_LAYER_SET(1, ON_BOTH), // FN18 - set Layer1, to use Workman layout at firmware level - ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys + [17] = ACTION_LAYER_SET(0, ON_BOTH), // FN17 - set Layer0 + [18] = ACTION_LAYER_SET(1, ON_BOTH), // FN18 - set Layer1, to use Workman layout at firmware level + [19] = ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys - ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys - ACTION_LAYER_TAP_KEY(5, KC_ENT), // FN21 - momentary Layer5 on Enter, to use with F* keys on top row - ACTION_LAYER_TAP_KEY(6, KC_ENT), // FN22 - momentary Layer6 on Enter, to use with F* keys on top row, cursor, Teensy, Workman-layer switch - ACTION_LAYER_TAP_KEY(7, KC_BSLS), // FN23 - momentary Layer7 on ' , to use with F* keys (F1-F24) + [20] = ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys + [21] = ACTION_LAYER_TAP_KEY(5, KC_ENT), // FN21 - momentary Layer5 on Enter, to use with F* keys on top row + [22] = ACTION_LAYER_TAP_KEY(6, KC_ENT), // FN22 - momentary Layer6 on Enter, to use with F* keys on top row, cursor, Teensy, Workman-layer switch + [23] = ACTION_LAYER_TAP_KEY(7, KC_BSLS), // FN23 - momentary Layer7 on ' , to use with F* keys (F1-F24) - ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys - ACTION_LAYER_TAP_KEY(8, KC_C), // FN26 = momentary Layer8 on C key, to use with mouse and navigation keys - ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys + [24] = ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys + [25] = ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys + [26] = ACTION_LAYER_TAP_KEY(8, KC_C), // FN26 = momentary Layer8 on C key, to use with mouse and navigation keys + [27] = ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys // i'd like to remove this - will try to get used to live without this and convert them to usual keys - ACTION_LAYER_TAP_KEY(4, KC_A), // FN28 = momentary Layer4 on A key, to use with unconvenient keys - ACTION_LAYER_TAP_KEY(3, KC_S), // FN29 = momentary Layer3 on S key, to use with F* keys - ACTION_LAYER_TAP_KEY(8, KC_D), // FN30 = momentary Layer8 on D key, to use with mouse and navigation keys - ACTION_LAYER_TAP_KEY(2, KC_F), // FN31 = momentary Layer2 on F key, to use with Numpad keys + [28] = ACTION_LAYER_TAP_KEY(4, KC_A), // FN28 = momentary Layer4 on A key, to use with unconvenient keys + [29] = ACTION_LAYER_TAP_KEY(3, KC_S), // FN29 = momentary Layer3 on S key, to use with F* keys + [30] = ACTION_LAYER_TAP_KEY(8, KC_D), // FN30 = momentary Layer8 on D key, to use with mouse and navigation keys + [31] = ACTION_LAYER_TAP_KEY(2, KC_F), // FN31 = momentary Layer2 on F key, to use with Numpad keys }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From d2427380e3d82df0f9b543615c27f9d823a09306 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 30 Mar 2014 05:49:01 +0300 Subject: [PATCH 042/101] Update of IS_COMMAND (thanks to ibm4704 branch) --- keyboard/ergodox/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index 8b9d3b21..7c8e0d4c 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -60,6 +60,7 @@ Project located at /* 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)) \ ) From 15516618e15de77962f1658f2f8009f68b2d98e6 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 30 Mar 2014 22:07:24 +0300 Subject: [PATCH 043/101] Added keyboard definition file for KTouch --- .../ktouch/workman-wcp-ergodox.keyboard.xml | 285 ++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp-ergodox.keyboard.xml diff --git a/keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp-ergodox.keyboard.xml b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp-ergodox.keyboard.xml new file mode 100644 index 00000000..b8aac30e --- /dev/null +++ b/keyboard/ergodox/addons/etc/layout/ktouch/workman-wcp-ergodox.keyboard.xml @@ -0,0 +1,285 @@ + + English Workman/Ergodox/Cub + English Workman/Ergodox/Cub for programmers + en (English) + + + A + + + S + + + H + + + T + + + N + + + E + + + O + + + I + + + + + + + + + + + + ~ + ` + + + ; + 1 + + + ! + 2 + + + # + 3 + + + { + 4 + + + } + 5 + + + [ + 6 + + + ] + 7 + + + * + 8 + + + ( + 9 + + + ) + 0 + + + = + + + + + Q + + + D + + + R + + + W + + + B + + + J + + + F + + + U + + + P + + + $ + @ + + + : + % + + + G + + + Y + + + - + _ + + + | + & + + + Z + + + X + + + M + + + C + + + V + + + K + + + L + + + < + , + + + > + . + + + ? + / + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 5ddefef79feb5c6d36292087feb8b5595f5910eb Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 02:09:52 +0300 Subject: [PATCH 044/101] Updates to keyboard layout switcher script --- keyboard/ergodox/addons/bin/set-xkb-map | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/keyboard/ergodox/addons/bin/set-xkb-map b/keyboard/ergodox/addons/bin/set-xkb-map index 1ffd99df..278c1c9e 100755 --- a/keyboard/ergodox/addons/bin/set-xkb-map +++ b/keyboard/ergodox/addons/bin/set-xkb-map @@ -1,24 +1,26 @@ #!/bin/sh +xset r rate 350 80 + opts='-model pc104 -option grp:caps_toggle,grp_led:scroll' case "$1" in dvorak) - setxkbmap "$opts" -layout us,ru -variant dvp, + setxkbmap $opts -layout us,ru -variant dvp, ;; carpalx) - setxkbmap "$opts" -layout carpalx,ru -variant qgmlwb-p, + setxkbmap $opts -layout carpalx,ru -variant qgmlwb-p, ;; workman) variant='wcp,' lsusb | grep -q feed:1112 || variant='wce,' [ -e ~/.force_ergodox ] && variant='wce,' [ -e ~/.force_plain ] && variant='wcp,' - setxkbmap "$opts" -layout workman,ru -variant "$variant" + setxkbmap $opts -layout workman,ru -variant "$variant" ;; *) # US or unknown layout - setting US - setxkbmap "$opts" -layout us,ru + setxkbmap $opts -layout us,ru ;; esac From b236b2c6165d01a97b7a9ae39e08cdd94af99633 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 03:50:23 +0300 Subject: [PATCH 045/101] Fix compiler warning --- keyboard/ergodox/keymap_cub.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index d01bb8dd..bfeae01a 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -185,12 +185,12 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS,TRNS,TRNS, - // in Workman right hand will be: - // + - // ^ { } ( ) = - // ' ! $ " ; \ - // # [ < > ] \ - // + /* in Workman right hand will be: + + + ^ { } ( ) = + ' ! $ " ; \ + # [ < > ] \ + */ // right hand NO, NO, NO, NO, NO, NO, PPLS, From eb9c38ff94fd148f3ef84fb665a4b1070ac97bbd Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 03:51:47 +0300 Subject: [PATCH 046/101] Remove unused code --- keyboard/ergodox/keymap_cub.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index bfeae01a..77cc20a7 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -392,9 +392,10 @@ static const uint16_t PROGMEM fn_actions[] = { void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) { - print("action_function called\n"); - print("id = "); phex(id); print("\n"); - print("opt = "); phex(opt); print("\n"); + // print("action_function called\n"); + // print("id = "); phex(id); print("\n"); + // print("opt = "); phex(opt); print("\n"); + if (id == TEENSY_KEY) { clear_keyboard(); print("\n\nJump to bootloader... "); From 4bc8e4018da9d6358b65e1b6fd5d58ed32db762c Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 03:52:49 +0300 Subject: [PATCH 047/101] Lower delay for reboot by TEENSY_KEY --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 77cc20a7..961cdffe 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -399,7 +399,7 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) if (id == TEENSY_KEY) { clear_keyboard(); print("\n\nJump to bootloader... "); - _delay_ms(250); + _delay_ms(50); bootloader_jump(); // should not return print("not supported.\n"); } From 139ab7a418c0c6371cfafb2e7c0cdbbf35e19cb4 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 03:54:43 +0300 Subject: [PATCH 048/101] Reimplement FN21/FN22 - same Layer5/Layer6 but with permanent CTRL+ALT --- keyboard/ergodox/keymap.c | 2 ++ keyboard/ergodox/keymap_cub.h | 55 ++++++++++++++++++++++++++++------- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap.c index a827f36a..d0c1c724 100644 --- a/keyboard/ergodox/keymap.c +++ b/keyboard/ergodox/keymap.c @@ -20,8 +20,10 @@ along with this program. If not, see . #include #include "keycode.h" #include "action.h" +#include "action_util.h" #include "action_code.h" #include "action_macro.h" +#include "action_layer.h" #include "bootloader.h" #include "report.h" #include "host.h" diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 961cdffe..af0081bb 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -224,21 +224,21 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer6: F-keys, cursor, Workman-layer switch, Teensy, leftled:top/white+onboard + KEYMAP( // Layer6: F-keys, Teensy, Workman-layer switch, leftled:top/white+onboard // left hand TRNS,F1, F2, F3, F4, F5, F6, - FN0, NO, PGUP,UP, PGDN,PGUP,TRNS, - TRNS,NO, LEFT,DOWN,RGHT,PGDN, - TRNS,INS, DEL, END, HOME,NO, TRNS, + FN0, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN18,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, // right hand - F7, F8, F9, F10, F11, F12, MINS, - TRNS,PGUP,PGUP,UP, PGDN,NO, FN0, - PGDN,LEFT,DOWN,RGHT,NO, TRNS, - TRNS,NO, HOME,END, DEL, INS, TRNS, + F7, F8, F9, F10, F11, F12, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN0, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -342,6 +342,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* id for user defined functions */ enum function_id { TEENSY_KEY, + L_CTRL_ALT_ENT, + R_CTRL_ALT_ENT, }; /* @@ -374,8 +376,8 @@ static const uint16_t PROGMEM fn_actions[] = { [19] = ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys [20] = ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys - [21] = ACTION_LAYER_TAP_KEY(5, KC_ENT), // FN21 - momentary Layer5 on Enter, to use with F* keys on top row - [22] = ACTION_LAYER_TAP_KEY(6, KC_ENT), // FN22 - momentary Layer6 on Enter, to use with F* keys on top row, cursor, Teensy, Workman-layer switch + [21] = ACTION_FUNCTION_TAP(L_CTRL_ALT_ENT), // FN21 - momentary Layer5+CTRL+ALT on Enter, to use with F* keys on top row + [22] = ACTION_FUNCTION_TAP(R_CTRL_ALT_ENT), // FN22 - momentary Layer6+CTRL+ALT on Enter, to use with F* keys on top row, Teensy, Workman-layer switch [23] = ACTION_LAYER_TAP_KEY(7, KC_BSLS), // FN23 - momentary Layer7 on ' , to use with F* keys (F1-F24) [24] = ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys @@ -390,7 +392,7 @@ static const uint16_t PROGMEM fn_actions[] = { [31] = ACTION_LAYER_TAP_KEY(2, KC_F), // FN31 = momentary Layer2 on F key, to use with Numpad keys }; -void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { // print("action_function called\n"); // print("id = "); phex(id); print("\n"); @@ -403,5 +405,36 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) bootloader_jump(); // should not return print("not supported.\n"); } + + if (id == L_CTRL_ALT_ENT || id == R_CTRL_ALT_ENT) { + if (record->tap.count == 0 || record->tap.interrupted) { + uint8_t weak_mods; + uint8_t layer; + + if (id == L_CTRL_ALT_ENT) { + weak_mods = MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT); + layer = 5; + } else { + weak_mods = MOD_BIT(KC_RCTL) | MOD_BIT(KC_RALT); + layer = 6; + } + + if (record->event.pressed) { + layer_on(layer); + add_weak_mods(weak_mods); + } else { + del_weak_mods(weak_mods); + layer_off(layer); + } + } else { + if (record->event.pressed) { + add_key(KC_ENT); + send_keyboard_report(); + } else { + del_key(KC_ENT); + send_keyboard_report(); + } + } + } } From b08d4e7f69a1e1ef1a7a20b305138e4443935c4b Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 04:03:08 +0300 Subject: [PATCH 049/101] Change PRODUCT_ID to custom value --- keyboard/ergodox/addons/bin/set-xkb-map | 2 +- keyboard/ergodox/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox/addons/bin/set-xkb-map b/keyboard/ergodox/addons/bin/set-xkb-map index 278c1c9e..8e187639 100755 --- a/keyboard/ergodox/addons/bin/set-xkb-map +++ b/keyboard/ergodox/addons/bin/set-xkb-map @@ -13,7 +13,7 @@ case "$1" in ;; workman) variant='wcp,' - lsusb | grep -q feed:1112 || variant='wce,' + lsusb | grep -qi FEED:1307 && variant='wce,' [ -e ~/.force_ergodox ] && variant='wce,' [ -e ~/.force_plain ] && variant='wcp,' setxkbmap $opts -layout workman,ru -variant "$variant" diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index 7c8e0d4c..89ce3816 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -27,7 +27,7 @@ Project located at /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1111 +#define PRODUCT_ID 0x1307 #define DEVICE_VER 0x0001 #define MANUFACTURER TMK/Cub #define PRODUCT Ergodox From 897daee45604bcacc0b33b3fdc8a74f7160d7149 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 04:17:37 +0300 Subject: [PATCH 050/101] Updates to CUB's layouts --- keyboard/ergodox/keymap_cub.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index af0081bb..896bb914 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -273,9 +273,9 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer8: mouse and navigation, leftled:mid/blue+bot/green // left hand TRNS,NO, NO, NO, NO, NO, NO, - TRNS,NO, NO, NO, NO, NO, TRNS, - TRNS,NO, NO, TRNS,NO, NO, - TRNS,NO, NO, TRNS,NO, NO, TRNS, + TRNS,NO, NO, NO, ACL0,NO, TRNS, + TRNS,NO, NO, TRNS,ACL1,NO, + TRNS,NO, NO, TRNS,ACL2,NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, From 77e946432e22382ad1bae8da05af87611006efab Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 04:28:27 +0300 Subject: [PATCH 051/101] Updates to CUB's layout - added media keys --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 896bb914..cf3c457a 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -282,7 +282,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand - TRNS,NO, NO, NO, NO, NO, NO, + TRNS,MPLY,MPRV,MNXT,VOLD,VOLU,MUTE, TRNS,BTN2,WH_L,WH_U,WH_D,WH_R,PGUP, BTN1,MS_L,MS_U,MS_D,MS_R,PGDN, TRNS,BTN3,HOME,END, DEL, INS, NO, From 1cf2ea29dc140caae4956c1198bb96996d23ea96 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 04:37:37 +0300 Subject: [PATCH 052/101] Updates to CUB's layout - redefined mouse constants --- keyboard/ergodox/config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index 89ce3816..e15b6d10 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -36,6 +36,11 @@ Project located at #define MATRIX_ROWS 14 #define MATRIX_COLS 6 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST From 793e6dc1a29809e15f22241d6f01c0317dfdeec9 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Apr 2014 05:03:30 +0300 Subject: [PATCH 053/101] Updates to CUB's layout --- keyboard/ergodox/keymap_cub.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index cf3c457a..42e3ccc7 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -145,7 +145,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, TRNS,NO, P7, P8, P9, PMNS,PGUP, - TRNS,P4, P5, P6, PPLS,PGDN, + NO, P4, P5, P6, PPLS,PGDN, TRNS,NO, P1, P2, P3, PPLS,PENT, P0, PDOT,SLSH,PENT,PENT, TRNS,TRNS, @@ -267,7 +267,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, - TRNS,TRNS,TRNS + SLEP,TRNS,TRNS ), KEYMAP( // Layer8: mouse and navigation, leftled:mid/blue+bot/green From 2381945e3079ab92ffb752e1fc9a3e4723d3530b Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 22 Apr 2014 20:50:20 +0300 Subject: [PATCH 054/101] Updates to CUB's layout - rearrange FN-keys --- keyboard/ergodox/keymap_cub.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 42e3ccc7..e3a636b8 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -224,7 +224,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), - KEYMAP( // Layer6: F-keys, Teensy, Workman-layer switch, leftled:top/white+onboard + KEYMAP( // Layer6: F-keys + utils(Teensy, Workman-layer switch), leftled:top/white+onboard // left hand TRNS,F1, F2, F3, F4, F5, F6, FN0, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, @@ -375,21 +375,22 @@ static const uint16_t PROGMEM fn_actions[] = { [18] = ACTION_LAYER_SET(1, ON_BOTH), // FN18 - set Layer1, to use Workman layout at firmware level [19] = ACTION_LAYER_SET(2, ON_BOTH), // FN19 - set Layer2, to use with Numpad keys - [20] = ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys [21] = ACTION_FUNCTION_TAP(L_CTRL_ALT_ENT), // FN21 - momentary Layer5+CTRL+ALT on Enter, to use with F* keys on top row - [22] = ACTION_FUNCTION_TAP(R_CTRL_ALT_ENT), // FN22 - momentary Layer6+CTRL+ALT on Enter, to use with F* keys on top row, Teensy, Workman-layer switch + [22] = ACTION_FUNCTION_TAP(R_CTRL_ALT_ENT), // FN22 - momentary Layer6+CTRL+ALT on Enter, to use with F* keys on top row + utils + + [28] = ACTION_LAYER_TAP_KEY(4, KC_A), // FN28 = momentary Layer4 on A key, to use with unconvenient keys + [29] = ACTION_LAYER_TAP_KEY(3, KC_S), // FN29 = momentary Layer3 on S key, to use with F* keys + [30] = ACTION_LAYER_TAP_KEY(8, KC_D), // FN30 = momentary Layer8 on D key, to use with mouse and navigation keys + [31] = ACTION_LAYER_TAP_KEY(2, KC_F), // FN31 = momentary Layer2 on F key, to use with Numpad keys + + // i'd like to remove this - will try to get used to live without this and convert them to usual keys + [20] = ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys [23] = ACTION_LAYER_TAP_KEY(7, KC_BSLS), // FN23 - momentary Layer7 on ' , to use with F* keys (F1-F24) [24] = ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys [25] = ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys [26] = ACTION_LAYER_TAP_KEY(8, KC_C), // FN26 = momentary Layer8 on C key, to use with mouse and navigation keys [27] = ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys - - // i'd like to remove this - will try to get used to live without this and convert them to usual keys - [28] = ACTION_LAYER_TAP_KEY(4, KC_A), // FN28 = momentary Layer4 on A key, to use with unconvenient keys - [29] = ACTION_LAYER_TAP_KEY(3, KC_S), // FN29 = momentary Layer3 on S key, to use with F* keys - [30] = ACTION_LAYER_TAP_KEY(8, KC_D), // FN30 = momentary Layer8 on D key, to use with mouse and navigation keys - [31] = ACTION_LAYER_TAP_KEY(2, KC_F), // FN31 = momentary Layer2 on F key, to use with Numpad keys }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) From 2405c989b0a18cf67efe0a3b9894c330afa421b8 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 23 Apr 2014 01:07:51 +0300 Subject: [PATCH 055/101] Added example how to handle custom keys --- keyboard/ergodox/keymap_cub.h | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index e3a636b8..cfe0b29a 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -342,6 +342,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* id for user defined functions */ enum function_id { TEENSY_KEY, + CUSTOM_KEY, L_CTRL_ALT_ENT, R_CTRL_ALT_ENT, }; @@ -385,6 +386,9 @@ static const uint16_t PROGMEM fn_actions[] = { // i'd like to remove this - will try to get used to live without this and convert them to usual keys [20] = ACTION_LAYER_MOMENTARY(2), // FN20 - momentary Layer2, to use with Numpad keys +// or +// [20] = ACTION_FUNCTION_TAP(CUSTOM_KEY), // FN20 - use custom key, with tapping support + [23] = ACTION_LAYER_TAP_KEY(7, KC_BSLS), // FN23 - momentary Layer7 on ' , to use with F* keys (F1-F24) [24] = ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys @@ -437,5 +441,44 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) } } } + + +/* + * just an example of custom key implementation + * not really needed with custom keymap_fn_to_action(), + * because it will allow you to have 32 FN** keys on EACH layer + */ + +/* + keyevent_t event = record->event; + + if (id == CUSTOM_KEY) { + uint8_t layer = biton32(layer_state); + uint8_t col = event.key.col; + uint8_t row = event.key.row; + uint8_t handled = 0; + + if (event.pressed) { + if (layer == XXX && col == XXX && row == XXX) { + action_macro_play( + MACRO( + ........... + END) + ); + handled++; + } + } + } + + if (!handled) { + print("custom key not handled"); + print(": layer "); pdec(layer); + print(", col "); pdec(col); + print(", row "); pdec(row); + print("\n"); + } + } +*/ + } From 7cd04d97b51b4e47e8175bcd29bf3d4460e5d298 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 23 Apr 2014 01:20:50 +0300 Subject: [PATCH 056/101] Added support for per-layer FN-translations --- keyboard/ergodox/.gitignore | 1 + keyboard/ergodox/keymap.c | 6 ++ keyboard/ergodox/keymap_cub.h | 61 +++++++++++++++++++-- keyboard/ergodox/keymap_passwords_example.h | 23 ++++++++ 4 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 keyboard/ergodox/.gitignore create mode 100644 keyboard/ergodox/keymap_passwords_example.h diff --git a/keyboard/ergodox/.gitignore b/keyboard/ergodox/.gitignore new file mode 100644 index 00000000..65198a98 --- /dev/null +++ b/keyboard/ergodox/.gitignore @@ -0,0 +1 @@ +keymap_passwords.h diff --git a/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap.c index d0c1c724..6a1e4d65 100644 --- a/keyboard/ergodox/keymap.c +++ b/keyboard/ergodox/keymap.c @@ -218,6 +218,11 @@ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) } } +#if defined(KEYMAP_CUB) + +// function keymap_fn_to_action will be defined in keymap_cub.h + +#else /* translates Fn keycode to action */ action_t keymap_fn_to_action(uint8_t keycode) { @@ -229,4 +234,5 @@ action_t keymap_fn_to_action(uint8_t keycode) } return action; } +#endif diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index cfe0b29a..c0fbd66c 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -251,8 +251,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer7: F-keys only, leftled:top/white // left hand - TRNS,NO, NO, NO, NO, NO, NO, - TRNS,F13, F14, F15, F16, NO, TRNS, + FN0, NO, NO, NO, NO, NO, NO, + FN1, F13, F14, F15, F16, NO, FN23, TRNS,F17, F18, F19, F20, NO, TRNS,F21, F22, F23, F24, NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, @@ -261,7 +261,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand NO, NO, NO, NO, NO, NO, TRNS, - TRNS,NO, F1, F2, F3, F4, TRNS, + FN23,NO, F1, F2, F3, F4, TRNS, NO, F5, F6, F7, F8, TRNS, TRNS,NO, F9, F10, F11, F12, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, @@ -339,7 +339,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -/* id for user defined functions */ +/* id for user defined functions & macros */ enum function_id { TEENSY_KEY, CUSTOM_KEY, @@ -347,6 +347,13 @@ enum function_id { R_CTRL_ALT_ENT, }; +enum macro_id { + XMONAD_RESET, + PASSWORD1, + PASSWORD2, + PASSWORD3, +}; + /* * Fn action definition */ @@ -397,6 +404,13 @@ static const uint16_t PROGMEM fn_actions[] = { [27] = ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys }; +static const uint16_t PROGMEM fn_actions_7[] = { + [0] = ACTION_MACRO(XMONAD_RESET), // FN0 = xmonad-reanimator + [1] = ACTION_MACRO(PASSWORD1), // FN1 = default password + [2] = ACTION_MACRO(PASSWORD1), // FN2 = other password + [3] = ACTION_MACRO(PASSWORD1), // FN3 = mega password +}; + void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { // print("action_function called\n"); @@ -482,3 +496,42 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) } +#include "keymap_passwords.h" +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch (id) { + case XMONAD_RESET: return MACRO_XMONAD_RESET; + case PASSWORD1: return MACRO_PASSWORD1; + } + } + return MACRO_NONE; +} + +#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) +#define FN_ACTIONS_7_SIZE (sizeof(fn_actions_7) / sizeof(fn_actions_7[0])) + +/* + * translates Fn keycode to action + * for some layers, use different translation table + */ +action_t keymap_fn_to_action(uint8_t keycode) +{ + uint8_t layer = biton32(layer_state); + + action_t action; + action.code = ACTION_NO; + + if (layer == 7 && FN_INDEX(keycode) < FN_ACTIONS_7_SIZE) { + action.code = pgm_read_word(&fn_actions_7[FN_INDEX(keycode)]); + } + + // by default, use fn_actions from default layer 0 + // this is needed to get mapping for same key, that was used switch to some layer, + // to have possibility to switch layers back + if (action.code == ACTION_NO && FN_INDEX(keycode) < FN_ACTIONS_SIZE) { + action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); + } + + return action; +} + diff --git a/keyboard/ergodox/keymap_passwords_example.h b/keyboard/ergodox/keymap_passwords_example.h new file mode 100644 index 00000000..ed53b99d --- /dev/null +++ b/keyboard/ergodox/keymap_passwords_example.h @@ -0,0 +1,23 @@ +#define MACRO_XMONAD_RESET MACRO( \ + I(15), \ + D(LCTL), D(LALT), T(F2), W(255), U(LALT), U(LCTL), W(255), \ + T(X), T(M), T(O), T(N), T(UP), T(ENT), W(255), \ + D(LCTL), D(LALT), T(F5), W(255), U(LALT), U(LCTL), W(255), \ + END) \ + +#define MACRO_PASSWORD1 MACRO( \ + I(15), \ + T(E), T(X), T(A), T(M), T(P), T(L), T(E), \ + END) \ + +#define MACRO_PASSWORD2 MACRO( \ + I(15), \ + T(E), T(X), T(A), T(M), T(P), T(L), T(E), \ + END) \ + +#define MACRO_PASSWORD2 MACRO( \ + I(15), \ + T(E), T(X), T(A), T(M), T(P), T(L), T(E), \ + END) \ + + From 1ed80a9a673a422d8e10bddee541b20b7ea4fe7c Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Mon, 9 Jun 2014 17:00:34 +0300 Subject: [PATCH 057/101] Updates to CUB's layout - improvements on Layer4 --- keyboard/ergodox/keymap_cub.h | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index c0fbd66c..160e19bb 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -93,7 +93,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer0: default, leftled:none // left hand GRV, 1, 2, 3, 4, 5, BSLS, - TAB, Q, W, E, R, T, FN23, + FN2, Q, W, E, R, T, FN23, FN11,FN28,FN29,FN30,FN31,G, FN12,FN24,FN25,FN26,FN27,B, HOME, FN21,FN20,CAPS,FN13,FN14, @@ -186,15 +186,15 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, /* in Workman right hand will be: - + - ^ { } ( ) = + { } ( ) + + ^ ! ? = ' ! $ " ; \ # [ < > ] \ */ // right hand - NO, NO, NO, NO, NO, NO, PPLS, - TRNS,MINS,4, 5, 9, 0, EQL, + NO, NO, 4, 5, 9, 0, PPLS, + TRNS,MINS,2, FN5, 9, 0, EQL, BSLS,2, P, FN1, 1, FN2, TRNS,3, 6, FN3, FN4, 7, FN2, TRNS,TRNS,TRNS,TRNS,TRNS, @@ -404,6 +404,14 @@ static const uint16_t PROGMEM fn_actions[] = { [27] = ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys }; +static const uint16_t PROGMEM fn_actions_4[] = { + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman + [2] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman + [3] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman + [4] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman + [5] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN5 = Shifted slash // ? in Workman +}; + static const uint16_t PROGMEM fn_actions_7[] = { [0] = ACTION_MACRO(XMONAD_RESET), // FN0 = xmonad-reanimator [1] = ACTION_MACRO(PASSWORD1), // FN1 = default password @@ -508,6 +516,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { } #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) +#define FN_ACTIONS_4_SIZE (sizeof(fn_actions_4) / sizeof(fn_actions_4[0])) #define FN_ACTIONS_7_SIZE (sizeof(fn_actions_7) / sizeof(fn_actions_7[0])) /* @@ -521,6 +530,10 @@ action_t keymap_fn_to_action(uint8_t keycode) action_t action; action.code = ACTION_NO; + if (layer == 4 && FN_INDEX(keycode) < FN_ACTIONS_4_SIZE) { + action.code = pgm_read_word(&fn_actions_4[FN_INDEX(keycode)]); + } + if (layer == 7 && FN_INDEX(keycode) < FN_ACTIONS_7_SIZE) { action.code = pgm_read_word(&fn_actions_7[FN_INDEX(keycode)]); } From 76c7ebebd7a7b55d2eddabc7bb7978a904f5706f Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 21 Jun 2014 00:36:56 +0300 Subject: [PATCH 058/101] Updates to CUB's layout - improvements on Layer8 --- keyboard/ergodox/config.h | 2 +- keyboard/ergodox/keymap_cub.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index e15b6d10..d5d992a1 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -56,7 +56,7 @@ Project located at * And so, there is no sense to have DEBOUNCE higher than 2. */ #define DEBOUNCE 2 -#define TAPPING_TERM 250 +#define TAPPING_TERM 200 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 160e19bb..f6b87dcf 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -282,10 +282,10 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand - TRNS,MPLY,MPRV,MNXT,VOLD,VOLU,MUTE, - TRNS,BTN2,WH_L,WH_U,WH_D,WH_R,PGUP, + F16, MPLY,MPRV,MNXT,VOLD,VOLU,MUTE, + F14, BTN2,WH_L,WH_U,WH_D,WH_R,PGUP, BTN1,MS_L,MS_U,MS_D,MS_R,PGDN, - TRNS,BTN3,HOME,END, DEL, INS, NO, + F15, BTN3,HOME,END, DEL, INS, NO, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, From 53030f1b65e121eb92b9cfed03f28c912c60b0e6 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 1 Jul 2014 13:20:34 +0300 Subject: [PATCH 059/101] Updates to CUB's layout - change TAPPING_TERM --- keyboard/ergodox/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/config.h b/keyboard/ergodox/config.h index d5d992a1..191efa45 100644 --- a/keyboard/ergodox/config.h +++ b/keyboard/ergodox/config.h @@ -56,7 +56,7 @@ Project located at * And so, there is no sense to have DEBOUNCE higher than 2. */ #define DEBOUNCE 2 -#define TAPPING_TERM 200 +#define TAPPING_TERM 230 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE From f2791c2e37de4e949080f931ec26eed8c476ebea Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 15 Jul 2014 17:28:37 +0300 Subject: [PATCH 060/101] Updates to CUB's layout - created Layer9 (app-specific shortcuts) --- keyboard/ergodox/keymap_cub.h | 67 ++++++++++++++++++++++++++++------- keyboard/ergodox/matrix.c | 7 +++- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index f6b87dcf..8d7b37e4 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -252,7 +252,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer7: F-keys only, leftled:top/white // left hand FN0, NO, NO, NO, NO, NO, NO, - FN1, F13, F14, F15, F16, NO, FN23, + FN1, F13, F14, F15, F16, NO, TRNS, TRNS,F17, F18, F19, F20, NO, TRNS,F21, F22, F23, F24, NO, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, @@ -261,7 +261,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand NO, NO, NO, NO, NO, NO, TRNS, - FN23,NO, F1, F2, F3, F4, TRNS, + TRNS,NO, F1, F2, F3, F4, TRNS, NO, F5, F6, F7, F8, TRNS, TRNS,NO, F9, F10, F11, F12, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, @@ -292,6 +292,27 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS ), + KEYMAP( // Layer9: application-specific shortcuts (mostly browser), leftled:top/white+bot/green + // left hand + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, TRNS,NO, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + NO, NO, NO, NO, NO, NO, TRNS, + TRNS,NO, FN12,FN13,NO, NO, FN10, + FN1, FN2, FN3, FN4, FN5, FN11, + TRNS,FN6, FN7, FN8, FN9, FN0, TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + /* // templates to copy from @@ -401,22 +422,39 @@ static const uint16_t PROGMEM fn_actions[] = { [24] = ACTION_LAYER_TAP_KEY(4, KC_Z), // FN24 = momentary Layer4 on Z key, to use with unconvenient keys [25] = ACTION_LAYER_TAP_KEY(3, KC_X), // FN25 = momentary Layer3 on X key, to use with F* keys [26] = ACTION_LAYER_TAP_KEY(8, KC_C), // FN26 = momentary Layer8 on C key, to use with mouse and navigation keys - [27] = ACTION_LAYER_TAP_KEY(2, KC_V), // FN27 = momentary Layer2 on V key, to use with Numpad keys + [27] = ACTION_LAYER_TAP_KEY(9, KC_V), // FN27 = momentary Layer9 on V key, to use with application-specific shortcuts }; static const uint16_t PROGMEM fn_actions_4[] = { - [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman - [3] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman - [4] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman - [5] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN5 = Shifted slash // ? in Workman + [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman + [2] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman + [3] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman + [4] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN4 = Shifted dot // > in Workman + [5] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN5 = Shifted slash // ? in Workman }; static const uint16_t PROGMEM fn_actions_7[] = { - [0] = ACTION_MACRO(XMONAD_RESET), // FN0 = xmonad-reanimator - [1] = ACTION_MACRO(PASSWORD1), // FN1 = default password - [2] = ACTION_MACRO(PASSWORD1), // FN2 = other password - [3] = ACTION_MACRO(PASSWORD1), // FN3 = mega password + [0] = ACTION_MACRO(XMONAD_RESET), // FN0 = xmonad-reanimator + [1] = ACTION_MACRO(PASSWORD1), // FN1 = default password + [2] = ACTION_MACRO(PASSWORD1), // FN2 = other password + [3] = ACTION_MACRO(PASSWORD1), // FN3 = mega password +}; + +static const uint16_t PROGMEM fn_actions_9[] = { + [0] = ACTION_MODS_KEY(MOD_LALT, KC_P0), // FN0 = Alt+0 + [1] = ACTION_MODS_KEY(MOD_LALT, KC_P1), // FN1 = Alt+1 + [2] = ACTION_MODS_KEY(MOD_LALT, KC_P2), // FN2 = Alt+2 + [3] = ACTION_MODS_KEY(MOD_LALT, KC_P3), // FN3 = Alt+3 + [4] = ACTION_MODS_KEY(MOD_LALT, KC_P4), // FN4 = Alt+4 + [5] = ACTION_MODS_KEY(MOD_LALT, KC_P5), // FN5 = Alt+5 + [6] = ACTION_MODS_KEY(MOD_LALT, KC_P6), // FN6 = Alt+6 + [7] = ACTION_MODS_KEY(MOD_LALT, KC_P7), // FN7 = Alt+7 + [8] = ACTION_MODS_KEY(MOD_LALT, KC_P8), // FN8 = Alt+8 + [9] = ACTION_MODS_KEY(MOD_LALT, KC_P9), // FN9 = Alt+9 + [10] = ACTION_MODS_KEY(MOD_LCTL|MOD_LSFT, KC_TAB), // FN10 = Ctrl+Shift+Tab + [11] = ACTION_MODS_KEY(MOD_LCTL, KC_TAB), // FN11 = Ctrl+Tab + [12] = ACTION_MODS_KEY(MOD_LCTL|MOD_LSFT, KC_PGUP), // FN12 = Ctrl+Shift+PgUp + [13] = ACTION_MODS_KEY(MOD_LCTL|MOD_LSFT, KC_PGDN), // FN13 = Ctrl+Shift+PgDn }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -518,6 +556,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_4_SIZE (sizeof(fn_actions_4) / sizeof(fn_actions_4[0])) #define FN_ACTIONS_7_SIZE (sizeof(fn_actions_7) / sizeof(fn_actions_7[0])) +#define FN_ACTIONS_9_SIZE (sizeof(fn_actions_9) / sizeof(fn_actions_9[0])) /* * translates Fn keycode to action @@ -538,6 +577,10 @@ action_t keymap_fn_to_action(uint8_t keycode) action.code = pgm_read_word(&fn_actions_7[FN_INDEX(keycode)]); } + if (layer == 9 && FN_INDEX(keycode) < FN_ACTIONS_9_SIZE) { + action.code = pgm_read_word(&fn_actions_9[FN_INDEX(keycode)]); + } + // by default, use fn_actions from default layer 0 // this is needed to get mapping for same key, that was used switch to some layer, // to have possibility to switch layers back diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index e8d69105..ee0d5d23 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -150,9 +150,14 @@ uint8_t matrix_scan(void) case 4: case 5: case 7: - // red + // white ergodox_left_led_1_on(); break; + case 9: + // white+green + ergodox_left_led_1_on(); + ergodox_left_led_3_on(); + break; default: // none break; From 4603cdf13490e43da593d0ead163226163fe4ef1 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 15 Jul 2014 17:41:59 +0300 Subject: [PATCH 061/101] Updates to CUB's layout - improvements on Layer9 --- keyboard/ergodox/keymap_cub.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 8d7b37e4..68691189 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -304,7 +304,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand NO, NO, NO, NO, NO, NO, TRNS, - TRNS,NO, FN12,FN13,NO, NO, FN10, + TRNS,NO, FN12,FN13,FN14,FN15,FN10, FN1, FN2, FN3, FN4, FN5, FN11, TRNS,FN6, FN7, FN8, FN9, FN0, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, @@ -441,20 +441,22 @@ static const uint16_t PROGMEM fn_actions_7[] = { }; static const uint16_t PROGMEM fn_actions_9[] = { - [0] = ACTION_MODS_KEY(MOD_LALT, KC_P0), // FN0 = Alt+0 - [1] = ACTION_MODS_KEY(MOD_LALT, KC_P1), // FN1 = Alt+1 - [2] = ACTION_MODS_KEY(MOD_LALT, KC_P2), // FN2 = Alt+2 - [3] = ACTION_MODS_KEY(MOD_LALT, KC_P3), // FN3 = Alt+3 - [4] = ACTION_MODS_KEY(MOD_LALT, KC_P4), // FN4 = Alt+4 - [5] = ACTION_MODS_KEY(MOD_LALT, KC_P5), // FN5 = Alt+5 - [6] = ACTION_MODS_KEY(MOD_LALT, KC_P6), // FN6 = Alt+6 - [7] = ACTION_MODS_KEY(MOD_LALT, KC_P7), // FN7 = Alt+7 - [8] = ACTION_MODS_KEY(MOD_LALT, KC_P8), // FN8 = Alt+8 - [9] = ACTION_MODS_KEY(MOD_LALT, KC_P9), // FN9 = Alt+9 + [0] = ACTION_MODS_KEY(MOD_LALT, KC_P0), // FN0 = Alt+0 + [1] = ACTION_MODS_KEY(MOD_LALT, KC_P1), // FN1 = Alt+1 + [2] = ACTION_MODS_KEY(MOD_LALT, KC_P2), // FN2 = Alt+2 + [3] = ACTION_MODS_KEY(MOD_LALT, KC_P3), // FN3 = Alt+3 + [4] = ACTION_MODS_KEY(MOD_LALT, KC_P4), // FN4 = Alt+4 + [5] = ACTION_MODS_KEY(MOD_LALT, KC_P5), // FN5 = Alt+5 + [6] = ACTION_MODS_KEY(MOD_LALT, KC_P6), // FN6 = Alt+6 + [7] = ACTION_MODS_KEY(MOD_LALT, KC_P7), // FN7 = Alt+7 + [8] = ACTION_MODS_KEY(MOD_LALT, KC_P8), // FN8 = Alt+8 + [9] = ACTION_MODS_KEY(MOD_LALT, KC_P9), // FN9 = Alt+9 [10] = ACTION_MODS_KEY(MOD_LCTL|MOD_LSFT, KC_TAB), // FN10 = Ctrl+Shift+Tab [11] = ACTION_MODS_KEY(MOD_LCTL, KC_TAB), // FN11 = Ctrl+Tab [12] = ACTION_MODS_KEY(MOD_LCTL|MOD_LSFT, KC_PGUP), // FN12 = Ctrl+Shift+PgUp [13] = ACTION_MODS_KEY(MOD_LCTL|MOD_LSFT, KC_PGDN), // FN13 = Ctrl+Shift+PgDn + [14] = ACTION_MODS_KEY(MOD_LCTL, KC_PMNS), // FN14 = Ctrl+Pad Minus + [15] = ACTION_MODS_KEY(MOD_LCTL, KC_PPLS), // FN15 = Ctrl+Pad Plus }; void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) From 190dd9a18cefdcc453c6aa9fb14c477b9cc17382 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 15 Jul 2014 23:07:16 +0300 Subject: [PATCH 062/101] Updates to CUB's layout - improvements on Layer9 --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 68691189..7c2ce2d6 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -441,7 +441,7 @@ static const uint16_t PROGMEM fn_actions_7[] = { }; static const uint16_t PROGMEM fn_actions_9[] = { - [0] = ACTION_MODS_KEY(MOD_LALT, KC_P0), // FN0 = Alt+0 + [0] = ACTION_MODS_KEY(MOD_LCTL, KC_P0), // FN0 = Ctrl+0 [1] = ACTION_MODS_KEY(MOD_LALT, KC_P1), // FN1 = Alt+1 [2] = ACTION_MODS_KEY(MOD_LALT, KC_P2), // FN2 = Alt+2 [3] = ACTION_MODS_KEY(MOD_LALT, KC_P3), // FN3 = Alt+3 From 89b2e49b1ea40874d7cde915523bab490c0d0fd9 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Wed, 16 Jul 2014 00:13:34 +0300 Subject: [PATCH 063/101] Updates to CUB's layout - improvements on Layer9 --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 7c2ce2d6..515e9f74 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -306,7 +306,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { NO, NO, NO, NO, NO, NO, TRNS, TRNS,NO, FN12,FN13,FN14,FN15,FN10, FN1, FN2, FN3, FN4, FN5, FN11, - TRNS,FN6, FN7, FN8, FN9, FN0, TRNS, + TRNS,TRNS,FN6, FN7, FN8, FN9, FN0, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, From 5d8b9cb1c63b3a489e523808639d606df803de51 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 26 Jul 2014 02:41:25 +0300 Subject: [PATCH 064/101] Initial version of Ergodox-FAQ.md --- README.md | 2 ++ keyboard/ergodox/Ergodox-FAQ.md | 29 +++++++++++++++++++++++++++++ keyboard/ergodox/TODO | 9 --------- 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 keyboard/ergodox/Ergodox-FAQ.md delete mode 100644 keyboard/ergodox/TODO diff --git a/README.md b/README.md index 6596dc33..2695b629 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di * [macway](keyboard/macway/) - [Compact keyboard mod][GH_macway] [retired] * [KMAC](keyboard/kmac/) - Korean custom keyboard * [Lightsaber](keyboard/lightsaber/) - Korean custom keyboard +* [ErgoDox](keyboard/ergodox/) - [ergonomic keyboard with split design][GH_ergodox] (see [Ergodox-FAQ.md](keyboard/ergodox/Ergodox-FAQ.md)) [GH_macway]: http://geekhack.org/showwiki.php?title=Island:11930 [GH_hhkb]: http://geekhack.org/showwiki.php?title=Island:12047 @@ -65,6 +66,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di [GH_x68k]: http://geekhack.org/showwiki.php?title=Island:29060 [GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 [GH_ibm4704]: http://geekhack.org/index.php?topic=54706.0 +[GH_ergodox]: http://geekhack.org/index.php?topic=48106.0 [HID_liber]: http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions [Phantom]: http://geekhack.org/index.php?topic=26742 [GH60]: http://geekhack.org/index.php?topic=34959 diff --git a/keyboard/ergodox/Ergodox-FAQ.md b/keyboard/ergodox/Ergodox-FAQ.md new file mode 100644 index 00000000..df55252c --- /dev/null +++ b/keyboard/ergodox/Ergodox-FAQ.md @@ -0,0 +1,29 @@ +Firmware +======== + +Q: Where to get binaries? +A: + +Q: Where to get sources? +A: + +Q: How to compile? +A: + + +Layouts +======= + +description of layouts in base firmware binaries + + +Things TO-DO +============ +2. Flash NumLock led only when "numpad" layer is active +3. Command (in terms of IS_COMMAND) to switch to no-leds mode +4. Increase count of ACTION keys +6. Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) +7. ergodox_blink_all_leds() should save current state of leds, and restore after blink. initial state of all leds == off +8. add support for pseudo-backlight (reversed LEDs) + docs/photo +9. command to debug all LEDs (on/off/blink) + diff --git a/keyboard/ergodox/TODO b/keyboard/ergodox/TODO deleted file mode 100644 index 2144ec24..00000000 --- a/keyboard/ergodox/TODO +++ /dev/null @@ -1,9 +0,0 @@ -2. Flash NumLock led only when "numpad" layer is active -3. Command (in terms of IS_COMMAND) to switch to no-leds mode -4. Increase count of ACTION keys -6. Fix command_state() onboard led: - it should flash only when kbd in some specific mode (CONSOLE || MOUSE) -7. ergodox_blink_all_leds() should save current state of leds, - and restore after blink. initial state of all leds == off -8. add support for pseudo-backlight (reversed LEDs) + docs/photo -9. command to debug all LEDs (on/off/blink) From ff5f1b0552078dcee25d31723e236f525bbf85e8 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 29 Jul 2014 01:51:00 +0300 Subject: [PATCH 065/101] Updates to Ergodox-FAQ.md --- keyboard/ergodox/Ergodox-FAQ.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/keyboard/ergodox/Ergodox-FAQ.md b/keyboard/ergodox/Ergodox-FAQ.md index df55252c..99f948b8 100644 --- a/keyboard/ergodox/Ergodox-FAQ.md +++ b/keyboard/ergodox/Ergodox-FAQ.md @@ -19,11 +19,13 @@ description of layouts in base firmware binaries Things TO-DO ============ -2. Flash NumLock led only when "numpad" layer is active -3. Command (in terms of IS_COMMAND) to switch to no-leds mode -4. Increase count of ACTION keys -6. Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) -7. ergodox_blink_all_leds() should save current state of leds, and restore after blink. initial state of all leds == off -8. add support for pseudo-backlight (reversed LEDs) + docs/photo -9. command to debug all LEDs (on/off/blink) +- Flash NumLock led only when "numpad" layer is active +- Command (in terms of IS_COMMAND) to switch to no-leds mode +- Increase count of ACTION keys +- Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) +- ergodox_blink_all_leds() should save current state of leds, and restore after blink. initial state of all leds == off +- add support for pseudo-backlight (reversed LEDs) + docs/photo +- command to debug all LEDs (on/off/blink) +- proper (in-core) implementation of DEBUG_MATRIX_SCAN_RATE (non-Ergodox specific) +- proper (in-core) support for per-layer fn_actions[] From 39ff9ac3d21438cc549b71763f9f43ac03a1e4f9 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 3 Aug 2014 13:28:11 +0300 Subject: [PATCH 066/101] Updates to Ergodox-FAQ.md --- keyboard/ergodox/Ergodox-FAQ.md | 55 ++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/keyboard/ergodox/Ergodox-FAQ.md b/keyboard/ergodox/Ergodox-FAQ.md index 99f948b8..bbbc7351 100644 --- a/keyboard/ergodox/Ergodox-FAQ.md +++ b/keyboard/ergodox/Ergodox-FAQ.md @@ -1,5 +1,31 @@ -Firmware -======== +# TMK Generic + +* I'm not sure what the Magic + H does. + Is this a menu that will pop up regardless of what platform and program is open? + + Yes, this is sort of debugging. + Use PJRC's [hid_listen](https://www.pjrc.com/teensy/hid_listen.html) to see debug messages. + +# TMK/Ergodox specific + +* I would like to configure my leds to indicate the active layer. + I read that can be done, but I haven't seen an example for this firmware. + Can someone please post an example or a link? + + TMK for Ergodox have support for seven (!) led's: + - three on right + - three on left (see http://geekhack.org/index.php?topic=22780.msg873819#msg873819 for more details) + - Teensy onboard led as well + + Any of these leds can be used as layer indicator or NumLock/CapsLock/ScrollLock led. + + [Here is example](https://github.com/cub-uanic/tmk_keyboard/blob/cub_layout/keyboard/ergodox/matrix.c#L121-167) + how you can assign some meaning to each led. + In this code only left leds are used to show layers, but you can + [change `led_set()`](https://github.com/cub-uanic/tmk_keyboard/blob/cub_layout/keyboard/ergodox/led.c) + and do anything you want with all leds. + +# Firmware Q: Where to get binaries? A: @@ -11,21 +37,20 @@ Q: How to compile? A: -Layouts -======= +# Layouts description of layouts in base firmware binaries -Things TO-DO -============ -- Flash NumLock led only when "numpad" layer is active -- Command (in terms of IS_COMMAND) to switch to no-leds mode -- Increase count of ACTION keys -- Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) -- ergodox_blink_all_leds() should save current state of leds, and restore after blink. initial state of all leds == off -- add support for pseudo-backlight (reversed LEDs) + docs/photo -- command to debug all LEDs (on/off/blink) -- proper (in-core) implementation of DEBUG_MATRIX_SCAN_RATE (non-Ergodox specific) -- proper (in-core) support for per-layer fn_actions[] +# Things TO-DO + +- [ ] Flash NumLock led only when "numpad" layer is active +- [ ] Command (in terms of IS_COMMAND) to switch to no-leds mode +- [ ] Increase count of ACTION keys +- [ ] Fix command_state() onboard led: it should flash only when kbd in some specific mode (CONSOLE || MOUSE) +- [ ] ergodox_blink_all_leds() should save current state of leds, and restore after blink. initial state of all leds == off +- [ ] add support for pseudo-backlight (reversed LEDs) + docs/photo +- [ ] command to debug all LEDs (on/off/blink) +- [ ] proper (in-core) implementation of DEBUG_MATRIX_SCAN_RATE (non-Ergodox specific) +- [ ] proper (in-core) support for per-layer fn_actions[] From ed8a8114d991087630977846606c7cb3718b7773 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Thu, 4 Sep 2014 19:49:51 +0300 Subject: [PATCH 067/101] Updates to CUB's layout --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 515e9f74..1ffe2fb2 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -138,7 +138,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,NO, NO, NO, NO, NO, TRNS, TRNS,NO, NO, NO, TRNS,NO, TRNS,NO, NO, NO, TRNS,NO, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,FN17,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, From 5748f1af6a43c65573431890acd04875509b0ec7 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Thu, 18 Sep 2014 20:17:35 +0300 Subject: [PATCH 068/101] Updates to CUB's layout --- keyboard/ergodox/keymap_cub.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 1ffe2fb2..6e6d0cd8 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -117,7 +117,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,Q, D, R, W, B, TRNS, TRNS,A, S, H, T, G, TRNS,Z, X, M, C, V, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,FN17,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, From 4094fc62dac9525eea48da4c4de4c9b2a8de2eaf Mon Sep 17 00:00:00 2001 From: Marius Hintsche Date: Fri, 14 Nov 2014 23:34:08 +0100 Subject: [PATCH 069/101] fixed bug in numpadlayer in default keymap there was no way to leave that layer --- keyboard/ergodox/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap.c index 6a1e4d65..048be0e8 100644 --- a/keyboard/ergodox/keymap.c +++ b/keyboard/ergodox/keymap.c @@ -162,7 +162,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS,TRNS,TRNS, // right hand - SLCK,NLCK,PSLS,PAST,PAST,PMNS,BSPC, + TRNS,NLCK,PSLS,PAST,PAST,PMNS,BSPC, TRNS,NO, P7, P8, P9, PMNS,BSPC, NO, P4, P5, P6, PPLS,PENT, TRNS,NO, P1, P2, P3, PPLS,PENT, @@ -185,9 +185,9 @@ enum function_id { static const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 - ACTION_LAYER_SET(2, ON_PRESS), // FN2 - push Layer2 - ACTION_LAYER_SET(3, ON_PRESS), // FN3 - push Layer3 - ACTION_LAYER_SET(0, ON_PRESS), // FN4 - push Layer0 + ACTION_LAYER_SET(2, ON_PRESS), // FN2 - set Layer2 + ACTION_LAYER_TOGGLE(3), // FN3 - toggle Layer3 aka Numpad layer + ACTION_LAYER_SET(0, ON_PRESS), // FN4 - set Layer0 }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From 0c95282d3d6d1d9158a8b29b25b96609869adb0c Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Tue, 16 Dec 2014 15:59:10 +0200 Subject: [PATCH 070/101] Updates to CUB's layout --- keyboard/ergodox/keymap_cub.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.h index 6e6d0cd8..32273025 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.h @@ -206,8 +206,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer5: F-keys instead of numbers, leftled:top/white // left hand TRNS,F1, F2, F3, F4, F5, F6, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,P1, P2, P3, P4, P5, TRNS, + TRNS,TRNS,TRNS,E, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, @@ -215,8 +215,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS, // right hand F7, F8, F9, F10, F11, F12, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,P6, P7, P8, P9, P0, TRNS, + TRNS,U, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, @@ -226,18 +226,18 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // Layer6: F-keys + utils(Teensy, Workman-layer switch), leftled:top/white+onboard // left hand - TRNS,F1, F2, F3, F4, F5, F6, - FN0, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + FN0, F1, F2, F3, F4, F5, F6, + TRNS,P1, P2, P3, P4, P5, TRNS, + TRNS,TRNS,TRNS,E, TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN18,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, // right hand - F7, F8, F9, F10, F11, F12, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN0, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + F7, F8, F9, F10, F11, F12, FN0, + TRNS,P6, P7, P8, P9, P0, TRNS, + TRNS,U, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, @@ -389,7 +389,7 @@ static const uint16_t PROGMEM fn_actions[] = { [5] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC), // FN5 = LShift with tap BackSpace [6] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_DEL), // FN6 = LCtrl with tap Delete [7] = ACTION_MODS_TAP_KEY(MOD_LALT, KC_ESC), // FN7 = LAlt with tap Escape - [8] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS), // FN8 = RAlt with tap Ins + [8] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_INS), // FN8 = RGui with tap Ins [9] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // FN9 = RShift with tap Enter [10] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC), // FN10 = RCtrl with tap Space From eeb6463091847159308da72a64cfd8dd0271941b Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 3 Jan 2015 00:12:17 +0200 Subject: [PATCH 071/101] Change key_t to keypos_t - follow Hasu's style --- keyboard/ergodox/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap.c index 048be0e8..39713e50 100644 --- a/keyboard/ergodox/keymap.c +++ b/keyboard/ergodox/keymap.c @@ -208,7 +208,7 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) /* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) +uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) { if (layer < KEYMAPS_SIZE) { return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); From de5fe8238685a416b49a402dbee4a781d734020f Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 3 Jan 2015 13:55:49 +0200 Subject: [PATCH 072/101] Include $(TOP_DIR)/protocol.mk --- keyboard/ergodox/Makefile.lufa | 4 ++-- keyboard/ergodox/Makefile.pjrc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index 07241b03..6edba8c0 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -99,7 +99,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # LUFA bootloader 4096 OPT_DEFS += -DBOOTLOADER_SIZE=512 - # Build Options # comment out to disable the options. # @@ -109,7 +108,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+600) 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 - not yet supported in LUFA +NKRO_ENABLE = yes # USB Nkey Rollover (+500) #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support INVERT_NUMLOCK = yes # invert state of NumLock led @@ -118,6 +117,7 @@ INVERT_NUMLOCK = yes # invert state of NumLock led VPATH += $(TARGET_DIR) VPATH += $(TOP_DIR) +include $(TOP_DIR)/protocol.mk include $(TOP_DIR)/protocol/lufa.mk include $(TOP_DIR)/common.mk include $(TOP_DIR)/rules.mk diff --git a/keyboard/ergodox/Makefile.pjrc b/keyboard/ergodox/Makefile.pjrc index e36cbc6b..9a6da577 100644 --- a/keyboard/ergodox/Makefile.pjrc +++ b/keyboard/ergodox/Makefile.pjrc @@ -87,7 +87,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+600) 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(+500) +NKRO_ENABLE = yes # USB Nkey Rollover (+500) #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support INVERT_NUMLOCK = yes # invert state of NumLock led @@ -96,6 +96,7 @@ INVERT_NUMLOCK = yes # invert state of NumLock led VPATH += $(TARGET_DIR) VPATH += $(TOP_DIR) +include $(TOP_DIR)/protocol.mk include $(TOP_DIR)/protocol/pjrc.mk include $(TOP_DIR)/common.mk include $(TOP_DIR)/rules.mk From 4478c7cb95e6f2ae69d9f835dc4e82662a390c88 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 3 Jan 2015 14:39:23 +0200 Subject: [PATCH 073/101] Updates to Ergodox-FAQ.md --- keyboard/ergodox/Ergodox-FAQ.md | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/keyboard/ergodox/Ergodox-FAQ.md b/keyboard/ergodox/Ergodox-FAQ.md index bbbc7351..d70aac74 100644 --- a/keyboard/ergodox/Ergodox-FAQ.md +++ b/keyboard/ergodox/Ergodox-FAQ.md @@ -27,19 +27,31 @@ # Firmware -Q: Where to get binaries? -A: +#### Where to get binaries? +https://github.com/cub-uanic/tmk_keyboard/releases -Q: Where to get sources? -A: +#### Where to get sources? +https://github.com/cub-uanic/tmk_keyboard/tree/master -Q: How to compile? -A: +#### How to compile? + + cd tmk_keyboard/keyboard/ergodox + + # just to be safe + make -f Makefile.lufa clean + + # use one of these + make -f Makefile.lufa + make -f Makefile.lufa dvorak + make -f Makefile.lufa colemak + make -f Makefile.lufa workman + make -f Makefile.lufa micro + make -f Makefile.lufa cub # Layouts -description of layouts in base firmware binaries +TODO description of layouts in base firmware binaries # Things TO-DO From 1b58b13e306b9d670068fe7084d2fe10b6446591 Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sat, 3 Jan 2015 15:36:29 +0200 Subject: [PATCH 074/101] Updates to local gitignore --- keyboard/ergodox/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboard/ergodox/.gitignore b/keyboard/ergodox/.gitignore index 65198a98..9f8fcd12 100644 --- a/keyboard/ergodox/.gitignore +++ b/keyboard/ergodox/.gitignore @@ -1 +1,2 @@ keymap_passwords.h +keymap_passwords_cub.h From c375334bf53584e6e8f0945feabb57cb24b77bfa Mon Sep 17 00:00:00 2001 From: Oleg Kostyuk Date: Sun, 4 Jan 2015 05:42:29 +0200 Subject: [PATCH 075/101] Updates to Ergodox-FAQ.md --- keyboard/ergodox/Ergodox-FAQ.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboard/ergodox/Ergodox-FAQ.md b/keyboard/ergodox/Ergodox-FAQ.md index d70aac74..256806a1 100644 --- a/keyboard/ergodox/Ergodox-FAQ.md +++ b/keyboard/ergodox/Ergodox-FAQ.md @@ -65,4 +65,8 @@ TODO description of layouts in base firmware binaries - [ ] command to debug all LEDs (on/off/blink) - [ ] proper (in-core) implementation of DEBUG_MATRIX_SCAN_RATE (non-Ergodox specific) - [ ] proper (in-core) support for per-layer fn_actions[] +- [ ] create one-handed layouts, see + http://half-qwerty.com/ + https://geekhack.org/index.php?topic=60165.0 + https://www.massdrop.com/ext/ergodox/?hash=e097c3b9932179055023d47e48b25f1d From 9a451a5b1c30ff7986465eab6977b079340a783c Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sun, 19 Jul 2015 16:10:13 -0400 Subject: [PATCH 076/101] Change TOP_DIR to TMK_DIR in makefiles --- keyboard/ergodox/Makefile.lufa | 12 ++++++------ keyboard/ergodox/Makefile.pjrc | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index 6edba8c0..d714d760 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -42,7 +42,7 @@ TARGET = ergodox_lufa # Directory common source filess exist -TOP_DIR = ../.. +TMK_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . @@ -115,12 +115,12 @@ INVERT_NUMLOCK = yes # invert state of NumLock led # Search Path VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) +VPATH += $(TMK_DIR) -include $(TOP_DIR)/protocol.mk -include $(TOP_DIR)/protocol/lufa.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk +include $(TMK_DIR)/protocol.mk +include $(TMK_DIR)/protocol/lufa.mk +include $(TMK_DIR)/common.mk +include $(TMK_DIR)/rules.mk dvorak: OPT_DEFS += -DKEYMAP_DVORAK dvorak: all diff --git a/keyboard/ergodox/Makefile.pjrc b/keyboard/ergodox/Makefile.pjrc index 9a6da577..998b625f 100644 --- a/keyboard/ergodox/Makefile.pjrc +++ b/keyboard/ergodox/Makefile.pjrc @@ -42,7 +42,7 @@ TARGET = ergodox_pjrc # Directory common source filess exist -TOP_DIR = ../.. +TMK_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . @@ -94,12 +94,12 @@ INVERT_NUMLOCK = yes # invert state of NumLock led # Search Path VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) +VPATH += $(TMK_DIR) -include $(TOP_DIR)/protocol.mk -include $(TOP_DIR)/protocol/pjrc.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk +include $(TMK_DIR)/protocol.mk +include $(TMK_DIR)/protocol/pjrc.mk +include $(TMK_DIR)/common.mk +include $(TMK_DIR)/rules.mk dvorak: OPT_DEFS += -DKEYMAP_DVORAK dvorak: all From 9d440fc01b2fc3ea4b9b46a16802a31a6960e160 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sun, 19 Jul 2015 16:12:22 -0400 Subject: [PATCH 077/101] Change TMK_DIR setting --- keyboard/ergodox/Makefile.lufa | 2 +- keyboard/ergodox/Makefile.pjrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index d714d760..abb57017 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -42,7 +42,7 @@ TARGET = ergodox_lufa # Directory common source filess exist -TMK_DIR = ../.. +TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/keyboard/ergodox/Makefile.pjrc b/keyboard/ergodox/Makefile.pjrc index 998b625f..aa29a361 100644 --- a/keyboard/ergodox/Makefile.pjrc +++ b/keyboard/ergodox/Makefile.pjrc @@ -42,7 +42,7 @@ TARGET = ergodox_pjrc # Directory common source filess exist -TMK_DIR = ../.. +TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . From 6d1ac77109cfc3aa680be6d84179406d38451d47 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 28 May 2016 19:27:14 -0400 Subject: [PATCH 078/101] Fix compiler warning --- keyboard/ergodox/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index ee0d5d23..5c9c4bc2 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -44,7 +44,7 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static matrix_row_t read_cols(uint8_t row); static void init_cols(void); -static void unselect_rows(); +static void unselect_rows(void); static void select_row(uint8_t row); static uint8_t mcp23018_reset_loop; From 5b30bb5343f2953e0f4cfa23e3a0a03c435e95e3 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 28 May 2016 19:51:38 -0400 Subject: [PATCH 079/101] Cleanup file structure to more closely match tmk --- keyboard/ergodox/Makefile.lufa | 25 ++-- keyboard/ergodox/Makefile.pjrc | 25 ++-- .../ergodox/{keymap.c => keymap_blazak.c} | 110 +----------------- keyboard/ergodox/keymap_colemak.h | 4 - keyboard/ergodox/keymap_common.c | 33 ++++++ keyboard/ergodox/keymap_common.h | 80 +++++++++++++ .../ergodox/{keymap_cub.h => keymap_cub.c} | 17 ++- keyboard/ergodox/keymap_dvorak.h | 4 - .../{keymap_micro.h => keymap_micro.c} | 20 ++-- keyboard/ergodox/keymap_workman.h | 4 - 10 files changed, 154 insertions(+), 168 deletions(-) rename keyboard/ergodox/{keymap.c => keymap_blazak.c} (51%) delete mode 100644 keyboard/ergodox/keymap_colemak.h create mode 100644 keyboard/ergodox/keymap_common.c create mode 100644 keyboard/ergodox/keymap_common.h rename keyboard/ergodox/{keymap_cub.h => keymap_cub.c} (98%) delete mode 100644 keyboard/ergodox/keymap_dvorak.h rename keyboard/ergodox/{keymap_micro.h => keymap_micro.c} (98%) delete mode 100644 keyboard/ergodox/keymap_workman.h diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index abb57017..976877e1 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -48,12 +48,18 @@ TMK_DIR = ../../tmk_core TARGET_DIR = . # project specific files -SRC = keymap.c \ +SRC = keymap_common.c \ matrix.c \ led.c \ ergodox.c \ twimaster.c +ifdef KEYMAP + SRC := keymap_$(KEYMAP).c $(SRC) +else + SRC := keymap_blazak.c $(SRC) +endif + CONFIG_H = config.h @@ -121,20 +127,3 @@ include $(TMK_DIR)/protocol.mk include $(TMK_DIR)/protocol/lufa.mk include $(TMK_DIR)/common.mk include $(TMK_DIR)/rules.mk - -dvorak: OPT_DEFS += -DKEYMAP_DVORAK -dvorak: all - -colemak: OPT_DEFS += -DKEYMAP_COLEMAK -colemak: all - -workman: OPT_DEFS += -DKEYMAP_WORKMAN -workman: all - -micro: OPT_DEFS += -DKEYMAP_MICRO -micro: all - -cub: OPT_DEFS += -DKEYMAP_CUB -cub: all - - diff --git a/keyboard/ergodox/Makefile.pjrc b/keyboard/ergodox/Makefile.pjrc index aa29a361..04b07d9f 100644 --- a/keyboard/ergodox/Makefile.pjrc +++ b/keyboard/ergodox/Makefile.pjrc @@ -48,12 +48,18 @@ TMK_DIR = ../../tmk_core TARGET_DIR = . # project specific files -SRC = keymap.c \ +SRC = keymap_common.c \ matrix.c \ led.c \ ergodox.c \ twimaster.c +ifdef KEYMAP + SRC := keymap_$(KEYMAP).c $(SRC) +else + SRC := keymap_blazak.c $(SRC) +endif + CONFIG_H = config.h @@ -100,20 +106,3 @@ include $(TMK_DIR)/protocol.mk include $(TMK_DIR)/protocol/pjrc.mk include $(TMK_DIR)/common.mk include $(TMK_DIR)/rules.mk - -dvorak: OPT_DEFS += -DKEYMAP_DVORAK -dvorak: all - -colemak: OPT_DEFS += -DKEYMAP_COLEMAK -colemak: all - -workman: OPT_DEFS += -DKEYMAP_WORKMAN -workman: all - -micro: OPT_DEFS += -DKEYMAP_MICRO -micro: all - -cub: OPT_DEFS += -DKEYMAP_CUB -cub: all - - diff --git a/keyboard/ergodox/keymap.c b/keyboard/ergodox/keymap_blazak.c similarity index 51% rename from keyboard/ergodox/keymap.c rename to keyboard/ergodox/keymap_blazak.c index 39713e50..2a8164c5 100644 --- a/keyboard/ergodox/keymap.c +++ b/keyboard/ergodox/keymap_blazak.c @@ -14,80 +14,12 @@ GNU General 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 "keycode.h" -#include "action.h" -#include "action_util.h" -#include "action_code.h" -#include "action_macro.h" -#include "action_layer.h" #include "bootloader.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" -#include "ergodox.h" +#include "keymap_common.h" -/* ErgoDox keymap definition macro */ -#define KEYMAP( \ - \ - /* left hand, spatial positions */ \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k54, \ - k53,k52,k51, \ - \ - /* right hand, spatial positions */ \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { KC_##k00,KC_##k10,KC_##k20,KC_##k30,KC_##k40,KC_NO }, \ - { KC_##k01,KC_##k11,KC_##k21,KC_##k31,KC_##k41,KC_##k51}, \ - { KC_##k02,KC_##k12,KC_##k22,KC_##k32,KC_##k42,KC_##k52}, \ - { KC_##k03,KC_##k13,KC_##k23,KC_##k33,KC_##k43,KC_##k53}, \ - { KC_##k04,KC_##k14,KC_##k24,KC_##k34,KC_##k44,KC_##k54}, \ - { KC_##k05,KC_##k15,KC_##k25,KC_##k35,KC_NO, KC_##k55}, \ - { KC_##k06,KC_##k16,KC_NO, KC_##k36,KC_NO, KC_##k56}, \ - \ - { KC_##k07,KC_##k17,KC_NO, KC_##k37,KC_NO, KC_##k57}, \ - { KC_##k08,KC_##k18,KC_##k28,KC_##k38,KC_NO, KC_##k58}, \ - { KC_##k09,KC_##k19,KC_##k29,KC_##k39,KC_##k49,KC_##k59}, \ - { KC_##k0A,KC_##k1A,KC_##k2A,KC_##k3A,KC_##k4A,KC_##k5A}, \ - { KC_##k0B,KC_##k1B,KC_##k2B,KC_##k3B,KC_##k4B,KC_##k5B}, \ - { KC_##k0C,KC_##k1C,KC_##k2C,KC_##k3C,KC_##k4C,KC_##k5C}, \ - { KC_##k0D,KC_##k1D,KC_##k2D,KC_##k3D,KC_##k4D,KC_NO } \ - } - -#if defined(KEYMAP_DVORAK) -#include "keymap_dvorak.h" -#elif defined(KEYMAP_COLEMAK) -#include "keymap_colemak.h" -#elif defined(KEYMAP_WORKMAN) -#include "keymap_workman.h" -#elif defined(KEYMAP_MICRO) -#include "keymap_micro.h" -#elif defined(KEYMAP_CUB) -#include "keymap_cub.h" -#else - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // layer 0 : default // left hand EQL, 1, 2, 3, 4, 5, ESC, @@ -182,7 +114,7 @@ enum function_id { /* * Fn action definition */ -static const uint16_t PROGMEM fn_actions[] = { +const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_SET(2, ON_PRESS), // FN2 - set Layer2 @@ -200,39 +132,3 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) print("not supported.\n"); } } - -#endif - - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -#if defined(KEYMAP_CUB) - -// function keymap_fn_to_action will be defined in keymap_cub.h - -#else -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} -#endif - diff --git a/keyboard/ergodox/keymap_colemak.h b/keyboard/ergodox/keymap_colemak.h deleted file mode 100644 index 4e5565e7..00000000 --- a/keyboard/ergodox/keymap_colemak.h +++ /dev/null @@ -1,4 +0,0 @@ -#error Colemak layout is not defined yet -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -}; -static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/ergodox/keymap_common.c b/keyboard/ergodox/keymap_common.c new file mode 100644 index 00000000..5bae063c --- /dev/null +++ b/keyboard/ergodox/keymap_common.c @@ -0,0 +1,33 @@ +/* +Copyright 2013 Oleg Kostyuk +Copyright 2016 Mark Sikora + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "keymap_common.h" + +/* translates key to keycode */ +__attribute__ ((weak)) +uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) +{ + return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); +} + +/* translates Fn keycode to action */ +__attribute__ ((weak)) +action_t keymap_fn_to_action(uint8_t keycode) +{ + return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; +} diff --git a/keyboard/ergodox/keymap_common.h b/keyboard/ergodox/keymap_common.h new file mode 100644 index 00000000..656c28ff --- /dev/null +++ b/keyboard/ergodox/keymap_common.h @@ -0,0 +1,80 @@ +/* +Copyright 2013 Oleg Kostyuk +Copyright 2016 Mark Sikora + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 +#include +#include +#include "keycode.h" +#include "action.h" +#include "action_macro.h" +#include "report.h" +#include "host.h" +#include "print.h" +#include "debug.h" +#include "keymap.h" + + +extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; +extern const uint16_t fn_actions[]; + + +/* ErgoDox keymap definition macro */ +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { KC_##k00,KC_##k10,KC_##k20,KC_##k30,KC_##k40,KC_NO }, \ + { KC_##k01,KC_##k11,KC_##k21,KC_##k31,KC_##k41,KC_##k51}, \ + { KC_##k02,KC_##k12,KC_##k22,KC_##k32,KC_##k42,KC_##k52}, \ + { KC_##k03,KC_##k13,KC_##k23,KC_##k33,KC_##k43,KC_##k53}, \ + { KC_##k04,KC_##k14,KC_##k24,KC_##k34,KC_##k44,KC_##k54}, \ + { KC_##k05,KC_##k15,KC_##k25,KC_##k35,KC_NO, KC_##k55}, \ + { KC_##k06,KC_##k16,KC_NO, KC_##k36,KC_NO, KC_##k56}, \ + \ + { KC_##k07,KC_##k17,KC_NO, KC_##k37,KC_NO, KC_##k57}, \ + { KC_##k08,KC_##k18,KC_##k28,KC_##k38,KC_NO, KC_##k58}, \ + { KC_##k09,KC_##k19,KC_##k29,KC_##k39,KC_##k49,KC_##k59}, \ + { KC_##k0A,KC_##k1A,KC_##k2A,KC_##k3A,KC_##k4A,KC_##k5A}, \ + { KC_##k0B,KC_##k1B,KC_##k2B,KC_##k3B,KC_##k4B,KC_##k5B}, \ + { KC_##k0C,KC_##k1C,KC_##k2C,KC_##k3C,KC_##k4C,KC_##k5C}, \ + { KC_##k0D,KC_##k1D,KC_##k2D,KC_##k3D,KC_##k4D,KC_NO } \ + } + +#endif diff --git a/keyboard/ergodox/keymap_cub.h b/keyboard/ergodox/keymap_cub.c similarity index 98% rename from keyboard/ergodox/keymap_cub.h rename to keyboard/ergodox/keymap_cub.c index 32273025..aba7c79a 100644 --- a/keyboard/ergodox/keymap_cub.h +++ b/keyboard/ergodox/keymap_cub.c @@ -1,4 +1,11 @@ -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +#include +#include "action_layer.h" +#include "action_util.h" +#include "bootloader.h" +#include "keymap_common.h" + + +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Default Layer in QWERTY * @@ -378,7 +385,7 @@ enum macro_id { /* * Fn action definition */ -static const uint16_t PROGMEM fn_actions[] = { +const uint16_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman @@ -425,7 +432,7 @@ static const uint16_t PROGMEM fn_actions[] = { [27] = ACTION_LAYER_TAP_KEY(9, KC_V), // FN27 = momentary Layer9 on V key, to use with application-specific shortcuts }; -static const uint16_t PROGMEM fn_actions_4[] = { +const uint16_t PROGMEM fn_actions_4[] = { [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman [2] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman [3] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman @@ -433,14 +440,14 @@ static const uint16_t PROGMEM fn_actions_4[] = { [5] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN5 = Shifted slash // ? in Workman }; -static const uint16_t PROGMEM fn_actions_7[] = { +const uint16_t PROGMEM fn_actions_7[] = { [0] = ACTION_MACRO(XMONAD_RESET), // FN0 = xmonad-reanimator [1] = ACTION_MACRO(PASSWORD1), // FN1 = default password [2] = ACTION_MACRO(PASSWORD1), // FN2 = other password [3] = ACTION_MACRO(PASSWORD1), // FN3 = mega password }; -static const uint16_t PROGMEM fn_actions_9[] = { +const uint16_t PROGMEM fn_actions_9[] = { [0] = ACTION_MODS_KEY(MOD_LCTL, KC_P0), // FN0 = Ctrl+0 [1] = ACTION_MODS_KEY(MOD_LALT, KC_P1), // FN1 = Alt+1 [2] = ACTION_MODS_KEY(MOD_LALT, KC_P2), // FN2 = Alt+2 diff --git a/keyboard/ergodox/keymap_dvorak.h b/keyboard/ergodox/keymap_dvorak.h deleted file mode 100644 index 198709c5..00000000 --- a/keyboard/ergodox/keymap_dvorak.h +++ /dev/null @@ -1,4 +0,0 @@ -#error Dvorak layout is not defined yet -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -}; -static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/ergodox/keymap_micro.h b/keyboard/ergodox/keymap_micro.c similarity index 98% rename from keyboard/ergodox/keymap_micro.h rename to keyboard/ergodox/keymap_micro.c index 4e878d35..80906787 100644 --- a/keyboard/ergodox/keymap_micro.h +++ b/keyboard/ergodox/keymap_micro.c @@ -3,8 +3,12 @@ // http://geekhack.org/index.php?topic=42231.msg1062851#msg1062851 // https://www.massdrop.com/ext/ergodox/?referer=CTL63V&hash=9ff8ddbb75e03e517aaa39acabc81669 // +#include +#include "bootloader.h" +#include "keymap_common.h" -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Default Layer in QWERTY * @@ -199,12 +203,12 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS,TRNS,TRNS, - // in Workman right hand will be: - // - // ^ { } ( ) + - // ' ! $ " ; = - // # [ < > ] \ - // + /* in Workman right hand will be: + * + * ^ { } ( ) + + * ' ! $ " ; = + * # [ < > ] \ + */ // right hand TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, @@ -361,7 +365,7 @@ enum function_id { /* * Fn action definition */ -static const uint16_t PROGMEM fn_actions[] = { +const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key // Layer4: unconvenient keys on right hand diff --git a/keyboard/ergodox/keymap_workman.h b/keyboard/ergodox/keymap_workman.h deleted file mode 100644 index b1570650..00000000 --- a/keyboard/ergodox/keymap_workman.h +++ /dev/null @@ -1,4 +0,0 @@ -#error Workman layout is not defined yet -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -}; -static const uint16_t PROGMEM fn_actions[] = {}; From 3eeb7ca9f94e872606a1d14bf1639fbca95c6ab0 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 28 May 2016 20:49:40 -0400 Subject: [PATCH 080/101] Cleanup whitespace --- keyboard/ergodox/ergodox.c | 1 - keyboard/ergodox/keymap_passwords_example.h | 2 -- keyboard/ergodox/led.c | 1 - keyboard/ergodox/matrix.c | 7 +++---- 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/keyboard/ergodox/ergodox.c b/keyboard/ergodox/ergodox.c index 494d13c1..a88772c7 100644 --- a/keyboard/ergodox/ergodox.c +++ b/keyboard/ergodox/ergodox.c @@ -134,4 +134,3 @@ out: i2c_stop(); return mcp23018_status; } - diff --git a/keyboard/ergodox/keymap_passwords_example.h b/keyboard/ergodox/keymap_passwords_example.h index ed53b99d..01398d92 100644 --- a/keyboard/ergodox/keymap_passwords_example.h +++ b/keyboard/ergodox/keymap_passwords_example.h @@ -19,5 +19,3 @@ I(15), \ T(E), T(X), T(A), T(M), T(P), T(L), T(E), \ END) \ - - diff --git a/keyboard/ergodox/led.c b/keyboard/ergodox/led.c index 7a2c4ebf..765386e0 100644 --- a/keyboard/ergodox/led.c +++ b/keyboard/ergodox/led.c @@ -54,4 +54,3 @@ void led_set(uint8_t usb_led) ergodox_right_led_3_off(); } } - diff --git a/keyboard/ergodox/matrix.c b/keyboard/ergodox/matrix.c index 5c9c4bc2..cecfe574 100644 --- a/keyboard/ergodox/matrix.c +++ b/keyboard/ergodox/matrix.c @@ -233,11 +233,11 @@ uint8_t matrix_key_count(void) * * Teensy * col: 0 1 2 3 4 5 - * pin: F0 F1 F4 F5 F6 F7 + * pin: F0 F1 F4 F5 F6 F7 * * MCP23018 * col: 0 1 2 3 4 5 - * pin: B5 B4 B3 B2 B1 B0 + * pin: B5 B4 B3 B2 B1 B0 */ static void init_cols(void) { @@ -326,7 +326,7 @@ static void select_row(uint8_t row) // set other rows hi-Z : 1 mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write( 0xFF & ~(1< Date: Sat, 28 May 2016 19:51:30 -0700 Subject: [PATCH 081/101] keymap_xyvers.h My Dvorak layout --- keyboard/ergodox/keymap_xyverz.h | 229 +++++++++++++++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 keyboard/ergodox/keymap_xyverz.h diff --git a/keyboard/ergodox/keymap_xyverz.h b/keyboard/ergodox/keymap_xyverz.h new file mode 100644 index 00000000..f515c686 --- /dev/null +++ b/keyboard/ergodox/keymap_xyverz.h @@ -0,0 +1,229 @@ +static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * Keymap: Default Layer in Dvorak (Layer 0) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | + | 1 | 2 | 3 | 4 | 5 | Esc | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | Y | Y |(Null)| |(Null)| F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | \ | + * |--------+------+------+------+------+------| FN1 | | FN2 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + * + * + ***************************************************************************************************** + * This Dvorak keyboard layout stems from my early Kinesis years, using the Contour PS/2 with a Dvorak + * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the cor- + * ner keys. I've decided to continue using this layout with my ErgoDox. + */ + + KEYMAP( // layer 0 : default + // left hand + EQL, 1, 2, 3, 4, 5, ESC, + TAB, QUOT, COMM, DOT, P, Y, NO, + CAPS, A, O, E, U, I, + LSFT, SCLN, Q, J, K, X, FN1, + LGUI, GRV, INS,LEFT,RGHT, + LCTL,LALT, + HOME, + BSPC,DEL, END, + // right hand + ESC, 6, 7, 8, 9, 0, MINS, + NO, F, G, C, R, L, SLSH, + D, H, T, N, S, BSLS, + FN2, B, M, W, V, Z, RSFT, + UP,DOWN,RBRC,LBRC, RGUI, + RALT,RCTL, + PGUP, + PGDN,ENT, SPC + ), + + + /* + * Keymap: Function and Media Keys Layer (Layer 1) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | Mute | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | FN4 | | FN6 | | PrSc | ScLk | Paus | | Vol Up | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | Vol Dn | + * |--------+------+------+------+------+------| FN4 | | FN7 |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + * + */ + + KEYMAP( // layer 1 : function and media keys + // left hand + FN0, F1, F2, F3, F4, F5, F11, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + F12, F6, F7, F8, F9, F10, MUTE, + FN6, TRNS,PSCR,SLCK,PAUS,TRNS,VOLU, + MSTP,MPRV,MPLY,MNXT,MSEL,VOLD, + FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + + /* + * Keymap: Numpad Layer (Layer 2) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Power | | | | | | | | | | NmLk | KP / | KP * | KP - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Sleep | | | | | | FN5 | | FN4 | | KP 7 | KP 8 | KP 9 | KP + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | | + * |--------+------+------+------+------+------| FN7 | | FN4 |------+------+------+------+------+--------| + * | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | KP 0 | | KP . |KP Ent| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + */ + + KEYMAP( // layer 2: numpad + // left hand + PWR, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + SLEP,TRNS,TRNS,TRNS,TRNS,TRNS, FN5, + WAKE,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN7, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,NLCK,PSLS,PAST,PMNS,TRNS, + FN4,NO, P7, P8, P9, PPLS,TRNS, + NO, P4, P5, P6, PPLS,TRNS, + FN4,NO, P1, P2, P3, PENT,TRNS, + P0, TRNS,PDOT,PENT,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + + /* + * Keymap: QWERTY Gaming Layer (Layer 3) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Fn4 | | Fn4 | Y | U | I | O | P | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| Fn1 | | Fn2 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + * + */ + + KEYMAP( // layer 3 : QWERTY Gaming + // left hand + EQL, 1, 2, 3, 4, 5, ESC, + TAB, Q, W, E, R, T, FN4, + CAPS,A, S, D, F, G, + LSFT,Z, X, C, V, B, FN1, + LGUI,GRV, INS,LEFT,RGHT, + LCTL,LALT, + HOME, + BSPC,DEL, END, + // right hand + ESC, 6, 7, 8, 9, 0, MINS, + FN4, Y, U, I, O, P, BSLS, + H, J, K, L, SCLN,QUOT, + FN2, N, M, COMM,DOT, SLSH,RSFT, + UP,DOWN,LBRC,RBRC,RGUI, + RALT,RCTL, + PGUP, + PGDN,ENT, SPC + ), + +}; + +/* id for user defined functions & macros */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +static const uint16_t PROGMEM fn_actions[] = { + ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 + ACTION_LAYER_MOMENTARY(2), // FN2 - switch to Layer2 + ACTION_LAYER_MOMENTARY(3), // FN3 - switch to Layer3 + ACTION_LAYER_SET_CLEAR(0), // FN4 - set Layer0 + ACTION_LAYER_SET(1, ON_PRESS), // FN5 - set Layer1 + ACTION_LAYER_SET(2, ON_PRESS), // FN6 - set Layer2 + ACTION_LAYER_SET(3, ON_PRESS), // FN7 - set Layer3 +}; + +/* + * Defining the Teensy Key action_function + */ +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // print("action_function called\n"); + // print("id = "); phex(id); print("\n"); + // print("opt = "); phex(opt); print("\n"); + + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(50); + bootloader_jump(); // should not return + print("not supported.\n"); + } + +} From 1e0d8bf6b7d03ace4d2e2ae30b37268938227cfb Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sat, 28 May 2016 19:52:33 -0700 Subject: [PATCH 082/101] Xyverz's Dvorak Layout From 6edd0fff3727525fe6d61d9d6d605d1759a3e1c3 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Sat, 28 May 2016 22:56:26 -0700 Subject: [PATCH 083/101] Dvorak Keymap Layout --- keyboard/ergodox/keymap_dvorak.h | 229 ++++++++++++++++++++++++++++++- 1 file changed, 227 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox/keymap_dvorak.h b/keyboard/ergodox/keymap_dvorak.h index 198709c5..f515c686 100644 --- a/keyboard/ergodox/keymap_dvorak.h +++ b/keyboard/ergodox/keymap_dvorak.h @@ -1,4 +1,229 @@ -#error Dvorak layout is not defined yet static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* + * Keymap: Default Layer in Dvorak (Layer 0) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | + | 1 | 2 | 3 | 4 | 5 | Esc | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | ' | , | . | Y | Y |(Null)| |(Null)| F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | \ | + * |--------+------+------+------+------+------| FN1 | | FN2 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + * + * + ***************************************************************************************************** + * This Dvorak keyboard layout stems from my early Kinesis years, using the Contour PS/2 with a Dvorak + * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the cor- + * ner keys. I've decided to continue using this layout with my ErgoDox. + */ + + KEYMAP( // layer 0 : default + // left hand + EQL, 1, 2, 3, 4, 5, ESC, + TAB, QUOT, COMM, DOT, P, Y, NO, + CAPS, A, O, E, U, I, + LSFT, SCLN, Q, J, K, X, FN1, + LGUI, GRV, INS,LEFT,RGHT, + LCTL,LALT, + HOME, + BSPC,DEL, END, + // right hand + ESC, 6, 7, 8, 9, 0, MINS, + NO, F, G, C, R, L, SLSH, + D, H, T, N, S, BSLS, + FN2, B, M, W, V, Z, RSFT, + UP,DOWN,RBRC,LBRC, RGUI, + RALT,RCTL, + PGUP, + PGDN,ENT, SPC + ), + + + /* + * Keymap: Function and Media Keys Layer (Layer 1) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | Mute | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | FN4 | | FN6 | | PrSc | ScLk | Paus | | Vol Up | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | Vol Dn | + * |--------+------+------+------+------+------| FN4 | | FN7 |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + * + */ + + KEYMAP( // layer 1 : function and media keys + // left hand + FN0, F1, F2, F3, F4, F5, F11, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + F12, F6, F7, F8, F9, F10, MUTE, + FN6, TRNS,PSCR,SLCK,PAUS,TRNS,VOLU, + MSTP,MPRV,MPLY,MNXT,MSEL,VOLD, + FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + + /* + * Keymap: Numpad Layer (Layer 2) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Power | | | | | | | | | | NmLk | KP / | KP * | KP - | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Sleep | | | | | | FN5 | | FN4 | | KP 7 | KP 8 | KP 9 | KP + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | | + * |--------+------+------+------+------+------| FN7 | | FN4 |------+------+------+------+------+--------| + * | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | KP 0 | | KP . |KP Ent| | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + * + */ + + KEYMAP( // layer 2: numpad + // left hand + PWR, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + SLEP,TRNS,TRNS,TRNS,TRNS,TRNS, FN5, + WAKE,TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN7, + TRNS,TRNS,TRNS,TRNS,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS, + // right hand + TRNS,TRNS,NLCK,PSLS,PAST,PMNS,TRNS, + FN4,NO, P7, P8, P9, PPLS,TRNS, + NO, P4, P5, P6, PPLS,TRNS, + FN4,NO, P1, P2, P3, PENT,TRNS, + P0, TRNS,PDOT,PENT,TRNS, + TRNS,TRNS, + TRNS, + TRNS,TRNS,TRNS + ), + + + /* + * Keymap: QWERTY Gaming Layer (Layer 3) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Fn4 | | Fn4 | Y | U | I | O | P | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| Fn1 | | Fn2 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LCtr | LAlt | | Ralt | RCtr | + * ,------|------|------| |------+------+------. + * | | | Home | | PgUp | | | + * | BkSp | Del |------| |------| Enter| Space| + * | | | End | | PgDn | | | + * `--------------------' `--------------------' + * + */ + + KEYMAP( // layer 3 : QWERTY Gaming + // left hand + EQL, 1, 2, 3, 4, 5, ESC, + TAB, Q, W, E, R, T, FN4, + CAPS,A, S, D, F, G, + LSFT,Z, X, C, V, B, FN1, + LGUI,GRV, INS,LEFT,RGHT, + LCTL,LALT, + HOME, + BSPC,DEL, END, + // right hand + ESC, 6, 7, 8, 9, 0, MINS, + FN4, Y, U, I, O, P, BSLS, + H, J, K, L, SCLN,QUOT, + FN2, N, M, COMM,DOT, SLSH,RSFT, + UP,DOWN,LBRC,RBRC,RGUI, + RALT,RCTL, + PGUP, + PGDN,ENT, SPC + ), + }; -static const uint16_t PROGMEM fn_actions[] = {}; + +/* id for user defined functions & macros */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +static const uint16_t PROGMEM fn_actions[] = { + ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key + ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 + ACTION_LAYER_MOMENTARY(2), // FN2 - switch to Layer2 + ACTION_LAYER_MOMENTARY(3), // FN3 - switch to Layer3 + ACTION_LAYER_SET_CLEAR(0), // FN4 - set Layer0 + ACTION_LAYER_SET(1, ON_PRESS), // FN5 - set Layer1 + ACTION_LAYER_SET(2, ON_PRESS), // FN6 - set Layer2 + ACTION_LAYER_SET(3, ON_PRESS), // FN7 - set Layer3 +}; + +/* + * Defining the Teensy Key action_function + */ +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // print("action_function called\n"); + // print("id = "); phex(id); print("\n"); + // print("opt = "); phex(opt); print("\n"); + + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(50); + bootloader_jump(); // should not return + print("not supported.\n"); + } + +} From 5e1d5a8f42e0b8597cd63b702cc498129ff4159b Mon Sep 17 00:00:00 2001 From: Paul Williamson Date: Tue, 7 Jun 2016 11:29:43 +0100 Subject: [PATCH 084/101] Add colemak layout --- keyboard/ergodox/keymap_colemak.c | 203 ++++++++++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 keyboard/ergodox/keymap_colemak.c diff --git a/keyboard/ergodox/keymap_colemak.c b/keyboard/ergodox/keymap_colemak.c new file mode 100644 index 00000000..8ddd51c5 --- /dev/null +++ b/keyboard/ergodox/keymap_colemak.c @@ -0,0 +1,203 @@ +/* +Copyright 2016 Paul Williamson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "bootloader.h" +#include "keymap_common.h" + + +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * Keymap 0: Default Colemak Layer + * + * This is a general purpose Colemak layout which should serve as a good + * basis for your own custom layout. Mac users may want to swap the + * position of the Alt and GUI keys. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | - | 6 | 7 | 8 | 9 | 0 | + | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | [ | | ] | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CpsLk | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| +L2 | | |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LCtrl| LGui | LAlt | Left | Rght | | Up | Dn | RAlt | RGui | RCtrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |CpsLck| Del | | PgUp | PgDn | + * ,------|------|------| |------+------+------. + * | | | LAlt | | RAlt | | | + * | BkSp | ~L1 |------| |------| Enter| Space| + * | | | LCtrl| | RCtrl| | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + ESC, 1, 2, 3, 4, 5, GRV, + TAB, Q, W, F, P, G, LBRC, + CAPS,A, R, S, T, D, + LSFT,Z, X, C, V, B, FN2, + LCTL,LGUI,LALT,LEFT,RGHT, + CAPS,DEL, + LALT, + BSPC,FN1, LCTL, + // right hand + MINS,6, 7, 8, 9, 0, EQL, + RBRC,J, L, U, Y, SCLN,BSLS, + H, N, E, I, O, QUOT, + NO, K, M, COMM,DOT, SLSH,RSFT, + UP, DOWN,RALT,RGUI,RCTL, + PGUP,PGDN, + RALT, + RCTL,ENT, SPC + ), + + /* + * Layer 1: Function keys + * + * This layer contains function keys, and media keys. Additionally, there + * are QWERTY-style Vim arrow keys. I could never get used to Colemak's + * rearranged Vim arrow placements. + * + * Most of the non-modifier keys are marked as NO, so it's immediately + * obvious if you start typing on a secondary layer. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Teensy | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | TRNS | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TRNS | | | | | | TRNS | | TRNS | | | | | | TRNS | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TRNS | | | | | |------| |------| Left | Down | Up | Right| | TRNS | + * |--------+------+------+------+------+------| +L2 | | |------+------+------+------+------+--------| + * | TRNS | | | | | | | | | | | | | | TRNS | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | TRNS | TRNS | Play | RW | FF | | Mute | Vol- | Vol+ | TRNS | TRNS | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | HOME | END | + * ,------|------|------| |------+------+------. + * | | | TRNS | | TRNS | | | + * | TRNS | |------| |------| TRNS | TRNS | + * | | | TRNS | | TRNS | | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + FN31,F1, F2, F3, F4, F5, F11, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, FN2, + TRNS,TRNS,MPLY,MPRV,MNXT, + NO, NO, + TRNS, + TRNS,NO, TRNS, + // right hand + F12, F6, F7, F8, F9, F10, TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + LEFT,DOWN,UP, RGHT,NO, TRNS, + NO, NO, NO, NO, NO, NO, TRNS, + MUTE,VOLD,VOLU,TRNS,TRNS, + HOME,END, + TRNS, + TRNS,TRNS,TRNS + ), + + /* + * Layer 2: Number Pad + * + * This layer has a number pad for quicker number entry. As with layer 1, + * most of the non-modifier keys are marked as NO, so it's immediately + * obvious if you start typing on a secondary layer. + * + * Inspired by Ben Blazak QWERTY num pad. + * https://git.io/voIeY + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | | | | | | | | | | NmLk | / | * | - | Bkspc | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TRNS | | | | | | TRNS | | TRNS | | 7 | 8 | 9 | + | Bkspc | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TRNS | | | | | |------| |------| | 4 | 5 | 6 | + | Enter | + * |--------+------+------+------+------+------| | | -L0 |------+------+------+------+------+--------| + * | TRNS | | | | | | | | | | 1 | 2 | 3 | Enter| Enter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | TRNS | TRNS | LALT | | | | 0 | 0 | . | Enter| Enter| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | TRNS | TRNS | + * ,------|------|------| |------+------+------. + * | | | TRNS | | TRNS | | | + * | Bkspc| |------| |------| Enter| | + * | | | TRNS | | TRNS | | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + ESC, NO, NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, TRNS, + TRNS,NO, NO, NO, NO, NO, + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,TRNS,LALT,NO, NO, + NO, NO, + TRNS, + BSPC,NO, TRNS, + // right hand + NO, NO, NLCK,SLSH,PAST,PMNS,BSPC, + TRNS,NO, P7, P8, P9, PPLS,BSPC, + NO, P4, P5, P6, PPLS,PENT, + FN0, NO, P1, P2, P3, PENT,PENT, + P0, P0, PDOT,PENT,PENT, + TRNS,TRNS, + TRNS, + TRNS,ENT, TRNS + ), +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +const uint16_t PROGMEM fn_actions[] = { + // Layer shifting + [0] = ACTION_LAYER_SET(0, ON_PRESS), // Switch to Layer 0 + [1] = ACTION_LAYER_MOMENTARY(1), // Momentarily switch to layer 1 + [2] = ACTION_LAYER_SET(2, ON_PRESS), // Switch to Layer 2 + + // Teensy + [31] = ACTION_FUNCTION(TEENSY_KEY), +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} + From 6b4ce8606c82573d009d076213648b1388432a19 Mon Sep 17 00:00:00 2001 From: Paul Williamson Date: Tue, 7 Jun 2016 19:31:58 +0100 Subject: [PATCH 085/101] Remove duplicated keymap --- keyboard/ergodox/keymap_xyverz.h | 229 ------------------------------- 1 file changed, 229 deletions(-) delete mode 100644 keyboard/ergodox/keymap_xyverz.h diff --git a/keyboard/ergodox/keymap_xyverz.h b/keyboard/ergodox/keymap_xyverz.h deleted file mode 100644 index f515c686..00000000 --- a/keyboard/ergodox/keymap_xyverz.h +++ /dev/null @@ -1,229 +0,0 @@ -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * Keymap: Default Layer in Dvorak (Layer 0) - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | + | 1 | 2 | 3 | 4 | 5 | Esc | | ESC | 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | ' | , | . | Y | Y |(Null)| |(Null)| F | G | C | R | L | / | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CapsLk | A | O | E | U | I |------| |------| D | H | T | N | S | \ | - * |--------+------+------+------+------+------| FN1 | | FN2 |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | X | | | | B | M | W | V | Z | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtr | LAlt | | Ralt | RCtr | - * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | | - * | BkSp | Del |------| |------| Enter| Space| - * | | | End | | PgDn | | | - * `--------------------' `--------------------' - * - * - ***************************************************************************************************** - * This Dvorak keyboard layout stems from my early Kinesis years, using the Contour PS/2 with a Dvorak - * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the cor- - * ner keys. I've decided to continue using this layout with my ErgoDox. - */ - - KEYMAP( // layer 0 : default - // left hand - EQL, 1, 2, 3, 4, 5, ESC, - TAB, QUOT, COMM, DOT, P, Y, NO, - CAPS, A, O, E, U, I, - LSFT, SCLN, Q, J, K, X, FN1, - LGUI, GRV, INS,LEFT,RGHT, - LCTL,LALT, - HOME, - BSPC,DEL, END, - // right hand - ESC, 6, 7, 8, 9, 0, MINS, - NO, F, G, C, R, L, SLSH, - D, H, T, N, S, BSLS, - FN2, B, M, W, V, Z, RSFT, - UP,DOWN,RBRC,LBRC, RGUI, - RALT,RCTL, - PGUP, - PGDN,ENT, SPC - ), - - - /* - * Keymap: Function and Media Keys Layer (Layer 1) - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | TEENSY | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | Mute | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | | | | FN4 | | FN6 | | PrSc | ScLk | Paus | | Vol Up | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| Stop | Prev | Play | Next | Sel | Vol Dn | - * |--------+------+------+------+------+------| FN4 | | FN7 |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - * - * - */ - - KEYMAP( // layer 1 : function and media keys - // left hand - FN0, F1, F2, F3, F4, F5, F11, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS, - // right hand - F12, F6, F7, F8, F9, F10, MUTE, - FN6, TRNS,PSCR,SLCK,PAUS,TRNS,VOLU, - MSTP,MPRV,MPLY,MNXT,MSEL,VOLD, - FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS - ), - - - /* - * Keymap: Numpad Layer (Layer 2) - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Power | | | | | | | | | | NmLk | KP / | KP * | KP - | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Sleep | | | | | | FN5 | | FN4 | | KP 7 | KP 8 | KP 9 | KP + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Wake | | | | | |------| |------| | KP 4 | KP 5 | KP 6 | KP + | | - * |--------+------+------+------+------+------| FN7 | | FN4 |------+------+------+------+------+--------| - * | | | | | | | | | | | KP 1 | KP 2 | KP 3 |KP Ent| | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | KP 0 | | KP . |KP Ent| | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - * - */ - - KEYMAP( // layer 2: numpad - // left hand - PWR, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - SLEP,TRNS,TRNS,TRNS,TRNS,TRNS, FN5, - WAKE,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN7, - TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS, - // right hand - TRNS,TRNS,NLCK,PSLS,PAST,PMNS,TRNS, - FN4,NO, P7, P8, P9, PPLS,TRNS, - NO, P4, P5, P6, PPLS,TRNS, - FN4,NO, P1, P2, P3, PENT,TRNS, - P0, TRNS,PDOT,PENT,TRNS, - TRNS,TRNS, - TRNS, - TRNS,TRNS,TRNS - ), - - - /* - * Keymap: QWERTY Gaming Layer (Layer 3) - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ESC | | ESC | 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | E | R | T | Fn4 | | Fn4 | Y | U | I | O | P | [ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | CapsLk | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | - * |--------+------+------+------+------+------| Fn1 | | Fn2 |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | LGUI | ` | INS | Left | Rght | | Up | Dn | [ | ] | RGUI | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | LCtr | LAlt | | Ralt | RCtr | - * ,------|------|------| |------+------+------. - * | | | Home | | PgUp | | | - * | BkSp | Del |------| |------| Enter| Space| - * | | | End | | PgDn | | | - * `--------------------' `--------------------' - * - */ - - KEYMAP( // layer 3 : QWERTY Gaming - // left hand - EQL, 1, 2, 3, 4, 5, ESC, - TAB, Q, W, E, R, T, FN4, - CAPS,A, S, D, F, G, - LSFT,Z, X, C, V, B, FN1, - LGUI,GRV, INS,LEFT,RGHT, - LCTL,LALT, - HOME, - BSPC,DEL, END, - // right hand - ESC, 6, 7, 8, 9, 0, MINS, - FN4, Y, U, I, O, P, BSLS, - H, J, K, L, SCLN,QUOT, - FN2, N, M, COMM,DOT, SLSH,RSFT, - UP,DOWN,LBRC,RBRC,RGUI, - RALT,RCTL, - PGUP, - PGDN,ENT, SPC - ), - -}; - -/* id for user defined functions & macros */ -enum function_id { - TEENSY_KEY, -}; - -/* - * Fn action definition - */ -static const uint16_t PROGMEM fn_actions[] = { - ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key - ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 - ACTION_LAYER_MOMENTARY(2), // FN2 - switch to Layer2 - ACTION_LAYER_MOMENTARY(3), // FN3 - switch to Layer3 - ACTION_LAYER_SET_CLEAR(0), // FN4 - set Layer0 - ACTION_LAYER_SET(1, ON_PRESS), // FN5 - set Layer1 - ACTION_LAYER_SET(2, ON_PRESS), // FN6 - set Layer2 - ACTION_LAYER_SET(3, ON_PRESS), // FN7 - set Layer3 -}; - -/* - * Defining the Teensy Key action_function - */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // print("action_function called\n"); - // print("id = "); phex(id); print("\n"); - // print("opt = "); phex(opt); print("\n"); - - if (id == TEENSY_KEY) { - clear_keyboard(); - print("\n\nJump to bootloader... "); - _delay_ms(50); - bootloader_jump(); // should not return - print("not supported.\n"); - } - -} From cbf4e5b6ff774d53013a3c2d10852858600a8d7e Mon Sep 17 00:00:00 2001 From: Paul Williamson Date: Tue, 7 Jun 2016 19:49:08 +0100 Subject: [PATCH 086/101] Update dvorak to new layout scheme --- keyboard/ergodox/{keymap_dvorak.h => keymap_dvorak.c} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename keyboard/ergodox/{keymap_dvorak.h => keymap_dvorak.c} (99%) diff --git a/keyboard/ergodox/keymap_dvorak.h b/keyboard/ergodox/keymap_dvorak.c similarity index 99% rename from keyboard/ergodox/keymap_dvorak.h rename to keyboard/ergodox/keymap_dvorak.c index f515c686..495de6cf 100644 --- a/keyboard/ergodox/keymap_dvorak.h +++ b/keyboard/ergodox/keymap_dvorak.c @@ -1,4 +1,4 @@ -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Default Layer in Dvorak (Layer 0) * @@ -198,7 +198,7 @@ enum function_id { /* * Fn action definition */ -static const uint16_t PROGMEM fn_actions[] = { +const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_MOMENTARY(2), // FN2 - switch to Layer2 From f852668691d9b065a51ff67933a7952b5552a85b Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 18 Jun 2016 16:15:04 -0400 Subject: [PATCH 087/101] Missing headers in dvorak layout --- keyboard/ergodox/keymap_dvorak.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboard/ergodox/keymap_dvorak.c b/keyboard/ergodox/keymap_dvorak.c index 495de6cf..a4995188 100644 --- a/keyboard/ergodox/keymap_dvorak.c +++ b/keyboard/ergodox/keymap_dvorak.c @@ -1,3 +1,6 @@ +#include "bootloader.h" +#include "keymap_common.h" + const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* * Keymap: Default Layer in Dvorak (Layer 0) From a13f6b8f2a8fcdce3a97869aeeef6e47700008a0 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 18 Jun 2016 17:57:50 -0400 Subject: [PATCH 088/101] Full symbol layer for blazak layout --- keyboard/ergodox/keymap_blazak.c | 70 ++++++++++++++++++++++++++++---- 1 file changed, 61 insertions(+), 9 deletions(-) diff --git a/keyboard/ergodox/keymap_blazak.c b/keyboard/ergodox/keymap_blazak.c index 2a8164c5..da92696f 100644 --- a/keyboard/ergodox/keymap_blazak.c +++ b/keyboard/ergodox/keymap_blazak.c @@ -18,6 +18,29 @@ along with this program. If not, see . #include "bootloader.h" #include "keymap_common.h" +// Aliases for shifted symbols +// Names from QMK +#define KC_TILD KC_FN11 +#define KC_EXLM KC_FN12 +#define KC_AT KC_FN13 +#define KC_HASH KC_FN14 +#define KC_DLR KC_FN15 +#define KC_PERC KC_FN16 +#define KC_CIRC KC_FN17 +#define KC_AMPR KC_FN18 +#define KC_ASTR KC_FN19 +#define KC_LPRN KC_FN20 +#define KC_RPRN KC_FN21 +#define KC_UNDS KC_FN22 +#define KC_PLUS KC_FN23 +#define KC_LCBR KC_FN24 +#define KC_RCBR KC_FN25 +#define KC_LABK KC_FN26 +#define KC_RABK KC_FN27 +#define KC_COLN KC_FN28 +#define KC_PIPE KC_FN29 +#define KC_QUES KC_FN30 +#define KC_DQT KC_FN31 const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // layer 0 : default @@ -43,19 +66,19 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // layer 1 : function and symbol keys // left hand - TRNS,F1, F2, F3, F4, F5, F11, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + NO, F1, F2, F3, F4, F5, F11, + TRNS,LCBR,RCBR,LBRC,RBRC,NO, FN4, + TRNS,SCLN,SLSH,MINS,P0, COLN, + TRNS,P6, P7, P8, P9, PLUS,TRNS, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, // right hand - F12, F6, F7, F8, F9, F10, TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, + F12, F6, F7, F8, F9, F10, PWR, + TRNS,NO, MINS,LABK,RABK,DLR ,VOLU, + BSLS,P1, LPRN,RPRN,PLUS,VOLD, + TRNS,ASTR,P2, P3, P4, P5, MUTE, TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS, TRNS, @@ -114,12 +137,41 @@ enum function_id { /* * Fn action definition */ -const uint16_t PROGMEM fn_actions[] = { +const uint16_t PROGMEM fn_actions[32] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_SET(2, ON_PRESS), // FN2 - set Layer2 ACTION_LAYER_TOGGLE(3), // FN3 - toggle Layer3 aka Numpad layer ACTION_LAYER_SET(0, ON_PRESS), // FN4 - set Layer0 + // Reserved for user actions + ACTION_NO, + ACTION_NO, + ACTION_NO, + ACTION_NO, + ACTION_NO, + ACTION_NO, + // Shifted keys + ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // FN11 - ~ + ACTION_MODS_KEY(MOD_LSFT, KC_1), // FN12 - ! + ACTION_MODS_KEY(MOD_LSFT, KC_2), // FN13 - @ + ACTION_MODS_KEY(MOD_LSFT, KC_3), // FN14 - # + ACTION_MODS_KEY(MOD_LSFT, KC_4), // FN15 - $ + ACTION_MODS_KEY(MOD_LSFT, KC_5), // FN16 - % + ACTION_MODS_KEY(MOD_LSFT, KC_6), // FN17 - ^ + ACTION_MODS_KEY(MOD_LSFT, KC_7), // FN18 - & + ACTION_MODS_KEY(MOD_LSFT, KC_8), // FN19 - * + ACTION_MODS_KEY(MOD_LSFT, KC_9), // FN20 - ( + ACTION_MODS_KEY(MOD_LSFT, KC_0), // FN21 - ) + ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN22 - _ + ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // FN23 - + + ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // FN24 - { + ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // FN25 - } + ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN26 - < + ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // FN27 - > + ACTION_MODS_KEY(MOD_LSFT, KC_SCLN), // FN28 - : + ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN29 - | + ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN30 - ? + ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), // FN31 - " }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) From f7b0c6f1fcbe56574a6544ecbe82f9284d7cf206 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sun, 23 Apr 2017 17:10:39 -0400 Subject: [PATCH 089/101] fn_actions is now of type action_t --- keyboard/ergodox/keymap_blazak.c | 2 +- keyboard/ergodox/keymap_colemak.c | 2 +- keyboard/ergodox/keymap_common.h | 2 +- keyboard/ergodox/keymap_cub.c | 8 ++++---- keyboard/ergodox/keymap_dvorak.c | 2 +- keyboard/ergodox/keymap_micro.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboard/ergodox/keymap_blazak.c b/keyboard/ergodox/keymap_blazak.c index da92696f..233ab049 100644 --- a/keyboard/ergodox/keymap_blazak.c +++ b/keyboard/ergodox/keymap_blazak.c @@ -137,7 +137,7 @@ enum function_id { /* * Fn action definition */ -const uint16_t PROGMEM fn_actions[32] = { +const action_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_SET(2, ON_PRESS), // FN2 - set Layer2 diff --git a/keyboard/ergodox/keymap_colemak.c b/keyboard/ergodox/keymap_colemak.c index 8ddd51c5..bf91d953 100644 --- a/keyboard/ergodox/keymap_colemak.c +++ b/keyboard/ergodox/keymap_colemak.c @@ -180,7 +180,7 @@ enum function_id { /* * Fn action definition */ -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { // Layer shifting [0] = ACTION_LAYER_SET(0, ON_PRESS), // Switch to Layer 0 [1] = ACTION_LAYER_MOMENTARY(1), // Momentarily switch to layer 1 diff --git a/keyboard/ergodox/keymap_common.h b/keyboard/ergodox/keymap_common.h index 656c28ff..39c4d6b6 100644 --- a/keyboard/ergodox/keymap_common.h +++ b/keyboard/ergodox/keymap_common.h @@ -32,7 +32,7 @@ along with this program. If not, see . extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; +extern const action_t fn_actions[]; /* ErgoDox keymap definition macro */ diff --git a/keyboard/ergodox/keymap_cub.c b/keyboard/ergodox/keymap_cub.c index aba7c79a..f9ef8252 100644 --- a/keyboard/ergodox/keymap_cub.c +++ b/keyboard/ergodox/keymap_cub.c @@ -385,7 +385,7 @@ enum macro_id { /* * Fn action definition */ -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { [0] = ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman @@ -432,7 +432,7 @@ const uint16_t PROGMEM fn_actions[] = { [27] = ACTION_LAYER_TAP_KEY(9, KC_V), // FN27 = momentary Layer9 on V key, to use with application-specific shortcuts }; -const uint16_t PROGMEM fn_actions_4[] = { +const action_t PROGMEM fn_actions_4[] = { [1] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // FN1 = Shifted BackSlash // " in Workman [2] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // FN2 = Shifted Minus // \ in Workman [3] = ACTION_MODS_KEY(MOD_LSFT, KC_COMM), // FN3 = Shifted comma // < in Workman @@ -440,14 +440,14 @@ const uint16_t PROGMEM fn_actions_4[] = { [5] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), // FN5 = Shifted slash // ? in Workman }; -const uint16_t PROGMEM fn_actions_7[] = { +const action_t PROGMEM fn_actions_7[] = { [0] = ACTION_MACRO(XMONAD_RESET), // FN0 = xmonad-reanimator [1] = ACTION_MACRO(PASSWORD1), // FN1 = default password [2] = ACTION_MACRO(PASSWORD1), // FN2 = other password [3] = ACTION_MACRO(PASSWORD1), // FN3 = mega password }; -const uint16_t PROGMEM fn_actions_9[] = { +const action_t PROGMEM fn_actions_9[] = { [0] = ACTION_MODS_KEY(MOD_LCTL, KC_P0), // FN0 = Ctrl+0 [1] = ACTION_MODS_KEY(MOD_LALT, KC_P1), // FN1 = Alt+1 [2] = ACTION_MODS_KEY(MOD_LALT, KC_P2), // FN2 = Alt+2 diff --git a/keyboard/ergodox/keymap_dvorak.c b/keyboard/ergodox/keymap_dvorak.c index a4995188..e64378c6 100644 --- a/keyboard/ergodox/keymap_dvorak.c +++ b/keyboard/ergodox/keymap_dvorak.c @@ -201,7 +201,7 @@ enum function_id { /* * Fn action definition */ -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_MOMENTARY(2), // FN2 - switch to Layer2 diff --git a/keyboard/ergodox/keymap_micro.c b/keyboard/ergodox/keymap_micro.c index 80906787..80366306 100644 --- a/keyboard/ergodox/keymap_micro.c +++ b/keyboard/ergodox/keymap_micro.c @@ -365,7 +365,7 @@ enum function_id { /* * Fn action definition */ -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key // Layer4: unconvenient keys on right hand From 79159729cd621b97e3e1de2478f45697f242a661 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sun, 23 Apr 2017 20:12:22 -0400 Subject: [PATCH 090/101] Update I2C library --- keyboard/ergodox/i2cmaster.h | 22 +++++++++++----------- keyboard/ergodox/twimaster.c | 20 +++++++------------- 2 files changed, 18 insertions(+), 24 deletions(-) diff --git a/keyboard/ergodox/i2cmaster.h b/keyboard/ergodox/i2cmaster.h index 3917b9e6..8e5d1462 100644 --- a/keyboard/ergodox/i2cmaster.h +++ b/keyboard/ergodox/i2cmaster.h @@ -1,17 +1,17 @@ #ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 +#define _I2CMASTER_H /************************************************************************* * 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 +* Author: Peter Fleury +* File: $Id: i2cmaster.h,v 1.12 2015/09/16 09:27:58 peter Exp $ +* Software: AVR-GCC 4.x * Target: any AVR device * Usage: see Doxygen manual **************************************************************************/ -#ifdef DOXYGEN /** + @file @defgroup pfleury_ic2master I2C Master library @code #include @endcode @@ -38,8 +38,9 @@ Replaced the incorrect quarter period delays found in AVR300 with half period delays. - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - + @author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury + @copyright (C) 2015 Peter Fleury, GNU General Public License Version 3 + @par API Usage Example The following code shows typical usage of this library, see example test_i2cmaster.c @@ -77,7 +78,7 @@ @endcode */ -#endif /* DOXYGEN */ + /**@{*/ @@ -96,7 +97,6 @@ /** @brief initialize the I2C master interace. Need to be called only once - @param void @return none */ extern void i2c_init(void); @@ -104,7 +104,6 @@ extern void i2c_init(void); /** @brief Terminates the data transfer and releases the I2C bus - @param void @return none */ extern void i2c_stop(void); @@ -164,7 +163,7 @@ 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 + Implemented as a macro, which calls either @ref i2c_readAck or @ref i2c_readNak @param ack 1 send ack, request more data from device
0 send nak, read is followed by a stop condition @@ -174,5 +173,6 @@ extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + /**@}*/ #endif diff --git a/keyboard/ergodox/twimaster.c b/keyboard/ergodox/twimaster.c index f91c08e6..3f9ccb3c 100644 --- a/keyboard/ergodox/twimaster.c +++ b/keyboard/ergodox/twimaster.c @@ -1,7 +1,7 @@ /************************************************************************* * 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 $ +* File: $Id: twimaster.c,v 1.4 2015/01/17 12:16:05 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 @@ -12,13 +12,13 @@ #include -/* define CPU frequency in Mhz here if not defined in Makefile */ +/* define CPU frequency in hz here if not defined in Makefile */ #ifndef F_CPU -#define F_CPU 16000000UL +#define F_CPU 4000000UL #endif /* I2C clock in Hz */ -#define SCL_CLOCK 400000L +#define SCL_CLOCK 100000L /************************************************************************* @@ -26,16 +26,10 @@ *************************************************************************/ 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 - */ + /* initialize TWI clock: 100 kHz clock, TWPS = 0 => prescaler = 1 */ - TWSR = 0; /* no prescaler */ - TWBR = 10; /* must be >= 10 for stable operation */ + TWSR = 0; /* no prescaler */ + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; /* must be > 10 for stable operation */ }/* i2c_init */ From 69a2a92f9de35d8f254157338fc31129a4cc2aea Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 14 Apr 2018 17:19:39 -0400 Subject: [PATCH 091/101] Add include guards --- keyboard/ergodox/ergodox.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/keyboard/ergodox/ergodox.h b/keyboard/ergodox/ergodox.h index 460d995f..c3729d04 100644 --- a/keyboard/ergodox/ergodox.h +++ b/keyboard/ergodox/ergodox.h @@ -24,6 +24,9 @@ Most used files are located at */ +#ifndef ERGODOX_H +#define ERGODOX_H + #include #include #include @@ -114,3 +117,4 @@ inline void ergodox_led_all_set(uint8_t n) ergodox_right_led_3_set(n); } +#endif From 5f4412a1a4277d39137edad7bc1593aa05933c27 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Sat, 14 Apr 2018 17:24:16 -0400 Subject: [PATCH 092/101] Inline functions need to be declared as static --- keyboard/ergodox/ergodox.h | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/keyboard/ergodox/ergodox.h b/keyboard/ergodox/ergodox.h index c3729d04..67d43c3d 100644 --- a/keyboard/ergodox/ergodox.h +++ b/keyboard/ergodox/ergodox.h @@ -66,23 +66,23 @@ extern bool ergodox_left_led_1; // left top extern bool ergodox_left_led_2; // left middle extern bool ergodox_left_led_3; // left bottom -inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } -inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } -inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } -inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } -inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } -inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } -inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } +static inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } +static inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } +static inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } +static inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } +static inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; } +static inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; } +static inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; } -inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } -inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } -inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } -inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } -inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } -inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } -inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } +static inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +static inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } +static inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } +static inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } +static inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; } +static inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } +static inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } -inline void ergodox_led_all_on(void) +static inline void ergodox_led_all_on(void) { ergodox_board_led_on(); ergodox_right_led_1_on(); @@ -94,7 +94,7 @@ inline void ergodox_led_all_on(void) ergodox_left_leds_update(); } -inline void ergodox_led_all_off(void) +static inline void ergodox_led_all_off(void) { ergodox_board_led_off(); ergodox_right_led_1_off(); @@ -106,11 +106,11 @@ inline void ergodox_led_all_off(void) ergodox_left_leds_update(); } -inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } -inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } -inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } +static inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } +static inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } +static inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } -inline void ergodox_led_all_set(uint8_t n) +static inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_1_set(n); ergodox_right_led_2_set(n); From 9a6247e6b88454a261bdc4751adff7790d864c20 Mon Sep 17 00:00:00 2001 From: Mark Sikora Date: Thu, 5 Aug 2021 11:21:22 -0400 Subject: [PATCH 093/101] ergodox: disable NKRO for lufa builds --- keyboard/ergodox/Makefile.lufa | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboard/ergodox/Makefile.lufa b/keyboard/ergodox/Makefile.lufa index 976877e1..42efc7d5 100644 --- a/keyboard/ergodox/Makefile.lufa +++ b/keyboard/ergodox/Makefile.lufa @@ -114,7 +114,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+600) 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 (+500) #PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support INVERT_NUMLOCK = yes # invert state of NumLock led From 0fbf77b546e3f2cce213b64b87a817dcaa4f68d5 Mon Sep 17 00:00:00 2001 From: roberto Date: Fri, 11 Nov 2022 18:08:15 -0800 Subject: [PATCH 094/101] Update command in ergodox FAQ. The instructions in the ergodox FAQ use commands that no longer work. This updates the commands in case someone still wants tu use this firmware. Fix bug GH-45 --- keyboard/ergodox/Ergodox-FAQ.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboard/ergodox/Ergodox-FAQ.md b/keyboard/ergodox/Ergodox-FAQ.md index 256806a1..a4247176 100644 --- a/keyboard/ergodox/Ergodox-FAQ.md +++ b/keyboard/ergodox/Ergodox-FAQ.md @@ -42,11 +42,11 @@ https://github.com/cub-uanic/tmk_keyboard/tree/master # use one of these make -f Makefile.lufa - make -f Makefile.lufa dvorak - make -f Makefile.lufa colemak - make -f Makefile.lufa workman - make -f Makefile.lufa micro - make -f Makefile.lufa cub + make -f Makefile.lufa KEYMAP=dvorak + make -f Makefile.lufa KEYMAP=colemak + make -f Makefile.lufa KEYMAP=workman + make -f Makefile.lufa KEYMAP=micro + make -f Makefile.lufa KEYMAP=cub # Layouts From e02889088845d7fc0d7ead7c374bc43956cbbdd4 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 11 Apr 2021 10:57:55 +0100 Subject: [PATCH 095/101] Add my keymap --- keyboard/ergodox/keymap_max.c | 149 ++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 keyboard/ergodox/keymap_max.c diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c new file mode 100644 index 00000000..3ae7d5bf --- /dev/null +++ b/keyboard/ergodox/keymap_max.c @@ -0,0 +1,149 @@ +/* +Copyright 2016 Paul Williamson + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General 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 "bootloader.h" +#include "keymap_common.h" + + +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * Keymap 0: Default Colemak Layer + * + * This is a general purpose Colemak layout which should serve as a good + * basis for your own custom layout. Mac users may want to swap the + * position of the Alt and GUI keys. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | - | 6 | 7 | 8 | 9 | 0 | + | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | [ | | ] | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | LAlt | | BkSp | | Del | | RAlt | | RCtrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | PgUp | PgDn | + * ,------|------|------| |------+------+------. + * | | | | | RAlt | | | + * |Space | LCtrl|------| |------| LAlt | Enter| + * | | | LGui | | ~L1 | | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + ESC, 1, 2, 3, 4, 5, GRV, + TAB, Q, W, F, P, G, LBRC, + NO, A, R, S, T, D, + LSFT,Z, X, C, V, B, NO, + NO, NO, LALT, NO ,BSPC, + NO, NO, + NO, + SPC,LCTL, LGUI, + // right hand + MINS,6, 7, 8, 9, 0, EQL, + RBRC,J, L, U, Y, SCLN,BSLS, + H, N, E, I, O, QUOT, + NO, K, M, COMM,DOT, SLSH,RSFT, + DEL, NO ,RALT,NO, RCTL, + PGUP,PGDN, + RALT, + FN1,LALT, ENT + ), + + /* + * Layer 1: Function keys + * + * This layer contains function keys, and media keys. * + * Most of the non-modifier keys are marked as NO, so it's immediately + * obvious if you start typing on a secondary layer. + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Teensy | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | TRNS | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TRNS | | | UP | | | TRNS | | TRNS | | | | | | TRNS | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TRNS | | LEFT | DOWN |RIGHT | |------| |------| | | | | | TRNS | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TRNS | | | | | | | | | | | | | | TRNS | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | TRNS | TRNS | Play | RW | FF | | Mute | Vol- | Vol+ | TRNS | TRNS | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | HOME | END | + * ,------|------|------| |------+------+------. + * | | | TRNS | | TRNS | | | + * | TRNS | |------| |------| TRNS | TRNS | + * | | | TRNS | | TRNS | | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + FN31,F1, F2, F3, F4, F5, F11, + TRNS,NO, NO, UP, NO, NO, TRNS, + TRNS,NO,LEFT,DOWN,RIGHT, NO, + TRNS,NO, NO, NO, NO, NO, NO, + TRNS,TRNS,MPLY,MPRV,MNXT, + NO, NO, + TRNS, + TRNS,NO, TRNS, + // right hand + F12, F6, F7, F8, F9, F10, TRNS, + TRNS,NO, NO, NO, NO, NO, TRNS, + NO,NO,NO, NO,NO, TRNS, + NO, NO, NO, NO, NO, NO, TRNS, + MUTE,VOLD,VOLU,TRNS,TRNS, + HOME,END, + TRNS, + TRNS,TRNS,TRNS + ) +}; + +/* id for user defined functions */ +enum function_id { + TEENSY_KEY, +}; + +/* + * Fn action definition + */ +const action_t PROGMEM fn_actions[] = { + // Layer shifting + [0] = ACTION_LAYER_SET(0, ON_PRESS), // Switch to Layer 0 + [1] = ACTION_LAYER_MOMENTARY(1), // Momentarily switch to layer 1 + [2] = ACTION_LAYER_SET(2, ON_PRESS), // Switch to Layer 2 + + // Teensy + [31] = ACTION_FUNCTION(TEENSY_KEY), +}; + +void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) +{ + if (id == TEENSY_KEY) { + clear_keyboard(); + print("\n\nJump to bootloader... "); + _delay_ms(250); + bootloader_jump(); // should not return + print("not supported.\n"); + } +} + From ec7454b331e6482236e14b751f2b477b4493ae4a Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Sun, 11 Apr 2021 11:01:40 +0100 Subject: [PATCH 096/101] Move arrow keys over wasd --- keyboard/ergodox/keymap_max.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c index 3ae7d5bf..505d0c0f 100644 --- a/keyboard/ergodox/keymap_max.c +++ b/keyboard/ergodox/keymap_max.c @@ -79,9 +79,9 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | Teensy | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | TRNS | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TRNS | | | UP | | | TRNS | | TRNS | | | | | | TRNS | + * | TRNS | | UP | | | | TRNS | | TRNS | | | | | | TRNS | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | TRNS | | LEFT | DOWN |RIGHT | |------| |------| | | | | | TRNS | + * | TRNS | LEFT | DOWN |RIGHT | | |------| |------| | | | | | TRNS | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | TRNS | | | | | | | | | | | | | | TRNS | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -99,8 +99,8 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // left hand FN31,F1, F2, F3, F4, F5, F11, - TRNS,NO, NO, UP, NO, NO, TRNS, - TRNS,NO,LEFT,DOWN,RIGHT, NO, + TRNS,NO, UP, NO, NO, NO, TRNS, + TRNS,LEFT,DOWN,RIGHT,NO, NO, TRNS,NO, NO, NO, NO, NO, NO, TRNS,TRNS,MPLY,MPRV,MNXT, NO, NO, From c4e4aca4e16f0e95c6e18ec088bd49c354fc7798 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 12 Apr 2021 13:10:38 +0100 Subject: [PATCH 097/101] Make a few more modifications to layout --- keyboard/ergodox/keymap_max.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c index 505d0c0f..0abded4c 100644 --- a/keyboard/ergodox/keymap_max.c +++ b/keyboard/ergodox/keymap_max.c @@ -28,14 +28,14 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * basis for your own custom layout. Mac users may want to swap the * position of the Alt and GUI keys. * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | ~ | | - | 6 | 7 | 8 | 9 | 0 | + | + * ,--------------------------------------------------. ,-------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~# | | | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Tab | Q | W | F | P | G | [ | | ] | J | L | U | Y | ; | \ | + * | Tab | Q | W | F | P | G | [ | | ] | J | L | U | Y | ; | + | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * | LShift | A | R | S | T | D |------| |------| H | N | E | I | O | ' | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | RShift | + * | \ | Z | X | C | V | B | | | | K | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | LAlt | | BkSp | | Del | | RAlt | | RCtrl | * `----------------------------------' `----------------------------------' @@ -50,17 +50,17 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // left hand - ESC, 1, 2, 3, 4, 5, GRV, + ESC, 1, 2, 3, 4, 5, NUHS, TAB, Q, W, F, P, G, LBRC, - NO, A, R, S, T, D, - LSFT,Z, X, C, V, B, NO, + LSFT,A, R, S, T, D, + NUBS,Z, X, C, V, B, NO, NO, NO, LALT, NO ,BSPC, NO, NO, NO, SPC,LCTL, LGUI, // right hand - MINS,6, 7, 8, 9, 0, EQL, - RBRC,J, L, U, Y, SCLN,BSLS, + NO,6, 7, 8, 9, 0, MINS, + RBRC,J, L, U, Y, SCLN,EQL, H, N, E, I, O, QUOT, NO, K, M, COMM,DOT, SLSH,RSFT, DEL, NO ,RALT,NO, RCTL, @@ -77,7 +77,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * obvious if you start typing on a secondary layer. * * ,--------------------------------------------------. ,--------------------------------------------------. - * | Teensy | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | TRNS | + * | ` | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | TRNS | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TRNS | | UP | | | | TRNS | | TRNS | | | | | | TRNS | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -98,7 +98,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( // left hand - FN31,F1, F2, F3, F4, F5, F11, + GRV ,F1, F2, F3, F4, F5, F11, TRNS,NO, UP, NO, NO, NO, TRNS, TRNS,LEFT,DOWN,RIGHT,NO, NO, TRNS,NO, NO, NO, NO, NO, NO, From 8963bc30428621342fbc135bdd263aa92e005210 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 13 Apr 2021 14:44:12 +0100 Subject: [PATCH 098/101] Add end and home keys --- keyboard/ergodox/keymap_max.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c index 0abded4c..fe1eb26d 100644 --- a/keyboard/ergodox/keymap_max.c +++ b/keyboard/ergodox/keymap_max.c @@ -37,7 +37,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | \ | Z | X | C | V | B | | | | K | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | LAlt | | BkSp | | Del | | RAlt | | RCtrl | + * | | | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | PgUp | PgDn | @@ -54,7 +54,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, F, P, G, LBRC, LSFT,A, R, S, T, D, NUBS,Z, X, C, V, B, NO, - NO, NO, LALT, NO ,BSPC, + NO, NO, LALT, HOME ,BSPC, NO, NO, NO, SPC,LCTL, LGUI, @@ -63,7 +63,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RBRC,J, L, U, Y, SCLN,EQL, H, N, E, I, O, QUOT, NO, K, M, COMM,DOT, SLSH,RSFT, - DEL, NO ,RALT,NO, RCTL, + DEL, END, RALT,NO, RCTL, PGUP,PGDN, RALT, FN1,LALT, ENT From 8c95a539482c77932174c7a21b74c7acd76ed8dd Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Mon, 26 Apr 2021 13:16:16 +0100 Subject: [PATCH 099/101] Add a qwerty layer --- keyboard/ergodox/keymap_max.c | 64 +++++++++++++++++++++++++++++++---- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c index fe1eb26d..e1fe2ec8 100644 --- a/keyboard/ergodox/keymap_max.c +++ b/keyboard/ergodox/keymap_max.c @@ -40,11 +40,11 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | PgUp | PgDn | + * | | L1 | | PgUp | PgDn | * ,------|------|------| |------+------+------. * | | | | | RAlt | | | * |Space | LCtrl|------| |------| LAlt | Enter| - * | | | LGui | | ~L1 | | | + * | | | LGui | | ~L2 | | | * `--------------------' `--------------------' */ @@ -55,7 +55,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LSFT,A, R, S, T, D, NUBS,Z, X, C, V, B, NO, NO, NO, LALT, HOME ,BSPC, - NO, NO, + NO, FN1, NO, SPC,LCTL, LGUI, // right hand @@ -66,11 +66,60 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { DEL, END, RALT,NO, RCTL, PGUP,PGDN, RALT, - FN1,LALT, ENT + FN2,LALT, ENT ), /* - * Layer 1: Function keys + * Keymap 1: Default qwerty Layer + * + * This is a general purpose Colemak layout which should serve as a good + * basis for your own custom layout. Mac users may want to swap the + * position of the Alt and GUI keys. + * + * ,--------------------------------------------------. ,-------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | ~# | | | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | \ | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | L0 | | PgUp | PgDn | + * ,------|------|------| |------+------+------. + * | | | | | RAlt | | | + * |Space | LCtrl|------| |------| LAlt | Enter| + * | | | LGui | | ~L2 | | | + * `--------------------' `--------------------' + */ + + KEYMAP( + // left hand + ESC, 1, 2, 3, 4, 5, NUHS, + TAB, Q, W, E, R, T, LBRC, + LSFT,A, S, D, F, G, + NUBS,Z, X, C, V, B, NO, + NO, NO, LALT, HOME ,BSPC, + NO, FN0, + NO, + SPC,LCTL, LGUI, + // right hand + NO, 6, 7, 8, 9, 0, MINS, + RBRC,Y, U, I, O, P, EQL, + H, J, K, L, SCLN,QUOT, + NO, N, M, COMM,DOT, SLSH,RSFT, + DEL, END, RALT,NO, RCTL, + PGUP,PGDN, + RALT, + FN2,LALT, ENT + ), + + + /* + * Layer 2: Function keys * * This layer contains function keys, and media keys. * * Most of the non-modifier keys are marked as NO, so it's immediately @@ -116,6 +165,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS,TRNS,TRNS ) + }; /* id for user defined functions */ @@ -129,8 +179,8 @@ enum function_id { const action_t PROGMEM fn_actions[] = { // Layer shifting [0] = ACTION_LAYER_SET(0, ON_PRESS), // Switch to Layer 0 - [1] = ACTION_LAYER_MOMENTARY(1), // Momentarily switch to layer 1 - [2] = ACTION_LAYER_SET(2, ON_PRESS), // Switch to Layer 2 + [1] = ACTION_LAYER_SET(1, ON_PRESS), // Switch to Layer 1 + [2] = ACTION_LAYER_MOMENTARY(2), // Momentarily switch to layer 2 // Teensy [31] = ACTION_FUNCTION(TEENSY_KEY), From f7bd5d2de7032232707f06e8ad98c283f09a1e32 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 4 Jul 2024 15:17:45 +0100 Subject: [PATCH 100/101] Add print screen to layout --- keyboard/ergodox/keymap_max.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/ergodox/keymap_max.c b/keyboard/ergodox/keymap_max.c index e1fe2ec8..1270d0e1 100644 --- a/keyboard/ergodox/keymap_max.c +++ b/keyboard/ergodox/keymap_max.c @@ -37,7 +37,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | \ | Z | X | C | V | B | | | | K | M | , | . | / | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | + * | PScrn| | LAlt | Home | BkSp | | Del | End | RAlt | | RCtrl | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | L1 | | PgUp | PgDn | @@ -54,7 +54,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, F, P, G, LBRC, LSFT,A, R, S, T, D, NUBS,Z, X, C, V, B, NO, - NO, NO, LALT, HOME ,BSPC, + PSCREEN, NO, LALT, HOME ,BSPC, NO, FN1, NO, SPC,LCTL, LGUI, From aff8ec8fc86f35be63d78eadeeeb4c8acb9b1929 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Thu, 4 Jul 2024 15:34:35 +0100 Subject: [PATCH 101/101] Add include for sleep_led --- tmk_core/protocol/pjrc/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tmk_core/protocol/pjrc/main.c b/tmk_core/protocol/pjrc/main.c index 45eb17d4..4e1823d6 100644 --- a/tmk_core/protocol/pjrc/main.c +++ b/tmk_core/protocol/pjrc/main.c @@ -36,6 +36,7 @@ #include "suspend.h" #include "host.h" #include "pjrc.h" +#include "sleep_led.h" #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))