Skip to content

Instantly share code, notes, and snippets.

@VeryCrazyDog
Last active July 8, 2018 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VeryCrazyDog/4cafad4183b5a684a4b9 to your computer and use it in GitHub Desktop.
Save VeryCrazyDog/4cafad4183b5a684a4b9 to your computer and use it in GitHub Desktop.
Setting Keyboard Layout to US in Chinese Traditional (Hong Kong) Language for Windows 8, 8.1, 10
# More information at
# https://vicidi.wordpress.com/2014/10/19/setting-keyboard-layout-to-us-in-chinese-traditional-hong-kong-language-for-windows-8/
# Please notice that this won't work on Windows 7
# WARNING: This will clear your language list setting
# Determine Windows version
$WindowsVersion = [System.Environment]::OSVersion.Version.Major * 10 + [System.Environment]::OSVersion.Version.Minor
if ($WindowsVersion -ge 62) {
# Windows 8 or higher
$langList = New-WinUserLanguageList zh-Hant-HK
$langList[0].InputMethodTips.Clear()
# Keyboard layout: US
$langList[0].InputMethodTips.Add('0C04:00000409')
# Keyboard layout: United States-International
#$langList[0].InputMethodTips.Add('0C04:00020409')
# (Show as unavailable input method) Keyboard layout: Chinese (Traditional) - US Keyboard
#$langList[0].InputMethodTips.Add('0C04:00000404')
# (Not Working) Keyboard layout: Chinese (Traditional, Hong Kong S.A.R.) - US Keyboard
#$langList[0].InputMethodTips.Add('0C04:00000c04')
Set-WinUserLanguageList $langList
} else {
# Windows 7 or lower
# Do nothing, Windows 7 does not support the above command
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment