Obsidian-StudiosInc / ecrire

General purpose graphical Text Editor built on the Enlightenment Foundation Libraries (EFL)
GNU General Public License v3.0
7 stars 1 forks source link

Copy/Paste key bindings #53

Closed Peter2121 closed 4 years ago

Peter2121 commented 4 years ago
Description

Almost all editors permit to use Ctrl-Ins to copy selection (like Ctrl-C) and Shift-Ins to paste selection (like Ctrl-V). It would be nice to be able to use the same keyboard shortcuts in ecrire. In an ideal world all keybindings should be configurable (like in Terminology).

Steps to reproduce
  1. Enter some text in ecrire
  2. Select some text
  3. Try to copy the selected text to clipboard with Ctrl-Ins
  4. Try to paste the clipboard anywhere
System information
Peter2121 commented 4 years ago

A patch is proposed.

elm_code_widget.c.patch.txt

wltjr commented 4 years ago

Sorry for the delay, thanks for the report. I can see about addressing this in ecrire. For your patch, that would need to go to EFL developers. I have no means to include that. I believe, @haxworx is still maintaining elm_code and would be interested in that patch. Otherwise, you probably need to open a ticket in upstreams phab or PR here. I will keep this one open.

Peter2121 commented 4 years ago

EFL guys say there is an API somewhere to add key bindings. It seems that it was used in EDI to add something. So, they don't want to add key bindings for keys that are not present in all supported OS (Mac OS X...) as it's possible to play at the application level. Probably, you need to add such bindings in Ecrire yourself.

wltjr commented 4 years ago

@Peter2121, sorry, I was not clear. I was only referring to your patch, since it touched code outside of ecrire. I added support for Ctrl+Insert and Shift+Insert. That should resolve this issue. If you have any issues with that, please reopen or file a new issue. Thanks!