How to enable keyboard power button?
Hi folks :)
Is it possible to turn off the computer (Slackware 13.37 Box) simply using the power button on the keyboard? Thanks... |
You can program any button to do any task in linux/Bash/KDE/whatever. Its called key-bindings. I use alt-control-delete to bring up a password protected xscreensaver.
My keyboard doesn't have a power button, but I'm sure your power button has some identifier that lets it communicate with the system. |
Hi Phys,
It is possible on some laptops through ACPI. Among other things it depends on your hardware and the way ACPI is configured. It works here (Lenovo Thinkpad T61). Please provide the brand / model of your computer, and outputs of 'dmesg|grep Power' and 'lsmod|grep acpi'. |
Thank you Rigelan and Didier Spaier.
Quote:
Quote:
Again thanks for your deal. |
@phys
Is this a laptop? |
Quote:
|
How far have you gotten in figuring this problem out yet?
I know that you would need to figure out what keycode is produced when the power button is pressed. Then you need to put that keycode into your keybindings file (each file is different if you do keybindings for bash / KDE / XFCE / Fluxbox) You need to connect that keybinding with an appropriate command, such as Logout, init 0 (shutdown), suspend-to-ram (sleep), or suspend-to-disk. |
Hi
This command should help you obtain the keycode for that particular button on the keyboard Quote:
Run it in the terminal, push the key and you should have all the info needed to bind the key to the action that you need. |
All times are GMT -5. The time now is 12:14 PM. |