2

I'm trying to fake xinput events with xte:

xte "str $(echo '<[email protected]>')"

But, I get:

WQBC@g;qil<co;X

That's really weird, I'm using US keyboard and mapping, but xte gives this very different result.

UPDATE

Output from xte "str '<[email protected]>'"

4WQBC@g;qil<co;X4

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
daisy
  • 53,527
  • 78
  • 236
  • 383
  • Does `xte "str ''"` work? (This is probably not what you want (in the end), but for debugging...) – sr_ May 25 '12 at 09:09
  • @sr_ rather wired – daisy May 25 '12 at 09:21
  • @sr_ , i configured both french and english keyboard in xorg.conf , but since my current output has no problems , it shouldn't happen with xtr either – daisy May 25 '12 at 09:21
  • Hmm. Both outputs differ in the quotation marks only (`'`=`4`, apparently)... – sr_ May 25 '12 at 09:25
  • [This discussion is enlightening](http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=415451) (not sure if the patch helps, though) [but apparently upstream fixed that issue](http://www.hoopajoo.net/projects/xautomation.html) – sr_ May 25 '12 at 09:28

1 Answers1

2

As an alternative you can try:

xdotool type  --clearmodifiers -delay 0 "string to type at fake input"

I found it works a lot better than xte version 1.02 which seemed to have a 255 character limit. Or xte version 1.0.7 which seemed to ignore all newlines in the string.

jasonwryan
  • 71,734
  • 34
  • 193
  • 226
anthony
  • 610
  • 6
  • 13