After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784393 - Allow rebinding key and mouse actions
Allow rebinding key and mouse actions
Status: RESOLVED OBSOLETE
Product: epiphany
Classification: Core
Component: Preferences
3.22.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 784168
 
 
Reported: 2017-06-30 16:57 UTC by Dan Jacobson
Modified: 2018-08-03 21:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Jacobson 2017-06-30 16:57:02 UTC
Hardwired key and mouse bindings are "so 60's".
A simple extra layer of abstraction would allow users to customize
keystrokes. E.g., a user with only three fingers on his right hand
could reassign certain mouse functions (but only for ephy! He doesn't
want to necessarily reassign them elsewhere in addition.)

Emacs example:
https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-Rebinding.html
     (global-set-key (kbd "C-c y") 'clipboard-yank)
     (global-set-key (kbd "C-M-q") 'query-replace)
     (global-set-key (kbd "<f5>") 'flyspell-mode)
     (global-set-key (kbd "C-<f5>") 'linum-mode)
     (global-set-key (kbd "C-<right>") 'forward-sentence)
     (global-set-key (kbd "<mouse-2>") 'mouse-save-then-kill)

https://en.wikipedia.org/wiki/Abstraction_layer
Comment 1 Dan Jacobson 2017-06-30 16:58:46 UTC
Users could put their overrides in a dot file somewhere in their $HOME.
Comment 2 Michael Catanzaro 2017-06-30 17:01:44 UTC
I'm not aware of any GNOME applications that allow editing keybindings, so this needs to be coordinated at a desktop-wide level, not just for Epiphany.
Comment 3 André Klapper 2017-06-30 17:10:42 UTC
(In reply to Dan Jacobson from comment #0)
> Hardwired key and mouse bindings are "so 60's".

Subjective buzzword bingo does not make a good feature request. 
Providing actual convincing use cases does.

> A simple extra layer of abstraction would allow users to customize
> keystrokes. E.g., a user with only three fingers on his right hand
> could reassign certain mouse functions (but only for ephy! He doesn't
> want to necessarily reassign them elsewhere in addition.)

Currently changing https://git.gnome.org/browse/epiphany/tree/src/ephy-window.c?id=6ff26acccd0b90ec364681dc7d87b76818b6349f#n118 and compiling yourself is an option (which obviously requires advanced technical knowledge).
And as far as I know external software like "autokey" exists to allow mapping new shortcuts to existing ones, as a workaround.

Speaking from an architecture point of view IMHO it makes no sense to implement this in Epiphany code itself (which makes this task a WONTFIX for Epiphany itself). Such functionality should be implemented lower in the stack, if at all.
Comment 4 Dan Jacobson 2017-06-30 17:30:14 UTC
A search shows lots of extensions available for Firefox and Chromium to
do this.
Can http://code.google.com/archive/p/autokey/ make click A do action B?
But this bug is now closed so I suppose epiphany's bindings are the best
for all users.
Comment 5 Daniel Boles 2017-06-30 17:37:15 UTC
(In reply to Dan Jacobson from comment #4)
> But this bug is now closed so I suppose epiphany's bindings are the best
> for all users.

Constantly being passive-aggressive on your tickets doesn't aid your case.

The real reason that this bug is closed is not that at all, and it was already clearly stated:

(In reply to Michael Catanzaro from comment #2)
> this needs to be coordinated at a desktop-wide level, not just for Epiphany.

As an aside:

> I'm not aware of any GNOME applications that allow editing keybindings

Does Pitivi count? I'm pretty sure it has some clever stuff for this. Maybe Builder too; I can't recall.

I'm of the opinion that GTK+ needs a higher-level 'action manager' to handle creating actions, GtkShortcuts widgets, menu items, setting actions on buttons, etc all in one place. But until then, I doubt many maintainers of individual projects will want to roll their own, and it would be bad for cohesion if they did.

(For now, I'll roll my own, because I'm not developing a GNOME app.)
Comment 6 Dan Jacobson 2017-06-30 17:44:23 UTC
I would reassign this bug, not close it.
Anyway users shouldn't be required to fork the whole project just to change one
itty bitty keystroke.
Comment 7 Michael Catanzaro 2017-07-01 01:07:31 UTC
It would be really cool if GtkShortcutsWindow allowed configuring shortcuts.

I won't reassign the bug to GTK+ though, because I have no clue if the GTK+ developers desire this level of functionality. It's something that would need to be discussed elsewhere.
Comment 8 Daniel Boles 2017-07-01 07:03:35 UTC
The GtkShortcuts* widgets still don't even have any get|set_foo() API, and require byzantine and precise sequences of incantations just to get them to work at all from application code (instead of a .ui file)... so first things first. ;-)

Anyway, I don't think they'll be interested. I appreciate that a 'manager' like this is probably a bit too high-level for low-level parts of the stack, and would be hard to get right as something that everyone could agree on.

Further up, though - I haven't looked too far into Dazzle, but I think it handles that and much more:

https://git.gnome.org/browse/libdazzle/tree/src/shortcuts

Very interesting library, basically the reusable parts of Builder hoisted out. (I really need to do the same with my own app!)
Comment 9 Dan Jacobson 2017-07-01 22:27:49 UTC
https://github.com/chergert/libdazzle is the home page.
Comment 10 Michael Catanzaro 2017-07-01 22:41:00 UTC
OK, using Dazzle for this, I would consider.
Comment 11 GNOME Infrastructure Team 2018-08-03 21:09:55 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/epiphany/issues/400.