diff options
Diffstat (limited to 'Libraries/LibKeyboard')
-rw-r--r-- | Libraries/LibKeyboard/CharacterMap.cpp | 13 | ||||
-rw-r--r-- | Libraries/LibKeyboard/CharacterMap.h | 4 |
2 files changed, 15 insertions, 2 deletions
diff --git a/Libraries/LibKeyboard/CharacterMap.cpp b/Libraries/LibKeyboard/CharacterMap.cpp index 87e9973e89..b5e0f4ee25 100644 --- a/Libraries/LibKeyboard/CharacterMap.cpp +++ b/Libraries/LibKeyboard/CharacterMap.cpp @@ -36,7 +36,6 @@ namespace Keyboard { CharacterMap::CharacterMap(const String& file_name) { #ifdef KERNEL - UNUSED_PARAM(file_name); m_character_map_data = default_character_map; #else auto result = CharacterMapFile::load_from_file(file_name); @@ -44,13 +43,14 @@ CharacterMap::CharacterMap(const String& file_name) m_character_map_data = result.value(); #endif + m_character_map_name = file_name; } #ifndef KERNEL int CharacterMap::set_system_map() { - Syscall::SC_setkeymap_params params { m_character_map_data.map, m_character_map_data.shift_map, m_character_map_data.alt_map, m_character_map_data.altgr_map }; + Syscall::SC_setkeymap_params params { m_character_map_data.map, m_character_map_data.shift_map, m_character_map_data.alt_map, m_character_map_data.altgr_map, { m_character_map_name.characters(), m_character_map_name.length() } }; return syscall(SC_setkeymap, ¶ms); } @@ -92,4 +92,13 @@ void CharacterMap::set_character_map_data(CharacterMapData character_map_data) m_character_map_data = character_map_data; } +void CharacterMap::set_character_map_name(const String& character_map_name) +{ + m_character_map_name = character_map_name; +} + +const String CharacterMap::character_map_name() +{ + return m_character_map_name; +} } diff --git a/Libraries/LibKeyboard/CharacterMap.h b/Libraries/LibKeyboard/CharacterMap.h index cf0a8f065e..413f7b4ded 100644 --- a/Libraries/LibKeyboard/CharacterMap.h +++ b/Libraries/LibKeyboard/CharacterMap.h @@ -43,9 +43,13 @@ public: u32 get_char(KeyEvent); void set_character_map_data(CharacterMapData character_map_data); + void set_character_map_name(const String& character_map_name); + + const String character_map_name(); private: CharacterMapData m_character_map_data; + String m_character_map_name; }; } |