1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:05:06 +00:00

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.
This commit is contained in:
Brian Gianforcaro 2020-08-01 16:31:13 -07:00 committed by Andreas Kling
parent 10e912d68c
commit e67d0c9eef
2 changed files with 7 additions and 0 deletions

View file

@ -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();