Re: Dead keys question
- From: Owen Taylor <otaylor redhat com>
- To: "Stephan R.A. Deibel" <sdeibel archaeopteryx com>
- Cc: gtk-list gnome org
- Subject: Re: Dead keys question
- Date: 12 Sep 2000 17:49:12 -0400
"Stephan R.A. Deibel" <sdeibel archaeopteryx com> writes:
> Hi,
>
> I understand how dead keys are configured and reported using the
> keyval / string fields of GdkEvent but I had a question about
> how to handle them in my widget:
>
> I have the deadkeys info (keyval is being reported correctly)
> but I see that string is set to '^', for example, for the
> 0xfe52 key, which is the dead_circumflex. Some things I've
> read seem to indicate the string should be '' for the dead key
> and I should be getting the correct char only after the second key is
> pressed. But I just get '^' with the first keystroke and and 'i'
> with the second.
>
> (Note that things do work properly in an xterm and elsewhere
> so I'm fairly certain I've got the basic configuration right).
>
> Given this, it seems that I need to look at keyval and do my own
> processing. Is this really true or is there support in gtk for
> this? (I could find no docs on this).
>
> If I do have to do the work myself, what is the recommended
> way to access the dead keys mappings which are configured by
> the user?
In order to correctly handle dead keys, you need to use the
input-method functionality of GDK.
I don't want to go into it in the use in detail here, but you can
look, say, the gnome-terminal sources for an example of using it in a
fairly simple fashion. (Or GtkEntry sources for a more complex
example.)
(Basically, the reason why you need a input context is order
to handle dead keys, is that without some idea of context,
GDK has no ideas of when multiple keys in a row are directed
to the same entity)
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]