diff options
Diffstat (limited to 'Userland/Libraries/LibC/serenity.cpp')
-rw-r--r-- | Userland/Libraries/LibC/serenity.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/serenity.cpp b/Userland/Libraries/LibC/serenity.cpp index 7f2bf8364f..319975c653 100644 --- a/Userland/Libraries/LibC/serenity.cpp +++ b/Userland/Libraries/LibC/serenity.cpp @@ -129,4 +129,24 @@ int serenity_readlink(const char* path, size_t path_length, char* buffer, size_t int rc = syscall(SC_readlink, &small_params); __RETURN_WITH_ERRNO(rc, rc, -1); } + +int setkeymap(const char* name, const u32* map, u32* const shift_map, const u32* alt_map, const u32* altgr_map, const u32* shift_altgr_map) +{ + Syscall::SC_setkeymap_params params { map, shift_map, alt_map, altgr_map, shift_altgr_map, { name, strlen(name) } }; + return syscall(SC_setkeymap, ¶ms); +} + +int getkeymap(char* name_buffer, size_t name_buffer_size, u32* map, u32* shift_map, u32* alt_map, u32* altgr_map, u32* shift_altgr_map) +{ + Syscall::SC_getkeymap_params params { + map, + shift_map, + alt_map, + altgr_map, + shift_altgr_map, + { name_buffer, name_buffer_size } + }; + int rc = syscall(SC_getkeymap, ¶ms); + __RETURN_WITH_ERRNO(rc, rc, -1); +} } |