Re: Working with GDK_Multi_key & Friends



Daniel Yacob <locales geez org> writes:

> Greetings,
> 
> I'm working on an input method where I need to use apostrophe
> as a dead key.  Unless a composable character follows apostrophe,
> it doesn't render in the text buffer.  If a combining character
> follows, of course that should appear.  A simple example:
> 
> keystrokes => composition
> --------------------------
>     n'n    =>  nn
>     n'a    =>  n\xE1
> 	n''    =>  n'
> 
> 
> I found in gtkimcontextsimple.c some code that looks like it can
> be modified for use in this IM:
> 
>   GDK_Multi_key,	GDK_apostrophe,	GDK_space,	0,	0,	0x0027,	/* APOSTROPHE */
>   GDK_Multi_key,	GDK_apostrophe,	GDK_apostrophe,	0,	0,	0x00B4,	/* ACUTE_ACCENT */
>   GDK_Multi_key,	GDK_apostrophe,	GDK_a,	0,	0,	0x00E1,	/* LATIN_SMALL_LETTER_A_WITH_ACUTE */
> 
> 
> However, I don't understand the GDK_Multi_key part of it.  What
> initiates the "Multi Key" context?  Does it take a key sequence
> to get GDK_Multi_key signalled (I'm on an English 101 type keyboard)? 
> 
> I realize that I might be going about this the wrong way, any
> advice and pointers for working with GDK_ special keys  would
> be appreciated.

The Multi_key is a separate key (usually labelled "Compose") that some
keyboards might have, which means "combine the next characters". So,
if I type <compose><'><a> I get 'a' with an accent. So, you simply
don't need the Multi_key here since you don't want your users to
have type anything special. You'd just want something like:

 GDK_n, GDK_apostrophe, GDK_n, 0, 0,  ...

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]