jackhumbert / pinebook-pro-keyboard-updater

A keyboard/touchpad firmware and updater for the Pinebook Pro
80 stars 11 forks source link

Implement fn+esc sleep button functionality #17

Closed aveao closed 4 years ago

aveao commented 4 years ago

This PR implements the Fn+Esc -> sleep combo. Esc has a blue sleep icon printed, and on the non-RE'd firmware, causes the PBP to sleep.

The reason why this leads to the system sleeping even though we send a KC_POWER is because, by default, power action on the built in keyboard is mapped to sleep (KEYBOARD_KEY_70066=sleep) on /etc/udev/hwdb.d/10-usb-kbd.hwdb. This is the on Manjaro ARM, I haven't tested any other distros. Sending KC_POWER and letting udev handle the conversion to sleep is also the behavior of the non-RE'd firmware.

jackhumbert commented 4 years ago

Awesome, thanks!