#include <revolution/kbd.h> KBDUnicode KBDTranslateHidCode(KBDHIDCode hid, KBDModState modState, KBDCountryCode co);
| hid | USB HID code to be translated. |
|---|---|
| modState | Keyboard modifier state value to use in the translation. |
| co | Country code of the map to be used. |
| KBDUnicode | Returns a Unicode value that represents the translated key. It will return KBK_Error under the following conditions:
KBK_Void if the key has no defined translation (for example, if KBD_MS_ALTGR is set but the map has no AltGr).)
|
|---|
Given a USB HID code, modifier state, and country code, this function will return the KBDUnicode value from the appropriate keyboard map.
Note that a KBDUnicode value may be private to the KBD library. All keys are provided with a KBDUnicode value. For the function, editing, arrow, and other special keys, custom (private) Unicode values are used. These private Unicode values are all in the range of 0xf000-0xf1ff; they should never be used for external data exchange. They should also not be confused with private Unicode values that may be used elsewhere in the Revolution SDK or other SDKs. The KBD private Unicode values should only be used with keyboard-related functions.
For more information about KBDUnicode, refer to Introduction.
If the modifier state KBD_MS_SHIFTED_KEY is not set, the translate function will ignore KBD_MS_SHIFT, KBD_MS_CAPS_LOCK, and KBD_MS_NUM_LOCK if one or more of the following modifiers are also on:
KBD_MS_CTRLKBD_MS_ALTKBD_MS_GUIKBD_MS_EXTRAThe KBD_MS_SHIFTED_KEY modifier state is off by default.
Keyboard Functions
Introduction
2007/03/27 Initial version.
CONFIDENTIAL