Set the event type from the event handler instead of determining the event type at run-time based on string comparison. QWasmDeadKeySupport adds a complication. This can't be easily simplified or removed since it maintains state. Change-Id: Iad6f02ee7e2dc22817d7ac606514a2b4022f8fb0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>