I have a (seemingly rather exotic) Dell Latitude XT2 notebook running Lubuntu 12.04, fresh install.
Tried to get the power button to work as expected (opening lubuntu-logout, just as I think it was meant to be out-of-the box), but no success: power button does nothing but forced power-off on long press.
Here some more information, please ask if something more could help:
Power button is recognized as a device: xinput lists Power Button as a slave keyboard at /dev/input/event1, and I can run a tool to listen to that device and invoke some action (successfully).
But using .config/openbox/lubuntu-rc.xml to assign some action to XF86ShutDown or XF86PowerOff does nothing. Works well for any key of the keyboard.
xinput --test reports a keycode (key press, key release) of 124 when pressing & releasing the power button.
xmodmap -pk lists 124 mapped to XF86PowerOff which seems correct to me (btw: is this the same as XF86ShutDown?)
When assigning another keysymname to the 124 keycode, e.g. 'w', still nothing happens when pressing the power button (no window seems to receive a 'w'). Works well for any key on the keyboard.
The outputs of xev for a press/release of the power button irritate me:
MappingNotify event, serial 41, synthetic NO, window 0x0,
request MappingKeyboard, first_keycode 8, count 248
FocusOut event, serial 41, synthetic NO, window 0x2a00001,
mode NotifyGrab, detail NotifyAncestor
FocusIn event, serial 41, synthetic NO, window 0x2a00001,
mode NotifyUngrab, detail NotifyAncestor
KeymapNotify event, serial 41, synthetic NO, window 0x0,
keys: 93 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(instead of 93, I also get different values)
I might have missed something very basic since I'm not very familiar with both openbox/lubuntu and the X input system.
Btw.: same goes for three other special buttons on my laptop..