1

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

I mean something like:

$ invoke ALT+4

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

2 Answers 2

3

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.

1

you can also try virtual keyboard xvkbd.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .