[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Capture X keystrokes

Benjamin Kudria

2/15/2008 2:09:00 AM

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/cod...
--
Posted via http://www.ruby-....