Kernel: Replace char and u8 data types to u32 for code point
Remove character property from event and add code_point property.
This commit is contained in:
parent
1887e35dc8
commit
174987f930
Notes:
sideshowbarker
2024-07-19 05:37:36 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/174987f930e Pull-request: https://github.com/SerenityOS/serenity/pull/2541
4 changed files with 10 additions and 10 deletions
|
@ -265,7 +265,7 @@ void KeyboardDevice::key_state_changed(u8 scan_code, bool pressed)
|
|||
event.flags = m_modifiers;
|
||||
event.e0_prefix = m_has_e0_prefix;
|
||||
event.caps_lock_on = m_caps_lock_on;
|
||||
event.character = m_character_map.get_char(event);
|
||||
event.code_point = m_character_map.get_char(event);
|
||||
|
||||
if (pressed)
|
||||
event.flags |= Is_Press;
|
||||
|
|
|
@ -161,7 +161,7 @@ enum KeyModifier {
|
|||
struct KeyEvent {
|
||||
KeyCode key { Key_Invalid };
|
||||
u32 scancode { 0 };
|
||||
u8 character { 0 };
|
||||
u32 code_point { 0 };
|
||||
u8 flags { 0 };
|
||||
bool caps_lock_on { false };
|
||||
bool e0_prefix { false };
|
||||
|
|
|
@ -4305,10 +4305,10 @@ int Process::sys$setkeymap(const Syscall::SC_setkeymap_params* user_params)
|
|||
|
||||
Keyboard::CharacterMapData character_map_data;
|
||||
|
||||
const char* map = params.map;
|
||||
const char* shift_map = params.shift_map;
|
||||
const char* alt_map = params.alt_map;
|
||||
const char* altgr_map = params.altgr_map;
|
||||
const u32* map = params.map;
|
||||
const u32* shift_map = params.shift_map;
|
||||
const u32* alt_map = params.alt_map;
|
||||
const u32* altgr_map = params.altgr_map;
|
||||
|
||||
if (!validate_read(map, CHAR_MAP_SIZE))
|
||||
return -EFAULT;
|
||||
|
|
|
@ -325,10 +325,10 @@ struct SC_futex_params {
|
|||
};
|
||||
|
||||
struct SC_setkeymap_params {
|
||||
const char* map;
|
||||
const char* shift_map;
|
||||
const char* alt_map;
|
||||
const char* altgr_map;
|
||||
const u32* map;
|
||||
const u32* shift_map;
|
||||
const u32* alt_map;
|
||||
const u32* altgr_map;
|
||||
};
|
||||
|
||||
struct SC_create_thread_params {
|
||||
|
|
Loading…
Add table
Reference in a new issue