Capture X keystrokes

Discussion in 'Ruby' started by Benjamin Kudria, Feb 15, 2008.

  1. Hi,

    I'm the author of Snippits[1], a text expansion program for Linux.
    Snippits types by generating X keystrokes, using the xte utility from
    the xautomation suite. However, the way xte reads typed X characters is
    a bit of a hack: it generates key commands to select back one word
    (ctrl+shift+left), cut (ctrl+x), and then it reads the clipboard (using
    xsel). This method is slow, error-prone, and ugly.

    I was wondering if there was any way to capture X keystrokes as they are
    generated. Does anyone know of a better method than above? I'm not
    averse to using Ruby UI Toolkit bindings, if they have some method for
    this.

    Does anyone have any suggestions?

    1: http://ben.kudria.net/code/snippits
    --
    Posted via http://www.ruby-forum.com/.
     
    Benjamin Kudria, Feb 15, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob T

    Capturing Keystrokes

    Rob T, May 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    914
    Vidar Petursson
    May 14, 2004
  2. Lucas Tam
    Replies:
    5
    Views:
    6,451
    WizyDig
    Dec 2, 2004
  3. Max
    Replies:
    7
    Views:
    9,403
  4. Replies:
    3
    Views:
    550
    VisionSet
    Jun 28, 2004
  5. Martijn Mulder

    where do the keystrokes go?

    Martijn Mulder, Dec 18, 2005, in forum: Java
    Replies:
    2
    Views:
    503
    Martijn Mulder
    Dec 18, 2005
  6. Simon
    Replies:
    2
    Views:
    501
    Simon
    Mar 2, 2006
  7. Steven Raasch

    Sending keystrokes to QT applications

    Steven Raasch, Jul 17, 2003, in forum: C++
    Replies:
    2
    Views:
    569
    Rolf Magnus
    Jul 17, 2003
  8. Support Desk
    Replies:
    0
    Views:
    441
    Support Desk
    Feb 27, 2009
Loading...