Find registry key for windows 8 per-application input method setting

by Cedric Schmutz   Last Updated March 13, 2018 08:01 AM

I had some trouble to adapt a windows 7 application for windows 8. The issue was windows 8 having a global input method on windows 8.

I found that the control panel setting "Let me set a different input method for each app Windows" solved my problem (Set Windows 8 to per-application input language mode).

Now my question is : where can I find this setting in the windows 8 registry ?

I would like to retrieve this key in my application..



Answers 1


This setting is stored in HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferencesMask. The registry value itself is a binary value that represents a bitmask of various settings. Its format is documented here

Unfortunately this document is a bit oudated and does not contain information about this particular setting. By experimenting with this value I have found that the settins is stored in bit 32. When this bit is on, input switches for each application separately.

Example of HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferencesMask with setting on:
9e 1e 07 80 92 00 00 00
With setting off:
9e 1e 07 80 12 00 00 00 

Here is a Powershell script example to turn it on:

$prefMask = (Get-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name 'UserPreferencesMask').UserPreferencesMask
if (($prefMask[4] -band 0x80) -eq 0) {
  $prefMask[4] = ($prefMask[4] -bor 0x80)
  New-ItemProperty -Path 'HKCU:\Control Panel\Desktop' -Name 'UserPreferencesMask' -Value $prefMask -PropertyType ([Microsoft.Win32.RegistryValueKind]::Binary) -Force | Out-Null
}

Was tested on quite a bunch of win8.1 machines (both x86 and x64) and appears to work as expected.

Note that the setting takes effect immediately, but displays wrong in language panel settings dialog. So you need to logoff and logon back for panel settings to pick up the change.

Alexey Orlov
Alexey Orlov
March 27, 2015 11:25 AM

Related Questions



Windows 7 Keyboard Language reverting back " `` "

Updated October 25, 2017 09:01 AM

Multiple input languages, switch between two

Updated May 18, 2018 15:01 PM


Current user input language

Updated March 15, 2017 16:01 PM