1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

LibKeyboard+keymap: Support querying the keymap via commandline

This commit is contained in:
Ben Wiederhake 2021-01-30 22:01:34 +01:00 committed by Andreas Kling
parent a2c21a55e1
commit dd4e670f72
4 changed files with 52 additions and 7 deletions

View file

@ -26,6 +26,10 @@
#pragma once
#ifndef KERNEL
# include <AK/OSError.h>
# include <AK/Result.h>
#endif
#include <AK/String.h>
#include <Kernel/API/KeyCode.h>
#include <LibKeyboard/CharacterMapData.h>
@ -35,10 +39,12 @@ namespace Keyboard {
class CharacterMap {
public:
CharacterMap(const String& file_name);
CharacterMap(const String& map_name);
CharacterMap(const String& map_name, const CharacterMapData& map_data);
#ifndef KERNEL
int set_system_map();
static Result<CharacterMap, OSError> fetch_system_map();
#endif
u32 get_char(KeyEvent);