Keymap issues with Pointer+Keys device
saschahlusiak at arcor.de
Mon Sep 15 10:59:16 PDT 2008
> > Should the driver rather create two devices, one for pointer and one for
> > keys?
> Creating two devices is the simplest and most effective solution for now.
Is there a _simple_ way to add two devices? Because with HAL it seems not
possible to hotplug two drivers for one device, I implemented a way that the
first device adds a second device (basically ripped this out of the old evdev
driver, with the evdev-brain). While it really seems to work fine with MPX
now, I still cannot sleep at nights. Please give it your blessing.
Basically it's like this:
1) In PreInit of the official device:
- xf86AllocateInput, fill out a second device struct and save it for later.
Duplicate the IDevPtr struct for that, otherwise pointers/optionlists are
2) In DEVICE_INIT of official device:
- Call xf86ActivateDevice for the slave device.
- Set dev->inited = device_control(dev, DEVICE_INIT) manually.
- Call xf86EnableDevice(dev);
3) In UnInit of official device:
- Call xf86DisableDevice(dev, TRUE);
Here, "panic" set to TRUE doesn't seem so right but it's the only way I found
to totally remove a device.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 197 bytes
Desc: This is a digitally signed message part.
More information about the xorg