Originally Posted by pan64
what kind of changes do you need?
The functionality I'm after is to be able to click in a running gnome-terminal window (to give it the input focus) and hit a key (such as F12) and have gnome/metacity/(something else?) place arbitrary characters in that window at the current cursor position so that I can subsequently hit the Enter key and have those characters executed as a command.
Using the date command as an example, if I'm logged into a bash shell within a gnome-terminal and I'm at the command prompt:
I'd like to be able to hit F12 and have the characters 'd' 'a' 't' 'e' placed at the cursor:
at which point I'd just hit the Enter key to execute that command. (It would also be fine if I did not have to hit the Enter key and the command was executed immediately.)
The actual characters I'd be typing are not 'date' but a fairly long string that I find myself typing several times a day. The reason I'd like this tied to an F-key (rather than, for example, just creating an alias for it in .bashrc) is that I'm most often typing this string after 'su-ing' to another user with a hyphen (eg 'su -' or 'su - jdoe') and I don't want to muck with root's or jdoe's .bashrc files (or any of their files for that matter).
And indeed, as mentioned originally, the first two characters need to be a dot followed by a space so that the command is executed in the current shell, not a subshell.