Show / Hide Table of Contents

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
IEnumerable<char> characters

A list of characters to convert.

Returns

byte[]

The HID codes that correspond to the input characters.

Exceptions

Type Condition
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
string value

A string to convert to HID codes.

Returns

byte[]

The HID codes that correspond to the input string.

Exceptions

Type Condition
ArgumentOutOfRangeException

At least one of the characters in the string is not in the map for this HidCodeTranslator instance.

In this article
Back to top Generated by DocFX