The issue was: Keys like XK_Backspace and XK_Enter sends the wrong keys.
Reason: gdk_keymap_get_entries_for_keyval return multiple combinations
of keycodes, i.e XK_Enter returns
(key=36, modifier=0) [Enter], [Mod4]+p,
(key=55, modifier=32) [Mod4]+p,
(key=55, modifier=33) [Mod4]+[Shift]+p
The latest version is returned, but collides with this 'bugfix':
'if( keymod.modifiers == 33 ) keymod.modifiers = 0;'
Solution:
Return first version (36, 0). Moreover the 'bugfix' is commented out,
but this had to recheck on several systems.