Keyboard shortcuts not working when input language is not English
I'm using Audacious 3.4.3 from official repos on an Archlinux x64.
When I change input language to something other than English (for example russian), then the keyboard shortcuts do nothing.
1) setxkbmap ru
2) Open audacious
3) Press Z/X/C/V/B keys to play/pause/etc the song
What happens: Nothing
What is expected: The song should start playing/pause/etc
Proposed fix: The keyboard shortcuts should be assigned to keycodes, and not the input characters.
#3 Updated by John Lindgren over 5 years ago
Okay then, my impression is that what you are asking for is impossible without bypassing GDK and going to the lower X11 level. And I don't want to add any new X11-specific code since Audacious is intended to run equally well on Win32, Quartz, Wayland, etc.
#4 Updated by Maksim Kozlov over 5 years ago
- File 0001-gtkui-Make-shortcuts-independent-of-the-input-langua.patch 0001-gtkui-Make-shortcuts-independent-of-the-input-langua.patch added
I had the same problem and I resolved it for myself by using the gdk_keymap_translate_keyboard_state() function. This function allows to get keyval for certain group (0 in our case, it is correspond to English symbols). I prepared a patch for my solution and hope it will be useful...
I use russian, swedish, ukranian and english input languages and this works fine for all of them. In additional, I use FreeBSD with X11 and I didn't test this patch on Windows
#5 Updated by John Lindgren over 5 years ago
Okay, that patch solves the question of what keycode to use. But I'm not convinced that this is the right fix, mainly because it only fixes those few shortcuts. Others (e.g. Control-T to open a new playlist tab) still don't work. I can't imagine that this is a new problem or is specific to Audacious. What have other projects done? It seems like the problem should be fixed at the toolkit level, not the application level.