StuBS
Keyboard Class Reference

Handles keystrokes. More...

#include <device/keyboard.h>

Inheritance diagram for Keyboard:
[legend]
Collaboration diagram for Keyboard:
[legend]

Public Member Functions

 Keyboard ()
 Constructor.
 
void plugin ()
 Initialization of the keyboard.
 
void trigger () override
 Handling of keyboard interrupts.
 
- Public Member Functions inherited from Gate
 Gate ()
 Is this epiloque already marked for execution Add a member that stores the information whether a Gate has already been queued.
 
virtual ~Gate ()
 Destructor.
 

Private Member Functions

 Keyboard (const Keyboard &)=delete
 
Keyboardoperator= (const Keyboard &)=delete
 

Detailed Description

Handles keystrokes.

This class ensures correct initialization of the keyboard and, above all, its interrupt handling.

Constructor & Destructor Documentation

◆ Keyboard() [1/2]

Keyboard::Keyboard ( const Keyboard )
privatedelete

◆ Keyboard() [2/2]

Keyboard::Keyboard ( )
inline

Constructor.

Member Function Documentation

◆ operator=()

Keyboard & Keyboard::operator= ( const Keyboard )
privatedelete

◆ plugin()

void Keyboard::plugin ( )

Initialization of the keyboard.

Initialization of the keyboard and activation of the specific interrupt handling: The object will register itself at the Plugbox and configure the IOAPIC to receive the corresponding interrupts.

Note
The keyboard interrupts should be configured as level triggered. According to the standard we would have to check the corresponding entry in ACPI::MADS::Interrupt_Source_Override and use these values. Most likely this would suggest an edge-triggered mode – which would work as well. However, using a level-triggered mode is more forgiving because it resends the interrupt request even if an interrupt was lost (e.g. the required handling, retrieving the buffer entry, was not performed).
Todo:
Implement Method

◆ trigger()

void Keyboard::trigger ( )
overridevirtual

Handling of keyboard interrupts.

Processes interrupts triggered by the keyboard. On each keystroke it outputs the corresponding character on the screen – only valid keys are printed, for the sake of simplicity all in a separate line dedicated to the keyboard. If the key combination Ctrl + Alt + Del is pressed, a reboot is triggered.

Todo:
Implement Method

Implements Gate.


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