Some keys are not recognized, though. Actually, mainly those related to deleting actions (like delete, backspace virtual keyboard keys and so on). As far as I can see/understand, xterm also had to handle them in a proper way, using "vte" [1] for that. Is it ? Is there other GtkIMContext singal to handle actions like these ?
<br><br>[1] <a href="http://developer.gnome.org/doc/API/2.0/vte/vteterminal.html#VTETERMINALERASEBINDING">http://developer.gnome.org/doc/API/2.0/vte/vteterminal.html#VTETERMINALERASEBINDING</a><br><br>regards<br><br><div>
<span class="gmail_quote">On 1/28/06, <b class="gmail_sendername">Antonio Gomes</b> &lt;<a href="mailto:tonikitoo@gmail.com">tonikitoo@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hey Aaron ..<br><br>just to thank you for your input regarding the Vk stuff ;)<br><br>is works ! (just fixing bugies now)<br><br>cheers<div><span class="e" id="q_1091243a5aaad044_1"><br><br><div><span class="gmail_quote">
On 1/24/06, <b class="gmail_sendername">Aaron Levinson
</b> &lt;<a href="mailto:alevinsn@aracnet.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">alevinsn@aracnet.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I should note that the &quot;commit&quot; signal, along with the &quot;preedit-changed&quot;
<br>signal, are the only ways that you can respond to input from an input<br>method.&nbsp;&nbsp;That's likely your problem--you weren't doing anything with the<br>string in the &quot;commit&quot; callback.&nbsp;&nbsp;Writing a proper &quot;commit&quot; callback is a
<br>requirement for using a GTK input method.&nbsp;&nbsp;I wouldn't bother with using<br>gdk_window_foreign_new() if this works, and it should work.<br><br>Aaron<br><br>On Tue, 24 Jan 2006, Antonio Gomes wrote:<br><br>&gt; On 1/24/06, Aaron Levinson &lt;
<a href="mailto:alevinsn@aracnet.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">alevinsn@aracnet.com</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; It's unclear to me why you wouldn't be able to &quot;type&quot; anymore in HTML
<br>&gt; &gt; forms.&nbsp;&nbsp;Do you mean with a regular keyboard or with the virtual keyboard?
<br>&gt;<br>&gt;<br>&gt;<br>&gt; it stop working only for the virtual keyboard. Regular kb is ok !<br>&gt;<br>&gt; As you indicated in a previous e-mail, you are getting to the &quot;commit&quot;<br>&gt; &gt; signal--why don't you just push the string passed to the &quot;commit&quot; callback
<br>&gt; &gt; directly into the form?<br>&gt;<br>&gt;<br>&gt; Hummm ... I got your point here. Good enough to give it a try ;)<br>&gt;<br>&gt; Look at the source code for GtkSocket or maybe GtkPlug for examples of<br>&gt; &gt; using gdk_window_foreign_new().&nbsp;&nbsp;GtkMozEmbed may use it as well.
<br>&gt;<br>&gt;<br>&gt; Ok ... I'll do that now .<br>&gt;<br>&gt; many thanks again<br>&gt;<br>&gt; Aaron<br>&gt; &gt;<br>&gt; &gt; On Tue, 24 Jan 2006, Antonio Gomes wrote:<br>&gt; &gt;<br>&gt; &gt; &gt; &gt; I still think working with the GtkMozEmbed is the way to go--I don't
<br>&gt; &gt; &gt; &gt; exactly understand your description of the problem that occurred when<br>&gt; &gt; you<br>&gt; &gt; &gt; &gt; used a GtkIMContext with your GtkMozEmbed widget.&nbsp;&nbsp;A more detailed<br>&gt; &gt; &gt; &gt; description would help.
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Ok, so let me try: GtkMozEmbed widget wraps some gtk stuff, making<br>&gt; &gt; easier<br>&gt; &gt; &gt; &quot;embedding&quot; mozilla in a gtk app. It also wraps some mozilla guts (like
<br>&gt; &gt; the<br>&gt; &gt; &gt; EmbedPrivate, and listeners - you don't care, probably) and these are<br>&gt; &gt; left<br>&gt; &gt; &gt; alone - I mean, non-gtk widgets. Having said that, the point is: &quot;HTML<br>

&gt; &gt; &gt; forms&quot; are not gtk/gdk objects, so I can not connect im_context to them<br>&gt; &gt; &gt; without mapping them to gtk object (I'm investigating ways to make this<br>&gt; &gt; &gt; mapping possible, but I am not sure if it is supported).
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; In other words, the GtkMozEmbed widget itself seems to be too external<br>&gt; &gt; for<br>&gt; &gt; &gt; my needs, I guess. As soon as set<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; *gtk_im_context_set_client_window ((GtkIMContext *) embed-&gt;im_context,
<br>&gt; &gt; &gt; GDK_WINDOW (widget-&gt;window));<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; *<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I can not longer type into HTML forms ... Now, does it make sense to you<br>&gt; &gt; ?<br>&gt; &gt; &gt;
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Why don't you send me the relevant source code<br>&gt; &gt; &gt; &gt; that you wrote for GtkMozEmbed?&nbsp;&nbsp;I'll have a chance to look at it over<br>&gt; &gt; the<br>&gt; &gt; &gt; &gt; weekend or possibly on Friday.
<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; I will ... thanks for that ;)<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; Regarding gdk_window_foreign_new, the GdkNativeWindow parameter (not<br>&gt; &gt; &gt; &gt; GtkNativeWindow as you stated) represents a native window.&nbsp;&nbsp;As stated
<br>&gt; &gt; in<br>&gt; &gt; &gt; &gt; the GDK API documentation, this is a Window for X and an HWND for<br>&gt; &gt; Win32.<br>&gt; &gt; &gt; &gt; See<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt;<br>&gt; &gt; <a href="http://developer.gnome.org/doc/API/2.0/gdk/gdk-X-Window-System-Interaction.html#gdk-window-foreign-new" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

http://developer.gnome.org/doc/API/2.0/gdk/gdk-X-Window-System-Interaction.html#gdk-window-foreign-new</a><br>&gt; &gt; &gt; &gt; for more information.&nbsp;&nbsp;I've never used this function and I haven't<br>&gt; &gt; &gt; &gt; personally tried to use the method that I suggested in my original
<br>&gt; &gt; e-mail.<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; it seems nobody knows much about it :S<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; regards<br>&gt; &gt; &gt;<br>&gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; Aaron,
<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; After some troubles, I'm now reconsidering the idea of creating<br>&gt; &gt; &gt; &gt; &gt; GdkNativeWindow from the HTML form, and setting the im_context to it<br>

&gt; &gt; &gt; &gt; &gt; (gtk_im_context_set_client_window) - as your proposed first -<br>&gt; &gt; instead of<br>&gt; &gt; &gt; &gt; &gt; setting it to the GtkMozEmbed widget !<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; But I'm stuck on the gdk_window_foreign_new function. How do I use
<br>&gt; &gt; that<br>&gt; &gt; &gt; &gt; ? I<br>&gt; &gt; &gt; &gt; &gt; mean, I don't get the GtkNativeWindow parameter required by this<br>&gt; &gt; &gt; &gt; function<br>&gt; &gt; &gt; &gt; &gt; ... Could you help me out here ?
<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; thanks again ;)<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; On 1/23/06, Antonio Gomes &lt;<a href="mailto:tonikitoo@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">

tonikitoo@gmail.com</a>&gt; wrote:<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; hi Aaron,<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; I didn't mention this in my last e-mail, but you'll also need to
<br>&gt; &gt; &gt; &gt; setup a<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; &gt; signal handler for the GtkIMContext object's &quot;commit&quot; signal.<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;
<br>&gt; &gt; &gt; &gt; &gt; &gt; I have it (the 'commit' signal) already connected and also its<br>&gt; &gt; &gt; &gt; callback<br>&gt; &gt; &gt; &gt; &gt; &gt; defined as it is in your post at<br>&gt; &gt; &gt; &gt; &gt; &gt;
<br>&gt; &gt; <a href="http://maemo.org/pipermail/maemo-developers/2006-January/002337.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://maemo.org/pipermail/maemo-developers/2006-January/002337.html
</a> -<br>&gt; &gt; &gt; &gt; &gt; &gt; cool !!! ...&nbsp;&nbsp;But problem begins after creating the IM_Context
<br>&gt; &gt; object<br>&gt; &gt; &gt; &gt; and<br>&gt; &gt; &gt; &gt; &gt; &gt; associating it with the GdkWindow of my GtkMozEmbed object : the<br>&gt; &gt; &gt; &gt; &gt; &gt; mozilla_engine stop recognizing any input from the vkb, except if
<br>&gt; &gt; I<br>&gt; &gt; &gt; &gt; press<br>&gt; &gt; &gt; &gt; &gt; &gt; 'backspace' ...<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; bwt, in 'commit_cb' method, it prints what I type at the console
<br>&gt; &gt; but<br>&gt; &gt; &gt; &gt; &gt; &gt; doesn't add nothing at the HTML form (detail: it does with no<br>&gt; &gt; context<br>&gt; &gt; &gt; &gt; &gt; &gt; associated or if I type from the physical keyboard) ...
<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt; static&nbsp;&nbsp;gboolean<br>&gt; &gt; &gt; &gt; &gt; &gt; gtk_moz_embed_im_context_commit_cb (GtkIMContext *ctx,<br>&gt; &gt; const&nbsp;&nbsp;gchar<br>&gt; &gt; &gt; &gt; *str, GtkMozEmbed *aEmbed) {
<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; gunichar uChar = 0;<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; guint keyval = 0;<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; gchar *text2 = (gchar *) str;<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; printf (&quot;\n [GTK_MOZ_EMBED] it gets here '%s'
<br>&gt; &gt; &gt; &gt; &gt; &gt; \n&quot;, str);<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; *// the string is in UTF-8 format--iterate through the<br>&gt; &gt; characters*<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; *while*&nbsp;&nbsp;(*text2) {
<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; uChar = g_utf8_get_char(text2);<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; keyval = gdk_unicode_to_keyval(uChar);<br>&gt; &gt; &gt; &gt; &gt; &gt;<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; *//*
<br>
&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; *// do something with the character here*<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; *//*<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; text2 = g_utf8_next_char(text2);<br>&gt; &gt; &gt; &gt; &gt; &gt;&nbsp;&nbsp; }
<br>&gt; &gt; &gt; &gt; &gt; &gt; }<br></blockquote></div></span></div></blockquote></div><br>-- <br>--Antonio Gomes<br>http:// tonikitoo (dot) blogspot (dot) com (slash)