[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Detecting a "stylus based" system, for sgt-puzzles



Hi there,

This is my first post to this list, so I should introduce myself.  I
have a GTA04 device, and am particularly interested in running Debian on
it.  I prefer to build up a system from components, rather than adopting
a complete ready-made "image", and hence I'm interested in finding, and
helping to create more, Debian components that are suitable for running,
direct from the archive, on mobile devices.

More specifically, I'd like your help regarding how to automatically
detect when a system is "stylus based".  The source code of the
sgt-puzzles package has a STYLUS_BASED #ifdef in it, which is perfect
for a phone like device with no keyboard and with no easy emulation of
middle or right mouse buttons.  But it is not currently #defined in the
Debian build, and clearly can't be (unconditionally) because that
wouldn't be the right thing for other computers.

I think the right thing would be to detect at runtime whether the X
server indicates (i) a real keyboard, and (ii) middle and right mouse
buttons, but I'm not sure yet, and I don't yet know the correct way to
detect those things on a Debian system.

Alternatively, if that kind of autodetection isn't straightforward, we
could just implement a command line switch.

If you can advise on those points, please do!  Once it's clear what a
good solution is, I'm happy to work on code changes and submit them
upstream.

Many thanks,
     Neil


Reply to: