I am also having trouble with the keymap file.
In the online docs, the keycodes for power and volume buttons are 26, 24, 25. Volume buttons do show up when using a key tester, but not the power button, which probably gives code 26.
Now, the Generic.kl file has completely different keycodes, but changing the power & sleep codes, ie. changing all SLEEP codes to POWER and vice-versa makes a difference in power button behavior, even though the map has different assignments for key 26. Key 26 itself is assigned to LEFT_BRACKET.
So yeah, if anyone who knows about this could give some help, it would be very useful, because I am really confused.