[LDTP-Dev] how do I configure key code map for generatekeyevent?

Nagappan Alagappan nagappan at gmail.com
Mon Sep 16 10:45:15 PDT 2013


Hi Mike,

Even, I could not see the message in moderator's page. Not sure, what
happened.

LDTP keycode was done based on LTFX project. On Ubuntu 13.04, its how the
result is:

nagappan at nalagappan:~$ python
Python 2.7.4 (default, Apr 19 2013, 18:28:01)
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ldtp import *
>>> generatekeyevent('abcdefghijklmnopqrstuvwxyz')
abcdefghijklmnopqrstuvwxyz1 # 1 at end is output from generatekeyevent API
>>> abcdefghijklmnopqrstuvwxyz

Thanks
Nagappan


On Mon, Sep 16, 2013 at 7:16 AM, Mike Pelican <mpelican at sift.net> wrote:

> Hi Nagappan -
>
> I tried to send the following message to ldtp-dev, but the message didn't
> appear in the archive and I didn't get a bounce.  Was it quietly rejected?
>
> I've been digging into the generatekeyevent issue.  It seems like some key
> code values are hardcoded and others are read from xmodmap output, but the
> result is not right for our configuration.  Based on my limited knowledge,
> it seems the Right Thing to use xmodmap to arrange all the key mappings.
>  Is there a better way?  Should we be doing something differently to make
> the current code work?
>
> Thanks,
>
> Mike
>
> Begin forwarded message:
>
> *From: *Mike Pelican <mpelican at sift.net>
> *Subject: **how do I configure key code map for generatekeyevent?*
> *Date: *September 12, 2013 11:59:33 AM CDT
> *To: *ldtp-dev at lists.freedesktop.org
> *Cc: *Eric Engstrom <engstrom at sift.net>
>
> Hi -
>
> I'm trying to use LDTP to script a web browser.  I'd like to use
> generatekeyevent to type things into browser text boxes and web forms, but
> I don't understand the mapping between the string I pass to
> generatekeyevent and the resulting key events in my window.  Eg:
>
> generatekeyevent("abcdefghijkmlnopqrstuwxyz")
>
> produces
>
> asqc9def;ghuit'`7-b=]8p[o
>
> in an xterm window.
>
> I see that there's a remapping done in get_keyval_id using _get_key_value
> which uses a hardcoded _char_key map.
>
> Do I need to change my X or Gnome configuration to match this _char_key
> map?  (How?)  Or is there a function I should use to transform my string
> before I pass it to generatekeyevent?
>
> Thanks!
>
> Mike
>
>
>


-- 
Cross platform GUI testing
Linux Desktop (GUI Application) Testing Project -
http://ldtp.freedesktop.org
Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra
ATOMac - Mac GUI Automation tool - https://github.com/pyatom/pyatom
http://nagappanal.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/ldtp-dev/attachments/20130916/13b4737c/attachment.html>


More information about the LDTP-dev mailing list