summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibKeyboard
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibKeyboard')
-rw-r--r--Userland/Libraries/LibKeyboard/CharacterMap.cpp4
-rw-r--r--Userland/Libraries/LibKeyboard/CharacterMap.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibKeyboard/CharacterMap.cpp b/Userland/Libraries/LibKeyboard/CharacterMap.cpp
index cf5771d67f..925a768c8f 100644
--- a/Userland/Libraries/LibKeyboard/CharacterMap.cpp
+++ b/Userland/Libraries/LibKeyboard/CharacterMap.cpp
@@ -74,7 +74,7 @@ Result<CharacterMap, OSError> CharacterMap::fetch_system_map()
#endif
-u32 CharacterMap::get_char(KeyEvent event)
+u32 CharacterMap::get_char(KeyEvent event) const
{
auto modifiers = event.modifiers();
auto index = event.scancode & 0xFF; // Index is last byte of scan code.
@@ -121,7 +121,7 @@ void CharacterMap::set_character_map_name(const String& character_map_name)
m_character_map_name = character_map_name;
}
-const String CharacterMap::character_map_name()
+const String& CharacterMap::character_map_name() const
{
return m_character_map_name;
}
diff --git a/Userland/Libraries/LibKeyboard/CharacterMap.h b/Userland/Libraries/LibKeyboard/CharacterMap.h
index 5a45c34fdb..6dd701d216 100644
--- a/Userland/Libraries/LibKeyboard/CharacterMap.h
+++ b/Userland/Libraries/LibKeyboard/CharacterMap.h
@@ -47,12 +47,12 @@ public:
static Result<CharacterMap, OSError> fetch_system_map();
#endif
- u32 get_char(KeyEvent);
+ u32 get_char(KeyEvent) const;
void set_character_map_data(CharacterMapData character_map_data);
void set_character_map_name(const String& character_map_name);
const CharacterMapData& character_map_data() const { return m_character_map_data; };
- const String character_map_name();
+ const String& character_map_name() const;
private:
CharacterMapData m_character_map_data;