(sent to George, but forgot to CC to the list as well. my bad.)
They work great for me on Jaguar. I can test them under 10.1.5 later
this weekend if anyone wants me to, though I suspect there are others
here who can do that more easily than I.
I'm also happy to report that this code works even on a machine with no
Apple Pro Keyboard attached.
George,
I've noticed that you do not post key-up events for the keys. In my [5
minutes of] testing, it takes the volume control OSD about 4 seconds to
fade away without posting key-up events and about 2 seconds if key-up
events are posted (which, coincidentally, is the same amount of time as
pressing one of the actual media keys on a keyboard). The eject key
(HIDPostSysDefinedKey()) doesn't seem to have a difference in the time,
however, and there is no explicit setting of a key-down event in that
function.
I've added this code to the end of the end of the HIDPostAuxKey()
function to post a key-up event and all seems to be well (at least on
my machine):
[BEGIN]
event.compound.misc.C[2] = NX_KEYUP;
kr = IOHIDPostEvent( get_event_driver(), NX_SYSDEFINED, loc,
&event, kNXEventDataVersion, 0, FALSE );
check( KERN_SUCCESS == kr );
[END]
Dave Corder
--- George Warner <email@hidden> wrote:
> on 8/30/02 12:10 PM, David Niemeijer at <email@hidden>
> wrote:
> >> Ok, Here's everything you'll need to post the media keys:
> >
> > Is the code you posted supposed to work on 10.1 and up or just
> 10.2?
>
> Not a clue. I don't think anything changed in the keyboards drivers
> for
> Jaguar so I'll venture a guess that it should work but not sure how
> far
> back. The constants & API came from sources written in '92 (NeXT) so
> they
> may work back to 10.0 or public beta. ;-)
> --
> Enjoy,
> George Warner,
> Mixed Mode Magic Fragment Scientist
> Apple Developer Technical Support (DTS)
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
_______________________________________________
studentdev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/studentdev
Do not post admin requests to the list. They will be ignored.