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. Advertising

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:
    816
    Vidar Petursson
    May 14, 2004
  2. Max
    Replies:
    7
    Views:
    9,121
  3. Support Desk
    Replies:
    0
    Views:
    366
    Support Desk
    Feb 27, 2009
  4. Shane Geiger
    Replies:
    0
    Views:
    482
    Shane Geiger
    Feb 27, 2009
  5. Support Desk
    Replies:
    0
    Views:
    646
    Support Desk
    Feb 27, 2009
Loading...

Share This Page