Hi all,

I'm wondering whether Awesome is capable of picking up hotplug events
from the X server (like when a keyboard is connected) and passing them
along to the Lua script?

The reason I ask is that since about 2009, Xorg was changed so that a
newly connected input device was not configured automatically, and it
was left up to the window manager to do this.  Since I plug my USB
keyboard into the hub on my monitor, every morning when I switch my
monitor on my keyboard gets hotplugged and Xorg leaves it at the
default autorepeat rate.

Some people have set up udev rules to combat this, but the problem is
that Xorg doesn't appear to set the repeat rate until the first key is
pressed, which is often long after the udev rule has run, making this
solution unworkable.

The official solution[1] is that Xorg now sends events[2] when devices
are added or removed, and the window manager (or a daemon monitoring
events on the root window) is responsible for doing something with this
information, like setting the user's preferred autorepeat rate.

Rather than write my own daemon and having it sit there all the time
just for this, I am wondering whether it is possible for Awesome to
listen out for these events as well, and pass them along to Lua like it
does for other window-related events.  Then I could just create a
function in my configuration file that calls xset to change the
keyboard repeat rate whenever a 'new keyboard' event arrives.

Is this sort of thing feasible for Awesome?

Thanks,
Adam.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=601853
[2] http://who-t.blogspot.com.au/2009/06/xi2-recipies-part-2.html


-- 
To unsubscribe, send mail to [email protected].

Reply via email to