ACPI/ThinkPad-special-buttons

Preparation
make sure ACPI is installed To check what names ACPI uses on a specific button, start acpi_listen and press Fn+buttons and see output

Collect those names. Now create an event for each button in /etc/acpi/events, I named them by the location-function, but it's up to you.

Screen Lock button
than create corresponding action for the button in /etc/acpi/actions, in this example

Sleep button
...to be continued