Skip to content

Commit e154a43

Browse files
authored
Update InputLanguage.xml (dotnet#9153)
1 parent 6a00c0b commit e154a43

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

xml/System.Windows.Forms/InputLanguage.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,23 +237,22 @@
237237
<format type="text/markdown"><![CDATA[
238238
239239
## Remarks
240-
The <xref:System.Windows.Forms.InputLanguage.FromCulture%2A> method selects from among installed keyboards. Specifically, this method performs the following operations:
240+
241+
The <xref:System.Windows.Forms.InputLanguage.FromCulture%2A> method returns the first keyboard layout with matching `culture` from the list of all installed keyboard layouts. It might return an unexpected value if multiple keyboards are installed under a single user language.
242+
243+
Specifically, this method performs the following operations:
244+
245+
1. Gets the full list of available input language identifiers (HKLs) from the `GetKeyboardLayoutList` function.
241246
242-
1. Gets the LCID associated with `culture`.
247+
2. Finds the HKL that corresponds to the `culture`, if one is present.
243248
244-
2. Gets the full list of available input language identifiers (HKLs) from the `GetKeyboardLayoutList` function.
249+
3. Returns the installed keyboard associated with that HKL.
245250
246-
3. Finds the HKL that corresponds to the LCID from `culture`, if one is present.
247-
248-
4. Returns the installed keyboard associated with that HKL.
249-
250-
5. If no keyboard is found, returns `null`.
251+
4. If no keyboard is found, returns `null`.
251252
252253
> [!NOTE]
253254
> The <xref:System.Windows.Forms.InputLanguage.FromCulture%2A> method never tries to load or install an additional keyboard if one has not already been installed for `culture`. Use the Platform SDK function, `LoadKeyboardLayout`, to install an additional keyboard.
254255
255-
256-
257256
## Examples
258257
The following code example sets the default input language as the current input language.
259258

0 commit comments

Comments
 (0)