On środa 18 grudzień 2002 11:14 am, Angus Leeming wrote:
> On Wednesday 18 December 2002 3:52 pm, Andre Poenitz wrote:
> > On Wed, Dec 18, 2002 at 10:26:09AM -0500, Kuba Ober wrote:
> > > So, there are just a few simple steps that take place:
> > > 1. Keyboard scancodes result from physical keypresses
> > > 2. current modmap is used by the X server to map scancode sequences to
> > > keysyms 3. keysyms are passed to the application via Xlib
> > > 4. it's up to the toolkit to decide what to do -- AFAIK the expected
> > > behaviour (somewhat screwed in Qt) is to simply pass keysyms in some
> > > toolkit-transcoded form to the widgets as proper events
> > > 5. for all documents, the application will typically pass the letters
> > > that are inside the document's encoding set to the document, and should
> > > display question mark or box or something similar for letters wich are
> > > outside of document's encoding set.
> >
> > Where in that scheme happens Composing?

Looking at xev output helps.

I'm trying to compose aogonek (ą) by pressing right-alt, a:

*** Pressing right-alt

 KeyPress event, serial 27, synthetic NO, window 0x3600001,
    root 0x3a, subw 0x0, time 848549951, (258,176), root:(1161,196),
    state 0x10, keycode 113 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 characters:  ""

keysym is mode_switch so we can safely ignore it (it's not a letter)

*** Pressing a

KeyPress event, serial 27, synthetic NO, window 0x3600001,
    root 0x3a, subw 0x0, time 848550501, (258,176), root:(1161,196),
    state 0x2010, keycode 38 (keysym 0x1b1, aogonek), same_screen YES,
    XLookupString gives 0 characters:  ""

now we get 'ą' letter, so we take it


Other composing is handled similarly, and I presume that modmap (i.e. X 
server) can handle some of it, and some can be handled additionally by IME 
[input method editor], toolkit and application.

In any event, X sends events for all key presses/releases, but not all those 
events are useful. Those that are not (unknown/useless keysym) can be simply 
discarded.

Cheers, Kuba Ober

Reply via email to