map fn+f12 key to acpi call

map fn+f12 key to acpi call

Post by Miguel De » Thu, 05 Jan 2006 12:59:50


I've managed to get acpi to call a script (actually was pretty much
automatic after recompiling kernel). Anyway, its not catching the laptops
suspend key (fn+f12).

Dec 16 06:48:09 msi kernel: ACPI: RSDP (v000
MSI ) @ 0x000f8360
Dec 16 06:48:09 msi kernel: ACPI: RSDT (v001 MSI 1013 0x09262005 MSFT
0x00000097) @ 0x0bf40000
Dec 16 06:48:09 msi kernel: ACPI: FADT (v002 MSI 1013 0x09262005 MSFT
0x00000097) @ 0x0bf40200
Dec 16 06:48:09 msi kernel: ACPI: MADT (v001 MSI OEMAPIC 0x09262005 MSFT
0x00000097) @ 0x0bf40300
Dec 16 06:48:09 msi kernel: ACPI: WDRT (v001 MSI MSI_OEM 0x09262005 MSFT
0x00000097) @ 0x0bf40360
Dec 16 06:48:09 msi kernel: ACPI: MCFG (v001 MSI OEMMCFG 0x09262005 MSFT
0x00000097) @ 0x0bf403b0
Dec 16 06:48:09 msi kernel: ACPI: SSDT (v001 OEM_ID OEMTBLID 0x00000001 INTL
0x02002026) @ 0x0bf435e0
Dec 16 06:48:09 msi kernel: ACPI: OEMB (v001 MSI MSI_OEM 0x09262005 MSFT
0x00000097) @ 0x0bf50040
Dec 16 06:48:09 msi kernel: ACPI: DSDT (v001 MSI 1013 0x09262005 INTL
0x02002026) @ 0x00000000
Dec 16 06:48:09 msi kernel: ACPI: Subsystem revision 20040326
Dec 16 06:48:09 msi kernel: ACPI: Interpreter enabled
Dec 16 06:48:09 msi kernel: ACPI: Using PIC for interrupt routing
Dec 16 06:48:09 msi kernel: ACPI: System [ACPI] (supports S0 S1 S3 S4 S5)
Dec 16 06:48:09 msi kernel: ACPI: PCI Root Bridge [PCI0] (00:00)
Dec 16 06:48:09 msi kernel: ACPI: Embedded Controller [EC] (gpe 6)
Dec 16 06:48:09 msi kernel: PCI: Using ACPI for IRQ routing
Dec 16 06:48:09 msi kernel: ACPI: AC Adapter [ADP1] (on-line)
Dec 16 06:48:09 msi kernel: ACPI: Battery Slot [BAT1] (battery present)
Dec 16 06:48:09 msi kernel: ACPI: Power Button (FF) [PWRF]
Dec 16 06:48:09 msi kernel: ACPI: Lid Switch [LID0]
Dec 16 06:48:09 msi kernel: ACPI: Sleep Button (CM) [SLPB]
Dec 16 06:48:09 msi kernel: ACPI: Processor [CPU1] (supports C1 C2 C3)
Dec 16 06:48:09 msi kernel: ACPI: Thermal Zone [THRM] (60 C)
Dec 16 07:08:59 msi logger: ACPI action lid is not defined
Dec 16 07:09:12 msi logger: ACPI action lid is not defined

It seems to support the sleep button but it doesn't log itself to the
logger. The acpi script is only handling the power button.

I got a message from dmesg telling me to use setkeycodes to make keys known
but it seems like the dim/brighten and email/explorer/search/wireless keys
trigger it and possibly not the sleep button.

If the sleep button does trigger it, is there a way to use setkeycodes to
somehow trigger a script?




Also, how do I use setkeycodes to map to some useful buttons that kde can
recognize? My usb keyboard seems to trigger some proper events that X11
recognizes (logout key, search key, back/forward, etc).

It seems that the volume up/down/mute buttons don't trigger this log
message, could it be they they are recognized and don't need setkeys, but
are just not printing anything to the console and kde doesn't recognize it?

--just did xev and volume keys trigger keycodes: 174, 176, 160, respectively
and sleep triggers 223. What do I do with this? I suspect it might have
something to do with X11's keyboard layout, but I can't seem to find a list
of keyboards I can use. (desktop uses mx2750 even thought its some higher
model 3xxx).

Thanks.
 
 
 

map fn+f12 key to acpi call

Post by Miguel De » Thu, 05 Jan 2006 13:17:53


[snip]

Wow, I just finished a wild scavenger hunt. I somehow found that xmodmap can
be used to map to recognized keys. I then used a clue given by an erroneous
xmodmap command that keysym is important. An slocate for keysym give me a
bunch of junk. Read though one of the cpp files and it mentioned some
KeysymDB, looked at that file. That had a list of valid mappings. Wow. Now
I guess I can just do a sudo or something to run the sleep script. Is there
an easier/better way?

If not for sleep, it at least helped me figure out how to get volume
controls and hotkeys to function properly.