Commit d1831727 authored by Trent Whaley's avatar Trent Whaley Committed by Greg Kroah-Hartman

[PATCH] USB: kbtab.c (Jamstudio Tablet) with optional pressure

I have altered kbtab.c a bit in anticipation of an XFree86 4.3 driver
that can accept the pressure data (as a third axis) by listening on the
event interface.

I have set it so that if the option kb_pressure_click is -1 it  reports
pressure rather than clicks.
parent ae345672
......@@ -74,12 +74,15 @@ static void kbtab_irq(struct urb *urb, struct pt_regs *regs)
input_report_abs(dev, ABS_X, kbtab->x);
input_report_abs(dev, ABS_Y, kbtab->y);
/*input_report_abs(dev, ABS_PRESSURE, kbtab->pressure);*/
/*input_report_key(dev, BTN_TOUCH , data[0] & 0x01);*/
input_report_key(dev, BTN_RIGHT, data[0] & 0x02);
input_report_key(dev, BTN_LEFT, (kbtab->pressure > kb_pressure_click) ? 1 : 0);
if( -1 == kb_pressure_click){
input_report_abs(dev, ABS_PRESSURE, kbtab->pressure);
} else {
input_report_key(dev, BTN_LEFT, (kbtab->pressure > kb_pressure_click) ? 1 : 0);
};
input_sync(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment