UNIX programming under Windows 10: Dead key issue

Typing the shortcuts to your home directory with the tilde (~) sign, requires an extra space after the character when using an 'US International keyboard' layout which could be rather annoying since I type a lot.

Setting keyboards and languages is a mess under windows GUI settings, luckaly powershell to the rescue (thanks to this reddit post for the suggestion):

# Set some sane defaults (for NL programmer)
Set-WinUserLanguageList en-NL -Force

PS C:\Users\info> Get-WinUserLanguageList
LanguageTag     : en-NL
Autonym         : English (Netherlands)
EnglishName     : English
LocalizedName   : English (Netherlands)
ScriptName      : Latin
InputMethodTips : {2000:00000409}
Spellchecking   : True
Handwriting     : False


# Default keyboard layout of en-NL is 'US International', which includes dead keys
# really annoying for (UNIX) programming input.
PS C:\Users\info> Set-WinUserLanguageList en-NL -Force
PS C:\Users\info> Get-WinUserLanguageList


LanguageTag     : en-NL
Autonym         : English (Netherlands)
EnglishName     : English
LocalizedName   : English (Netherlands)
ScriptName      : Latin
InputMethodTips : {2000:00020409}
Spellchecking   : True
Handwriting     : False


# Change to 'US' to get rid of dead-keys
PS C:\Users\info> $someVar = Get-WinUserLanguageList
PS C:\Users\info> $someVar[0].InputMethodTips.Remove('2000:00020409')
True
PS C:\Users\info> $someVar[0].InputMethodTips.Add('2000:00000409')
PS C:\Users\info> Set-WinUserLanguageList $someVar -Force

PS C:\Users\info> Get-WinUserLanguageList


LanguageTag     : en-NL
Autonym         : English (Netherlands)
EnglishName     : English
LocalizedName   : English (Netherlands)
ScriptName      : Latin
InputMethodTips : {2000:00000409}
Spellchecking   : True
Handwriting     : False

Comments

No comments.