[Geany-Devel] VTE resetting and handling of ^C and ^D

Lex Trotman elextr at gmail.com
Wed Dec 5 00:42:25 UTC 2012

> Well, we send this signal to the shell we launched and it only, so I
> expect the shell do what's needed to kill its children.

Oops, I misread it and thought we sent it to the child.

 I guess shells
> are supposed to handle this since it's the old "tty disconnect" signal;
> and at least Bash saves its history and quits with this one (whereas it
> doesn't quit with SIGINT and doesn't (obviously) save its history with
> SIGKILL).  If you know a better signal, I'm all ears :)
>> agreed, what happens if we actually send it to the shell?
> The "problem" is that Geany has a global key handling function that will
> eat the event before they reach the VTE handler (which will simply send
> them to the child, as they should).
> Though, your remark made me go in that function an realize it'd be quite
> easy to force it to let ^C and ^D pass through when on the VTE -- there
> is already quite some code for the VTE here.
> So I now have a better patch that simply makes ^C and ^D pass through in
> any case, no matter "override Geany keybindings" is enabled or not --
> since when it is ^C and ^D goes through properly.  This approach looks
> indeed ways better, doesn't involves weird ASCII control characters, and
> removes quite some code -- and the code is slightly cleaner than before,
> although the check for ^C and ^D are spread across 2 files (instead of
> being spread across 2 functions in the same file).
> Here's the revised patch (with a revised name):
> 0001-VTE-Always-let-the-terminal-handle-C-and-D-itself.patch
> I think this patch is good (for now, hehe :D), but maybe we want let the
> other common binding pass through too, like ^Z, maybe others?

Why not just send all by default and only a few very specific
keybindings (like switch focus) work in the VTE.  The problem with
"common" ones is that someone will always find some program that uses
some other keys. Of course you could have a second set of keybindings
for the VTE window, not :)

>> [...]
>> Can you get any ideas from what the various terminal emulators that
>> use VTE do with these keycodes etc?
> Nothing, they just let the keybinding go through I guess.

Good idea lets do that :)

Seriously, trying to be smart and decide that some keybindings
will/won't work in the VTE window is always going to never be
completely right and always risks clashes with bindings in Geany


> Regards,
> Colomban
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel

More information about the Devel mailing list