aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-11-02 03:10:49 +0900
committertmk <nobody@nowhere>2013-11-02 04:30:08 +0900
commit676d94d13791a99751cebf724fd5a56b150f344d (patch)
tree5e931d0fbbf3c51272ba80703cd6c58e76c95993 /common
parent1591764cfbc39e73c6f32e9b805d596379866ff0 (diff)
downloadqmk_firmware-676d94d13791a99751cebf724fd5a56b150f344d.tar.gz
qmk_firmware-676d94d13791a99751cebf724fd5a56b150f344d.zip
Fix PS/2 mouse support
Diffstat (limited to 'common')
-rw-r--r--common/keyboard.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/common/keyboard.c b/common/keyboard.c
index 601e3abe1..63a58b218 100644
--- a/common/keyboard.c
+++ b/common/keyboard.c
@@ -30,8 +30,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30#include "sendchar.h" 30#include "sendchar.h"
31#include "bootmagic.h" 31#include "bootmagic.h"
32#include "eeconfig.h" 32#include "eeconfig.h"
33#include "mousekey.h"
34#include "backlight.h" 33#include "backlight.h"
34#ifdef MOUSEKEY_ENABLE
35# include "mousekey.h"
36#endif
37#ifdef PS2_MOUSE_ENABLE
38# include "ps2_mouse.h"
39#endif
35 40
36 41
37#ifdef MATRIX_HAS_GHOST 42#ifdef MATRIX_HAS_GHOST
@@ -111,10 +116,18 @@ void keyboard_task(void)
111 action_exec(TICK); 116 action_exec(TICK);
112 117
113MATRIX_LOOP_END: 118MATRIX_LOOP_END:
119
114#ifdef MOUSEKEY_ENABLE 120#ifdef MOUSEKEY_ENABLE
115 // mousekey repeat & acceleration 121 // mousekey repeat & acceleration
116 mousekey_task(); 122 mousekey_task();
117#endif 123#endif
124
125#ifdef PS2_MOUSE_ENABLE
126 if (ps2_mouse_read() == 0) {
127 ps2_mouse_usb_send();
128 }
129#endif
130
118 // update LED 131 // update LED
119 if (led_status != host_keyboard_leds()) { 132 if (led_status != host_keyboard_leds()) {
120 led_status = host_keyboard_leds(); 133 led_status = host_keyboard_leds();