Add support for mousewheel

This commit is contained in:
Iwan Timmer
2014-09-13 23:24:00 +02:00
parent 8fdf4c7260
commit 693829616c
2 changed files with 4 additions and 1 deletions

View File

@@ -137,6 +137,7 @@ public class EvdevConstants {
/* Mouse constants */
public static final short REL_X = 0x00;
public static final short REL_Y = 0x01;
public static final short REL_WHEEL = 0x08;
public static final short BTN_LEFT = 0x110;
public static final short BTN_RIGHT = 0x111;

View File

@@ -136,7 +136,9 @@ public class EvdevHandler extends EvdevReader {
conn.sendMouseMove((short) value, (short) 0);
else if (code==EvdevConstants.REL_Y)
conn.sendMouseMove((short) 0, (short) value);
else if (code==EvdevConstants.REL_WHEEL)
conn.sendMouseScroll((byte) value);
mapped = false;
} else if (type==EvdevConstants.EV_ABS) {
if (code==mapping.abs_x)