summaryrefslogtreecommitdiff
path: root/Libraries/LibKeyboard/CharacterMap.cpp
diff options
context:
space:
mode:
authorBrian Gianforcaro <b.gianfo@gmail.com>2020-08-01 16:31:13 -0700
committerAndreas Kling <kling@serenityos.org>2020-08-02 10:56:33 +0200
commite67d0c9eef8d34714da3b0a2730ae31110e5181d (patch)
tree556e4b56fa734fd69e719d038a8cbbfb1e702f75 /Libraries/LibKeyboard/CharacterMap.cpp
parent10e912d68c47d4575c3030948fbcf3d11ba4a30d (diff)
downloadserenity-e67d0c9eef8d34714da3b0a2730ae31110e5181d.zip
LibKeyboard: Don't compile CharacterMap:set_system_map in kernel mode
In preparation for using Userspace<T> in Syscall::SC_setkeymap_params remove the usage of SC_setkeymap_params from when compiling in kernel mode. In kernel model we would need to do a bunch of explicit FlatPtr cats to in order to get it to compile, and it's unused anyway, so just avoid the pain.
Diffstat (limited to 'Libraries/LibKeyboard/CharacterMap.cpp')
-rw-r--r--Libraries/LibKeyboard/CharacterMap.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Libraries/LibKeyboard/CharacterMap.cpp b/Libraries/LibKeyboard/CharacterMap.cpp
index 577f25422d..87e9973e89 100644
--- a/Libraries/LibKeyboard/CharacterMap.cpp
+++ b/Libraries/LibKeyboard/CharacterMap.cpp
@@ -46,12 +46,16 @@ CharacterMap::CharacterMap(const String& file_name)
#endif
}
+#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 };
return syscall(SC_setkeymap, &params);
}
+#endif
+
u32 CharacterMap::get_char(KeyEvent event)
{
auto modifiers = event.modifiers();