Skip to content

keyboard: Handle symbolic OSK key codes as explicitly invalid

Daniel van Vugt requested to merge vanvugt/gnome-shell:fix-lp1918738 into master

key is an empty string in this case, causing charCodeAt(0) to return NaN, which when passed to Clutter.unicode_to_keysym now generates an error in gjs >= 1.67.3:

JS ERROR: Error: Argument wc: value is out of range for uint32

And the symbolic keys like Backspace, Enter and Caps Lock would have their presses ignored.

Just skip the call to charCodeAt that will fail and allow Clutter.unicode_to_keysym to return its usual error flag.

Fixes: https://bugs.launchpad.net/bugs/1918738

Edited by Daniel van Vugt

Merge request reports