On Tue, 2006-09-26 at 19:23 +0200, Mika Fischer wrote: > Marvin Raaijmakers wrote: > > On Mon, 2006-09-25 at 20:52 +0200, Mika Fischer wrote: > >> But please note that what you want already exists. Take a look at acpid > >> and acpi_fakekey. It is included in the acpi-support package. You may > >> also want to take a look at the scripts in /etc/acpi/ to see how it's > >> used. > > No it doens't exist yet, because acpi_hotkey is an X CLIENT that > > simulates key press events using the XTest extension (or does it by the > > XSendEvent function). So this solution will only work when the X server > > and the machine running the X clients, run on the same machine. > > Acpi_fakekey will neither work when more than two persons are running an > > X session, because 1 ACPI event will cause 2 simulated key event (1 for > > each user). > > So my solution would be that an event device will be created > > in /dev/input/ and for each acpi hotkey event, a key press event will be > > written to that device. In other words: the X server will be able to use > > an InputDevice for the ACPI hotkeys. > > Sorry but that is not true. Please download the acpi-support package (from > edgy!) and look at what acpi_fakekey.c does (it's only 64 lines of C). You > will see that it has nothing at all to do with X.
Ow, sorry for saying that. I that case it is a very usefull little program. BTW the author forgot to call close(fd) at the end of the main function. > > In fact it does exactly what you want to do with the added bonus that it > does not create a special input device but uses the existing input device > for the keyboard. So the ACPI events trigger fake key events of the real > keyboard. > > Regards, > Mika > > -- laptop-testing-team mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/laptop-testing-team
