aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar tmk <nobody@nowhere>2013-11-02 03:10:49 +0900
committerGravatar tmk <nobody@nowhere>2013-11-02 04:30:08 +0900
commit676d94d13791a99751cebf724fd5a56b150f344d (patch)
tree5e931d0fbbf3c51272ba80703cd6c58e76c95993 /common
parent1591764cfbc39e73c6f32e9b805d596379866ff0 (diff)
downloadqmk_firmware-676d94d13791a99751cebf724fd5a56b150f344d.tar.gz
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/>.
#include "sendchar.h"
#include "bootmagic.h"
#include "eeconfig.h"
-#include "mousekey.h"
#include "backlight.h"
+#ifdef MOUSEKEY_ENABLE
+# include "mousekey.h"
+#endif
+#ifdef PS2_MOUSE_ENABLE
+# include "ps2_mouse.h"
+#endif
#ifdef MATRIX_HAS_GHOST
@@ -111,10 +116,18 @@ void keyboard_task(void)
action_exec(TICK);
MATRIX_LOOP_END:
+
#ifdef MOUSEKEY_ENABLE
// mousekey repeat & acceleration
mousekey_task();
#endif
+
+#ifdef PS2_MOUSE_ENABLE
+ if (ps2_mouse_read() == 0) {
+ ps2_mouse_usb_send();
+ }
+#endif
+
// update LED
if (led_status != host_keyboard_leds()) {
led_status = host_keyboard_leds();