Re: Obtaining keyboard rate & delay metrics
Re: Obtaining keyboard rate & delay metrics
- Subject: Re: Obtaining keyboard rate & delay metrics
- From: Ricky Sharp <email@hidden>
- Date: Mon, 28 Feb 2005 12:47:40 -0600
On Monday, February 28, 2005, at 12:37PM, Ricky Sharp <email@hidden> wrote:
>While not critical for my app, I'd like to be able to obtain the values for key repeat rate and delay until repeat. In a custom stepper-style value field, I want mouse tracking in my stepper arrows (done with periodic events) to perform just as if using the keyboard.
>
>Searching came up with very few hits. But none ultimately revealed any API for which property list (if any) the settings were stored in.
>
>Looking at mod-dates of various plists, I couldn't find anything that stored such settings. Will definitely file an enhancement request on this if no API exists (or no key exists to work with NSUserDefaults).
>
Just after I posted this, I remembered that you can use a 'find' parameter on the command-line with the defaults command. The key repeat is stored as a ticks[1] value with the key 'KeyRepeat' in the 'Apple Global Domain' domain.
Attempting to find 'delay' turned up nothing and looking at all values in 'Apple Global Domain' turned up nothing either. I guess this is at least a good first step as the key repeat value is more important to know than the initial delay (at least for my needs).
So, I'll just file an enhancement on obtaining the initial delay value.
[1] Ticks are roughly 1/60th of second, so it's very easy to convert to milliseconds. Hopefully the implementation detail of what units are used do not change as that would cause serious grief in future versions of my app. The reason I think the value is ticks is that the shortest interval is currently '2' and the longest is '120'. When set at 120, I noticed a 2-second delay between generated key events.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden