Is there a way of invoking a key combination over the CLI?

I mean something like:

$ invoke ALT+4

link|improve this question

55% accept rate
Can you provide some context for why you would want to do this? Are you connected to the physical console, in an X11 session, connected via ssh/other? – Zoredache Feb 10 at 19:13
X11, ubuntu oneiric desktop edition. I just need to invoke those keys after X minutes, for example CTRL+ALT+L to Lock Screen after X minutes – w0rldart Feb 10 at 19:17
1  
Why wouldn't you use one of the many screen saver programs for that purpose? – Zoredache Feb 10 at 19:21
that was an example, I do want to know how invoke key combinations :) – w0rldart Feb 10 at 19:28
Ok, but to be clear, you are primarily concerned with how to do this under X11? Since the methods for a remote terminal, console, and X11 will each be different. – Zoredache Feb 10 at 19:37
show 1 more comment
feedback

2 Answers

The cloest I can find in some quick Google searches might be something like xdotool.

What is xdotool? This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.

link|improve this answer
feedback

you can also try virtual keyboard xvkbd.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.