In article
<20bd15eb-3049-474a-ab7e-cda9f060940c@[EMAIL PROTECTED]
>,
"Roman A. Kirillov" <sigizmund@[EMAIL PROTECTED]
> wrote:
> Hi guys,
>
> I've got quite crazy idea - there's a wonderful button on a keyboard
> named Caps Lock. And I really want it to toggle something useful -
> like... ummm... keyboard layout? While switching keyboard layout isn't
> really tricky, trapping caps lock - that's an issue.
>
> Using examples from ADC, I easily figured, how to catch modifier
> status 0x400. Now the question is - but how can I actually disable
> capitalizing after that? Ideally, I should catch this event and do not
> call something like DispatchEventOn method - but there's no such a
> method I can find :) (I am quite new in Mac OS X programming, but not
> new in UNIX).
>
> Any ideas?
I think you may be looking for the wrong solution for your problem.
Instead of writing code that switches the keyboard layout depending on
the status of the caps lock key, why don't you write and install a
single keyboard layout that behaves as you want?
I think <http://developer.apple.com/technotes/tn2002/tn2056.html>
and
<http://scripts.sil.org/ukelele>
should provide sufficient information
for achieving what you want.
Reinder


|