-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeyboard.sh
executable file
·96 lines (59 loc) · 3.15 KB
/
keyboard.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
#
# Keyboard preferences.
#
cd "$(dirname "${BASH_SOURCE[0]}")" \
&& . "../../../utilities.sh"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
main() {
print_subheader "Keyboard"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# (e.g. enable Tab in modal dialogs)
execute "defaults write -g AppleKeyboardUIMode -int 2" \
"Enable full keyboard access for all controls"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write com.apple.universalaccess closeViewScrollWheelToggle -bool true && \
defaults write com.apple.universalaccess closeViewZoomFollowsFocus -bool true && \
defaults write com.apple.universalaccess HIDScrollZoomModifierMask -int 262144" \
"Use scroll gesture with the Ctrl (^) modifier key to zoom"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g KeyRepeat -int 2" \
"Set blazing fast key repeat rate"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g InitialKeyRepeat -int 15 && \
defaults write -g 'InitialKeyRepeat_Level_Saved' -int 15" \
"Set blazing fast initial key repeat delay"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write com.apple.BezelServices kDim -bool true" \
"Automatically illuminate built-in MacBook keyboard in low light"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write com.apple.BezelServices kDimTime -int 300" \
"Turn off keyboard illumination when computer is not used for 5 minutes."
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g ApplePressAndHoldEnabled -bool false" \
"Disable press-and-hold for keys in favor of key repeat"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticCapitalizationEnabled -bool false" \
"Disable automatic capitalization"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticPeriodSubstitutionEnabled -bool false" \
"Disable automatic period substitution"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticQuoteSubstitutionEnabled -bool false" \
"Disable smart quotes"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticDashSubstitutionEnabled -bool false" \
"Disable smart dashes"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticCapitalizationEnabled -bool false " \
"Disable automatic capitalization"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticSpellingCorrectionEnabled -bool false" \
"Disable auto-correct"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
execute "defaults write -g NSAutomaticTextCompletionEnabled -bool false" \
"Disable text-completion"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
printf "\n"
}
main