<br><br><div class="gmail_quote">On Thu, May 27, 2010 at 12:58 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On 27.05.2010, at 04:32, David T. Lewis wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Wed, May 26, 2010 at 02:12:03PM -0700, Eliot Miranda wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi All,<br>
&gt;&gt;<br>
&gt;&gt;    is there any way to get the unix VM to deliver raw keyboard events, or<br>
&gt;&gt; at least control and shift key presses?<br>
&gt;<br>
&gt; I don&#39;t know enough to fully answer this, but I am fairly sure that<br>
&gt; the answer will turn out to be yes.<br>
<br>
</div>Well I assume Eliot meant &quot;... without hacking the VM&quot; in which case the answer would be &quot;no&quot;. Everything else is just ASMOP, but he knows that ;)<br></blockquote><div><br></div><div>Except that yesterday when I enabled DEBUG_EVENTS in sqUnixX11.c and wrote some code to map keycodes into the XK_Blah define names in /usr/include/X11/keysymdef.h I soon found out that there&#39;s a non-obvious mapping going on and that I&#39;ll probably have to grok <a href="http://wiki.archlinux.org/index.php/Xorg#Keyboard_settings">Xorg&#39;s keyboard drive</a>r, sigh.  I find the keyboard event mapping code in sqUnixX11.c distinctly non-obvious.  Part of it is that international input complicates things but (I *think*) the root of it is that a keycode in an XKeyEvent (at least on Xorg) is /not/ decoded.  The problem for me in these kinds of situations is that I only have one real machine and one virtual machine to hand so finding out what the one true solution for all of X11 is daunting  (should I say that I *hate* X11).  But at least I now know that (apart from the [fn] key) Xorg delivers all key presses immediately, so as you say Bert, merely ASMOP :)</div>
<div><br></div><div>best</div><div>Eliot</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
- Bert -<br>
</font><div><div></div><div class="h5"><br>
&gt; Assuming that the unix VM is running under X11, the raw information<br>
&gt; would be in the form of X11 events, which are translated into some more<br>
&gt; generic Squeak event format in platforms/unix/vm-display-X11/sqUnixX11.c.<br>
&gt;<br>
&gt; The low level keyboard event information, including shift key presses,<br>
&gt; would be represented as XKeyEvents, so I would expect that there is<br>
&gt; some way to make these available as events in the VM.<br>
&gt;<br>
&gt; X11 definitely does understand the shift keys, see for example<br>
&gt; /usr/include/X11/keysymdef.h.<br>
&gt;<br>
&gt; John&#39;s API documentation may help: &lt;<a href="http://isqueak.org/ioProcessEvents" target="_blank">http://isqueak.org/ioProcessEvents</a>&gt;<br>
&gt;<br>
&gt; Dave<br>
&gt;<br>
<br>
<br>
<br>
</div></div></blockquote></div><br>