Merge remote-tracking branch 'upstream/master'

pull/990/head
Joshua T 9 years ago
commit e9a501d447

@ -20,7 +20,7 @@ RUN apt-get install --no-install-recommends -y build-essential \
RUN apt-get clean RUN apt-get clean
RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /var/lib/apt/lists/*
ENV keyboard=ergodox_ez ENV keyboard=ergodox
ENV keymap=default ENV keymap=default
VOLUME /qmk VOLUME /qmk

2
Vagrantfile vendored

@ -91,7 +91,7 @@ Vagrant.configure(2) do |config|
Or you can copy and paste the example line below. Or you can copy and paste the example line below.
cd /vagrant; cd keyboards; cd ergodox_ez; make clean; make cd /vagrant; cd keyboards; cd ergodox; make clean; make
EOT EOT

@ -34,7 +34,7 @@ You can find some keyboard specific projects under `converter` and `keyboard` di
* [atomic](keyboards/atomic/) - [Atomic] Ortholinear 60% keyboard * [atomic](keyboards/atomic/) - [Atomic] Ortholinear 60% keyboard
### Ergodox EZ ### Ergodox EZ
* [ergodox_ez](keyboards/ergodox_ez) - [Ergodox_EZ] Assembled split keyboard * [ergodox_ez](keyboards/ergodox/ez) - [Ergodox_EZ] Assembled split keyboard
## Other projects ## Other projects

@ -20,7 +20,7 @@ See [/doc/keymap.md](/doc/keymap.md).
## Flashing the firmware ## Flashing the firmware
The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox_ez/readme.md) gives a great example. The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboards/ergodox/readme.md) gives a great example.
If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version. If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.

@ -0,0 +1,34 @@
#----------------------------------------------------------------------------
# On command line:
#
# make = Make software.
#
# make clean = Clean out built project files.
#
# That's pretty much all you need. To compile, always go make clean,
# followed by make.
#
# For advanced users only:
# make teensy = Download the hex file to the device, using teensy_loader_cli.
# (must have teensy_loader_cli installed).
#
#----------------------------------------------------------------------------
SUBPROJECT_DEFAULT = ez
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode
ifndef QUANTUM_DIR
include ../../Makefile
endif

@ -0,0 +1,36 @@
#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
#define KEYBOARDS_ERGODOX_CONFIG_H_
#define MOUSEKEY_DELAY 100
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 3
#define MOUSEKEY_TIME_TO_MAX 10
#define TAPPING_TOGGLE 1
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
)
#ifdef SUBPROJECT_ez
#include "ez/config.h"
#endif
#ifdef SUBPROJECT_infinity
#include "infinity/config.h"
#endif
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */

@ -0,0 +1,10 @@
#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_
#define KEYBOARDS_ERGODOX_ERGODOX_H_
#ifdef SUBPROJECT_ez
#include "ez.h"
#endif
#ifdef SUBPROJECT_infinity
#include "infinity.h"
#endif
#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */

@ -70,17 +70,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode
ifndef QUANTUM_DIR ifndef QUANTUM_DIR
include ../../Makefile include ../../../Makefile
endif endif

@ -16,10 +16,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #ifndef ERGODOX_EZ_CONFIG_H
#define CONFIG_H #define ERGODOX_EZ_CONFIG_H
#include "config_common.h" #include "../config.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
@ -33,34 +33,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 14 #define MATRIX_ROWS 14
#define MATRIX_COLS 6 #define MATRIX_COLS 6
#define MOUSEKEY_DELAY 100
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 3
#define MOUSEKEY_TIME_TO_MAX 10
#define TAPPING_TOGGLE 1
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */ /* number of backlight levels */
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #define DEBOUNCE 5
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
)
/* /*
* Feature disable options * Feature disable options

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ez.h"
#include "i2cmaster.h" #include "i2cmaster.h"
bool i2c_initialized = 0; bool i2c_initialized = 0;

@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h" #include "debug.h"
#include "util.h" #include "util.h"
#include "matrix.h" #include "matrix.h"
#include "ergodox_ez.h" #include "ez.h"
#include "i2cmaster.h" #include "i2cmaster.h"
#ifdef DEBUG_MATRIX_SCAN_RATE #ifdef DEBUG_MATRIX_SCAN_RATE
#include "timer.h" #include "timer.h"

@ -52,34 +52,26 @@ ARMV = 7
# Vector table for application # Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ # 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB # The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
OPT_DEFS = -DCORTEX_VTOR_INIT=0x00002000 OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
# Build Options # Build Options
# comment out to disable the options. # comment out to disable the options.
# #
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE ?= yes # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control
CONSOLE_ENABLE ?= yes # Console for debug
COMMAND_ENABLE ?= yes # Commands for debug and configuration
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover
CUSTOM_MATRIX ?= yes # Custom matrix file CUSTOM_MATRIX ?= yes # Custom matrix file
SERIAL_LINK_ENABLE = yes SERIAL_LINK_ENABLE = yes
VISUALIZER_ENABLE ?= yes VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
LCD_ENABLE ?= yes LCD_ENABLE ?= yes
LED_ENABLE ?= yes LED_ENABLE ?= yes
LCD_BACKLIGHT_ENABLE ?= yes LCD_BACKLIGHT_ENABLE ?= yes
ifndef QUANTUM_DIR
include ../../../Makefile
endif
ifdef LCD_ENABLE ifdef LCD_ENABLE
include drivers/gdisp/st7565ergodox/driver.mk include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
endif endif
ifdef LED_ENABLE ifdef LED_ENABLE
include drivers/gdisp/IS31FL3731C/driver.mk include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
endif endif
ifndef QUANTUM_DIR
include ../../Makefile
endif

@ -15,8 +15,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef CONFIG_H #ifndef INFINITY_ERGODOX_CONFIG_H
#define CONFIG_H #define INFINITY_ERGODOX_CONFIG_H
#include "../config.h"
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
@ -35,25 +37,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 5 #define MATRIX_COLS 5
#define LOCAL_MATRIX_ROWS 9 #define LOCAL_MATRIX_ROWS 9
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
/* define if matrix has ghost */ /* define if matrix has ghost */
//#define MATRIX_HAS_GHOST //#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */ /* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5 #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_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* Keymap for Infiity prototype */
#define INFINITY_PROTOTYPE
#define SERIAL_LINK_BAUD 562500 #define SERIAL_LINK_BAUD 562500
#define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1) #define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1)
// The visualizer needs gfx thread priorities // The visualizer needs gfx thread priorities

@ -1,8 +1,10 @@
#include "infinity_ergodox.h" #include "infinity.h"
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
#include "serial_link/system/serial_link.h" #include "serial_link/system/serial_link.h"
#ifdef VISUALIZER_ENABLE
#include "lcd_backlight.h" #include "lcd_backlight.h"
#endif
void init_serial_link_hal(void) { void init_serial_link_hal(void) {
PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2);
@ -36,7 +38,7 @@ void init_serial_link_hal(void) {
// Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced // Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced
// Which will reduce the brightness range // Which will reduce the brightness range
#define PRESCALAR_DEFINE 0 #define PRESCALAR_DEFINE 0
#ifdef VISUALIZER_ENABLE
void lcd_backlight_hal_init(void) { void lcd_backlight_hal_init(void) {
// Setup Backlight // Setup Backlight
SIM->SCGC6 |= SIM_SCGC6_FTM0; SIM->SCGC6 |= SIM_SCGC6_FTM0;
@ -74,3 +76,57 @@ void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
CHANNEL_GREEN.CnV = g; CHANNEL_GREEN.CnV = g;
CHANNEL_BLUE.CnV = b; CHANNEL_BLUE.CnV = b;
} }
#endif
__attribute__ ((weak))
void matrix_init_user(void) {
}
__attribute__ ((weak))
void matrix_scan_user(void) {
}
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
void ergodox_board_led_on(void){
}
void ergodox_right_led_1_on(void){
}
void ergodox_right_led_2_on(void){
}
void ergodox_right_led_3_on(void){
}
void ergodox_right_led_on(uint8_t led){
}
void ergodox_board_led_off(void){
}
void ergodox_right_led_1_off(void){
}
void ergodox_right_led_2_off(void){
}
void ergodox_right_led_3_off(void){
}
void ergodox_right_led_off(uint8_t led){
}

@ -0,0 +1,110 @@
#ifndef KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_
#define KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_
#include "quantum.h"
void ergodox_board_led_on(void);
void ergodox_right_led_1_on(void);
void ergodox_right_led_2_on(void);
void ergodox_right_led_3_on(void);
void ergodox_right_led_on(uint8_t led);
void ergodox_board_led_off(void);
void ergodox_right_led_1_off(void);
void ergodox_right_led_2_off(void);
void ergodox_right_led_3_off(void);
void ergodox_right_led_off(uint8_t led);
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();
}
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();
}
inline void ergodox_right_led_1_set(uint8_t n){
if (n) {
ergodox_right_led_1_on();
} else {
ergodox_right_led_1_off();
}
}
inline void ergodox_right_led_2_set(uint8_t n){
if (n) {
ergodox_right_led_2_on();
} else {
ergodox_right_led_2_off();
}
}
inline void ergodox_right_led_3_set(uint8_t n){
if (n) {
ergodox_right_led_3_on();
} else {
ergodox_right_led_3_off();
}
}
inline void ergodox_right_led_set(uint8_t led, uint8_t n){
if (n) {
ergodox_right_led_on(led);
} else {
ergodox_right_led_off(led);
}
}
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);
}
#define KEYMAP( \
A80, A70, A60, A50, A40, A30, A20, \
A81, A71, A61, A51, A41, A31, A21, \
A82, A72, A62, A52, A42, A32, \
A83, A73, A63, A53, A43, A33, A23, \
A84, A74, A64, A54, A44, \
A13, A03, \
A04, \
A34, A24, A14, \
B20, B30, B40, B50, B60, B70, B80, \
B21, B31, B41, B51, B61, B71, B81, \
B32, B42, B52, B62, B72, B82, \
B23, B33, B43, B53, B63, B73, B83, \
B44, B54, B64, B74, B84, \
B03, B13, \
B04, \
B14, B24, B34 \
) { \
{ KC_NO, KC_NO, KC_NO, A03, A04 }, \
{ KC_NO, KC_NO, KC_NO, A13, A14 }, \
{ A20, A21, KC_NO, A23, A24 }, \
{ A30, A31, A32, A33, A34 }, \
{ A40, A41, A42, A43, A44 }, \
{ A50, A51, A52, A53, A54 }, \
{ A60, A61, A62, A63, A64 }, \
{ A70, A71, A72, A73, A74 }, \
{ A80, A81, A82, A83, A84 }, \
{ KC_NO, KC_NO, KC_NO, B03, B04 }, \
{ KC_NO, KC_NO, KC_NO, B13, B14 }, \
{ B20, B21, KC_NO, B23, B24 }, \
{ B30, B31, B32, B33, B34 }, \
{ B40, B41, B42, B43, B44 }, \
{ B50, B51, B52, B53, B54 }, \
{ B60, B61, B62, B63, B64 }, \
{ B70, B71, B72, B73, B74 }, \
{ B80, B81, B82, B83, B84 } \
}
#endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */

@ -63,6 +63,8 @@ void matrix_init(void)
memset(matrix, 0, MATRIX_ROWS); memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS); memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
matrix_init_quantum();
} }
uint8_t matrix_scan(void) uint8_t matrix_scan(void)
@ -127,6 +129,7 @@ uint8_t matrix_scan(void)
} }
debouncing = false; debouncing = false;
} }
matrix_scan_quantum();
return 1; return 1;
} }

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_german.h" #include "keymap_german.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

Before

Width:  |  Height:  |  Size: 814 KiB

After

Width:  |  Height:  |  Size: 814 KiB

@ -4,13 +4,19 @@ SLEEP_LED_ENABLE=no
UNICODE_ENABLE=no UNICODE_ENABLE=no
FORCE_NKRO ?= yes FORCE_NKRO ?= yes
DEBUG_ENABLE = no DEBUG_ENABLE = no
CONSOLE_ENABLE = yes CONSOLE_ENABLE = no
TAP_DANCE_ENABLE = yes TAP_DANCE_ENABLE = yes
KEYLOGGER_ENABLE ?= yes
ifeq (${FORCE_NKRO},yes) ifeq (${FORCE_NKRO},yes)
OPT_DEFS += -DFORCE_NKRO OPT_DEFS += -DFORCE_NKRO
endif endif
ifeq (${KEYLOGGER_ENABLE},yes)
OPT_DEFS += -DKEYLOGGER_ENABLE
CONSOLE_ENABLE = yes
endif
KEYMAP_VERSION = $(shell \ KEYMAP_VERSION = $(shell \
if [ -d "${KEYMAP_PATH}/.git" ]; then \ if [ -d "${KEYMAP_PATH}/.git" ]; then \
cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \

@ -50,6 +50,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
- `LEAD a` makes the [ADORE layer](#adore-layer) the default. - `LEAD a` makes the [ADORE layer](#adore-layer) the default.
- `LEAD v` prints the firmware version, the keyboard and the keymap. - `LEAD v` prints the firmware version, the keyboard and the keymap.
- `LEAD d` toggles logging keypress positions to the HID console. - `LEAD d` toggles logging keypress positions to the HID console.
- `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader.
## ADORE layer ## ADORE layer
@ -148,6 +149,14 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
# Changelog # Changelog
## v1.4 - 2016-07-29
* When toggling the key logging on or off, the LEDs will do a little dance.
* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it.
* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key.
* The `-`/`_` key was turned into a tap-dance key too.
* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`.
## v1.3 - 2016-07-06 ## v1.3 - 2016-07-06
* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. * Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.

@ -0,0 +1,533 @@
[
{
"backcolor": "#ffffff",
"name": "ErgoDox - algernon's layout: Heatmap",
"author": "Gergely Nagy <kbd@gergo.csillger.hu>",
"notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.",
"switchMount": "cherry",
"switchBrand": "gateron",
"switchType": "KS-3-Tea",
"pcb": true,
"css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }"
},
[
{
"x": 3.5,
"c": "#a7d0db",
"fa": [
0,
0,
2
]
},
"#\n3\nF3",
{
"x": 10.5,
"c": "#a7d0db",
"t": "#000000",
"a": 4,
"fa": [
0,
0,
2
]
},
"*\n8\nF8"
],
[
{
"y": -0.875,
"x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"@\n2\nF2",
{
"x": 1,
"c": "#7adabd",
"t": "#000000"
},
"$\n4\nF4",
{
"x": 8.5
},
"&\n7\nF7",
{
"x": 1,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"(\n9\nF9"
],
[
{
"y": -0.875,
"x": 5.5,
"c": "#7adabd",
"t": "#000000"
},
"%\n5\nF5",
{
"c": "#f9cd31",
"a": 7,
"f": 2
},
"STENO",
{
"x": 4.5,
"f": 6
},
"<i class='mss mss-Unicode-Option-3'></i>",
{
"c": "#7adabd",
"a": 4,
"f": 3,
"fa": [
0,
0,
2
]
},
"^\n6\nF6"
],
[
{
"y": -0.875,
"c": "#ffb2d2",
"f": 3,
"w": 1.5
},
"\n\n~\n`",
{
"t": "#0d0d0b"
},
"!\n1\nF1",
{
"x": 14.5
},
")\n0\nF10",
{
"a": 7,
"w": 1.5
},
"F11"
],
[
{
"y": -0.375,
"x": 3.5,
"c": "#a7d0db",
"t": "#000000",
"a": 6
},
"L",
{
"x": 10.5
},
"C"
],
[
{
"y": -0.875,
"x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b",
"a": 4
},
">\n.",
{
"x": 1,
"c": "#7adabd",
"t": "#000000",
"a": 6
},
"W",
{
"x": 8.5
},
"H",
{
"x": 1,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"P"
],
[
{
"y": -0.875,
"x": 5.5,
"c": "#7adabd",
"t": "#000000"
},
"M",
{
"c": "#93c9b7",
"a": 4,
"h": 1.5
},
"{\n[",
{
"x": 4.5,
"h": 1.5
},
"}\n]",
{
"c": "#7adabd",
"a": 6
},
"F"
],
[
{
"y": -0.875,
"c": "#ffb07b",
"t": "#0d0d0b",
"f": 6,
"w": 1.5
},
"<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
{
"c": "#ffb2d2",
"a": 4,
"f": 3
},
"<\n,",
{
"x": 14.5,
"a": 6
},
"Y",
{
"a": 4,
"w": 1.5
},
"|\n\\"
],
[
{
"y": -0.375,
"x": 3.5,
"c": "#a7d0db",
"t": "#000000",
"a": 6
},
"E",
{
"x": 10.5
},
"T"
],
[
{
"y": -0.875,
"x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"O",
{
"x": 1,
"c": "#7adabd",
"t": "#000000",
"n": true
},
"I",
{
"x": 8.5,
"n": true
},
"R",
{
"x": 1,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"N"
],
[
{
"y": -0.875,
"x": 5.5,
"c": "#7adabd",
"t": "#000000"
},
"U",
{
"x": 6.5
},
"D"
],
[
{
"y": -0.875,
"c": "#ffb2d2",
"t": "#0d0d0b",
"fa": [
6
],
"w": 1.5
},
"<i class='fa fa-arrows'></i>\n\nTab",
{
"f": 3
},
"A",
{
"x": 14.5,
"f": 3
},
"S",
{
"a": 4,
"fa": [
0,
0,
0,
0,
0,
0,
0,
6
],
"w": 1.5
},
"+\n="
],
[
{
"y": -0.625,
"x": 6.5,
"c": "#93c9b7",
"t": "#000000",
"a": 7,
"h": 1.5
},
"(",
{
"x": 4.5,
"h": 1.5
},
")"
],
[
{
"y": -0.75,
"x": 3.5,
"c": "#a7d0db",
"a": 4,
"f": 3
},
"\"\n'",
{
"x": 10.5
},
"V"
],
[
{
"y": -0.875,
"x": 2.5,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"Z",
{
"x": 1,
"c": "#7adabd",
"t": "#000000"
},
"K",
{
"x": 8.5
},
"G",
{
"x": 1,
"c": "#bfbad1",
"t": "#0d0d0b"
},
"J"
],
[
{
"y": -0.875,
"x": 5.5,
"c": "#7adabd",
"t": "#000000"
},
"X",
{
"x": 6.5
},
"B"
],
[
{
"y": -0.875,
"c": "#ffb07b",
"f": 9,
"w": 1.5
},
"\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
{
"c": "#ffb2d2",
"t": "#0d0d0b",
"a": 4,
"f": 3
},
"?\n/",
{
"x": 14.5,
"a": 6
},
"Q",
{
"c": "#ffb07b",
"t": "#000000",
"f": 9,
"w": 1.5
},
"<i class='kb kb-Multimedia-Stop'></i>"
],
[
{
"y": -0.375,
"x": 3.5,
"c": "#d9dae0",
"g": true,
"a": 7,
"f": 3
},
"",
{
"x": 10.5
},
""
],
[
{
"y": -0.875,
"x": 2.5
},
"",
{
"x": 1,
"c": "#d4872a",
"g": false,
"a": 5
},
";\n:",
{
"x": 8.5
},
"_\n-",
{
"x": 1,
"c": "#d9dae0",
"g": true,
"a": 7
},
""
],
[
{
"y": -0.75,
"x": 0.5
},
"",
{},
"",
{
"x": 14.5
},
"",
{},
""
],
[
{
"r": 30,
"rx": 6.5,
"ry": 4.25,
"y": -1,
"x": 1,
"c": "#f9cd31",
"g": false
},
"Alt",
{
"a": 4,
"fa": [
0,
0,
0,
9
]
},
"\n\n\n<i class='kb kb-logo-linux-debian fa-large'></i>"
],
[
{
"c": "#d4872a",
"a": 7,
"f": 9,
"h": 2
},
"<i class='kb kb-Unicode-BackSpace-DeleteLeft-Big'></i>",
{
"h": 2
},
"<i class='fa fa-angle-double-up'></i>",
{
"c": "#f9cd31",
"f": 3
},
"Ctrl"
],
[
{
"x": 2,
"c": "#e26757"
},
"ESC"
],
[
{
"r": -30,
"rx": 13,
"y": -1,
"x": -3,
"c": "#f9cd31",
"f": 2
},
"MEDIA",
{},
"1HAND"
],
[
{
"x": -3
},
"LEAD",
{
"c": "#d4872a",
"f": 9,
"h": 2
},
"<i class='kb kb-Return-2'></i>",
{
"f": 3,
"h": 2
},
"SPC"
],
[
{
"x": -3,
"c": "#f9cd31",
"f": 2
},
"HUN"
]
]

@ -1,7 +1,7 @@
// Netable differences vs. the default firmware for the ErgoDox EZ: // Netable differences vs. the default firmware for the ErgoDox EZ:
// 1. The Cmd key is now on the right side, making Cmd+Space easier. // 1. The Cmd key is now on the right side, making Cmd+Space easier.
// 2. The media keys work on OSX (But not on Windows). // 2. The media keys work on OSX (But not on Windows).
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_bepo.h" #include "keymap_bepo.h"

@ -0,0 +1,2 @@
SLEEP_LED_ENABLE = no
UNICODE_ENABLE = yes

@ -1,7 +1,8 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_neo2.h" #include "led.h"
#include "keymap_extras/keymap_neo2.h"
// Layer names // Layer names
#define BASE 0 // default layer #define BASE 0 // default layer
@ -33,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[BASE] = KEYMAP( [BASE] = KEYMAP(
// left hand // left hand
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EQL, KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, NEO_GRV,
NEO_Y, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_HOME, NEO_Y, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_HOME,
NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O,
KC_LSFT, NEO_UE, NEO_OE, NEO_AE, NEO_P, NEO_Z, TG(PMQ), KC_LSFT, NEO_UE, NEO_OE, NEO_AE, NEO_P, NEO_Z, TG(PMQ),
@ -42,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_MINS, KC_MINS,
KC_SPC, KC_ENT, ALL_T(KC_NO), KC_SPC, KC_ENT, ALL_T(KC_NO),
// right hand // right hand
DE_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, NEO_ACUT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, KC_END, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS,
NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R,
TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT, TG(PMN), NEO_B, NEO_M, KC_COMM,KC_DOT, NEO_J, KC_RSFT,
@ -140,10 +141,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* F9 F10 F11 F12 * F9 F10 F11 F12
* *
* F5 F6 F7 F8 * F5 F6 F7 F8
* * (TL2) (TL3)
* F1 F2 F3 F4 * F1 F2 F3 F4
* *
* (MO1) (MO1) * (MO1) (MO4) (MO4) (MO1)
* *
* Ms Ms Ms Ms * Ms Ms Ms Ms
* *
@ -267,7 +268,13 @@ void matrix_scan_user(void)
ergodox_right_led_3_on(); ergodox_right_led_3_on();
break; break;
default: default:
ergodox_board_led_off(); if(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) {
ergodox_led_all_set(LED_BRIGHTNESS_HI);
ergodox_right_led_1_on();
}
else {
ergodox_board_led_off();
}
break; break;
} }

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_norwegian.h" #include "keymap_norwegian.h"
@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
NO_COLN, KC_A, KC_R, KC_S, KC_T, KC_D, NO_COLN, KC_A, KC_R, KC_S, KC_T, KC_D,
KC_EXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, KC_EXLM, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN,
MO(4), KC_BTN1, KC_BTN2, KC_TAB,GUI_T(KC_COMMA), MO(4), KC_BTN1, KC_BTN2, KC_TAB,GUI_T(KC_COMMA),
NO_AMP, NO_PIPE, NO_AMPR, NO_PIPE,
NO_PLUS, NO_PLUS,
KC_FN1,CTL_T(KC_DOT),ALT_T(NO_MINS), KC_FN1,CTL_T(KC_DOT),ALT_T(NO_MINS),
// right hand // right hand

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 189 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,7 +1,7 @@
// Netable differences vs. the default firmware for the ErgoDox EZ: // Netable differences vs. the default firmware for the ErgoDox EZ:
// 1. The Cmd key is now on the right side, making Cmd+Space easier. // 1. The Cmd key is now on the right side, making Cmd+Space easier.
// 2. The media keys work on OSX (But not on Windows). // 2. The media keys work on OSX (But not on Windows).
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,5 +1,5 @@
#include <keymap_extras/keymap_colemak.h> #include <keymap_extras/keymap_colemak.h>
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,7 +1,7 @@
// German keymap derived from "german", but more closely resembling the German layout of the Kinesis Ergo Elan. // German keymap derived from "german", but more closely resembling the German layout of the Kinesis Ergo Elan.
// //
// chschmitz, 2016-01-27 // chschmitz, 2016-01-27
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_german.h" #include "keymap_german.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap.h" #include "keymap.h"
#include "keymap_german.h" #include "keymap_german.h"

@ -12,7 +12,7 @@ Tested with python 2.7 and python 3.4
{ {
"layout": "ergodox_ez", "layout": "ergodox_ez",
"keymaps_includes": [ "keymaps_includes": [
"ergodox_ez.h", "ergodox.h",
"action_layer.h", "action_layer.h",
"keymap_common.h", "keymap_common.h",
"keymap_extras/keymap_german.h", "keymap_extras/keymap_german.h",

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_german.h" #include "keymap_german.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -0,0 +1,229 @@
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#define BASE 0 // default layer
#define SYMB 1 // symbols
#define ARRW 2 // arrow keys
#define MDIA 3 // media keys, including mouse
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | = | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | Tab | Q | W | E | R | T | L1 | | CAPS | Y | U | I | O | P | \ |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
* |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | Grv | |*SYMB*|*ARRW*| |*MDIA*|*SYMB*| [ | ] | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+--------+------.
* | | | | | | | |
* | Space| Bksp |------| |------| Tab |Enter |
* | ctrl | gui | Alt | | Alt | gui | ctrl |
* `--------------------' `----------------------'
*/
// TODO: maybe look into changing the delay or whatever for the holding macros... not sure which way you would go with this. if the macro automatically kicks in if you hold it and press another button (no matter how long you held it for), then it wouldn't hurt to have a longer period i think... although if you hold a button and then decide not to, then you;ll register a space/bksp/etc. on accident. on the other hand, if it's too short of a delay, then you might be able to register spc/bksp/etc quickly enough, although i don't see this as big of an issue
// not sure if gui is meta key or super... it says meta on the basic keycodes page, and i think that's consitent with other shit, but you should really figure out how to program the keyboard to have meta and super separately instead of hacking your init.el to recognize alt as meta... because shit will get fucked up beteween awesome and emacs and other shit i'm guessing
// If it accepts an argument (i.e, is a function), it doesn't need KC_.
// Otherwise, it needs KC_*
[BASE] = KEYMAP( // layer 0 : default
// left hand
KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
KC_TRNS, KC_GRV, KC_TRNS,MO(SYMB),MO(ARRW),
KC_TRNS, KC_TRNS,
KC_TRNS,
CTL_T(KC_SPC),GUI_T(KC_BSPC),KC_LALT,
// right hand
KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_CAPSLOCK, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
MO(MDIA), MO(SYMB), KC_LBRC,KC_RBRC, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_RALT,GUI_T(KC_TAB), CTL_T(KC_ENT)
),
/* Keymap 1: Symbol Layer
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | . |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | 0 | = | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// SYMBOLS
[SYMB] = KEYMAP(
// left hand
KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
KC_TRNS,KC_TRNS,
KC_TRNS,
KC_TRNS,KC_TRNS,KC_TRNS,
// right hand
KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_DOT,
KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
KC_TRNS,KC_TRNS, KC_0, KC_EQL, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 2: Arrow keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | | | | | | | |PGDOWN| PGUP | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | |------| |------| LEFT | DOWN | UP |RIGHT | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | | | | | | | | | | HOME | END | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[ARRW] = KEYMAP(
// left hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_PGDOWN, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS,
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
/* Keymap 3: Media and mouse keys
*
* ,--------------------------------------------------. ,--------------------------------------------------.
* | | | | | | | | | | | | | | | |
* |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
* | | | | MsUp | | | | | | | | | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | |
* |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
* | | |Mute |VolDn | VolUp| | | | | | | | | | |
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
* | | | Prev | Play | Next | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-------------. ,-------------.
* | | | | | |
* ,------|------|------| |------+------+------.
* |Brwser| | | | | | |
* |Back | |------| |------| | |
* | | | | | | | |
* `--------------------' `--------------------'
*/
// MEDIA AND MOUSE
[MDIA] = KEYMAP(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_WBAK, KC_TRNS, KC_TRNS,
// right hand
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_MPLY,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS,
KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS
),
};
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
switch(id) {
case 0:
if (record->event.pressed) {
register_code(KC_RSFT);
} else {
unregister_code(KC_RSFT);
}
break;
}
return MACRO_NONE;
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
uint8_t layer = biton32(layer_state);
ergodox_board_led_off();
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
// TODO: Make this relevant to the ErgoDox EZ.
case 1:
ergodox_right_led_1_on();
break;
case 2:
ergodox_right_led_2_on();
break;
default:
// none
break;
}
};

@ -0,0 +1,121 @@
# Introduction
## Motivation
I created this keymap in an attempt to optimize my typing experience in text editors (vim and emacs) and the command-line.
More specifically, I wanted to have each modifier key controlled by the thumbs, the most powerful of the digits (I think). This cured me of emacs pinky, which had surprisingly grown quite quickly over the first two weeks of using emacs & emacs-like commands on the command-line.
## Changes
There are some miscellaneous changes that I kind of forgot I made, such as moving the tilde key, but you can check out the visual layouts below, which I **have** kept up to date.
### Modifier Keys
The biggest changes from the ergodox ez default keymap are the modifiers on the thumb cluster. You must hold each key down for a certain amount of time (forgot where this is specified) in order for the modifier key to activate.
### Layers
* an arrow layer (ARRW) has been created because the default arrow keys suck. Beware, these do use vim bindings because they're the best.
* the keys in the media layer have been moved around for a better experience (imo), especially with respect to the mouse
* the three layers (SYMB, MDIA, and ARRW) now have their own dedicated keys accessible by the thumbs in the basic layer
* caps lock has been put in place of the right-side `L1` toggle key because there was really no need to have two keys to toggle one layer, and caps lock is useful when writing queries
** unfortunatley, caps lock is not indicated by an LED, so be careful. I use caps lock just like I do insert in vim; for a short burst of text. I always turn off caps lock when I change my focus
### Removal Of Keys
I also removed a bunch of unnecessary keys that I wasn't going to use anyway. You'll see such keys are blank in the basic layer. I will probably add some more keys in place of these, but I'm fine for now; I just didn't want the distraction of extra keys I barely use.
## Caveats
### Thumb Cluster Range
I've heard many complaints about the thumb clusters. I agree that the three outter keys are almost impossible to reach. I am going to try to build [Matt Adereth's keyboard](https://github.com/adereth/dactyl-keyboard), which looks to have a better layout. However, I am able to comfortably use the three modifier keys mainly because:
* I use DCS keycaps with SA Row 3 keycaps where the Alt keys are
* I have relatively large hands (I guarantee you there's no problem - I guarantee you)
### Dangerous positioning
I think it's quite dangerous to put something like control on the same key as enter. Alas, this is a risk I'm willing to accept, and so should you if you decide to use this keymap. I tend to avoid putting myself in situtations in which disaster could occur with one fell swoop of a keypress.
# Keymap
## Keymap 0: Basic layer
```
,--------------------------------------------------. ,--------------------------------------------------.
| = | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| Tab | Q | W | E | R | T | L1 | | CAPS | Y | U | I | O | P | \ |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
|--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
| LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | Grv | |*SYMB*|*ARRW*| |*MDIA*|*SYMB*| [ | ] | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------|------|------| |------+--------+------.
| | | | | | | |
| Space| Bksp |------| |------| Tab |Enter |
| ctrl | gui | Alt | | Alt | gui | ctrl |
`--------------------' `----------------------'
```
## Keymap 1: Symbol Layer
The only change here is the *dot* (`.`) character moving from next to `0` next to `+` in order to move the layer keys in the correct position
```
,--------------------------------------------------. ,--------------------------------------------------.
| | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | . |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | | | | | 0 | = | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------|------|------| |------+------+------.
| | | | | | | |
| | |------| |------| | |
| | | | | | | |
`--------------------' `--------------------'
```
## Keymap 2: Arrow Layer
```
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | | | | | | | |PGDOWN| PGUP | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | |------| |------| LEFT | DOWN | UP |RIGHT | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | | | | | | | | | | HOME | END | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | | | | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------|------|------| |------+------+------.
| | | | | | | |
| | |------| |------| | |
| | | | | | | |
`--------------------' `--------------------'
```
## Keymap 3: Media and mouse keys
```
,--------------------------------------------------. ,--------------------------------------------------.
| | | | | | | | | | | | | | | |
|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
| | | | MsUp | | | | | | | | | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | |
|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
| | |Mute |VolDn | VolUp| | | | | | | | | | |
`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
| | | Prev | Play | Next | | | | | | |
`----------------------------------' `----------------------------------'
,-------------. ,-------------.
| | | | | |
,------|------|------| |------+------+------.
|Brwser| | | | | | |
|Back | |------| |------| | |
| | | | | | | |
`--------------------' `--------------------'
```

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_colemak.h" #include "keymap_colemak.h"

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "led.h" #include "led.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_german_osx.h" #include "keymap_german_osx.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_neo2.h" #include "keymap_neo2.h"

@ -1,5 +1,5 @@
// French AZERTY version of the default_osx file // French AZERTY version of the default_osx file
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_french_osx.h" #include "keymap_french_osx.h"
@ -184,4 +184,4 @@ void matrix_scan_user(void) {
break; break;
} }
}; };

@ -5,7 +5,7 @@
// Only default layer was remapped all others layers are standard Ergodox EZ // Only default layer was remapped all others layers are standard Ergodox EZ
// Very personal mapping of-course, but who knows a starting point for others. // Very personal mapping of-course, but who knows a starting point for others.
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
@ -160,7 +160,7 @@ KEYMAP(
[PLVR] = KEYMAP( // layout: layer 4: Steno for Plover [PLVR] = KEYMAP( // layout: layer 4: Steno for Plover
// left hand // left hand
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T,
KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO,
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
@ -169,7 +169,7 @@ KEYMAP(
KC_C, KC_V, KC_NO, KC_C, KC_V, KC_NO,
// right hand // right hand
KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS,
KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO,

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,7 +1,7 @@
// Based on `default_osx` // Based on `default_osx`
// Replace left Bksp with Ctrl/Esc // Replace left Bksp with Ctrl/Esc
// Remove the Ctrl from Z and / // Remove the Ctrl from Z and /
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_neo2.h" #include "keymap_neo2.h"

@ -1,7 +1,7 @@
#ifndef CONFIG_USER_H #ifndef CONFIG_USER_H
#define CONFIG_USER_H 1 #define CONFIG_USER_H 1
#include "config.h" #include "../../config.h"
#undef LOCKING_SUPPORT_ENABLE #undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE #undef LOCKING_RESYNC_ENABLE

@ -2,7 +2,7 @@
* SuperCoder 2000 layout * SuperCoder 2000 layout
*/ */
#include "ergodox_ez.h" #include "ergodox.h"
/* Layers */ /* Layers */

@ -23,7 +23,7 @@ your own:
``` ```
$ git clone https://github.com/jackhumbert/qmk_firmware.git $ git clone https://github.com/jackhumbert/qmk_firmware.git
$ cd qmk_firmware/keyboards/ergodox_ez $ cd qmk_firmware/keyboards/ergodox
$ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder $ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder
$ make KEYMAP=supercoder $ make KEYMAP=supercoder
``` ```

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "led.h" #include "led.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,5 +1,5 @@
/* TypeMatrix-2030-like keymap */ /* TypeMatrix-2030-like keymap */
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "led.h" #include "led.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -0,0 +1,44 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "../../config.h"
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
//#define DEBUG_MATRIX_SCAN_RATE
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 3000
#endif

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "action_util.h" #include "action_util.h"

@ -1,4 +1,2 @@
# I don't want my keyboard blinking lights when is suppose to be asleep. # I don't want my keyboard blinking lights when is suppose to be asleep.
SLEEP_LED_ENABLE = no SLEEP_LED_ENABLE = no
CONFIG_H = keymaps/$(KEYMAP)/config.h

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
#include "keymap_plover.h" #include "keymap_plover.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"
// readme // readme

@ -1,4 +1,4 @@
#include "ergodox_ez.h" #include "ergodox.h"
#include "debug.h" #include "debug.h"
#include "action_layer.h" #include "action_layer.h"

@ -1,33 +1,38 @@
# Getting started # Getting started
There are two main ways you could customize the ErgoDox EZ. There are two main ways you could customize the ErgoDox (EZ and Infinity)
## The Easy Way: Use an existing firmware file and just flash it ## The Easy Way: Use an existing firmware file and just flash it
This does not work for Infinity ErgoDox yet, you need to compile the firmware according to the instructions below
1. Download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). Some Linux distributions already provide a binary (may be called `teensy-loader-cli`), so you may prefer to use this. 1. Download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). Some Linux distributions already provide a binary (may be called `teensy-loader-cli`), so you may prefer to use this.
2. Find a firmware file you like. You can find a few if these in the keymaps subdirectory right here. The file you need ends with .hex, and you can look at its .c counterpart (or its PNG image) to see what you'll be getting. You can also use the [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) to create a firmware Hex file you like. 2. Find a firmware file you like. You can find a few of these in the keymaps subdirectory right here. The file you need ends with .hex, and you can look at its .c counterpart (or its PNG image) to see what you'll be getting. You can also use the [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) to create a firmware Hex file you like.
3. Download the firmware file 3. Download the firmware file
4. Connect the keyboard, press its Reset button (gently insert a paperclip into the hole in the top-right corner) and flash it using the Teensy loader you installed on step 1 and the firmware you downloaded. 4. Connect the keyboard, press its Reset button (gently insert a paperclip into the hole in the top-right corner) and flash it using the Teensy loader you installed on step 1 and the firmware you downloaded.
## More technical: create your own totally custom firmware by editing the source files. ## More technical: compile an existing keymap, or create your own totally custom firmware by editing the source files.
This requires a little bit of familiarity with coding. This requires a little bit of familiarity with coding.
If you are just compiling an existing keymap and don't want to create your own, you can skip step 4, 5 and 8.
1. Go to https://github.com/jackhumbert/qmk_firmware and read the readme at the base of this repository, top to bottom. Then come back here :) 1. Go to https://github.com/jackhumbert/qmk_firmware and read the readme at the base of this repository, top to bottom. Then come back here :)
2. Clone the repository (download it) 2. Clone the repository (download it)
3. Set up a build environment as per [the build guide](/doc/BUILD_GUIDE.md) 3. Set up a build environment as per [the build guide](/doc/BUILD_GUIDE.md)
- Using a Mac and have homebrew? just run `brew tap osx-cross/avr && brew install avr-libc` - Using a Mac and have homebrew? just run `brew tap osx-cross/avr && brew install avr-libc`
4. Copy `keyboards/ergodox_ez/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`) 4. Copy `keyboards/ergodox/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`)
5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work. 5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work.
6. Compile your firmware by running `make keymap=your_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_your_name.hex`, e.g. `ergodox_ez_german.hex`. 6. Compile your firmware by running `make keymap=keymap_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `subproject=infinity` to the make command.
6. Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successfull build by running `make teensy keymap=your_name`. 7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make teensy keymap=keymap_name`.
7. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics.
**Infinity ErgoDox** - Flash the firmware by running `make dfu-util keymap=keymap_name subproject=infinity`
8. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics.
Good luck! :) Good luck! :)
## Contributing your keymap ## Contributing your keymap
The ErgoDox EZ firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed almost 20 user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox EZ. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. The ErgoDox firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed almost 20 user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format.
1. All work goes inside your keymap subdirectory (`keymaps/german` in this example). 1. All work goes inside your keymap subdirectory (`keymaps/german` in this example).
2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did. 2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did.

@ -1,92 +0,0 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1307
#define DEVICE_VER 0x0001
#define MANUFACTURER ErgoDox EZ
#define PRODUCT ErgoDox EZ
#define DESCRIPTION t.m.k. keyboard firmware for Ergodox
/* key matrix size */
#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 TAPPING_TOGGLE 1
#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
#define ROWS (int []){ D0, D5, B5, B6 }
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 2
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
)
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
//#define DEBUG_MATRIX_SCAN_RATE
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 3000
#endif

@ -1,44 +0,0 @@
#ifndef KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_
#define KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_
#include "quantum.h"
#define KEYMAP( \
A80, A70, A60, A50, A40, A30, A20, \
A81, A71, A61, A51, A41, A31, A21, \
A82, A72, A62, A52, A42, A32, \
A83, A73, A63, A53, A43, A33, A23, \
A84, A74, A64, A54, A44, \
A13, A03, \
A04, \
A34, A24, A14, \
B20, B30, B40, B50, B60, B70, B80, \
B21, B31, B41, B51, B61, B71, B81, \
B32, B42, B52, B62, B72, B82, \
B23, B33, B43, B53, B63, B73, B83, \
B44, B54, B64, B74, B84, \
B03, B13, \
B04, \
B14, B24, B34 \
) { \
{ KC_NO, KC_NO, KC_NO, KC_##A03, KC_##A04 }, \
{ KC_NO, KC_NO, KC_NO, KC_##A13, KC_##A14 }, \
{ KC_##A20, KC_##A21, KC_NO, KC_##A23, KC_##A24 }, \
{ KC_##A30, KC_##A31, KC_##A32, KC_##A33, KC_##A34 }, \
{ KC_##A40, KC_##A41, KC_##A42, KC_##A43, KC_##A44 }, \
{ KC_##A50, KC_##A51, KC_##A52, KC_##A53, KC_##A54 }, \
{ KC_##A60, KC_##A61, KC_##A62, KC_##A63, KC_##A64 }, \
{ KC_##A70, KC_##A71, KC_##A72, KC_##A73, KC_##A74 }, \
{ KC_##A80, KC_##A81, KC_##A82, KC_##A83, KC_##A84 }, \
{ KC_NO, KC_NO, KC_NO, KC_##B03, KC_##B04 }, \
{ KC_NO, KC_NO, KC_NO, KC_##B13, KC_##B14 }, \
{ KC_##B20, KC_##B21, KC_NO, KC_##B23, KC_##B24 }, \
{ KC_##B30, KC_##B31, KC_##B32, KC_##B33, KC_##B34 }, \
{ KC_##B40, KC_##B41, KC_##B42, KC_##B43, KC_##B44 }, \
{ KC_##B50, KC_##B51, KC_##B52, KC_##B53, KC_##B54 }, \
{ KC_##B60, KC_##B61, KC_##B62, KC_##B63, KC_##B64 }, \
{ KC_##B70, KC_##B71, KC_##B72, KC_##B73, KC_##B74 }, \
{ KC_##B80, KC_##B81, KC_##B82, KC_##B83, KC_##B84 } \
}
#endif /* KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_ */

@ -1,114 +0,0 @@
/*
Copyright 2016 Fred Sundvik <fsundvik@gmail.com>
Jun Wako <wakojun@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "infinity_ergodox.h"
// Workaround for old keymap format
#define KC_RESET RESET
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // layer 0 : default
// left hand
EQL, 1, 2, 3, 4, 5, ESC,
BSLS,Q, W, E, R, T, FN1,
TAB, A, S, D, F, G,
LSFT,Z, X, C, V, B, FN0,
LGUI,GRV, BSLS,LEFT,RGHT,
LCTL,LALT,
HOME,
BSPC,DEL, END,
// right hand
FN2, 6, 7, 8, 9, 0, MINS,
LBRC,Y, U, I, O, P, RBRC,
H, J, K, L, SCLN,QUOT,
FN0, 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,FN3,
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
RESET,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN3,
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
),
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
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,
P0, PDOT,SLSH,PENT,PENT,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS
),
};
const uint16_t fn_actions[] = {
ACTION_LAYER_MOMENTARY(1), // FN0 - switch to Layer1
ACTION_LAYER_SET(2, ON_PRESS), // FN1 - set Layer2
ACTION_LAYER_TOGGLE(3), // FN2 - toggle Layer3 aka Numpad layer
ACTION_LAYER_SET(0, ON_PRESS), // FN3 - set Layer0
};

@ -1,168 +0,0 @@
/*
Copyright 2016 Fred Sundvik <fsundvik@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Currently we are assuming that both the backlight and LCD are enabled
// But it's entirely possible to write a custom visualizer that use only
// one of them
#ifndef LCD_BACKLIGHT_ENABLE
#error This visualizer needs that LCD backlight is enabled
#endif
#ifndef LCD_ENABLE
#error This visualizer needs that LCD is enabled
#endif
#include "visualizer.h"
#include "led_test.h"
static const char* welcome_text[] = {"TMK", "Infinity Ergodox"};
// Just an example how to write custom keyframe functions, we could have moved
// all this into the init function
bool display_welcome(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
// Read the uGFX documentation for information how to use the displays
// http://wiki.ugfx.org/index.php/Main_Page
gdispClear(White);
// You can use static variables for things that can't be found in the animation
// or state structs
gdispDrawString(0, 3, welcome_text[0], state->font_dejavusansbold12, Black);
gdispDrawString(0, 15, welcome_text[1], state->font_dejavusansbold12, Black);
// Always remember to flush the display
gdispFlush();
// you could set the backlight color as well, but we won't do it here, since
// it's part of the following animation
// lcd_backlight_color(hue, saturation, intensity);
// We don't need constant updates, just drawing the screen once is enough
return false;
}
// Feel free to modify the animations below, or even add new ones if needed
// Don't worry, if the startup animation is long, you can use the keyboard like normal
// during that time
static keyframe_animation_t startup_animation = {
.num_frames = 4,
.loop = false,
.frame_lengths = {0, gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(5000), 0},
.frame_functions = {
display_welcome,
keyframe_animate_backlight_color,
keyframe_no_operation,
enable_visualization
},
};
// The color animation animates the LCD color when you change layers
static keyframe_animation_t color_animation = {
.num_frames = 2,
.loop = false,
// Note that there's a 200 ms no-operation frame,
// this prevents the color from changing when activating the layer
// momentarily
.frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)},
.frame_functions = {keyframe_no_operation, keyframe_animate_backlight_color},
};
// The LCD animation alternates between the layer name display and a
// bitmap that displays all active layers
static keyframe_animation_t lcd_animation = {
.num_frames = 2,
.loop = true,
.frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)},
.frame_functions = {keyframe_display_layer_text, keyframe_display_layer_bitmap},
};
static keyframe_animation_t suspend_animation = {
.num_frames = 3,
.loop = false,
.frame_lengths = {0, gfxMillisecondsToTicks(1000), 0},
.frame_functions = {
keyframe_display_layer_text,
keyframe_animate_backlight_color,
keyframe_disable_lcd_and_backlight,
},
};
static keyframe_animation_t resume_animation = {
.num_frames = 5,
.loop = false,
.frame_lengths = {0, 0, gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(5000), 0},
.frame_functions = {
keyframe_enable_lcd_and_backlight,
display_welcome,
keyframe_animate_backlight_color,
keyframe_no_operation,
enable_visualization,
},
};
void initialize_user_visualizer(visualizer_state_t* state) {
// The brightness will be dynamically adjustable in the future
// But for now, change it here.
lcd_backlight_brightness(0x50);
state->current_lcd_color = LCD_COLOR(0x00, 0x00, 0xFF);
state->target_lcd_color = LCD_COLOR(0x10, 0xFF, 0xFF);
start_keyframe_animation(&startup_animation);
start_keyframe_animation(&led_test_animation);
}
void update_user_visualizer_state(visualizer_state_t* state) {
// Add more tests, change the colors and layer texts here
// Usually you want to check the high bits (higher layers first)
// because that's the order layers are processed for keypresses
// You can for check for example:
// state->status.layer
// state->status.default_layer
// state->status.leds (see led.h for available statuses)
if (state->status.layer & 0x8) {
state->target_lcd_color = LCD_COLOR(0xC0, 0xB0, 0xFF);
state->layer_text = "Numpad";
}
else if (state->status.layer & 0x4) {
state->target_lcd_color = LCD_COLOR(0, 0xB0, 0xFF);
state->layer_text = "KBD functions";
}
else if (state->status.layer & 0x2) {
state->target_lcd_color = LCD_COLOR(0x80, 0xB0, 0xFF);
state->layer_text = "Function keys";
}
else {
state->target_lcd_color = LCD_COLOR(0x40, 0xB0, 0xFF);
state->layer_text = "Default";
}
// You can also stop existing animations, and start your custom ones here
// remember that you should normally have only one animation for the LCD
// and one for the background. But you can also combine them if you want.
start_keyframe_animation(&lcd_animation);
start_keyframe_animation(&color_animation);
}
void user_visualizer_suspend(visualizer_state_t* state) {
state->layer_text = "Suspending...";
uint8_t hue = LCD_HUE(state->current_lcd_color);
uint8_t sat = LCD_SAT(state->current_lcd_color);
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
start_keyframe_animation(&suspend_animation);
}
void user_visualizer_resume(visualizer_state_t* state) {
state->current_lcd_color = LCD_COLOR(0x00, 0x00, 0x00);
state->target_lcd_color = LCD_COLOR(0x10, 0xFF, 0xFF);
start_keyframe_animation(&resume_animation);
start_keyframe_animation(&led_test_animation);
}

@ -1,12 +1,10 @@
 #include "planck.h"
#include "planck.h"
#ifdef BACKLIGHT_ENABLE #ifdef BACKLIGHT_ENABLE
#include "backlight.h" #include "backlight.h"
#endif #endif
#include "..\..\..\..\quantum\keymap_extras\keymap_german.h" #include "keymap_german.h"
#include "..\..\..\..\quantum\keymap_common.h"
#include "..\..\..\..\tmk_core\common\keycode.h" #define _______ KC_TRNS
#define _______ = KC_TRNS;
/* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout.
It has "üäöß" as it is optimized for a mix of German & English. It has "üäöß" as it is optimized for a mix of German & English.
@ -88,7 +86,7 @@ accessed by sliding from M2 to M3 with thumb
*/ */
[3] = { [3] = {
{ KC_NO, KC_NO, DE_7, DE_8 DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, { KC_NO, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO },
{ _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ },
{ _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ },
{ _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ }
@ -112,7 +110,7 @@ slide from m4 to m5 to access flipped version
{ KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO }, { KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO },
{ _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, { _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ },
{ _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ }
} },
/* flipped Function & Media Keys /* flipped Function & Media Keys
@ -128,8 +126,8 @@ slide from m4 to m5 to access flipped version
*/ */
[5] = { [5] = {
{ KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO },
{ KC_NO, KC_SQ3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO },
{ _______, KC_SQ2, KC_F1, KC_F2, KC_F3, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ },
{ _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ } { _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ }
} }
}; };

@ -0,0 +1,25 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,138 @@
#include "planck.h"
#include "action_layer.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
#include "eeconfig.h"
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.
#define _BASE 0
#define _MOVE 1
#define _SYMB 2
#define _FUNC 3
enum planck_keycodes {
BASE = SAFE_RANGE,
MOVE,
SYMB,
FUNC
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* BASE
* ,-----------------------------------------------------------------------------------.
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Bksp | A | R | S | T | D | H | N | E | I | O | " |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps |
* `-----------------------------------------------------------------------------------'
*/
[_BASE] = {
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS},
{KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT},
{FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS}
},
/* MOVE
* ,-----------------------------------------------------------------------------------.
* | Esc | | Home | Up | End | | | Home | Up | End | | Esc |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | Del | | Left | Down |Right | | | Left | Down |Right | | Del |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | | |Pg Up |Pg Dn | | |Pg Dn |Pg Up | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_MOVE] = {
{KC_ESC, _______, KC_HOME, KC_UP, KC_END, _______, _______, KC_HOME, KC_UP, KC_END, _______, KC_ESC},
{KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL},
{_______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
},
/* SYMB
* ,-----------------------------------------------------------------------------------.
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc |
* |-----------------------------------------------------------------------------------.
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
* |------+------+------+------+------+-------------+------+------+------+------+------|
* | | ~ | | | + | [ | { | } | ] | = | \ | ` | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_SYMB] = {
{KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC },
{KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL },
{_______, KC_TILD, KC_PIPE, KC_PLUS, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_EQL, KC_BSLS, KC_GRV, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
},
/* FUNC
* ,-----------------------------------------------------------------------------------.
* | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
* |-----------------------------------------------------------------------------------.
* | | Play | Prev | Next | BL+ | | | | | | | |
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | Mute | Vol- | Vol+ | BL- | | | | | | | |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | | | | |Reset |
* `-----------------------------------------------------------------------------------'
*/
[_FUNC] = {
{KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 },
{_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______},
{_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______},
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET }
}
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case MOVE:
if (record->event.pressed) {
layer_on(_MOVE);
update_tri_layer(_MOVE, _SYMB, _FUNC);
} else {
layer_off(_MOVE);
update_tri_layer(_MOVE, _SYMB, _FUNC);
}
return false;
break;
case SYMB:
if (record->event.pressed) {
layer_on(_SYMB);
update_tri_layer(_MOVE, _SYMB, _FUNC);
} else {
layer_off(_SYMB);
update_tri_layer(_MOVE, _SYMB, _FUNC);
}
return false;
break;
case FUNC:
if (record->event.pressed) {
layer_on(_FUNC);
} else {
layer_off(_FUNC);
}
return false;
break;
}
return true;
}

@ -0,0 +1,48 @@
# callums planck layout
This is a layout for the grid planck, built with a few ideals in mind. These ideals are just my opinion mind! The great thing about *qmk* is that we can all afford to have different opinions about what makes a good layout:
- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided --- since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording.
- The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible.
- There should be two of every modifier (one on each side), since otherwise certain long key combinations become hard to make.
- Backspace should be in the “capslock position” as God intended.
- The keyboard should be usable without any firmware changes on any operating system. In my case that means it should work on *Windows* and *Linux* without any software modifications, while I can change the behaviour slightly on *macOS* in software since thats my home OS. The images reflect the intended use on *macOS* **after** minor software tweaks; which will be noted.
We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys.
## The `BASE` layer
![](http://i.imgur.com/aEXOlWl.png)
This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I dont really use the bottom corners so theres nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and its probably my next most used key that didnt yet have a home.
The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneosly, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls.
The `ctrl`, `alt`, `cmd` cluster is asymmetric around the centre so that at least one of each of the modifiers can be reached with the thumbs. The intended use is to always hit the left `cmd` and the right `ctrl`, unless an awkward key combination dictates otherwise.
In firmware `ctrl` and `cmd`/`GUI` are swapped with respect to the image above --- I swap them to the illustrated location when using *macOS* and leave them be for *Windows* and *Linux*. (so that `cmd-z,x,c,v,...` becomes `ctrl-z,x,c,v,...` saving me some confusion)
## The `MOVE` layer
![](http://i.imgur.com/KXRSuHT.png)
This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if its needed.
On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `home` and `end` jump you to the beginning and end of the line respectively and so that `pg up` and `pg dn` move the cursor instead of just scrolling.
None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected.
## The `SYMB` layer
![](http://i.imgur.com/iuU144Y.png)
The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, with brackets in the centre; then normally shifted symbols to the left, and non shifted to the right, in order of most to least used.
`esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand.
Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected.
## The `FUNC` layer
![](http://i.imgur.com/skxRZiH.png)
The only thing of note here is that `bl+` and `bl-` are short for *backlight up* and *backlight down* respectively, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys.
## Other changes from the default
I have LEDs and sound disabled, simply because I have no need of them.

@ -11,7 +11,7 @@ CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = yes # MIDI controls MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6 AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
@ -22,4 +22,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR ifndef QUANTUM_DIR
include ../../../../Makefile include ../../../../Makefile
endif endif

@ -0,0 +1,21 @@
# Build Options
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
ifndef QUANTUM_DIR
include ../../../../Makefile
endif

@ -0,0 +1,30 @@
Ergonomic Colemak Keymap
========================
An ergonomically optimized Colemak keymap for the grid-layout Preonic
Modes
----------
#### Colemak
> Base layer
- All alphanumerics and symbols available on the base layer
----------
#### Game
> QWERTY layout for use with games or number entry
- Standard QWERTY layout
- Integrated right-hand numpad in phone layout
----------
#### Function (Raise)
> Functions and mode switching
- Turns NEIO into arrow cluster, with nav cluster below (Home, Page Down, Page Up, End)
- Reset key at lower left (Esc)

@ -0,0 +1,10 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#include "../../config.h"
// Number of backlight levels
#undef BACKLIGHT_LEVELS
#define BACKLIGHT_LEVELS 5
#endif

@ -0,0 +1,173 @@
#include "preonic.h"
#include "action_layer.h"
#include "eeconfig.h"
#ifdef AUDIO_ENABLE
#include "audio.h"
#endif
// Layer names
#define _COLEMAK 0
#define _GAME 1
#define _RAISE 2
enum preonic_keycodes {
COLEMAK = SAFE_RANGE,
GAME,
RAISE
};
// Fillers to make layering more clear
#define _______ KC_TRNS
#define XXXXXXX KC_NO
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Colemak
* ,-----------------------------------------------------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | = | Q | W | F | P | G | J | L | U | Y | [ | ] |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | - | A | R | S | T | D | H | N | E | I | O | ' |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ; | Z | X | C | V | B | K | M | , | . | / | ENTER|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | ESC | ALT | GUI | SHIFT| CTRL | BKSP | SPACE| RAISE| SHIFT| | DEL | TAB |
* `-----------------------------------------------------------------------------------'
*/
[_COLEMAK] = {
{KC_GRV ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_BSLS},
{KC_EQL ,KC_Q ,KC_W ,KC_F ,KC_P ,KC_G ,KC_J ,KC_L ,KC_U ,KC_Y ,KC_LBRC,KC_RBRC},
{KC_MINS,KC_A ,KC_R ,KC_S ,KC_T ,KC_D ,KC_H ,KC_N ,KC_E ,KC_I ,KC_O ,KC_QUOT},
{KC_SCLN,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_K ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_ENT },
{KC_ESC ,KC_LALT,KC_LGUI,KC_LSFT,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_RSFT,_______,KC_DEL ,KC_TAB }
},
/* Game
* ,-----------------------------------------------------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 |NUM LK| ÷ | × | - |
* |------+------+------+------+------+------+------+------+------+------+------+------+
* | TAB | Q | W | E | R | T | Y | U | 1 | 2 | 3 | + |
* |------+------+------+------+------+------+------+------+------+------+------+------+
* | CTRL | A | S | D | F | G | H | J | 4 | 5 | 6 | = |
* |------+------+------+------+------+------+------+------+------+------+------+------+
* | SHIFT| Z | X | C | V | B | N | M | 7 | 8 | 9 | ENTER|
* |------+------+------+------+------+------+------+------+------+------+------+------+
* | | ALT | GUI | SPACE| CTRL | BKSP | SPACE| RAISE| , | 0 | . | TAB |
* `-----------------------------------------------------------------------------------'
*/
[_GAME] = {
{KC_ESC ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 ,KC_7 ,KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS},
{KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_Y ,KC_U ,KC_P1 ,KC_P2 ,KC_P3 ,KC_PPLS},
{KC_LCTL,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_H ,KC_J ,KC_P4 ,KC_P5 ,KC_P6 ,KC_PEQL},
{KC_LSFT,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_N ,KC_M ,KC_P7 ,KC_P8 ,KC_P9 ,KC_PENT},
{XXXXXXX,KC_LALT,KC_LGUI,KC_SPC ,KC_LCTL,KC_BSPC,KC_SPC ,RAISE ,KC_PCMM,KC_P0 ,KC_PDOT,KC_TAB }
},
/* Raise
* ,-----------------------------------------------------------------------------------.
* | SLEEP| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |PRTSCR|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | SYM | F11 | F12 | |AU TOG| VOL+ |BL INC|COLMAK| GAME | MUSIC| MENU |SCRLCK|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | CAPS | PREV | STOP | PLAY | NEXT | VOL- |BL DEC| LEFT | DOWN | UP | RIGHT| PAUSE|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | BACK | STOP | RFRSH| FRWRD| MUTE |BL TOG| HOME | PGDN | PGUP | END |INSERT|
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | RESET| | | | | DEL | | | | | | |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = {
{KC_SLEP,KC_F1 ,KC_F2 ,KC_F3 ,KC_F4 ,KC_F5 ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_PSCR},
{XXXXXXX,KC_F11 ,KC_F12 ,XXXXXXX,AU_TOG ,KC_VOLU,BL_INC ,COLEMAK,GAME ,MU_TOG ,KC_MENU,KC_SLCK},
{KC_CAPS,KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT,KC_VOLD,BL_DEC ,KC_LEFT,KC_DOWN,KC_UP ,KC_RGHT,KC_PAUS},
{XXXXXXX,KC_WBAK,KC_WSTP,KC_WREF,KC_WFWD,KC_MUTE,BL_TOGG,KC_HOME,KC_PGDN,KC_PGUP,KC_END ,KC_INS },
{RESET ,_______,_______,_______,_______,KC_DEL ,_______,_______,_______,_______,_______,_______}
}
};
#ifdef AUDIO_ENABLE
float tone_startup[][2] = {
{NOTE_B5, 20},
{NOTE_B6, 8},
{NOTE_DS6, 20},
{NOTE_B6, 8}
};
float tone_colemak[][2] = SONG(COLEMAK_SOUND);
float tone_game[][2] = {
{NOTE_E6, 10} ,{NOTE_E6, 10} ,{NOTE_REST, 10} ,{NOTE_E6, 10} ,
{NOTE_REST, 10} ,{NOTE_C6, 10} ,{NOTE_E6, 10} ,{NOTE_REST, 10} ,
{NOTE_G6, 10} ,{NOTE_REST, 30},
{NOTE_G5, 10} ,{NOTE_REST, 30}
};
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
void startup_user() {
_delay_ms(20); // gets rid of tick
PLAY_NOTE_ARRAY(tone_startup, false, 0);
}
void shutdown_user() {
PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
_delay_ms(150);
stop_all_notes();
}
void music_on_user(void) {
music_scale_user();
}
void music_scale_user(void) {
PLAY_NOTE_ARRAY(music_scale, false, 0);
}
#endif
void matrix_init_user(void) {
#ifdef AUDIO_ENABLE
startup_user();
#endif
}
void persistant_default_layer_set(uint16_t default_layer) {
eeconfig_update_default_layer(default_layer);
default_layer_set(default_layer);
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case COLEMAK:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_colemak, false, 0);
#endif
persistant_default_layer_set(1UL<<_COLEMAK);
}
break;
case GAME:
if (record->event.pressed) {
#ifdef AUDIO_ENABLE
PLAY_NOTE_ARRAY(tone_game, false, STACCATO);
#endif
persistant_default_layer_set(1UL<<_GAME);
}
break;
case RAISE:
if (record->event.pressed) {
layer_on(_RAISE);
} else {
layer_off(_RAISE);
}
break;
default:
return true;
break;
}
return false;
};

@ -17,7 +17,7 @@ What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and
Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-assembled, premium ergonomic keyboard. Its split design allows you to place both halves shoulder width, and its custom-made wrist rests and tilt/tent kit make for incredibly comfortable typing. Available on [ergodox-ez.com](https://ergodox-ez.com). Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-assembled, premium ergonomic keyboard. Its split design allows you to place both halves shoulder width, and its custom-made wrist rests and tilt/tent kit make for incredibly comfortable typing. Available on [ergodox-ez.com](https://ergodox-ez.com).
* [ErgoDox EZ](/keyboards/ergodox_ez/) - Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types. * [ErgoDox EZ](/keyboards/ergodox/) - Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types.
### Clueboard - Zach White ### Clueboard - Zach White

@ -1,20 +1,15 @@
#include "../../config.h" #include "../../config.h"
// USB Device descriptor parameter
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0003
#define MANUFACTURER Custom
#define PRODUCT GH60 rev.CHN
#define DESCRIPTION QMK keyboard firmware for GH60 with WS2812 support
// Backlight configuration // Backlight configuration
#undef BACKLIGHT_LEVELS
#define BACKLIGHT_LEVELS 3 #define BACKLIGHT_LEVELS 3
// Underlight configuration // Underlight configuration
#define RGB_DI_PIN E2 #undef RGBLED_NUM
#define RGBLIGHT_TIMER
#define RGBLED_NUM 6 // Number of LEDs #define RGBLED_NUM 6 // Number of LEDs
#undef RGBLIGHT_HUE_STEP
#define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_HUE_STEP 8
#undef RGBLIGHT_SAT_STEP
#define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_SAT_STEP 8
#undef RGBLIGHT_VAL_STEP
#define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_VAL_STEP 8

@ -1,6 +1,18 @@
#include "quantum.h" #include "quantum.h"
static qk_tap_dance_state_t qk_tap_dance_state; static qk_tap_dance_state_t qk_tap_dance_state;
bool td_debug_enable = false;
#if CONSOLE_ENABLE
#define td_debug(s) if (td_debug_enable) \
{ \
xprintf ("D:tap_dance:%s:%s = { keycode = %d, count = %d, active = %d, pressed = %d }\n", __FUNCTION__, s, \
qk_tap_dance_state.keycode, qk_tap_dance_state.count, \
qk_tap_dance_state.active, qk_tap_dance_state.pressed); \
}
#else
#define td_debug(s)
#endif
void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data) { void qk_tap_dance_pair_finished (qk_tap_dance_state_t *state, void *user_data) {
qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data; qk_tap_dance_pair_t *pair = (qk_tap_dance_pair_t *)user_data;
@ -33,16 +45,19 @@ static inline void _process_tap_dance_action_fn (qk_tap_dance_state_t *state,
static inline void process_tap_dance_action_on_each_tap (qk_tap_dance_action_t action) static inline void process_tap_dance_action_on_each_tap (qk_tap_dance_action_t action)
{ {
td_debug("trigger");
_process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_each_tap); _process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_each_tap);
} }
static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_action_t action) static inline void process_tap_dance_action_on_dance_finished (qk_tap_dance_action_t action)
{ {
td_debug("trigger");
_process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_dance_finished); _process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_dance_finished);
} }
static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t action) static inline void process_tap_dance_action_on_reset (qk_tap_dance_action_t action)
{ {
td_debug("trigger")
_process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_reset); _process_tap_dance_action_fn (&qk_tap_dance_state, action.user_data, action.fn.on_reset);
} }

@ -49,6 +49,7 @@ typedef struct
} }
extern const qk_tap_dance_action_t tap_dance_actions[]; extern const qk_tap_dance_action_t tap_dance_actions[];
extern bool td_debug_enable;
/* To be used internally */ /* To be used internally */

@ -25,6 +25,7 @@
#include "led.h" #include "led.h"
#include "action_util.h" #include "action_util.h"
#include <stdlib.h> #include <stdlib.h>
#include "print.h"
extern uint32_t default_layer_state; extern uint32_t default_layer_state;

@ -82,9 +82,9 @@ If this is a bit complex for you, Docker might be the turn-key solution you need
```bash ```bash
# You'll run this every time you want to build a keymap # You'll run this every time you want to build a keymap
# modify the keymap and keyboard assigment to compile what you want # modify the keymap and keyboard assigment to compile what you want
# defaults are ergodox_ez/default # defaults are ergodox/default
docker run -e keymap=gwen -e keyboard=ergodox_ez --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware docker run -e keymap=gwen -e keyboard=ergodox --rm -v $('pwd'):/qmk:rw edasque/qmk_firmware
``` ```
@ -229,10 +229,18 @@ For a value of `4` for this imaginary setting. So we `undef` it first, then `def
You can then override any settings, rather than having to copy and paste the whole thing. You can then override any settings, rather than having to copy and paste the whole thing.
## Going beyond the keycodes # Going beyond the keycodes
Aside from the [basic keycodes](doc/keycode.txt), your keymap can include shortcuts to common operations. Aside from the [basic keycodes](doc/keycode.txt), your keymap can include shortcuts to common operations.
## Quick aliases to common actions
Your keymap can include shortcuts to common operations (called "function actions" in tmk).
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk `ACTION_*` functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/doc/keymap.md#2-action).
Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
### Switching and toggling layers ### Switching and toggling layers
`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. `MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack.
@ -310,7 +318,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac
* `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped
* `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift.
### Space Cadet Shift: The future, built in ## Space Cadet Shift: The future, built in
Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds.
@ -335,7 +343,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time. This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time.
### The Leader key: A new kind of modifier ## The Leader key: A new kind of modifier
If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen. If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen.
@ -373,7 +381,7 @@ void matrix_scan_user(void) {
As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_KEYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously.
### Tap Dance: A single key can do 3, 5, or 100 different things ## Tap Dance: A single key can do 3, 5, or 100 different things
Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/jackhumbert/qmk_firmware/pull/451). Here's how algernon describes the feature: Hit the semicolon key once, send a semicolon. Hit it twice, rapidly -- send a colon. Hit it three times, and your keyboard's LEDs do a wild dance. That's just one example of what Tap Dance can do. It's one of the nicest community-contributed features in the firmware, conceived and created by [algernon](https://github.com/algernon) in [#451](https://github.com/jackhumbert/qmk_firmware/pull/451). Here's how algernon describes the feature:
@ -409,7 +417,32 @@ Our next stop is `matrix_scan_tap_dance()`. This handles the timeout of tap-danc
For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros. For the sake of flexibility, tap-dance actions can be either a pair of keycodes, or a user function. The latter allows one to handle higher tap counts, or do extra things, like blink the LEDs, fiddle with the backlighting, and so on. This is accomplished by using an union, and some clever macros.
In the end, let's see a full example! ### Examples
Here's a simple example for a single definition:
1. In your `makefile`, add `TAP_DANCE_ENABLE = yes`
2. In your `config.h` (which you can copy from `qmk_firmware/keyboards/planck/config.h` to your keymap directory), add `#define TAPPING_TERM 200`
3. In your `keymap.c` file, define the variables and definitions, then add to your keymap:
```c
//Tap Dance Declarations
enum {
TD_ESC_CAPS = 0
};
//Tap Dance Definitions
const qk_tap_dance_action_t tap_dance_actions[] = {
//Tap once for Esc, twice for Caps Lock
[TD_ESC_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_ESC, KC_CAPS)
// Other declarations would go here, separated by commas, if you have them
};
//In Layer declaration, add tap dance item in place of a key code
TD(TD_ESC_CAPS)
```
Here's a more complex example involving custom actions:
```c ```c
enum { enum {
@ -493,11 +526,11 @@ const qk_tap_dance_action_t tap_dance_actions[] = {
}; };
``` ```
### Temporarily setting the default layer ## Temporarily setting the default layer
`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. `DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does.
### Prevent stuck modifiers ## Prevent stuck modifiers
Consider the following scenario: Consider the following scenario:
@ -518,12 +551,6 @@ This option uses 5 bytes of memory per every 8 keys on the keyboard
rounded up (5 bits per key). For example on Planck (48 keys) it uses rounded up (5 bits per key). For example on Planck (48 keys) it uses
(48/8)\*5 = 30 bytes. (48/8)\*5 = 30 bytes.
### Remember: These are just aliases
These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/doc/keymap.md#2-action).
Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them.
## Macro shortcuts: Send a whole string when pressing just one key ## Macro shortcuts: Send a whole string when pressing just one key
Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c). Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c).
@ -710,7 +737,7 @@ Enable the backlight from the Makefile.
All of these functions are available in the `*_kb()` or `*_user()` variety. `kb` ones should only be used in the `<keyboard>/<keyboard>.c` file, and `user` ones should only be used in the `keymap.c`. The keyboard ones call the user ones - it's necessary to keep these calls to allow the keymap functions to work correctly. All of these functions are available in the `*_kb()` or `*_user()` variety. `kb` ones should only be used in the `<keyboard>/<keyboard>.c` file, and `user` ones should only be used in the `keymap.c`. The keyboard ones call the user ones - it's necessary to keep these calls to allow the keymap functions to work correctly.
## `void martix_init_*(void)` ## `void matrix_init_*(void)`
This function gets called when the matrix is initiated, and can contain start-up code for your keyboard/keymap. This function gets called when the matrix is initiated, and can contain start-up code for your keyboard/keymap.

@ -111,7 +111,7 @@ void layer_debug(void)
#endif #endif
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {0}; uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {{0}};
void update_source_layers_cache(keypos_t key, uint8_t layer) void update_source_layers_cache(keypos_t key, uint8_t layer)
{ {

@ -29,7 +29,9 @@
#include <stdbool.h> #include <stdbool.h>
#include "util.h" #include "util.h"
#if defined(PROTOCOL_CHIBIOS)
#define PSTR(x) x
#endif
#ifndef NO_PRINT #ifndef NO_PRINT

@ -60,9 +60,9 @@ TAB_LOG = printf "\n$$LOG\n\n" | $(AWK) '{ sub(/^/," | "); print }'
TAB_LOG_PLAIN = printf "$$LOG\n" TAB_LOG_PLAIN = printf "$$LOG\n"
AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }' AWK_STATUS = $(AWK) '{ printf " %-10s\n", $$1; }'
AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }' AWK_CMD = $(AWK) '{ printf "%-99s", $$0; }'
PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && false PRINT_ERROR = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) && exit 1
PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG) PRINT_WARNING = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG)
PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && false && break PRINT_ERROR_PLAIN = ($(SILENT) ||printf " $(ERROR_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) && exit 1
PRINT_WARNING_PLAIN = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN) PRINT_WARNING_PLAIN = ($(SILENT) || printf " $(WARN_STRING)" | $(AWK_STATUS)) && $(TAB_LOG_PLAIN)
PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS) PRINT_OK = $(SILENT) || printf " $(OK_STRING)" | $(AWK_STATUS)
BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi; BUILD_CMD = LOG=$$($(CMD) 2>&1) ; if [ $$? -gt 0 ]; then $(PRINT_ERROR); elif [ "$$LOG" != "" ] ; then $(PRINT_WARNING); else $(PRINT_OK); fi;
@ -253,6 +253,14 @@ MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
# Define all object files. # Define all object files.
OBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(patsubst %.cpp,$(OBJDIR)/%.o,$(patsubst %.S,$(OBJDIR)/%.o,$(SRC)))) OBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(patsubst %.cpp,$(OBJDIR)/%.o,$(patsubst %.S,$(OBJDIR)/%.o,$(SRC))))
# The files in the lib folder are shared between all keymaps, so generate that folder name by removing
# the keymap from the name
KBOBJDIR=$(subst _$(KEYMAP),,$(OBJDIR))
# And fixup the object files to match
LIBOBJ = $(foreach v,$(OBJ),$(if $(findstring /lib/,$v),$v))
NONLIBOBJ := $(filter-out $(LIBOBJ),$(OBJ))
LIBOBJ := $(subst _$(KEYMAP)/,/,$(LIBOBJ))
OBJ := $(LIBOBJ) $(NONLIBOBJ)
# Define all listing files. # Define all listing files.
LST = $(patsubst %.c,$(OBJDIR)/%.lst,$(patsubst %.cpp,$(OBJDIR)/%.lst,$(patsubst %.S,$(OBJDIR)/%.lst,$(SRC)))) LST = $(patsubst %.c,$(OBJDIR)/%.lst,$(patsubst %.cpp,$(OBJDIR)/%.lst,$(patsubst %.S,$(OBJDIR)/%.lst,$(SRC))))
@ -370,20 +378,35 @@ BEGIN = gccversion check_submodule sizebefore
$(eval CMD=$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)) $(eval CMD=$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS))
@$(BUILD_CMD) @$(BUILD_CMD)
define GEN_OBJRULE
# Compile: create object files from C source files. # Compile: create object files from C source files.
$(OBJDIR)/%.o : %.c | $(BEGIN) $1/%.o : %.c | $(BEGIN)
@mkdir -p $(@D) @mkdir -p $$(@D)
@$(SILENT) || printf "$(MSG_COMPILING) $<" | $(AWK_CMD) @$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
$(eval CMD=$(CC) -c $(ALL_CFLAGS) $< -o $@) $$(eval CMD=$$(CC) -c $$(ALL_CFLAGS) $$< -o $$@)
@$(BUILD_CMD) @$$(BUILD_CMD)
# Compile: create object files from C++ source files. # Compile: create object files from C++ source files.
$(OBJDIR)/%.o : %.cpp | $(BEGIN) $1/%.o : %.cpp | $(BEGIN)
@mkdir -p $(@D) @mkdir -p $$(@D)
@$(SILENT) || printf "$(MSG_COMPILING_CPP) $<" | $(AWK_CMD) @$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD)
$(eval CMD=$(CC) -c $(ALL_CPPFLAGS) $< -o $@) $$(eval CMD=$$(CC) -c $$(ALL_CPPFLAGS) $$< -o $$@)
@$(BUILD_CMD) @$(BUILD_CMD)
# Assemble: create object files from assembler source files.
$1/%.o : %.S | $(BEGIN)
@mkdir -p $$(@D)
@$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD)
$$(eval CMD=$$(CC) -c $$(ALL_ASFLAGS) $$< -o $$@)
@$$(BUILD_CMD)
endef
# Since the object files could be in two different folders, generate
# separate rules for them, rather than having too generic rules
$(eval $(call GEN_OBJRULE,$(OBJDIR)))
$(eval $(call GEN_OBJRULE,$(KBOBJDIR)))
# Compile: create assembler files from C source files. # Compile: create assembler files from C source files.
%.s : %.c | $(BEGIN) %.s : %.c | $(BEGIN)
@$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD) @$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
@ -396,13 +419,6 @@ $(OBJDIR)/%.o : %.cpp | $(BEGIN)
$(eval CMD=$(CC) -S $(ALL_CPPFLAGS) $< -o $@) $(eval CMD=$(CC) -S $(ALL_CPPFLAGS) $< -o $@)
@$(BUILD_CMD) @$(BUILD_CMD)
# Assemble: create object files from assembler source files.
$(OBJDIR)/%.o : %.S | $(BEGIN)
@mkdir -p $(@D)
@$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
$(eval CMD=$(CC) -c $(ALL_ASFLAGS) $< -o $@)
@$(BUILD_CMD)
# Create preprocessed source for use in sending a bug report. # Create preprocessed source for use in sending a bug report.
%.i : %.c | $(BEGIN) %.i : %.c | $(BEGIN)
$(CC) -E -mmcu=$(MCU) $(CFLAGS) $< -o $@ $(CC) -E -mmcu=$(MCU) $(CFLAGS) $< -o $@
@ -486,7 +502,7 @@ $(shell mkdir $(BUILD_DIR) 2>/dev/null)
# Create object files directory # Create object files directory
$(shell mkdir $(OBJDIR) 2>/dev/null) $(shell mkdir $(OBJDIR) 2>/dev/null)
$(shell mkdir $(KBOBJDIR) 2>/dev/null)
# Include the dependency files. # Include the dependency files.
-include $(shell mkdir $(BUILD_DIR)/.dep 2>/dev/null) $(wildcard $(BUILD_DIR)/.dep/*) -include $(shell mkdir $(BUILD_DIR)/.dep 2>/dev/null) $(wildcard $(BUILD_DIR)/.dep/*)

Loading…
Cancel
Save