Keyboard problems in Logic
Keyboard problems in Logic
- Subject: Keyboard problems in Logic
- From: john smith <email@hidden>
- Date: Mon, 10 Aug 2009 13:01:16 +0200
- Importance: Normal
Hi,
I'm trying to solve a problem we have with a plug-in in Logic.
When the user press a key, we want to route the keyboard input to one of our controls if the control is in "edit mode". In order to accomblish this I hooked into the keyboard, using the following code:
OSStatus err;
EventTargetRef pEventTarget; // GetWindowRef() returns AUCarbonViewBase::mCarbonWindow pEventTarget = ::GetWindowEventTarget(GetWindowRef());
EventTypeSpec pSpec[1]; pSpec[0].eventClass = kEventClassKeyboard; pSpec[0].eventKind = kEventRawKeyDown;
err = ::InstallEventHandler(pEventTarget, KeyboardHandlerProc, 1, pSpec, (void*)dynamic_cast<CWindowOSX*>(this), &mKeyboardRef);
In the keyboard proc I then return noErr or eventNotHandledErr, depending on whether we used the keyboard press for something.
Now, the problem is that Logic seems to get the "first run" on the keyboard events. For instance, if 1 is pressed we get the keyboard input, and all is well. If 0 is pressed, we never get the event (Logic seems to use this as a shortcut).
So, as said, it seems to me like Logic first decides whether it wants the event or not. Which is, obviously, reversed to how we would like it.
Is there anything which can be done about this?
Thanks,
Michael Olsen PhonoXone
Share your memories online with anyone you want anyone you want.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden