On Mon, Jan 12, 2009 at 11:19:20PM +0300, Michael Tokarev wrote: > [Repost for: > Message-ID: <48FF9737.5050207@xxxxxxxxxxxxxxxx> > Date: Thu, 23 Oct 2008 01:12:23 +0400 > To: linux-kernel@xxxxxxxxxxxxxxx, > which is a repost of earlier message with similar > content/question, both went unanswered] > > Hello. > > Similar question has been asked already by me in the past, > regarding "conversions" of ACPI button events to "keyboard > events". The talk is about how one is supposed to handle > various "common" "meta-buttons" like Power, Sleep, and so > on. > > Before, there was /proc/acpi/event and /etc/acpid/* stuff, > and it was easy (but somewhat clumsy) to act to system power > down button. But the "proper way" now is to handle > /dev/input/event* interface, because such "Power" button can > be on a keyboard, on a remote control, and so on. I understand > the idea, and I like it. > > But now the question. How one supposed to find all the devices > which generate such events? I mean not about scanning the /dev > directory, which can be done once at startup, but about REscanning > it to find which NEW keyboards and the like appeared since last > (re)scan and which were removed. > You can either listen to hotplug events or poll (select) /proc/bus/input/devices - waiters are woken up every time we add or remove a new input device or a new input handler. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html