From c8a121ff5cd4952df5631ffa91f2d701a7a54291 Mon Sep 17 00:00:00 2001 From: jesse Date: Wed, 20 Nov 2013 17:50:21 +0800 Subject: [PATCH] restore basic working keyboard mouse supprt --- ArduinoKeyboard.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ArduinoKeyboard.ino b/ArduinoKeyboard.ino index 10cd0bda..cc7021bc 100644 --- a/ArduinoKeyboard.ino +++ b/ArduinoKeyboard.ino @@ -120,10 +120,10 @@ double mouse_accel (double cycles) return accel; } -void handle_mouse_movement( byte x, byte y) +void handle_mouse_movement( char x, char y) { - if (x!=0 && y!=0) { + if (x!=0 || y!=0) { mouseActiveForCycles++; double accel = (double) mouse_accel(mouseActiveForCycles); float moveX=0; @@ -173,9 +173,9 @@ void send_key_events(byte layer) // TODO:switch to sending raw HID packets - - byte x = 0; - byte y = 0; + // really, these are signed small ints + char x = 0; + char y = 0; for (byte row = 0; row < ROWS; row++) {