[PATCH] xev: fix KeymapNotify event printing

Alan Coopersmith alan.coopersmith at oracle.com
Sun Feb 20 17:41:57 UTC 2022


On 2/18/22 14:20, Goblin wrote:
> Hello everyone,
> 
> When xev prints the KeymapNotify event (after the user brings the xev window
> into focus), it incorrectly displays unsigned char values >= 128. For
> instance, 128 is printed as 42949667168.
> 
> This can be seen for instance by holding the '6' key (which has the
> keycode 15) and then bringing the xev window into focus. Observe the
> KeymapNotify event, the second number after "keys: " will be 42949667168.
> If you instead hold the '5' key (which has the keycode 14), you'll see
> 64 there, as expected.
> 
> No-one seems to have noticed since at least the last millenium ;-)

I suspect few people look that closely at KeymapNotify events in xev output.

Thanks for the report and patch - I was able to reproduce the bug and verify
your fix, so have merged it into the git repo now:

https://gitlab.freedesktop.org/xorg/app/xev/-/commit/eedd0fed

-- 
         -Alan Coopersmith-                 alan.coopersmith at oracle.com
          Oracle Solaris Engineering - https://blogs.oracle.com/solaris


More information about the xorg-devel mailing list