On May 17, 2009, at 9:37 PM, Christopher Hansen wrote:

First of all, I want to be able to set them, so I primarily need the setters, but I also want the getters because I want to be able to restore the previous values when my app exits or is swapped out.

LMSetKeyRepThresh turns into this:

        NXEventHandle handle = NXOpenEventStatus();
        NXSetKeyRepeatThreshold( handle, inValue );
        NXCloseEventStatus( handle );

which I believe is all public API (if poorly/un-documented). However, I'm not sure if this has any effect if you're not running as root; you'll have to try it.

Second, my goal is to move entirely to Cocoa since, as I understand it, support for Carbon is being frozen with the release of Snow Leopard. So, I'm currently in the process of removing all of my Carbon dependencies. However, I'm just fine with C APIs, and, in fact, I'm retaining all of my CGL code since it would completely break my platform independent architecture -- which separates the rendering layer from the application/event handling layer -- to use Cocoa for my rendering.

In this particular case, I'd almost recommend sticking with LMSetKeyRepThresh. The NX-level APIs are nearly as deprecated as Carbon API in this case. Probably a good idea to file a bug requesting a Cocoa-level API to do this.

-eric

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to