Answer the question
In order to leave comments, you need to log in
How to assign an action to a key in the console?
I have an ubuntu server without X. I take pictures with fbgrab. I would like to set the print screen key to an action, for example, a bash script, so that the script is executed when pressed.
Answer the question
In order to leave comments, you need to log in
man bind
I'm not sure about the printscreen.
I don’t remember when I was sitting at the iron console, but it may simply not be transmitted via ssh.
create a function, hang it for example on Ctrl+p :
$ function hello_world
{
echo "Hello world"
}
$ bind -x '"\C-p":hello_world'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question