Max OS 0.3
Loading...
Searching...
No Matches
MaxOS::drivers::peripherals::KeyDownEvent Class Reference

Event that is triggered when a key is pressed. More...

#include <keyboard.h>

Inheritance diagram for MaxOS::drivers::peripherals::KeyDownEvent:
MaxOS::common::Event< KeyboardEvents >

Public Member Functions

 KeyDownEvent (KeyCode, const KeyboardState &)
 Constructor for the KeyDownEvent class.
 
- Public Member Functions inherited from MaxOS::common::Event< KeyboardEvents >
 Event (KeyboardEvents type)
 Constructs a new Event object.
 

Public Attributes

KeyCode key_code
 The key code of the key that was pressed.
 
KeyboardState keyboard_state
 The state of the keyboard when the key was pressed.
 
- Public Attributes inherited from MaxOS::common::Event< KeyboardEvents >
KeyboardEvents type
 
uint8_tbuffer_value
 
uint32_t int_value
 
bool bool_value
 
union { 
 
   uint8_t *   buffer_value 
 
   uint32_t   int_value 
 
   bool   bool_value 
 
return_value 
 

Detailed Description

Event that is triggered when a key is pressed.

Definition at line 261 of file keyboard.h.

Constructor & Destructor Documentation

◆ KeyDownEvent()

KeyDownEvent::KeyDownEvent ( KeyCode  key_code,
const KeyboardState keyboard_state 
)

Constructor for the KeyDownEvent class.

Parameters
key_codeThe keycode of the key that was pressed
keyboard_stateThe state of the keyboard when the key was pressed

Definition at line 662 of file keyboard.cpp.

663: Event<KeyboardEvents>(KeyboardEvents::KEYDOWN),
666{
667}
Stores the left, top, width and height of a rectangle.
Definition rectangle.h:22
KeyCode key_code
The key code of the key that was pressed.
Definition keyboard.h:266
KeyboardState keyboard_state
The state of the keyboard when the key was pressed.
Definition keyboard.h:267

Member Data Documentation

◆ key_code

KeyCode MaxOS::drivers::peripherals::KeyDownEvent::key_code

The key code of the key that was pressed.

Definition at line 266 of file keyboard.h.

◆ keyboard_state

KeyboardState MaxOS::drivers::peripherals::KeyDownEvent::keyboard_state

The state of the keyboard when the key was pressed.

Definition at line 267 of file keyboard.h.


The documentation for this class was generated from the following files: