OK, so the problem is just a small subset of equipment.
Regarding keyboards, most software nowadays uses unicode instead of the old ASCII sequences with the added kludge of code pages.
So when someone depresses a function key, does a unicode binary sequence get sent? Is it the correct one?
Gnome has been shifting away from using Xorg protocols, and the latest version of Gnome, 3.3, is purported to only recognize Wayland protocols. At least this is what Wikipedia says about it:
Wayland or X Window System
Main article: Wayland (display server protocol)
GNOME runs on Wayland and the X Window System.[91] Wayland support was introduced in GNOME 3.10[82] and deemed "for the majority of users […] a usable day to day experience" by 3.20,[92] at which point Wayland became the default user session.[93] GNOME 3.24 will extend Wayland compatibility to Nvidia drivers.[94] With GNOME 3.30, it is possible to run GNOME without X.Org Server, using only Wayland.
I think my latest update of Fedora is using Gnome 3.3
My naive interpretation is trying the fix the keyboard problem using XOrg libraries will become less and less successful. My login screen does have an option to select a version of Gnome desktop that recognizes XOrg protocols. I have never tried it. At the page where I type in my password is a small gear icon. Selecting that allows me to select one of several desktop environments.
Also Wikipedea has this graphic: https://upload.wikimedia.org/wikipedia/commons/a/a7/Wayland_display_server_protocol.svg
The graphic suggest keyboard and mouse inputs from the evdev linux kernel module are what Wayland monitors for input. Forcing keyboard sequences to go first to the evdev module might help response.
I hope this is helpful.
Usedtoberich
PS> I use an Ideapad 330-17IKB
I would be pleased to provide output of log files or other demonstration of how this is successfully implemented on my machine. Let me know!