2 Copyright 2011 Jun Wako <wakojun@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 /* max value on report descriptor */
26 #ifndef MOUSEKEY_MOVE_MAX
27 #define MOUSEKEY_MOVE_MAX 127
28 #elif MOUSEKEY_MOVE_MAX > 127
29 #error MOUSEKEY_MOVE_MAX needs to be smaller than 127
32 #ifndef MOUSEKEY_WHEEL_MAX
33 #define MOUSEKEY_WHEEL_MAX 127
34 #elif MOUSEKEY_WHEEL_MAX > 127
35 #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127
38 #ifndef MOUSEKEY_MOVE_DELTA
39 #define MOUSEKEY_MOVE_DELTA 5
41 #ifndef MOUSEKEY_WHEEL_DELTA
42 #define MOUSEKEY_WHEEL_DELTA 1
44 #ifndef MOUSEKEY_DELAY
45 #define MOUSEKEY_DELAY 300
47 #ifndef MOUSEKEY_INTERVAL
48 #define MOUSEKEY_INTERVAL 50
50 #ifndef MOUSEKEY_MAX_SPEED
51 #define MOUSEKEY_MAX_SPEED 10
53 #ifndef MOUSEKEY_TIME_TO_MAX
54 #define MOUSEKEY_TIME_TO_MAX 20
56 #ifndef MOUSEKEY_WHEEL_MAX_SPEED
57 #define MOUSEKEY_WHEEL_MAX_SPEED 8
59 #ifndef MOUSEKEY_WHEEL_TIME_TO_MAX
60 #define MOUSEKEY_WHEEL_TIME_TO_MAX 40
68 extern uint8_t mk_delay;
69 extern uint8_t mk_interval;
70 extern uint8_t mk_max_speed;
71 extern uint8_t mk_time_to_max;
72 extern uint8_t mk_wheel_max_speed;
73 extern uint8_t mk_wheel_time_to_max;
76 void mousekey_task(void);
77 void mousekey_on(uint8_t code);
78 void mousekey_off(uint8_t code);
79 void mousekey_clear(void);
80 void mousekey_send(void);