LibInput: Correctly resize keyboard layout maps 0xFF->0x100

This commit is contained in:
Bananymous 2025-06-27 14:46:43 +03:00
parent 4d080b30ab
commit fb09aa4d06
2 changed files with 4 additions and 4 deletions

View File

@ -106,7 +106,7 @@ namespace LibInput
return {};
keycode = (keycode * 10) + (c - '0');
}
if (keycode >= 0xFF)
if (keycode > 0xFF)
return {};
return keycode;
}

View File

@ -21,9 +21,9 @@ namespace LibInput
KeyboardLayout();
private:
BAN::Array<Key, 0xFF> m_keycode_to_key_normal;
BAN::Array<Key, 0xFF> m_keycode_to_key_shift;
BAN::Array<Key, 0xFF> m_keycode_to_key_altgr;
BAN::Array<Key, 0x100> m_keycode_to_key_normal;
BAN::Array<Key, 0x100> m_keycode_to_key_shift;
BAN::Array<Key, 0x100> m_keycode_to_key_altgr;
friend class BAN::UniqPtr<KeyboardLayout>;
};