Change Keyboard Input Source for all users

ashearera
New Contributor II

Hi guys, we have a lab of machines on Big Sur with input sources currently all set to British.

For various reasons, it will be easier for our users if we now set our default Input Type in System Preferences > Keyboard to US.

I have created a Configuration Profile with a Custom Settings payload configured as per below, but though the profile seems to install ok, it doesn't seem to have any effect - the Input Sources are still British. I have tried setting this both at computer and user level with no luck:

keyboard config profile screenshot.png

XML for reference:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>AppleCurrentKeyboardLayoutInputSourceID</key>
    <string>com.apple.keylayout.US</string>
    <key>AppleEnabledInputSources</key>
    <array>
        <dict>
            <key>InputSourceKind</key>
            <string>Keyboard Layout</string>
            <key>KeyboardLayout ID</key>
            <integer>0</integer>
            <key>KeyboardLayout Name</key>
            <string>U.S.</string>
        </dict>
    </array>
    <key>AppleSelectedInputSources</key>
    <array>
        <dict>
            <key>InputSourceKind</key>
            <string>Keyboard Layout</string>
            <key>KeyboardLayout ID</key>
            <integer>0</integer>
            <key>KeyboardLayout Name</key>
            <string>U.S.</string>
        </dict>
    </array>
</dict>
</plist>

Anyone have any ideas on where to go from here?

Thanks!

1 REPLY 1

mav_eric_jx
New Contributor III

Hey

I was facing a similar problem and found a solution here
Change OSX keyboard layout("input source") programmatically via terminal or AppleScript? 

I used the method with the small m file to compile a little executable with the keyboard layout hard coded in the executable and use a script that runs the executable as the current logged in user. Running the executable as the current logged in user is recommended as each user has an individual keyboard layout. If  you set e.g. US for the admin user (or the user createad/used during enrollment) new users would have British layout again. Both the script and the installation of the package are combined in one policy. 

In my case I added a second script to run it as non-admin. This script checks if the current logged in user is not in the admin group and if so runs the policy. 

 

I hope this helps.