title: In bash, how do I bind a function key to a command?
body: <p>Example:  I want to bind the <kbd>F12</kbd> key to the command <code>echo "foobar"</code> such that every time I hit <kbd>F12</kbd> the message "foobar" will be printed to screen.  Ideally it could be any arbitrary shell command, not just builtins.  How does one go about this?</p>