1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:47:44 +00:00

Syscall: Changed 'setkeymap' to take also the Shift+AltGr map.

This commit is contained in:
Davide Carella 2021-01-05 09:39:33 +01:00 committed by Andreas Kling
parent 41c4ce3c58
commit ca9e0a70f5
2 changed files with 3 additions and 0 deletions

View file

@ -336,6 +336,7 @@ struct SC_setkeymap_params {
const u32* shift_map; const u32* shift_map;
const u32* alt_map; const u32* alt_map;
const u32* altgr_map; const u32* altgr_map;
const u32* shift_altgr_map;
StringArgument map_name; StringArgument map_name;
}; };

View file

@ -50,6 +50,8 @@ int Process::sys$setkeymap(Userspace<const Syscall::SC_setkeymap_params*> user_p
return -EFAULT; return -EFAULT;
if (!copy_from_user(character_map_data.altgr_map, params.altgr_map, CHAR_MAP_SIZE * sizeof(u32))) if (!copy_from_user(character_map_data.altgr_map, params.altgr_map, CHAR_MAP_SIZE * sizeof(u32)))
return -EFAULT; return -EFAULT;
if (!copy_from_user(character_map_data.shift_altgr_map, params.shift_altgr_map, CHAR_MAP_SIZE * sizeof(u32)))
return -EFAULT;
auto map_name = get_syscall_path_argument(params.map_name); auto map_name = get_syscall_path_argument(params.map_name);
if (map_name.is_error()) { if (map_name.is_error()) {