UtilKeyboardGetKeyCode Method

Translate a character to the corresponding keycode.

Definition

Namespace: DevCase.Core.IO.Devices.Input
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static short GetKeyCode(
	char c,
	IntPtr keyboardLayout = default
)

Parameters

c  Char
The character.
keyboardLayout  IntPtr  (Optional)
The keyboard layout.

Return Value

Int16
If the function succeeds, the return value contains the keycode.

If the function finds no key that translates to the passed character code, the return value is -1.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also