Show / Hide Table of Contents

HidCodeTranslator Class

Namespace: Yubico.Core.Devices.Hid Assembly: Yubico.Core.dll

Represents an abstract keyboard's HID code map. Able to convert to and from characters and their corresponding HID code.

C#
public sealed class HidCodeTranslator
Inheritance object HidCodeTranslator

Properties

Name Description
this[byte]

Gets the character that corresponds to the given HID code.

this[char]

Gets the HID code that corresponds to the given HID code.

Layout

The KeyboardLayout that this HidCodeTranslator instance uses.

SupportedCharacters

An array of chars respresenting all of the characters supported by this HidCodeTranslator instance.

SupportedCharactersString

A string representation of all of the characters supported by this HidCodeTranslator instance.

SupportedHidCodes

An array of bytes representing all of the HID codes supported by this HidCodeTranslator instance.

Methods

Name Description
GetCharacters(byte[])

Given a collection of HID codes, returns an System.Collections.Generic.IList<T> of characters that would be produced by the keyboard layout in this class.

GetHidCodes(IEnumerable<char>)

Given a collection of characters, returns the corresponding HID codes for the keyboard layout.

GetHidCodes(string)

Given a string, returns the corresponding HID codes for the individual characters in the string for the keyboard layout.

GetInstance(KeyboardLayout)

Gets a KeyboardLayout specific instance of this class.

GetString(byte[])

Given a collection of HID codes, returns the string that it would produce.

In this article
Back to top Generated by DocFX