GNOME Bugzilla – Bug 581254
generatekeyevent('<') causes an error
Last modified: 2009-05-10 23:03:00 UTC
I'm using the python bindings of ldtp, and ldtp.generatekeyevent('<') generates an error: ldtplib.ldtplibutils.LdtpExecutionError: u'Invalid Key'. This may be intended behavior since there's no obvious way to identify '<', but still raise an error in the case of an incomplete tag, but if so, the documentation should be updated at http://ldtp.freedesktop.org/user-doc/generatekeyevent.html. ldtp.generatekeyevent('<<>') works (looking through the source code gave me the idea of trying it), but isn't mentioned anywhere in the documentation. I looked at the code here: http://cgit.freedesktop.org/ldtp/ldtp/tree/src/device.c, and possibly {"lessthan", 59} (or something similar) could be added to NonPrint_Key_Synth_Vals[] on line 164, though since it's not technically a non printing key, simply documenting the use of "<<>" might be better. For what it's worth, my own preference would be to rename NonPrint_Key_Synth to something like Escape_Key_Synth and add "lessthan". I'd submit a patch if I had any idea how to use a cvs system.
Thanks for the bug report, have fixed the document for now with a note to use < character as you have suggested ('<<>') Thanks