This is a second proposal to solve the problems mentioned in D7204: Add missing keys for (ABNT) Brazilian keyboards.
T68577: Missing key on Swiss keyboard variants being the most recurring one.
The solution is to simply remove this condition:
if (key != GHOST_kKeyUnknown) {As we can see in the comment for this line: wm_event_system.c$4045 GHOST_kKeyUnknown is a valid entry and has a corresponding RNA.
So it seems wrong to ignore all other values of this type of event (utf, pressed, released, modifiers...).
Apparently, this condition has always existed and there is no explanation for it.
GHOST_SystemWin32.cpp;12315f4d0e0ae993805f141f64cb8c73c5297311?follow=first
It seems unsafe, but I believe it is worth the risk.