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:
Hüseyin ASLITÜRK 2020-06-11 21:26:05 +03:00 committed by Andreas Kling
parent 1887e35dc8
commit 174987f930
Notes: sideshowbarker 2024-07-19 05:37:36 +09:00
4 changed files with 10 additions and 10 deletions

View file

@ -265,7 +265,7 @@ void KeyboardDevice::key_state_changed(u8 scan_code, bool pressed)
event.flags = m_modifiers; event.flags = m_modifiers;
event.e0_prefix = m_has_e0_prefix; event.e0_prefix = m_has_e0_prefix;
event.caps_lock_on = m_caps_lock_on; 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) if (pressed)
event.flags |= Is_Press; event.flags |= Is_Press;

View file

@ -161,7 +161,7 @@ enum KeyModifier {
struct KeyEvent { struct KeyEvent {
KeyCode key { Key_Invalid }; KeyCode key { Key_Invalid };
u32 scancode { 0 }; u32 scancode { 0 };
u8 character { 0 }; u32 code_point { 0 };
u8 flags { 0 }; u8 flags { 0 };
bool caps_lock_on { false }; bool caps_lock_on { false };
bool e0_prefix { false }; bool e0_prefix { false };

View file

@ -4305,10 +4305,10 @@ int Process::sys$setkeymap(const Syscall::SC_setkeymap_params* user_params)
Keyboard::CharacterMapData character_map_data; Keyboard::CharacterMapData character_map_data;
const char* map = params.map; const u32* map = params.map;
const char* shift_map = params.shift_map; const u32* shift_map = params.shift_map;
const char* alt_map = params.alt_map; const u32* alt_map = params.alt_map;
const char* altgr_map = params.altgr_map; const u32* altgr_map = params.altgr_map;
if (!validate_read(map, CHAR_MAP_SIZE)) if (!validate_read(map, CHAR_MAP_SIZE))
return -EFAULT; return -EFAULT;

View file

@ -325,10 +325,10 @@ struct SC_futex_params {
}; };
struct SC_setkeymap_params { struct SC_setkeymap_params {
const char* map; const u32* map;
const char* shift_map; const u32* shift_map;
const char* alt_map; const u32* alt_map;
const char* altgr_map; const u32* altgr_map;
}; };
struct SC_create_thread_params { struct SC_create_thread_params {