Skip to contentSkip to conversation

Keyboard/case power button events

DISCUSSION Yuri DElia 1 participant 1 message Sep 6, 2011 ACPI

lore
Share & tools
lore

Yuri DElia

author
#0 lore raw

Hi everyone,

I have a small but stupid issue on how the "power" (poweroff) event is generated. Both the real power button (as in acpi/button.c) and the power button in the keyboard (those with "media" keys) generate the same indistinguishable event.

This is the event I get with both:

button/power PBTN 00000080 00000000

As a result, I cannot remap the keyboard event without also disabling the handler for the real power button. I obviously want both.

Can I assign a different code, or string, or whatever (as long as I can match it in userland) to either the real or keyboard button to distinguish the two?

Any help would be greatly appreciated.