Package: xautomation
Version: 1.02-1
Severity: normal

Hi,

[ X-Debbugs-Cc set to [email protected] as this is probably not a
debian specific bug. ]

do I need to do some specific tricks to send an at-sign? The obvious
solution fails here:

$ xte "str f...@bar"
X Error of failed request:  BadValue (integer parameter out of range for 
operation)
  Major opcode of failed request:  141 (XTEST)
  Minor opcode of failed request:  2 (X_XTestFakeInput)
  Value in failed request:  0x0
  Serial number of failed request:  16
  Current serial number in output stream:  25

I'm using xautomation 1.02-1 on debian unstable with xserver-xorg-core
2:1.5.99.902-1 from debian experimental on armel architecture.

Background: On the openmoko neo freerunner phone I want to be able to
paste text into applications that don't support clipboard (mainly
xterm). (Using primary selection is pretty difficult without a middle
button). I am using the attached program[1] to convert printable and
non-printable characters to str and key commands for xte. However, at
sign did not seem to be a key either:

key At
Unable to resolve keysym for 'At'
Unable to resolve keysym for 'At'
key at
key at
# this prints "2"!
key @
Unable to resolve keysym for '@'
Unable to resolve keysym for '@'

best regards,
Timo Lindfors


[1]

#!/usr/bin/python
import popen2, os

def isprint(c):
    return ord(c) > 31

def get_key(c):
    if c == "\n":
        return "Return"
    if c == "\t":
        return "Tab"
    return False

def main():
    o, i = popen2.popen2("xclip -selection clipboard -o")
    output = o.read()
    i.close()
    o.close()
    #print(repr(output))
    argv = ["xte"]
    str = ""
    for c in output:
        if isprint(c):
            str += c
        else:
            if str != "":
                argv += ["str %s" % str]
            key = get_key(c)
            if not key:
                key = "\\x%02x" % c
            argv += ["key %s" % key]
            str = ""
    if str != "":
        argv += ["str %s" % str]
    print(("\" \"").join(argv))
    os.execv("/usr/bin/xte", argv)

main()




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to