I tried a lot of Unicode characters (e.g. "🐸") and it doesn't seem
like libxkbcommon ever returns something beginning with "0x". It
always returns the "U" string we expect.
Additionally, the workaround is wrong: "U" keysyms need a Unicode
code-point value, but we were using the keysym raw value instead.
These are not equal (try for yourself by removing the "if" condition).
Right, "shouldn't generally happen". I am not quite sure where this came from, likely originated from the cavalier way that earlier versions handled unicode and keysyms.
I tried a lot of Unicode characters (e.g. "🐸") and it doesn't seem like libxkbcommon ever returns something beginning with "0x". It always returns the "U" string we expect.
Additionally, the workaround is wrong: "U" keysyms need a Unicode code-point value, but we were using the keysym raw value instead. These are not equal (try for yourself by removing the "if" condition).