Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I mean something like:

$ invoke ALT+4

share|improve this question
    
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 '12 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 '12 at 19:17
1  
Why wouldn't you use one of the many screen saver programs for that purpose? –  Zoredache Feb 10 '12 at 19:21
    
that was an example, I do want to know how invoke key combinations :) –  w0rldart Feb 10 '12 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 '12 at 19:37

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer

you can also try virtual keyboard xvkbd.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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