<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal>I can get <span style='font-family:"Courier New"'>xcb_test_fake_input</span>
to work just fine, when I pass it the proper keycodes as <i>per</i> <span
style='font-family:"Courier New"'>xev</span> and/or <span style='font-family:
"Courier New"'>xmodmap &#8211;pke</span>. I could code a mapping from keycap to
keycode based on <span style='font-family:"Courier New"'>xmodmap &#8211;pke</span>,
but I&#8217;m reluctant to do this: my desktop Ubuntu is using a different
mapping of keycodes to keysyms than the target system, and I don&#8217;t really
know where this difference is coming from. (So, I can have no confidence that
the target system won&#8217;t change, or that someone else&#8217;s instance of
the target system will behave like mine.)<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>I did find some sample xlib code that uses <span
style='font-family:"Courier New"'>XKeysymToKeycode</span> to turn key symbols like
XK_A and XK_TAB into xtest-compatible keycodes.<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Is there an xcb equivalent of <span style='font-family:"Courier New"'>XKeysymToKeycode</span>?
Or, is there some standard file somewhere I can read at runtime to build my
mapping? Or, do I have to evaluate <span style='font-family:"Courier New"'>`xmodmap
&#8211;pke`</span> and parse it for lines that map keycodes to symbols?<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Sorry to be so helpless! I would sure like to avoid option
#3 &#8211; it wouldn&#8217;t take all that long, but it feels really ugly.<o:p></o:p></p>

</div>

</body>

</html>