Merge pull request #503 from fredizzimo/ergodox_subproject
Add both Ergodox EZ and Infinity Ergodox as sub-projects of Ergodoxpull/589/head
@ -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_ */
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ez.h"
|
||||
#include "i2cmaster.h"
|
||||
|
||||
bool i2c_initialized = 0;
|
@ -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_ */
|
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 "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_german.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 814 KiB After Width: | Height: | Size: 814 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 135 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
@ -1,7 +1,7 @@
|
||||
// Netable differences vs. the default firmware for the ErgoDox EZ:
|
||||
// 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).
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.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 "action_layer.h"
|
||||
#include "keymap_bepo.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "led.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_norwegian.h"
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 379 KiB After Width: | Height: | Size: 379 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 754 KiB After Width: | Height: | Size: 754 KiB |
@ -1,7 +1,7 @@
|
||||
// Netable differences vs. the default firmware for the ErgoDox EZ:
|
||||
// 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).
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.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 "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 139 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include <keymap_extras/keymap_colemak.h>
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.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.
|
||||
//
|
||||
// chschmitz, 2016-01-27
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_german.h"
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap.h"
|
||||
#include "keymap_german.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_german.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 69 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.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 |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "led.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_german_osx.h"
|
Before Width: | Height: | Size: 292 KiB After Width: | Height: | Size: 292 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 180 KiB After Width: | Height: | Size: 180 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_neo2.h"
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 297 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.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 "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 128 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 127 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
Before Width: | Height: | Size: 98 KiB After Width: | Height: | Size: 98 KiB |
@ -1,7 +1,7 @@
|
||||
// Based on `default_osx`
|
||||
// Replace left Bksp with Ctrl/Esc
|
||||
// Remove the Ctrl from Z and /
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_neo2.h"
|
@ -1,7 +1,7 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H 1
|
||||
|
||||
#include "config.h"
|
||||
#include "../../config.h"
|
||||
|
||||
#undef LOCKING_SUPPORT_ENABLE
|
||||
#undef LOCKING_RESYNC_ENABLE
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "led.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* TypeMatrix-2030-like keymap */
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "led.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.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 "action_layer.h"
|
||||
#include "action_util.h"
|
@ -1,4 +1,2 @@
|
||||
# I don't want my keyboard blinking lights when is suppose to be asleep.
|
||||
SLEEP_LED_ENABLE = no
|
||||
|
||||
CONFIG_H = keymaps/$(KEYMAP)/config.h
|
||||
SLEEP_LED_ENABLE = no
|
Before Width: | Height: | Size: 767 KiB After Width: | Height: | Size: 767 KiB |
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 381 KiB |
Before Width: | Height: | Size: 414 KiB After Width: | Height: | Size: 414 KiB |
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
#include "keymap_plover.h"
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
// readme
|
@ -1,4 +1,4 @@
|
||||
#include "ergodox_ez.h"
|
||||
#include "ergodox.h"
|
||||
#include "debug.h"
|
||||
#include "action_layer.h"
|
||||
|
@ -1,33 +1,38 @@
|
||||
# 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
|
||||
|
||||
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.
|
||||
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
|
||||
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 :)
|
||||
2. Clone the repository (download it)
|
||||
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`
|
||||
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.
|
||||
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. 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. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics.
|
||||
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.
|
||||
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`.
|
||||
|
||||
**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! :)
|
||||
|
||||
## 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).
|
||||
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);
|
||||
}
|