How to make special keys run commands without X?
Hello :)
I'm installing Slackware 13.1 on a Samsung N150 netbook and am stuck trying to make the special keys do their normal functions when using a virtual terminal, that is not under X. Under X + Xfce it can be done via Menu->Settings->Keyboard->"Application Shortcuts". In essence the question is how to make a special key (example Fn+Up to increase screen brightness) run a command in the background. EDIT: Changed title and text to make clear that the command should not run in a virtual terminal but while the display is being used for a virtual terminal, that is after Ctrl+Alt+F2 for example. Best Charles |
This page should be helpful. Also see /etc/inputrc and `man 3 readline` for more information. If you use screen you can always configure keybindings there as well.
|
Thanks T3slider :)
Thinking this through some more it's a hardware-level requirement. Ideally it would work at a virtual terminal even before login. Maybe it is not possible because all (?) keystrokes are intercepted by the login process that replaces the getty-type process but Linux is very flexible and powerful so I still have some hope. Perhaps keystrokes are passed to the login process via the kernel or perhaps there is a hardware event in hal land ... |
Fn keys are usually controlled through acpi events if the hardware doesn't do it alone.
Check out /etc/acpi/acpi_handler.sh |
Quote:
It looks as if Fn+<whatever> does not create ACPI events. In the default installation, the /etc/acpi/events directory has a single file, defaults, which looks as if it simply passes all events to acpi_handler.sh: Code:
root@CW9:~# cat /etc/acpi/events/default | grep -E -v '^#|^$' Code:
root@CW9:~# cat /etc/acpi/acpi_handler.sh | grep -E -v '^#|^$' Code:
root@CW9:/var/log# grep 'ACPI group' * | sed 's/.*logger: //' | sort | uniq |
All times are GMT -5. The time now is 03:04 PM. |