Skip to content

Commit

Permalink
feature-11 Fix after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
zored committed May 24, 2020
1 parent eca49b6 commit 7dff2c2
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 14 deletions.
6 changes: 3 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ keyboards:
MOUSEKEY_WHEEL_MAX_SPEED: 4
MOUSEKEY_WHEEL_TIME_TO_MAX: 180

ONESHOT_TAP_TOGGLE: 5
ONESHOT_TIMEOUT: 4000
NO_ACTION_FUNCTION: ''
NO_ACTION_MACRO: ''
NO_ACTION_ONESHOT: ''
APP_SWITCH_TIMEOUT: 500
NO_DEBUG: ''
NO_PRINT: ''
ONESHOT_TAP_TOGGLE: 5
ONESHOT_TIMEOUT: 4000
TAPPING_TERM: 110
TAPPING_TERM_TAP_DANCE: 270
UNICODE_SELECTED_MODES: 'UC_OSX, UC_WINC'
Expand Down
1 change: 1 addition & 0 deletions example/ergodox_ez/keymap.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@


#include "ergodox_ez.h"


Expand Down
14 changes: 6 additions & 8 deletions example/planck/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
#undef MOUSEKEY_MAX_SPEED
#define MOUSEKEY_MAX_SPEED 16

#undef MOUSEKEY_SLOW_SPEED
#define MOUSEKEY_SLOW_SPEED 1

#undef MOUSEKEY_FAST_SPEED
#define MOUSEKEY_FAST_SPEED 7

#undef MOUSEKEY_TIME_TO_MAX
#define MOUSEKEY_TIME_TO_MAX 80

Expand All @@ -41,29 +47,21 @@
#undef NO_ACTION_MACRO
#define NO_ACTION_MACRO

<<<<<<< HEAD
#undef APP_SWITCH_TIMEOUT
#define APP_SWITCH_TIMEOUT 500
=======
#undef NO_ACTION_ONESHOT
#define NO_ACTION_ONESHOT
>>>>>>> 4ec22ef... feature-11 Remove useless lights

#undef NO_DEBUG
#define NO_DEBUG

#undef NO_PRINT
#define NO_PRINT

<<<<<<< HEAD
#undef ONESHOT_TAP_TOGGLE
#define ONESHOT_TAP_TOGGLE 5

#undef ONESHOT_TIMEOUT
#define ONESHOT_TIMEOUT 4000

=======
>>>>>>> 4ec22ef... feature-11 Remove useless lights
#undef TAPPING_TERM
#define TAPPING_TERM 110

Expand Down
36 changes: 36 additions & 0 deletions example/planck/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,40 @@ enum do_command {
DO_ONE_SHOT_SHIFT,
DO_PREV_CHANGE, DO_NEXT_CHANGE,
DO_PREV_TAB, DO_NEXT_TAB,
DO_MOUSE_SLOW, DO_MOUSE_FAST,
};




extern uint8_t mk_max_speed;
void mousekey_on(uint8_t code);
void mousekey_off(uint8_t code);
uint8_t mouseSpeed = 1;
void setMouseSpeed(uint8_t newMouseSpeed) {
// Turn off:
if (mouseSpeed == newMouseSpeed || newMouseSpeed == 1) {
mouseSpeed = 1;
mousekey_off(KC_MS_ACCEL2);
mk_max_speed = MOUSEKEY_MAX_SPEED;
return;
}

mouseSpeed = newMouseSpeed;
mousekey_on(KC_MS_ACCEL2); // - make mk_max_speed the real mouse speed.

switch (mouseSpeed) {
case 0:
mk_max_speed = MOUSEKEY_SLOW_SPEED;
break;
case 2:
mk_max_speed = MOUSEKEY_FAST_SPEED;
break;
}
mouseSpeed = newMouseSpeed;

}

// Advanced commands.
void run_advanced (uint8_t command) {
switch (command) {
Expand Down Expand Up @@ -296,6 +326,12 @@ void run_advanced (uint8_t command) {
break;
}
break;
case DO_MOUSE_SLOW:
setMouseSpeed(0);
break;
case DO_MOUSE_FAST:
setMouseSpeed(2);
break;
}
}

Expand Down
3 changes: 0 additions & 3 deletions example/planck/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@ COMMAND_ENABLE = no

CONSOLE_ENABLE = no

<<<<<<< HEAD
DYNAMIC_MACRO_ENABLE = no

EXTRAKEY_ENABLE = yes

=======
>>>>>>> 4ec22ef... feature-11 Remove useless lights
KEY_LOCK_ENABLE = no

LEADER_ENABLE = yes
Expand Down

0 comments on commit 7dff2c2

Please sign in to comment.