On Wed, 03 Jan 2018 17:28:49 +0100, Andreas Falkenhahn wrote:
> user presses one of the shift, alt or control keys with Carbon? I've
> tried to listen to kEventRawKeyDown and kEventRawKeyUp but it doesn't
> seem to trigger when pressing shift, alt or control alone. It only
> triggers for non-modifier keys and then I can get the state of the modifier
> keys using kEventParamKeyModifiers. But that's not what I want. I
> want to be notified when shift, alt or control is pressed without any
> other key. How to do that in Carbon?
Excerpt from my old application:
switch (GetEventClass(outEvent)) {
case kEventClassKeyboard:
err = GetEventParameter(outEvent,
kEventParamKeyModifiers,
typeUInt32, 0, sizeof(mod), 0,
&mod);
switch (GetEventKind(outEvent)) {
case kEventRawKeyDown:
case kEventRawKeyModifiersChanged:
/* here you shlould see them */
}
}
Greetings, chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/carbon-dev/archive%40mail-archive.com
This email sent to [email protected]