summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2017-04-10 08:51:00 +0200
committerFred Sundvik <fsundvik@gmail.com>2017-04-13 15:00:29 +0200
commit737c1fe641dd018c9f8a0e333480825d6337ddd1 (patch)
tree1bcf707984ab75ef804d0661cd7cdf0f054dfcbf
parentbbe8876c8df3d37c7fd2b85bd2ef9a1a60ad5fe1 (diff)
downloadqmk_firmware-737c1fe641dd018c9f8a0e333480825d6337ddd1.tar.gz
qmk_firmware-737c1fe641dd018c9f8a0e333480825d6337ddd1.tar.xz
Make MOUSEKEY_MOVE_MAX and MOUSEKEY_WHEEL_MAX configurable
Kitten_paw/ickerwx was doing that
-rw-r--r--tmk_core/common/mousekey.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/tmk_core/common/mousekey.h b/tmk_core/common/mousekey.h
index 6eede06b4..9338d0af7 100644
--- a/tmk_core/common/mousekey.h
+++ b/tmk_core/common/mousekey.h
@@ -23,8 +23,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* max value on report descriptor */
-#define MOUSEKEY_MOVE_MAX 127
-#define MOUSEKEY_WHEEL_MAX 127
+#ifndef MOUSEKEY_MOVE_MAX
+ #define MOUSEKEY_MOVE_MAX 127
+#elif MOUSEKEY_MOVE_MAX > 127
+ #error MOUSEKEY_MOVE_MAX needs to be smaller than 127
+#endif
+
+#ifndef MOUSEKEY_WHEEL_MAX
+ #define MOUSEKEY_WHEEL_MAX 127
+#elif MOUSEKEY_WHEEL_MAX > 127
+ #error MOUSEKEY_WHEEL_MAX needs to be smaller than 127
+#endif
#ifndef MOUSEKEY_MOVE_DELTA
#define MOUSEKEY_MOVE_DELTA 5