#include <revolution/kbd.h> KBDEc KBDSetModState(KBDChannel ch, KBDModState modState);
| ch | Keyboard channel to set. |
|---|---|
| modState | A KBDModState value to set the current modifier state. |
| KBDEc | Keyboard error code. KBD_SUCCESS if the call was successful.KBD_ERR_NOT_INITIALIZED if the library was not initialized.KBD_ERR_BAD_VALUE if ch or modState is out of range. |
|---|
Sets the current modifier key state of the USB keyboard on channel ch. Normally, this function only lets you change these modifier bits:
KBD_MS_CAPS_LOCKKBD_MS_NUM_LOCKKBD_MS_SCROLL_LOCKKBD_MS_LANG1KBD_MS_LANG2KBD_MS_SHIFTED_KEYThe modifier key state for these bits is set according to the bits set in modState.
If the bit KBD_MS_SET_ALL is set in modState, all bits in the keyboard modifier state are set.
The modifier key state is used by KBDTranslateHidCode to correctly translate HID codes into Unicodes. The modifier state is normally controlled by the KBD library, although the application may take control of the locking states by calling KBDSetLockProcessing.
The default value for the keyboard modifier state is KBD_MS_NULL.
2007/03/19 Initial version.
CONFIDENTIAL