> Maybe that's a good opportunity to suggest to add the fnkeys tool, as well. > Unfortunately, that app doesn't exist yet :o(. > A while ago, I was asking for a way to switch the setting of the F[1-12] > keys combined with the Fn-key on the powerbook in Linux > (default F-keys <-> default backlight control etc.) > > BenH brought up some information on the register settings involved, and > I tried to modify trackpad.c following his suggestions, but I'm afraid I > don't really understand which registers trackpad is reading/writing.
Trackpad locates the trackpad device first by reading register 1 from each device present, and looks for some specific signature (0x74 0x70 0x61 0x64). The device mode is then set by writing the proper magic bytes to register 2 of the device found (my extension lets you also read back the current device state, by reading register 2). > > If you write 0xc6 0x01 to register 1 of the keyboard, the Fx keys will be > > real function keys by default and Fn will trigger the control buttons. > > Write 0xc6 00 to revert the behaviour to default. Sounds easy enough. You just need to figure out what the usual response to a read register 1 command is for a keyboard. It seems the kernel recognizes keyboards by means of the handler ID (byte 2 in register 3) rather than by using the register 1 contents. See technote HW01 'space aliens ate my mouse' for details. Michael