From 91c417b35ed6e63b2f3bc5dd1b60e0cc0d48c5d6 Mon Sep 17 00:00:00 2001 From: Jarrad Whitaker Date: Fri, 27 Nov 2015 23:58:38 +1100 Subject: [PATCH] add stylus-in-range explanation to documentation --- doc/protocol.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/protocol.txt b/doc/protocol.txt index c051fb3..dee74ae 100644 --- a/doc/protocol.txt +++ b/doc/protocol.txt @@ -29,3 +29,12 @@ Packet structure, uses network byte order (big endian): 0 button is released ("up") 1 button is pressed ("down") +XInput will ignore BTN_TOUCH events if they are not preceeded by +a BTN_TOOL_PEN event -- this would never happen for a real stylus, +because it would imply the stylus is touching the pad, yet too far +away from the pad to be detected. + +A GfxTablet client must therefore be careful to send a "Button -1 +down" event before a "Button 0 down" event, to emulate this +behaviour. If they are faking these events, they'll probably want +to likewise send a "Button -1 up" event after a "Button 0 up" event.