Re: Swap keyboard from "belgium" layout to US
Re: Swap keyboard from "belgium" layout to US
- Subject: Re: Swap keyboard from "belgium" layout to US
- From: "Gary (Lists)" <email@hidden>
- Date: Wed, 19 Apr 2006 06:50:13 -0400
"kai" wrote:
> On 18 Apr 2006, at 14:24, Jan Bultereys wrote:
>
>> Does anyone have an idea how to swap keyboard language in panther.
>> I want to swap the keyboard from “Belgian” to “US” and then back to
>> “Belgian” via applescript or terminal command.
>
> This seems to be another case where modifying the plist file (~/
> Library/Preferences/com.apple.HIToolbox.plist) doesn't have any (desired)
> effect, Jan. Don't know if you're open to GUI scripting on this, but here's a
> stab at it, anyway. It relies, of course, on the input menu being available in
> the menu bar - and on the required layout[s] being present in the menu.
[script clipped]
> While
> it works in Tiger, I can't say if it will in Panther. (Sometimes, adding a
> delay here and there seems to help with a pre-Tiger UI).
I can confirm that the uncertainty had merit.
This does not run in Panther, OMM.
Specifically, I get the NSReceiverEvaluationScriptError 4.
I added a few delays, as suggested for testing.
Alas. Zilch. Zippo. Nada.
I don't know enough about UI scripting to try alternatives, so this is
nothing definitive. I did open the UI Browser but saw only madness.
<lameass>
While I know this is not all that useful in a variable environment, I toggle
between two keyboard layouts -- current and last, only -- using 'cmd-space'.
Since I daily use two, I can switch quickly.
Via AppleScript, if one knew they wanted only to switch to "the other, and
back" during the course of some workflow, then one could:
tell application "System Events" to keystroke space using command down
This is ultra-unsophisticated but I use that in one applet, where I open a
url and switch the kb.
(The only problem is that when I'm done, I always forget to switch back.)
</lameass>
Not much help, pro'ly.
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden