although i like F1 better because it is easiert to hit one key instead of two, especially if you are in the middle of typing a command. but i can't figure out how to catch that one (apart from hardcoding a particular sequence)
Huh? Didn't we just decide that "\!k1" is used to catch F1?
___Hilfe->readline->get_input_controller()->bind("\!k1", lambda(){write("Hello!");});
works fine here. (In an xterm. In gnome-terminal, F1 is eaten by Gnome and not delivered to the command-line app.)