2012/3/19 Chase Douglas <chasedouglas@xxxxxxxxx>: > On 03/18/2012 11:39 PM, Henrik Rydberg wrote: >>> The proper way to send events through evdev when there are two different >>> "tools" (pen and touch) is to use BTN_TOOL_*. In your example above, it >>> would be: >>> >>> # finger touch (Note lack of tool, it's assumed to be finger) >>> ABS_MT_SLOT 0 >>> ABS_MT_TRACKING_ID 42 >>> ABS_MT_POSITION_X finger_x >>> ABS_MT_POSITION_Y finger_y >>> SYN_MT_REPORT >>> ABS_X finger_x >>> ABS_Y finger_y >>> SYN_REPORT >>> # finger release >>> ABS_MT_SLOT 0 >>> ABS_MT_TRACKING_ID -1 >>> SYN_REPORT >>> # pen motion >>> BTN_TOOL_PEN 1 >>> ABS_X pen_x >>> ABS_Y pen_y >>> SYN_REPORT >>> # finger touch begin >>> ABS_MT_SLOT 0 >>> ABS_MT_TRACKING_ID 42 >>> ABS_MT_POSITION_X finger_x >>> ABS_MT_POSITION_Y finger_y >>> SYN_MT_REPORT >>> BTN_TOOL_PEN 0 >>> ABS_X finger_x >>> ABS_Y finger_y >>> SYN_REPORT >>> etc. >>> >>> Then, xf86-input-evdev ignores ABS_{X,Y} events when there is no >>> BTN_TOOL_* active. >> >> On the subject how pen and touch could work going forward, the MT >> protocol is prepared to deal with tool type per slot. It makes a lot >> of sense to move away from the above example, towards a fully parallel >> representation of pen and touch data. Today's multitouch interfaces >> are really tremendously restrictive; I am looking forward to the day >> when one does not need to worry about touching or resting on a surface >> in order to operate it. >> >> In short, why not make xf86-input-evdev aware of MT_TOOL_TYPE? > > There's no reason it can't be made aware. The question is whether you > want to create separate X input devices, or annotate events with the > tool type. No one has really bothered looking into it outside of wacom > devices, but my understanding is that wacom is a big special cased > situation due to historical reasons anyway. > > If we merely annotate events by setting valuator values, that's a > trivial change that may even be already supported out of the box. > Splitting the evdev device into multiple X input devices is also > possible, since xf86-input-wacom does it, but would require a large > refactoring of xf86-input-evdev. > FWIW, non-wacom pen+touch devices should work with current xf86-input-wacom if they use above events. You will get split devices as long as you modify xorg.conf.d to route this input. MT events will be treated roughly like xf86-input-synaptics would treat DOUBLETAP though (internal 1 and 2 finger gesture support only). My plan is to take your xf86-input-evdev/synaptics X Input 2.2 work and merge it into xf86-input-wacom soon to benefit from those improvements. In addition to Wacom MT hardware, I try to occasionally test xf86-input-wacom with a hid-multitouch touchscreen to verify it isn't needlessly wacom specific. Having said that, I think its good to improve multi-tool support in xf86-input-evdev in parallel to the multi-touch improvements. In addition, xf86-input-evdev would be a much better base to start experimenting with annotating events. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html