diff options
Diffstat (limited to 'keyboards/ergodox_ez')
| -rw-r--r-- | keyboards/ergodox_ez/config.h | 14 | ||||
| -rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.c | 51 | ||||
| -rw-r--r-- | keyboards/ergodox_ez/ergodox_ez.h | 22 | ||||
| -rw-r--r-- | keyboards/ergodox_ez/rules.mk | 12 |
4 files changed, 88 insertions, 11 deletions
diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index c3b794f10..109a80d2c 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h | |||
| @@ -43,12 +43,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 43 | #define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 } | 43 | #define MATRIX_EXPANDER_COL_PINS { 5, 4, 3, 2, 1, 0 } |
| 44 | #define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 } | 44 | #define MATRIX_EXPANDER_ROW_PINS { 0, 1, 2, 3, 4, 5, 6 } |
| 45 | 45 | ||
| 46 | 46 | #define MOUSEKEY_INTERVAL 20 | |
| 47 | #define MOUSEKEY_INTERVAL 20 | 47 | #define MOUSEKEY_DELAY 0 |
| 48 | #define MOUSEKEY_DELAY 0 | 48 | #define MOUSEKEY_TIME_TO_MAX 60 |
| 49 | #define MOUSEKEY_TIME_TO_MAX 60 | 49 | #define MOUSEKEY_MAX_SPEED 7 |
| 50 | #define MOUSEKEY_MAX_SPEED 7 | 50 | #define MOUSEKEY_WHEEL_DELAY 400 |
| 51 | #define MOUSEKEY_WHEEL_DELAY 0 | 51 | #define MOUSEKEY_WHEEL_INTERVAL MOUSEKEY_INTERVAL |
| 52 | #define MOUSEKEY_WHEEL_MAX_SPEED MOUSEKEY_MAX_SPEED | ||
| 53 | #define MOUSEKEY_WHEEL_TIME_TO_MAX MOUSEKEY_TIME_TO_MAX | ||
| 52 | 54 | ||
| 53 | #define DEBOUNCE 30 | 55 | #define DEBOUNCE 30 |
| 54 | 56 | ||
diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 49f690fa7..8d3790088 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c | |||
| @@ -398,3 +398,54 @@ void eeconfig_init_kb(void) { // EEPROM is getting reset! | |||
| 398 | eeconfig_update_kb(keyboard_config.raw); | 398 | eeconfig_update_kb(keyboard_config.raw); |
| 399 | eeconfig_init_user(); | 399 | eeconfig_init_user(); |
| 400 | } | 400 | } |
| 401 | |||
| 402 | #ifdef ORYX_ENABLE | ||
| 403 | static uint16_t loops = 0; | ||
| 404 | static bool is_on = false; | ||
| 405 | #endif | ||
| 406 | |||
| 407 | #ifdef DYNAMIC_MACRO_ENABLE | ||
| 408 | static bool is_dynamic_recording = false; | ||
| 409 | static uint16_t dynamic_loop_timer; | ||
| 410 | |||
| 411 | void dynamic_macro_record_start_user(void) { | ||
| 412 | is_dynamic_recording = true; | ||
| 413 | dynamic_loop_timer = timer_read(); | ||
| 414 | ergodox_right_led_1_on(); | ||
| 415 | } | ||
| 416 | |||
| 417 | void dynamic_macro_record_end_user(int8_t direction) { | ||
| 418 | is_dynamic_recording = false; | ||
| 419 | layer_state_set_user(layer_state); | ||
| 420 | } | ||
| 421 | #endif | ||
| 422 | |||
| 423 | void matrix_scan_kb(void) { | ||
| 424 | #ifdef DYNAMIC_MACRO_ENABLE | ||
| 425 | if (is_dynamic_recording) { | ||
| 426 | ergodox_right_led_1_off(); | ||
| 427 | // if (timer_elapsed(dynamic_loop_timer) > 5) | ||
| 428 | { | ||
| 429 | static uint8_t counter; | ||
| 430 | counter++; | ||
| 431 | if (counter > 100) ergodox_right_led_1_on(); | ||
| 432 | dynamic_loop_timer = timer_read(); | ||
| 433 | } | ||
| 434 | } | ||
| 435 | #endif | ||
| 436 | |||
| 437 | #ifdef CAPS_LOCK_STATUS | ||
| 438 | led_t led_state = host_keyboard_led_state(); | ||
| 439 | if(led_state.caps_lock) { | ||
| 440 | ergodox_right_led_3_on(); | ||
| 441 | } | ||
| 442 | else { | ||
| 443 | uint8_t layer = get_highest_layer(layer_state); | ||
| 444 | if(layer != 1) { | ||
| 445 | ergodox_right_led_3_off(); | ||
| 446 | } | ||
| 447 | } | ||
| 448 | #endif | ||
| 449 | |||
| 450 | matrix_scan_user(); | ||
| 451 | } | ||
diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index 7bb271714..7243a6a18 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h | |||
| @@ -292,3 +292,25 @@ extern keyboard_config_t keyboard_config; | |||
| 292 | { R05, R15, R25, R35, R45, R55 }, \ | 292 | { R05, R15, R25, R35, R45, R55 }, \ |
| 293 | { R06, R16, R26, R36, R46, KC_NO } \ | 293 | { R06, R16, R26, R36, R46, KC_NO } \ |
| 294 | } | 294 | } |
| 295 | |||
| 296 | /* ---- LEFT HAND ---- ---- RIGHT HAND ---- */ | ||
| 297 | #define LED_LAYOUT_ergodox_pretty( \ | ||
| 298 | L01,L02,L03,L04,L05, R01,R02,R03,R04,R05, \ | ||
| 299 | L11,L12,L13,L14,L15, R11,R12,R13,R14,R15, \ | ||
| 300 | L21,L22,L23,L24,L25, R21,R22,R23,R24,R25, \ | ||
| 301 | L31,L32,L33,L34,L35, R31,R32,R33,R34,R35, \ | ||
| 302 | L41,L42,L43,L44, R42,R43,R44,R45 ) \ | ||
| 303 | \ | ||
| 304 | /* matrix positions */ \ | ||
| 305 | { R01, R02, R03, R04, R05, \ | ||
| 306 | R11, R12, R13, R14, R15, \ | ||
| 307 | R21, R22, R23, R24, R25, \ | ||
| 308 | R31, R32, R33, R34, R35, \ | ||
| 309 | R42, R43, R44, R45, \ | ||
| 310 | \ | ||
| 311 | L05, L04, L03, L02, L01, \ | ||
| 312 | L15, L14, L13, L12, L11, \ | ||
| 313 | L25, L24, L23, L22, L21, \ | ||
| 314 | L35, L34, L33, L32, L31, \ | ||
| 315 | L44, L43, L42, L41 \ | ||
| 316 | } | ||
diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index e64805392..1b4ace5ee 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk | |||
| @@ -12,15 +12,15 @@ BOOTLOADER = halfkay | |||
| 12 | # Build Options | 12 | # Build Options |
| 13 | # change yes to no to disable | 13 | # change yes to no to disable |
| 14 | # | 14 | # |
| 15 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | 15 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite |
| 16 | MOUSEKEY_ENABLE = yes # Mouse keys | 16 | MOUSEKEY_ENABLE = yes # Mouse keys |
| 17 | EXTRAKEY_ENABLE = yes # Audio control and System control | 17 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 18 | CONSOLE_ENABLE = no # Console for debug | 18 | CONSOLE_ENABLE = no # Console for debug |
| 19 | COMMAND_ENABLE = yes # Commands for debug and configuration | 19 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 20 | CUSTOM_MATRIX = lite # Custom matrix file for the ErgoDox EZ | 20 | CUSTOM_MATRIX = lite # Custom matrix file for the ErgoDox EZ |
| 21 | NKRO_ENABLE = yes # Enable N-Key Rollover | 21 | NKRO_ENABLE = yes # Enable N-Key Rollover |
| 22 | UNICODE_ENABLE = yes # Unicode | 22 | UNICODE_ENABLE = no # Unicode |
| 23 | SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard | 23 | SWAP_HANDS_ENABLE= no # Allow swapping hands of keyboard |
| 24 | 24 | ||
| 25 | RGB_MATRIX_ENABLE = no # enable later | 25 | RGB_MATRIX_ENABLE = no # enable later |
| 26 | RGB_MATRIX_DRIVER = IS31FL3731 | 26 | RGB_MATRIX_DRIVER = IS31FL3731 |
| @@ -36,3 +36,5 @@ LAYOUTS = ergodox | |||
| 36 | # Disable unsupported hardware | 36 | # Disable unsupported hardware |
| 37 | AUDIO_SUPPORTED = no | 37 | AUDIO_SUPPORTED = no |
| 38 | BACKLIGHT_SUPPORTED = no | 38 | BACKLIGHT_SUPPORTED = no |
| 39 | |||
| 40 | MOUSE_SHARED_EP = no | ||
