[PD] key and keyup question
Simon Wise
simonzwise at gmail.com
Mon Jul 13 05:26:15 CEST 2009
> that behaviour comes from the OS, those objects listen to the events
> that are sent to pd from the X server, not to the raw USB events that
> [hidio] uses. To fix your problem you have change the key repeat
> preferences on whatever OS you are using. You may also find you have
> issues with which window is in focus - to receive the events the
> appropriate pd window must be in focus.
It took me a little while to work this out, so I'll share this in case
anyone is looking at similar problems, and wants to control exactly what
inputs are used by X and when, so they can use keyboards, mice, tablets
etc as controls in pd without also controlling the pointer etc ...
A month or two ago Debian Sid moved to the new version of Xorg [some of
the other distributions moved over earlier] and this has meant huge
changes to the way input devices are dealt with, and now HAL is the
primary way that X gets info about accessing devices. It is now possible
to have a nearly empty xorg.conf, or even no xorg.conf at all. It is
also possible to stick with the old style of configuration if you wish,
but you will have to add a couple of extra lines to your old xorg.conf
if this is what you want.
This article is well worth reading to find out more:
http://wiki.debian.org/XStrikeForce/InputHotplugGuide
It seems that the HAL way of doing things, using it's configuration
files, is a lot more flexible and much more hot-pluggable than the old
way, but uses a completely different set of configuration files.
I have been wondering how hard it would be to make [hidio] into
something that works through HAL, maybe called [halio], to be able to
access many devices that register with HAL instead of just USB devices,
but to stick with a very similar interface to [hidio], and preferably
stay compatible for usb-hid devices?? It would of course be Linux only
because HAL is a purely Linux way of doing things.
That would be a very long-term learning exercise for me, with no results
for some time, if at all - but the results would be great!
Some other commands you may want to look at for more tricks, all
extremely easy to set up in Debian, then usable in pd with a few scripts
and [shell] (or maybe use pdreceive in a pipe?) are the ones that create
X events - so that you can create mouse and keyboard events, moving the
windows of other apps around and sending keystrokes, mouse events, text
selections and more - try out these packages ...
xdotool xautomation xsel
plus these utilities from x11-utils to help: xev xwininfo xprop
Simon
More information about the Pd-list
mailing list