From 5263dfd46520bd40af1d2b39364436df1c96a111 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 28 May 2020 01:26:53 -0700 Subject: Keyboards/zsa updates (#9214) --- keyboards/ergodox_ez/config.h | 8 +- keyboards/ergodox_ez/ergodox_ez.h | 15 ++-- keyboards/ergodox_ez/info.json | 3 +- keyboards/ergodox_ez/keymaps/default/keymap.c | 104 +++++++++----------------- keyboards/ergodox_ez/readme.md | 49 ++++++------ 5 files changed, 72 insertions(+), 107 deletions(-) (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index e60101e5e2..8ef600b089 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef ERGODOX_EZ_CONFIG_H -#define ERGODOX_EZ_CONFIG_H +#pragma once #include "config_common.h" @@ -25,9 +24,8 @@ along with this program. If not, see . #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1307 #define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDox EZ +#define MANUFACTURER ZSA Technology Labs Inc #define PRODUCT ErgoDox EZ -#define DESCRIPTION QMK keyboard firmware for Ergodox EZ /* key matrix size */ #define MATRIX_ROWS 14 @@ -149,5 +147,3 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE - -#endif diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 7ff62d38a1..88a0a2ee9f 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -1,5 +1,4 @@ -#ifndef ERGODOX_EZ_H -#define ERGODOX_EZ_H +#pragma once #include "quantum.h" #include @@ -65,8 +64,7 @@ inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; } inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; } #endif // LEFT_LEDS -inline void ergodox_led_all_on(void) -{ +inline void ergodox_led_all_on(void) { ergodox_board_led_on(); ergodox_right_led_1_on(); ergodox_right_led_2_on(); @@ -100,19 +98,20 @@ inline void ergodox_right_led_set(uint8_t led, uint8_t n) { (OCR1C = n); } -inline void ergodox_led_all_set(uint8_t n) -{ +inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_1_set(n); ergodox_right_led_2_set(n); ergodox_right_led_3_set(n); } -#ifdef ORYX_CONFIGURATOR enum ergodox_ez_keycodes { LED_LEVEL = SAFE_RANGE, TOGGLE_LAYER_COLOR, EZ_SAFE_RANGE, }; + +#ifndef WEBUSB_ENABLE +# define WEBUSB_PAIR KC_NO #endif typedef union { @@ -271,5 +270,3 @@ extern keyboard_config_t keyboard_config; { R05, R15, R25, R35, R45, R55 }, \ { R06, R16, R26, R36, R46, KC_NO } \ } - -#endif diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index e543206fed..61ba58051d 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -1,7 +1,8 @@ { "keyboard_name": "ErgoDox EZ", "url": "ergodox-ez.com", - "maintainer": "ZSA", + "maintainer": "ZSA via Drashna", + "manufacturer": "ZSA Technology Labs Inc", "width": 17, "height": 8, diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index 20c78bd57e..9079e48fcb 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -1,17 +1,18 @@ #include QMK_KEYBOARD_H #include "version.h" -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys +enum layers { + BASE, // default layer + SYMB, // symbols + MDIA, // media keys +}; enum custom_keycodes { #ifdef ORYX_CONFIGURATOR - EPRM = EZ_SAFE_RANGE, + VRSN = EZ_SAFE_RANGE, #else - EPRM = SAFE_RANGE, + VRSN = SAFE_RANGE, #endif - VRSN, RGB_SLD }; @@ -37,25 +38,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | |ace | End | | PgDn | | | * `--------------------' `----------------------' */ -[BASE] = LAYOUT_ergodox( +[BASE] = LAYOUT_ergodox_pretty( // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC, KC_BSPC, KC_END, - // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), - MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN, KC_TAB, KC_ENT + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), GUI_T(KC_QUOT), + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + LT(SYMB,KC_GRV), KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), + ALT_T(KC_APP), KC_LGUI, KC_LALT, CTL_T(KC_ESC), + KC_HOME, KC_PGUP, + KC_SPC, KC_BSPC, KC_END, KC_PGDN, KC_TAB, KC_ENT ), /* Keymap 1: Symbol Layer * @@ -78,25 +70,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[SYMB] = LAYOUT_ergodox( +[SYMB] = LAYOUT_ergodox_pretty( // left hand - VRSN, 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, - EPRM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - RGB_MOD, KC_TRNS, - KC_TRNS, - RGB_VAD, RGB_VAI, 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_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, - RGB_TOG, RGB_SLD, - KC_TRNS, - KC_TRNS, RGB_HUD, RGB_HUI + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_TRNS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_MOD, KC_TRNS, RGB_TOG, RGB_SLD, + KC_TRNS, KC_TRNS, + RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_HUD, RGB_HUI ), /* Keymap 2: Media and mouse keys * @@ -119,34 +102,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -[MDIA] = LAYOUT_ergodox( +[MDIA] = LAYOUT_ergodox_pretty( // left hand - 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, 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_TRNS, 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_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WBAK ), }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { - case EPRM: - eeconfig_init(); - return false; case VRSN: SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); return false; @@ -161,7 +133,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } // Runs just one time when the keyboard initializes. -void matrix_init_user(void) { +void keyboard_post_init_user(void) { #ifdef RGBLIGHT_COLOR_LAYER_0 rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); #endif @@ -179,10 +151,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { case 0: #ifdef RGBLIGHT_COLOR_LAYER_0 rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0); - #else - #ifdef RGBLIGHT_ENABLE - rgblight_init(); - #endif #endif break; case 1: diff --git a/keyboards/ergodox_ez/readme.md b/keyboards/ergodox_ez/readme.md index bce8ff3c6f..796e96ce53 100644 --- a/keyboards/ergodox_ez/readme.md +++ b/keyboards/ergodox_ez/readme.md @@ -1,41 +1,44 @@ # ErgoDox EZ -The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). +![ErgoDox EZ](http://www.coolthings.com/wp-content/uploads/2017/05/ergodox-ez-2.jpg) -Linux users need to modify udev rules as described on the [Teensy -Linux page]. Some distributions provide a binary, maybe called -`teensy-loader-cli`. +The ErgoDox EZ is a mass produced version of the original ErgoDox keyboard, with optional support for RGB Light (Shine) or RGB Matrix (Glow). -[Teensy Linux page]: https://www.pjrc.com/teensy/loader_linux.html +* Keyboard Maintainer: [ZSA Technology Labs Inc](https://github.com/zsa), Firmware maintained by [drashna](https://github.com/drashna) +* Hardware Supported: Original ErgoDox, ErgoDox EZ +* Hardware Availability: [ErgoDox EZ](https://ergodox-ez.com/), [ErgoDox.io](https://ergodox.io) -To flash the firmware: +Make example for this keyboard (after setting up your build environment): - - Build the firmware with `make :`, for example `make ergodox_ez:default` + make ergodox_ez:default:flash - - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. - `ergodox_ez_default.hex` +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - - Start the teensy loader. +## Oryx Configuation - - Load the .hex file into it. +If you have `ORYX_CONFIGURATOR` defined in your keymap's `config.h`, this enables a number of the built in options from the Oryx Configurator. - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corner. +### Indicator LEDs - - Click the button in the Teensy app to download the firmware. +You can use the `LED_LEVEL` keycode to cycle through the brightness levels for the LEDs on the top right of the keyboard. These settings are saved in eeprom (persistant memory). -See also [video demonstration](https://www.youtube.com/watch?v=9PyiGUO9_KQ) using Teensy in auto mode. +Alternatively, you can set the brightness by calling the following functions: -To flash with ´teensy-loader-cli´: +```c +void ergodox_led_all_set(uint8_t level); +void ergodox_right_led_1_set(uint8_t level); +void ergodox_right_led_2_set(uint8_t level); +void ergodox_right_led_3_set(uint8_t level); +``` - - Build the firmware with `make keymapname`, for example `make default` +These settings are not persistent, so you'd need to reset it every time the board starts. - - Run ´teensy_loader_cli -mmcu=atmega32u4 -w ergodox_ez_.hex´ +These are on a 0-255 scale - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. +### RGB Matrix Features -## Settings +If you're using the Smart LED (layer indication) feature from the Oryx Configurator, you want to make sure that you enable these options by adding `#define ORYX_CONFIGURATOR` to your keymap's `config.h`. -You may want to enable QMK_KEYS_PER_SCAN because the Ergodox has a relatively -slow scan rate. +This changes the `RGB_TOG` keycode so that it will toggle the lights on and off, in a way that will allow the Smart LEDs to continue to work, even with the rest of the LEDs turned off. + +Additionally, a new keycode has been added to toggle the Smart LEDs. Use `TOGGLE_LAYER_COLOR`, if you aren't already. -- cgit v1.2.3