25 lines
544 B
C++
25 lines
544 B
C++
#pragma once
|
|
#include "api/Keyboard.h"
|
|
#include <luna/Option.h>
|
|
|
|
namespace Keyboard
|
|
{
|
|
struct TTYKeyboardState
|
|
{
|
|
bool ignore_next { false };
|
|
bool left_shift { false };
|
|
bool right_shift { false };
|
|
bool left_control { false };
|
|
bool capslock { false };
|
|
};
|
|
|
|
struct KeyboardState
|
|
{
|
|
bool ignore_next { false };
|
|
};
|
|
|
|
Option<char> decode_scancode_tty(u8 scancode, TTYKeyboardState& state);
|
|
|
|
Option<moon::KeyboardPacket> decode_scancode(u8 scancode, KeyboardState& state);
|
|
}
|