Xte Emulate Key Press & Mouse Clicks - Xautomation - Linux Mint 8

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,512
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Apr 18, 2010

xte - Generates fake input using the XTest extension

Xautomation
Control X from the command line for scripts, and do "visual scraping" to
find things on the screen. The control interface allows mouse movement,
clicking, button up/down, key up/down, etc, and uses the XTest extension so
you don't have the annoying problems that xse has when apps ignore sent
events. The visgrep program find images inside of images and reports the
coordinates, allowing programs to find buttons, etc, on the screen to click
on.

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (gotbletu)

  • Nice video, but the Multi_key function is not working for me. For testing purposes, I am trying to use this method to enable the "Show Mouse" plugin for Compiz. Here is what my code looks like:

    #!/bin/bash

    xte 'keydown Multi_key' 'key K' 'keyup Multi_key'

    Any suggestions?

  • @FloobenShnooben think in lucid they disable the superkey to send events, easiest way is to use a different hot key like Alt + k, or something for the show mouse

  • the Meta key is the win key, not the multi one

  • @chenxubin yea u would think that but not in this case. Super key = Multi key

see all

All Comments (14)

Sign In or Sign Up now to post a comment!
  • very, very useful info. opens up a new world. thanks man.

  • is there a way to cycle through a long set of strings in a xte command? I'm looking to do something along the lines of: xte 'mouseclick 1' 'key Return' 'sleep 1' 'str [a..z]'

  • I just keep getting an "X Error of failed request: " error.

  • This is killing me. I am trying to write a script for using "feh" with compiz fusions "scale" effect, and although I have the first part working perfectly, I can not get xautomate to execute the "Super+A" I need to for scale.

    Here is the script so far:

    #!/bin/sh

    clear

    feh -x -w -g 700X500 *.*

    xte 'keydown Multi_key' 'key A' 'keyup Multi_key'

    Suggestions?

  • Hmm... I've scripted my custom panel buttons with the super key. The command I used for show desktop is: xte 'keydown Super_L' 'key d' 'keyup Super_L'

    But whatever, either way works.

    I love xte btw. I can finally have expo, stacking and other handy shortcuts on my panel without downloading stupid gnome panel applets.

  • @gotbletu Thanks, defiantly helped. You are for sure one of the better youtubers out there. Thanks for the help

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more