dark293 / garglk

Automatically exported from code.google.com/p/garglk
Other
0 stars 0 forks source link

Support for some Emacs key bindings #115

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
At least on the Unix port, it seems to me that it would make sense to support 
Emacs key bindings for line-editing (delete word, delete line, etc).

I'm attaching a patch that (mostly) does this.  It covers C-a, C-e, and C-u 
(start of line, end of line, and delete line) because those are very simple to 
implement with gli_input_handle_key().  I've moved the C-x, C-c, and C-v 
handlers into the same switch, and unlike the current code, any unrecognized 
control sequences are simply ignored, rather than being passed on as though 
control had never been hit (that is, in the current garglk if you hit e.g. C-m 
an “m” will be inserted).

Original issue reported on code.google.com by cspiegel@gmail.com on 16 Aug 2010 at 12:16

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the patch! Fixed in r386.

Note that the behavior of discarding unrecognized control sequences may 
interfere with Unicode character composition, if the compose key is set to 
Ctrl. This defect was present before but may be more noticeable now, since 
composing with vowels is more common.

May need to revisit this based on international user feedback. Not sure there 
is a great solution other than "don't use Ctrl as a compose key" given the way 
Gtk works.

Original comment by bcressey@gmail.com on 16 Aug 2010 at 5:23