[Geany-Devel] RFC: Keybindings rewrite

Thomas Martitz kugel at xxxxx
Tue Jun 10 11:06:56 UTC 2014


Am 10.06.2014 00:36, schrieb Yosef Or Boczko:
>
>
> Regards,
> Yosef Or Boczko
> בתאריך ג', יונ 10, 2014 בשעה 12:54 AM, Thomas Martitz 
> <kugel at rockbox.org> כתב:
>> Am 09.06.2014 22:39, schrieb Yosef Or Boczko:
>> >
>> >
>> > Regards,
>> > Yosef Or Boczko
>> > בתאריך ב', יונ 9, 2014 בשעה 11:30 PM, Thomas Martitz > 
>> <kugel at rockbox.org> כתב:
>> >> Am 06.06.2014 16:24, schrieb Yosef Or Boczko:
>> >>> I think it better to port to GAction instead of GtkAction (GtkAction
>> >>> has been deprecated since version 3.10 and will be removed in 
>> GTK+ 4),
>> >>> so it will be ease to port geany to GTK+ 4 in the future.
>> >>>
>> >>> Also, IIRC, there is a problem with GtkAction, wich cause to some 
>> >>> accelactors
>> >>> to work only when the keywoard layout on Englisg.
>> >>> For example, most of the accelactors in epiphany dosn't work when 
>> >>> the keywoard
>> >>> layout is Hebrew, and it will be solved when someone will port 
>> >>> epiphany from GtkAction
>> >>> GAction.
>> >>
>> >> Can you check if that isn't a bug with Epiphany? And if it occurs 
>> in >> Geany as well? Geany's approach to keybindings is most trivial 
>> (at >> it's core it does if (keyval == $KEY && modifier == 
>> $MODIFIER)). Gtk >> cannot do worse, so I expect it to have something 
>> more smart (or be >> equally dumb). So it sounds unlikely that Gtk 
>> has a locale-related >> problem that Geany does not.
>> >
>> > I see the same problem with part of the accelactors in totem (the > 
>> accels totem handle
>> > by hand and not by GAction), and btw also somewhere in gnome-shell.
>> >
>> > I'm not sure, but I think gtkkeyhash.c[1] relate to this.
>> >
>>
>> So the keybings totem does by hand don't work but those that are 
>> handled by Gtk/Glib do work? And what about gnome-shell. It's all 
>> Gtk3 so I'd expect it to use GAction.
>
> I found for you an example in the code for totem.
>
> - Ctrl+F to switch the search bar dosn't work when the keywoard layout 
> in Hebrew
> (note you need in the code to by the hand both Ctrl+F and Ctrl+f):
> https://git.gnome.org/browse/totem/tree/src/totem-grilo.c#n1634
>
> - Ctrl+A to select all work when the keywoard layout in Hebrew:
> https://git.gnome.org/browse/totem/tree/src/totem-grilo.c#n2206
>

So, what you are saying is that if you match keys manually, as totem 
does in the first example, you get bugs with non-latin keyboards. This 
is what Geany does currently.

The second example shows that if you use Gtk APIs/accelerators these 
problems can be avoided.


So, from my understanding, the proposed rewrite would make things work 
better (not worse) under non-latin keyboards.

>
>>
>>
>> What about current Geany?


Why do you avoid this question?

Best regards.


More information about the Devel mailing list