From 8450be21aa210efb73db7971bb8f74d99e8fad0d Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 4 Mar 2014 14:14:20 -0500 Subject: [PATCH] Add a "jump" mouse warp --- ArduinoKeyboard.ino | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ArduinoKeyboard.ino b/ArduinoKeyboard.ino index ccb7ac29..354db2e6 100644 --- a/ArduinoKeyboard.ino +++ b/ArduinoKeyboard.ino @@ -354,6 +354,12 @@ void _warp_cross(long left, long top, long height, long width) { _draw_warp_section(right, y_center, x_center, y_center,40); } +void _warp_jump(long left, long top, long height, long width) { + long x_center = left + width/2; + long y_center = top + height/2; + Mouse.moveAbsolute(x_center,y_center); +} + int last_x; @@ -457,9 +463,9 @@ void warp_mouse(Key ninth) { // the cloverleaf - _warp_cross(section_left, section_top, next_height,next_width); - +// _warp_cross(section_left, section_top, next_height,next_width); + _warp_jump(section_left, section_top, next_height,next_width); }