Fix issue in keysend (c function).
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.
This commit is contained in:
parent
077fc067d7
commit
7cf5e02407
@ -160,6 +160,9 @@ getKeyModCodes (GdkWindow *rootwin,
|
||||
// zu wählen ist 'add_modifiers | modifiers'
|
||||
keymod.keyval = keys[k].keycode;
|
||||
keymod.modifiers = add_modifiers | modifiers;
|
||||
|
||||
//printf(" Foo %u %u\n", keymod.keyval, keymod.modifiers);
|
||||
break;
|
||||
}
|
||||
|
||||
g_free(keys);
|
||||
@ -231,8 +234,10 @@ KeyMod keymod;
|
||||
* for the first layer (=no modifier is pressed) the above fuction
|
||||
* returns 33 for the modifier, if the neo layer is activated.
|
||||
* This will be corrected to 0.
|
||||
*
|
||||
* 33 = Mod4+Shift
|
||||
*/
|
||||
if( keymod.modifiers == 33 ) keymod.modifiers = 0;
|
||||
//if( keymod.modifiers == 33 ) keymod.modifiers = 0;
|
||||
|
||||
XKeyEvent event;
|
||||
//printf("Send key %u %i %u %u\n", keysym, modifiers, keymod.keyval, keymod.modifiers);
|
||||
|
@ -704,6 +704,7 @@ namespace NeoLayoutViewer {
|
||||
keysend2(ks,modi & Gdk.ModifierType.CONTROL_MASK, modi & Gdk.ModifierType.MOD1_MASK);
|
||||
}
|
||||
#endif
|
||||
//GLib.stdout.printf(@"Key: $(ks)\n"); GLib.stdout.flush();
|
||||
|
||||
return false;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user