• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keyboard problems in Logic
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keyboard problems in Logic


  • Subject: Re: Keyboard problems in Logic
  • From: Half Activist <email@hidden>
  • Date: Thu, 13 Aug 2009 10:57:01 +0200

I don't know anything of plug-ins programming, yet as both a Logic user and mac os x programmer i'll give you my two cents advice.
Maybe you could give a look at the Quartz Event Taps, that are damn handy when trying to grab events from the keyboard mouse and others.
In your case a passive listening tap would do the trick, and install/ remove it when your in your so called "edit mode".


I've used these taps and find them far more convenient than carbon event handlers, not to mention that they're not relying on the now aged (and supposed to disappear) carbon, carbon event handlers have a status that's too uncertain to me.

Quote from the Quart Event Services documentation : "Introduced in Mac OS X version 10.4, event taps provide functionality similar to the Win32 functions SetWinEventHook when used to establish an out-of- context event hook, and SendInput. "

Hope it helps.

Regards.

On Aug 13, 2009, at 10:10 AM, john smith wrote:


So, no-one has a take on the problem described below? Is there anyone from Apple and/or Emagic here?



Thanks,

Michael Olsen
PhonoXone


From: email@hidden To: email@hidden Date: Mon, 10 Aug 2009 13:01:16 +0200 Subject: Keyboard problems in Logic


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



_______________________________________________ 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
  • Follow-Ups:
    • RE: Keyboard problems in Logic
      • From: john smith <email@hidden>
References: 
 >AudioQueue - Setting channel layout (From: Richard Bannister <email@hidden>)
 >Keyboard problems in Logic (From: john smith <email@hidden>)
 >RE: Keyboard problems in Logic (From: john smith <email@hidden>)

  • Prev by Date: Re: Keyboard problems in Logic
  • Next by Date: Re: Audio glitches during playback thru Remote IO unit
  • Previous by thread: Re: Keyboard problems in Logic
  • Next by thread: RE: Keyboard problems in Logic
  • Index(es):
    • Date
    • Thread