Hi,
even looking at sources of various interfaces, I cannot really understand how the interface should behave in respect to lcl when handling keyboard events.

Let's look at keydown case:

(note: for "event considered handled" I mean the interface should tell native widgetset that the event has been handled, that is, widgetset doesn't handle/propagate further that message)

a key has been pressed.
Interface sends a CN_(SYS)KEYDOWN message
If lcl handles it (result<>0), interface should consider the event handled and stop there
 (no xx_char or utf8keypress). right?
 if lcl doesn't handle it, interface should proceed:
if key was changed it has to stop. right? the event has to be considered handled?

Does the interface have to send a LM_(SYS)KEYDOWN message then? does it have to do the same checks it did for CN_KEYDOWN (handled by lcl/key changed etc)?

If the key is not "special" (like arrows, ins, canc, return, backspace and so on) interface
sends an utf8 char via IntUTF8KeyPress.
if lcl handles it (result=true) interface should consider the event handled and stop
 there (no xx_char). right?
 if lcl doesn't handle it:
check if key was changed, if so stop. the event has to be considered handled?

if the key is an ascii char (does ascii mean "<=127" or does it mean "any non-special key that can be contained in a byte according to current locale, like iso-something"?) interface should send a CN_(SYS)CHAR. right? Does it have to do same checks as KEYDOWN case? And should it send a LM_(SYS)CHAR after that? And again, should it check for all these things?

Moreover:
if key is a unicode character that isn't an ascii character (<=127), should its keycode be VK_UNKNOWN? But doing so, xx_(SYS)KEYDOWN/KEYUP would be useless since we pass VK_UNKNOWN as keycode: so keydown/keyup should not be sent; so if I type an accented letter, being
it not ascii, OnKeyDown/OnKeyUp events won't fire? It's a bit strange...

As you can see, I'm a little bit confused :)

bye,
Giulio

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to