Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stripping modifier keys



On Wed, 20 Jun 2007 11:08:17 -0700,
Michael Grady (email@hidden) wrote:


>Marco,
>you'll want to look at the new TextInputSource (TIS) API avaiiable in  
>Leopard HIToolbox (TextInputSources.h).  The TIS API supercedes the  
>deprecated KL API and will be available in 64bit.  Hope the following  
>snippet helps:

[snip]

Thanks for the snippet.

Still one question, though: what happens if the currently selected
keyboard input source does not have an associated 'uchr' resource,
but only an old-style 'KCHR' resource?

Will TISGetInputSourceProperty() synthesize one for me? (From the
comments in <HIToolbox/TextInputSources.h>, I gather it won't)

Or can I assume all keyboards in Leopard have associated 'uchr'
data?  (this was certainly not the case in Tiger).

If the answers to the above two questions are both "no", that
means I may still have to use KeyTranslate() *and* convert its
result to Unicode *and* for the conversion step, I'll need to
know the script code (ugh!) of the 'KCHR'.  It's going to end
up with some messy code that uses functions and data types that
Apple has been telling us to stay clear of for years.

I had hoped Leopard would provide an easier way to strip modifier
keys that would work with any keyboard.  I guess I'll file an
enhancement request.


                                        -- marco

-- 
It's not the data universe only, it's human conversation.
They want to turn it into a one-way flow that they have entirely
monetized. I look at the collective human mind as a kind of
ecosystem. They want to clear cut it. They want to go into the
rainforest of human thought and mow the thing down.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Stripping modifier keys (From: "Marco Piovanelli" <email@hidden>)
 >Re: Stripping modifier keys (From: Michael Grady <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.