Search this site


[prev]  Page 2 of 3  [next]

Metadata

Articles

Projects

Presentations

new xdotool version available (20091231)

A new release of xdotool is available. This release has only minor changes based on changes needed to help Debian and other folks package this. Speaking of which: thanks to Daniel Kahn Gillmor and Wen-Yen Chuang for helping maintain the Debian packages for xdotool and keynav and for working with me on these changes.

Hop on over to the xdotool project page and download the new version.

The changelist follows:

20091231.02:
  No functional changes.
  - fix linking problems and just use $(CC) for build and linking
  - Make the tests headless (requires Xvfb and GNOME)
  - Make the t/run.sh test runner exit-code friendly

20091231.01:
  No xdotool changes.
  libxdo changes:
    * Rename keysymcharmap -> keysym_charmap
    * Expose keysym_charmap and symbol_map as xdo_keysym_charmap()
      and xdo_symbol_map()

xdotool-20091231.02

new xdotool version available (20090815)

Hop on over to the xdotool project page and download the new version.

The changelist from the previous announced release is as follows:

20090815:
* Incorporate patch from Henning Bekel which adds a new ability to change
  window properties such as window name, icon name, class, role, etc.  New
  command: xdotool set_window
* Add --maxdepth to 'xdotool search' to limit the traversal depth

new xdotool version available (20090710)

Looking at svn logs for xdotool shows that the project is now just over 2 years old. Crazy!

Hop on over to the xdotool project page and download the new version.

The changelist from the previous announced release is as follows:

20090710:
  * You can clear keyboard modifiers during typing now with --clearmodifiers
    When used, this flag causes physical keyboard modifiers (alt, control, etc)
    that are currently active to be ignored during typing.
    This is supported in: xdotool key, keyup, keydown, and type.
    
    Example: 
      xdotool type 'hello world' results in 'HELLO WORLD' while holding shift.
      xdotool type --clearmodifiers 'hello world' results in 'hello world'
        regardless of you holding shift.

    The 'reset' only happens at the beginning of typing and the modifiers are
    restored at the end. If you press a modifier key *during* typing it will 
    act as if --clearmodifiers was not present.
    (http://code.google.com/p/semicomplete/issues/detail?id=6)

  * You can now specify literal keycodes for any key command.
    Example: xdotool key 38   (types 'a' with my keyboard)
    (requested via mailing list)

  * Regression fix: 'xdotool type' now properly obeys capitalization, again.
  * Bug fix: 'xdotool key --window' now works properly

new xdotool version available (20090612)

Hop on over to the xdotool project page and download the new version.

The changelist from the previous announced release is as follows:

20090612:
  * Fixed bug where shift modifier was not reset when 'xdotool type' used.
  http://code.google.com/p/semicomplete/issues/detail?id=5

new xdotool version available (20090609)

Hop on over to the xdotool project page and download the new version.

The changelist from the previous announced release is as follows:

20090609:
  * Add '--delay ' to xdotool type. Sets the delay between keys.
  * Add '--window ' to xdotool type, key, keyup, and keydown.
    This feature (key events with --window ) only works if the
    application does not reject X events that have 'send_event' set to true.

    Special notes:
    * Firefox appears to ignore all input when it does not have focus.
    * xterm ignores sendevent by default, ctrl+leftclick menu will let you
      enable it.
    * gnome-terminal appears to accept send_event input by default

XSendEvent + LD_PRELOAD == win

As far as feature requests come, for xdotool, one of the more common ones is to have the ability to send key or mouse events to a specific window, not just the active one. XTEST (what xdotool uses for key/mouse currently) doesn't let you specify a window to send events. XSendEvent(3) lets you send hand-crafted events to a specific window, but most applications ignore these sent events.

The XEvent struct has a member 'send_event' which is true if the event came from an XSendEvent call and false otherwise. Programs like firefox and xterm (by default) ignore many events that have 'send_event' set to true.

Enter LD_PRELOAD.

Writing a custom shared library that overrides the default XNextEvent and XPeekEvent functions allows us to force 'send_event' to always be false, so an application with this library loaded will happily handle keyboard/mouse events generated with XSendEvent. I already have a helpful project that lets me write such a shared library: liboverride.

#include <stdio.h>
#include <X11/Xlib.h>

void hack_send_event(XEvent *ev) {
  switch (ev->type) {
    case KeyPress: case KeyRelease: case ButtonPress: case ButtonRelease:
      ev->xany.send_event = False;
      break;
  }
}

override(`XNextEvent', `
  {
    real_func(display, event_return);
    hack_send_event(event_return);
    return;
  }
')
This small bit of liboverride code will give me a shared library I can preload with LD_PRELOAD. Doing so will ensure that send_event is false for any key or mouse button events.

Works well. Now that we have a reliable way to allow XSendEvent I think it's worth putting this into xdotool.

xdotool 20090126 available

A new release of xdotool is available. It fixes two bugs that were moderately annoying.
20090126:
  * Change the default behavior of 'getwindowfocus' to get the first
    ancestor-or-self window that has WM_CLASS set. WM_CLASS will be set on
    (all?) top-level windows and it's possible that the currently focused window
    according to X is not a top-level window. To use the previous behavior, use
    'getwindowfocus -f'
  * Make 'xdotool key at' work correctly. 'at' is usually Shift+2, for example.
    Now all shifted characters should work, but I've only tested on a US
    keyboard.
  * Minor Makefile fixes for package maintainers.
I've tested it in GNOME and Ion-3 with success.

Download: xdotool-20090126.tar.gz

keynav shell command examples

Press 'f' when keynav is active and instantly jump to my firefox window.
# in .keynavrc
f sh "activate-firefox.sh", end
Now, in activate-firefox.sh:
#!/bin/sh
# activate-firefox.sh
xdotool windowactivate $(xdotool search -title -- '- Mozilla Firefox')
Extend that and press 'g' to jump to gmail, assuming that tab is open. (Requires my firefox tabsearch plugin)
# in .keynavrc
g sh "activate-gmail.sh"
Now, in activate-gmail.sh:
#!/bin/sh
# activate-gmail.sh

./activate-firefox.sh
xdotool key ctrl+apostrophe
xdotool type gmail
xdotool key Return

new xdotool version available (20080606)

Hop on over to the xdotool project page and download the new version.

I've also put up an HTML version of the manpage: xdotool.xhtml.

The changelist from the previous announced release is as follows:

20080606:
  * Correctly report an error if xdotool is invoked with an invalid command.
  * Fix invalid error code reporting from 'windowraise'

new xdotool version available (20080603)

Hop on over to the xdotool project page and download the new version.

The changelist from the previous announced release is as follows:

20080603:
  * Daniel Kahn Gillmor reported a problem with return codes from xdotool. All
    commands return proper exit status now (0 == success, nonzero == error)
  * I tested on 3 window managers: Gnome2 2.20.0, OpenBox 3.4, ion-3rc-20070608
    - Gnome2 and OpenBox pass all tests.
    - ion-3 fails on any desktop-related methods (ion-3 lacks the support).