Antkeeper
0.0.1
|
A virtual keyboard which generates keyboard-related input events. More...
#include <keyboard.hpp>
Public Member Functions | |
void | press (scancode scancode, std::uint16_t modifiers=modifier_key::none, bool repeat=false) |
Simulates a key press. More... | |
void | release (scancode scancode, std::uint16_t modifiers=modifier_key::none) |
Simulates a key release. More... | |
::event::channel< key_pressed_event > & | get_key_pressed_channel () noexcept |
Returns the channel through which key pressed events are published. More... | |
::event::channel< key_released_event > & | get_key_released_channel () noexcept |
Returns the channel through which key released events are published. More... | |
constexpr device_type | get_device_type () const noexcept override |
Returns device_type::keyboard. More... | |
![]() | |
void | connect () |
Simulates the device being connected. More... | |
void | disconnect () |
Simulates the device being disconnected. More... | |
bool | is_connected () const noexcept |
Returns true if the device is currently connected. More... | |
void | set_uuid (const ::uuid &id) |
Sets the universally unique identifier (UUID) of this input device. More... | |
const ::uuid & | get_uuid () const noexcept |
Returns the universally unique identifier (UUID) of this input device. More... | |
::event::channel< device_connected_event > & | get_connected_channel () noexcept |
Returns the channel through which device connected events are published. More... | |
::event::channel< device_disconnected_event > & | get_disconnected_channel () noexcept |
Returns the channel through which device disconnected events are published. More... | |
A virtual keyboard which generates keyboard-related input events.
Definition at line 34 of file keyboard.hpp.
|
inlineconstexproverridevirtualnoexcept |
Returns device_type::keyboard.
Implements input::device.
Definition at line 67 of file keyboard.hpp.
|
inlinenoexcept |
Returns the channel through which key pressed events are published.
Definition at line 55 of file keyboard.hpp.
|
inlinenoexcept |
Returns the channel through which key released events are published.
Definition at line 61 of file keyboard.hpp.
void input::keyboard::press | ( | scancode | scancode, |
std::uint16_t | modifiers = modifier_key::none , |
||
bool | repeat = false |
||
) |
Simulates a key press.
scancode | Scancode of the key to press. |
modifiers | Bit mask containing the active modifier keys. |
repeat | true if the key press is from a key repeat, false otherwise. |
Definition at line 25 of file keyboard.cpp.
void input::keyboard::release | ( | scancode | scancode, |
std::uint16_t | modifiers = modifier_key::none |
||
) |
Simulates a key release.
scancode | Scancode of the key to release. |
modifiers | Bit mask containing the active modifier keys. |
Definition at line 30 of file keyboard.cpp.