You are not logged in.
Hello, I've been looking around for a bit to try and figure out how to use one of the multimedia keys [4] on my keyboard to type 'exit [Enter]'. I am on the command line all day long and ssh'ing into multiple servers, I want to map my '4' multimedia key (on my Microsoft Natural Ergonomic Keyboard) to type the word 'exit' and hit [Enter] so I can close out of all my terminal windows quickly. Searching for 'multimedia keys type command' brings back so many search results I can't find what I am looking for. I know I'm in the right spot here (http://wiki.linuxquestions.org/wiki/Con … media_Keys), I just don't know what to put to make it do what I want it to do.
How do I say 'keycode 195 = type exit and hit Enter' in xmodmap.conf
Thank you
Last edited by minimalm (2019-06-26 18:23:28)
Offline
You'd may to use xdotool or a similar tool to simulate all those key press events and send them to the terminal window.
You may want to consider other approaches rather than trying to send the command and enter. If xmodmap can remap the key to send and EOF, that would be a much easier way to get the desired end result.
But what's wrong with just using Ctrl-L from within the terminal?
EDIT: oops, I meant Ctrl-D
Last edited by Trilby (2019-06-26 19:42:23)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Hi Trilby, Ctrl-L does nothing in the terminal window (except clear the screen). I forgot to mention I use xfce4 as my window manager (and thus, xfce4terminal to do all my work) -- yeah that's what I'm trying (send 'exit' and EOF) to do in xmodmap and I just can't find the information I am looking for.
I am looking into xdotool - I'll let you know if I get it working.
Thanks
Last edited by minimalm (2019-06-26 19:20:57)
Offline
EOF / EOT should normally be mapped to Ctrl-D.
Last edited by progandy (2019-06-26 19:24:15)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Ctrl+D
Edit - Ninja'd
Last edited by Slithery (2019-06-26 19:32:55)
Offline
Yes!! Thank you! This is exactly what I'm looking for.
Offline
Please remember to mark your thread [SOLVED] (edit the title of your first post).
Offline