Rishka
RISC-V virtual runtime in C/C++ made for ESP32-WROVER
|
Provides access to keyboard-related functionalities in the Rishka VM SDK. More...
#include <keyboard.h>
Static Public Member Functions | |
static string | layout_name () |
Get the name of the current keyboard layout. More... | |
static string | layout_desc () |
Get the description of the current keyboard layout. More... | |
static PS2Device | device_type () |
Get the type of the keyboard device. More... | |
static bool | is_num_lock () |
Check if the Num Lock key is currently active. More... | |
static bool | is_caps_lock () |
Check if the Caps Lock key is currently active. More... | |
static bool | is_scroll_lock () |
Check if the Scroll Lock key is currently active. More... | |
static void | num_lock (bool state) |
Set the state of the Num Lock key. More... | |
static void | caps_lock (bool state) |
Set the state of the Caps Lock key. More... | |
static void | scroll_lock (bool state) |
Set the state of the Scroll Lock key. More... | |
static u32 | next_scancode (i32 timeout, bool resend) |
Get the next keyboard scan code. More... | |
static void | lock (i32 timeout) |
Lock the keyboard to prevent input. More... | |
static void | unlock () |
Unlock the keyboard to allow input. More... | |
static void | reset () |
Reset the keyboard to its default state. More... | |
Provides access to keyboard-related functionalities in the Rishka VM SDK.
The Keyboard class allows interaction with keyboard-related functionalities in the Rishka VM SDK. It provides methods to retrieve information about the keyboard layout, check the status of lock keys (Num Lock, Caps Lock, Scroll Lock), control the state of these lock keys, obtain keyboard scan codes, and perform operations such as locking, unlocking, and resetting the keyboard.
|
static |
Set the state of the Caps Lock key.
This method allows setting the state of the Caps Lock key.
state | The desired state of the Caps Lock key (true for active, false for inactive). |
|
static |
Get the type of the keyboard device.
This method retrieves the type of the connected keyboard device.
|
static |
Check if the Caps Lock key is currently active.
This method checks whether the Caps Lock key is currently active.
|
static |
Check if the Num Lock key is currently active.
This method checks whether the Num Lock key is currently active.
|
static |
Check if the Scroll Lock key is currently active.
This method checks whether the Scroll Lock key is currently active.
|
static |
Get the description of the current keyboard layout.
This method retrieves the description of the currently selected keyboard layout.
|
static |
Get the name of the current keyboard layout.
This method retrieves the name of the currently selected keyboard layout.
|
static |
Lock the keyboard to prevent input.
This method locks the keyboard to prevent input.
timeout | The duration for which to lock the keyboard (in milliseconds). |
Get the next keyboard scan code.
This method retrieves the next keyboard scan code.
timeout | The maximum time to wait for a scan code (in milliseconds). |
resend | Flag indicating whether to resend previous scan codes. |
|
static |
Set the state of the Num Lock key.
This method allows setting the state of the Num Lock key.
state | The desired state of the Num Lock key (true for active, false for inactive). |
|
static |
Reset the keyboard to its default state.
This method resets the keyboard to its default state.
|
static |
Set the state of the Scroll Lock key.
This method allows setting the state of the Scroll Lock key.
state | The desired state of the Scroll Lock key (true for active, false for inactive). |
|
static |
Unlock the keyboard to allow input.
This method unlocks the keyboard to allow input.