Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!wuarchive!emory!gatech!bloom-beacon!deccrl!news.crl.dec.com!pa.dec.com!shlump.nac.dec.com!epik.enet.dec.com!p_davis From: p_davis@epik.enet.dec.com (Peter Davis) Newsgroups: comp.windows.x Subject: Substituting tablet for mouse Message-ID: <17891@shlump.nac.dec.com> Date: 6 Dec 90 16:04:58 GMT Sender: newsdaemon@shlump.nac.dec.com Organization: Digital Equipment Corporation Lines: 27 I'd like to be able to use a tablet with a pressure-sensitive stylus in place of a mouse on my workstation. Somebody told me that the easiest way to do this was to write a driver which packages up the tablet input in the form of a mouse event, and then sends that packet to the Xserver. I want to event to propagate through all the layers of server, window manager, toolkit, etc. so that the tablet behaves normally for other windows, menus, etc. Can anyone tell me: - how to send an event packet to the server, so that it will propagate through all the other layers? I know XSendEvent will send it to another window, but that's not the same. - if I can cram the stylus pressure into the high two bytes of the 'state' field in the motion event structure? The Xlib manual shows this field as being unsigned int, and the most of the low order 16 bits are defined as various button and modifier key masks. Can I I use the high 16 bits for pressure? My goal is to have the tablet and stylus behave just like a mouse for all unwitting applications, but to make it possible for my applications to look for the pressure information in the event structure, and use that. Thanks for any and all help. -pd