1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:27:35 +00:00

Kernel: KeyboardDevice, remove char mapping logic

Remove char mapping logic and constant character map.
This commit is contained in:
Hüseyin ASLITÜRK 2020-06-10 11:22:31 +03:00 committed by Andreas Kling
parent f4d14c42d0
commit b4577ffcf3
4 changed files with 31 additions and 246 deletions

View file

@ -32,6 +32,7 @@
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Interrupts/IRQHandler.h>
#include <Kernel/KeyCode.h>
#include <LibKeyboard/CharacterMap.h>
namespace Kernel {
@ -49,7 +50,7 @@ public:
KeyboardDevice();
void set_client(KeyboardClient* client) { m_client = client; }
void set_maps(const char* n_map, const char* n_shift_map, const char* n_alt_map, const char* n_altgr_map);
void set_maps(Keyboard::CharacterMapData character_map);
// ^CharacterDevice
virtual ssize_t read(FileDescription&, size_t, u8* buffer, ssize_t) override;
@ -81,6 +82,8 @@ private:
bool m_caps_lock_on { false };
bool m_num_lock_on { false };
bool m_has_e0_prefix { false };
Keyboard::CharacterMap m_character_map = Keyboard::CharacterMap("en");
};
class KeyboardClient {