mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 06:14:58 +00:00
KeyboardMapper: Convert Utf-8 char in String to Utf-32 code point
Ensure that the Utf-8 encoded "mapping character" in String (from InputBox) gets converted to Utf-32 code point. Before, only the first byte of Utf-8 char sequence was used as a Utf-32 code point. That used to result in incorrect characters getting written in the keymap file for all the "non-ascii" characters used as the mapping character.
This commit is contained in:
parent
227aa8f2e4
commit
90d68d43ce
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ void KeyboardMapperWidget::create_frame()
|
|||
if (value.is_empty())
|
||||
map[index] = '\0'; // Empty string
|
||||
else
|
||||
map[index] = value.bytes().at(0);
|
||||
map[index] = *value.code_points().begin();
|
||||
|
||||
window()->set_modified(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue