On Thu, 15 Jun 2006 19:44:36 +0200
zephod <[EMAIL PROTECTED]> wrote:
> hi,
>
> I am trying to implement mouse event handling for Qt widgets and have some
>
> questions about the way the modifier keys are handled.
>
> In Forms.pp : implementation of KeysToShiftState contains
> GetKeyState(VK_MENU). I don't quite understand why the Keys parameter
> shouldn't contain the ALT key. Is it that for some platforms the ALT key
> needs to be explicitely checked? If so, then why not do this work _before_
> constructing the LCL message so that the keys param is already correctly
> filled in? As I only work in linux I cannot test if changes in this part
> of the code breaks modifier-key handling in other platforms.
> In any case, it seems to me that the KeysToShiftState function should
> check on the presence of the ALT key in the Keys param. And offcourse the
> ALT key will need to be defined in LCLType.pp: add MK_ALT = $20 to LCLType
> (and add possibly others like 'meta').
>
> In my small investigation I discovered some related code in LCLIntf.pp:
> function MsgKeyDataToShiftState: KeyData is mostly ignored (for shift
> and control) and the ALT key is hard coded!
True.
For gtk the Alt is a normal modifier. For the carbon intf too.
What about the winapi?
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives