Keybinds with layout sensitive keys (letters and other) doesn't work.
Test on Arch Linux.
In Guake 3.7.0 keybindings works on both layouts, I think because there used Gtk.AccelGroup.
This was changed in commit 6af0a95 and now keyval is used.
Maybe we should back to Accel realisation with build-in magic.
For example copy keys (Ctrl+Shift+C)
For US layout
keyval: 67
mod: <flags GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD2_MASK of type Gdk.ModifierType>
scancode/keycode: 54
For RU layout
keyval: 1779
mod: <flags GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD2_MASK | GDK_MODIFIER_RESERVED_13_MASK of type Gdk.ModifierType>
scancode/keycode: 54
As workaround convert keycode to english keyval, for me it look like this:
keybindings.py
def activate(self, window, event):
key = event.keyval
mod = event.state
keycode = event.get_keycode()
if keycode[0]:
ent = Gdk.Keymap.get_for_display(window.get_display()).get_entries_for_keycode(keycode[1])
if ent[0]:
key = ent[2][0]
...
This code does not full tested so it can crash in some case.
Keybinds with layout sensitive keys (letters and other) doesn't work.
Test on Arch Linux.
In Guake 3.7.0 keybindings works on both layouts, I think because there used
Gtk.AccelGroup.This was changed in commit 6af0a95 and now
keyvalis used.Maybe we should back to
Accelrealisation with build-in magic.For example copy keys (
Ctrl+Shift+C)For US layout
For RU layout
As workaround convert
keycodeto englishkeyval, for me it look like this:This code does not full tested so it can crash in some case.