On Sunday 02 February 2003 5:11 pm, [EMAIL PROTECTED] wrote:
> On Sun, 2 Feb 2003, Angus Leeming wrote:
> > No, you are not missing anything. I was refering to this code.
> >
> > > By the way, a quick test shows that this code does not affect the
> > > precomposition point. That is, the keyboard signal does not go through
> > > this part ("turn_on_local_input(ob);") of the codes.
> >
> > Then you have to:
> >
> > 1. Check that 'Shift-Space' is passed to input.c.
> >
> > 2. Refine your test inside input.c:
> >     printf("XK_space %d, key %d, CJK_li %d, shift %d\n",
> >             XK_space, key, sp->CJK_local_input, shiftkey_down(kmask));
> >
> >     /* Turn on CJK composition */
> >     if (key == XK_space && shiftkey_down(kmask) && !sp->CJK_local_input) {
> >             printf("Turning composition on!\n");
> >             turn_on_local_input(ob);
> >             /* Do not actually print the XK_space. */
> >             return 0;
> >     }
> >
> >     /* Turn off CJK composition */
> >     if (key && sp->CJK_local_input) {
> >             printf("Turning composition off!\n");
> >             printf("key = %d, keybuf = %s\n", key, keybuf);
> >             turn_off_local_input(ob);
> >
> >             /* Presumably the contents of keybuf should be passed
> >                to the code below for printing?
> >             */
> >     }
>
> 'Shift-Space' does not produce any print-out! In fact, I see that no
> signal from the keyboard is entering into this part in input.c. Hm.......

Does input.c get called at all for any keypress events. Must do. (Add a printf 
at the very top of the file.)

You mentioned earlier that when you are in composition mode 'Space' is handled 
automatically by X. Ie it 'knows" that this means that composition is now 
finished and that it should give you the keysym for the fully composed Korean 
char when you look for it in XmbLookupString.

Is 'Shift-Space' also 'hardcoded' in this way. Ie, if you have created 
form->xic when you show the window, does this mean that 'Shift-Space' is used 
to tell X that composition is starting?

If so then your 'Shift Space' has the same role as my 'Multi_key'.

I wonder if it returns some strange keysym from fl_XLookupString? Perhaps add 
some code to do_keyboard, after the call to  fl_XLookupString but before our 
friend:

        /* keysym == NoSymbol during multi-byte char composition.
           Eg, I've typed Multi_key-a but not yet ' to give á
           Silently swallow these partial-compositions. */
        if (keysym == NoSymbol && kbuflen == 0)
                return;

A few print statements never hurt ;-)

        printf("keysym %d, keybuf %s\n", keysym, keybuf);
        if (keysym != 0) {
                char const * const tmp  = XKeysymToString(keysym);
                printf("keysym is %s\n", tmp);
        }

Apart from that, I'm out of ideas.

Angus

Reply via email to