While D7229 improves keyboard layout handling, it introduces some issues with how modifier keys are processed. Removing the GHOST_kKeyUnknown check from processKeyEvent() produces repeated unknown key events whenever a modifier key is held down, due to the way ghost uses GHOST_kKeyUnknown as a filter value for modifier key events.
This patch adds a GHOST_kKeyFilter value, so we can differentiate between unknown inputs and known-but-unwanted inputs. It fixes the modifier key issues introduced by D7229, but I haven't had a chance to test it with a wider set of keyboard layouts or input devices. Treat it like something halfway between a patch and a bug report.