mathiasbynens / mathiasbynens/custom.keylayout

Better way to set default keyboard?

Open
#7 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
64
Forks
9
PR merge metrics
No merged PRs in 30d

Description

This is for OS X 10.8, but it might just work for 10.9 as well: https://github.com/hjuutilainen/dotfiles/blob/9198bacc8e8ea63bf441a3e313a93a2159037a34/bin/osx-system-defaults.sh#L84-L96

``` bash
# ==============================================
# Set keyboard preferences
# ==============================================
defaults write /Library/Preferences/com.apple.HIToolbox AppleCurrentKeyboardLayoutInputSourceID "com.apple.keylayout.Finnish"
defaults write /Library/Preferences/com.apple.HIToolbox AppleDefaultAsciiInputSource -dict InputSourceKind "Keyboard Layout" "KeyboardLayout ID" -int 17 "KeyboardLayout Name" Finnish

# Delete the default layouts (US)
defaults delete /Library/Preferences/com.apple.HIToolbox AppleEnabledInputSources

# Enable Finnish layout
defaults write /Library/Preferences/com.apple.HIToolbox AppleEnabledInputSources -array '{ InputSourceKind = "Keyboard Layout"; "KeyboardLayout ID" = 17; "KeyboardLayout Name" = Finnish; }'
defaults write /Library/Preferences/com.apple.HIToolbox AppleInputSourceHistory -array '{ InputSourceKind = "Keyboard Layout"; "KeyboardLayout ID" = 17; "KeyboardLayout Name" = Finnish; }'
defaults write /Library/Preferences/com.apple.HIToolbox AppleSelectedInputSources -array '{ InputSourceKind = "Keyboard Layout"; "KeyboardLayout ID" = 17; "KeyboardLayout Name" = Finnish; }'
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the referenced bin/osx-system-defaults.sh lines 84-96 and the linked macOS defaults commands. Determine what safer or simpler default-keyboard setup is intended for OS X 10.8 or 10.9, then verify the resulting layout selection and enabled input sources on the target system.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, macos
Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.