Geany: Emacs keybindings -mode in Devel-Geany?

Created on 9 Jun 2016  路  4Comments  路  Source: geany/geany

I would like to learn what it requires to start its development for Geany. Motivation

  • convenient for typists (Dvorak/Colemak/...) and stereotypists (Plover)
  • consistency for typing

Some plan

  • In Preferences > Keybindings > main field _Keybinding-mode_: Emacs or Standard.
  • Emacs-mode first keybindings: CTRL-A, CTRL-E, ...

Currently

  • Primary = CTRL.

Proposal

  • I would propose to change Primary to ALT. Let the user configure with ALT. I could not free up CTRL key.

I can offer some help if I can grasp some basic understanding what it requires.

All 4 comments

I have no idea. It highly depends on what you mean by "emacs keybindings": if it's simple single sequences that basically just require remapping every actions to a different keybinding, all it would require is make everything configurable (some basic stuff is not, like movements). This would require the work of adding the missing keybindings so they are configurable, that is, it would be fairly easy.

If however you want to support full multi-sequences like (I don't know emacs, so I won't know if it exists or what it does) M-a d or more complex, you'll basically need to rewrite the whole keybinding handling. And that might be a lot of absolutely non-trivial work.

That said, I wonder if there isn't somebody already trying to do more or less this, ville on IRC I think.

As @b4n said, Emacs uses sequences of keypresses, whereas the GTK library we use only allows one keypress for accelerators (though that may use multiple keys, they must be pressed at once, not in sequence). So it would require a complete re-work of the Geany keybinding system, but would still not solve the fact that GTK only supports single keypress accelerators for menu items and that would have to be overridden by Geany code as well. So its a big job.

GTK+ supports an Emacs-style key theme (couldn't find official docs, but it's explained here). I have no idea to what extent, if any, that interoperates with the non-standard (Scintilla) keybindings in Geany, but I assume it should work for most of the regular (non-Scintilla) keybinding (ex. Open, Save, etc.).

Emacs "open" (called visit) is the sequence ctrl-x ctrl-f which I don't believe GTK/Gnome can use instead of its default ctrl-o. Only the single keystroke Emacs keys can be mapped IIUC. And you can certainly do that for the ones Geany currently makes available for binding.

Was this page helpful?
0 / 5 - 0 ratings