GetHidCodes Method
GetHidCodes(IEnumerable<Char>)
Given a collection of characters, returns the corresponding HID codes for the keyboard layout.
C#
public byte[] GetHidCodes(IEnumerable<char> characters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Char> | characters | A list of characters to convert. |
Returns
System.Byte[]
The HID codes that correspond to the input characters.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | At least one of the characters in the collection is not in the map for this HidCodeTranslator instance. |
GetHidCodes(String)
Given a string, returns the corresponding HID codes for the individual characters in the string for the keyboard layout.
C#
public byte[] GetHidCodes(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | A string to convert to HID codes. |
Returns
System.Byte[]
The HID codes that correspond to the input string.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | At least one of the characters in the string is not in the map for this HidCodeTranslator instance. |