--- layout: post title: UNIX programming under Windows 10: Dead key issue date: 2020-07-13 10:37 author: rick categories: --- 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](https://en.wikipedia.org/notes/Dead_key#Dead_keys_on_various_keyboard_layouts) 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](https://www.reddit.com/r/PowerShell/comments/g9m0hg/how_to_change_the_keyboard_layout_from_powershell/fov5h3m/)): ``` # 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 ```