#132 Focus editor after execute in VTE

Jan Martinek


after execution of an edited file the focus switches to the terminal window (VTE). It then eats almost all the keyboard shotcuts (Ctrl+PageDown/PageUp, Alt+letter, F5, ...) and if I accidently press one of those, it types garbage on the terminal. As a result, next attempt to execution fails because

"Could not execute the file in VTE because it probably contains a command"

Solution: After the executed program terminates, change the focus back to editor.

Enhancement_1: Terminal should not eat keyboard shortcuts considered "global".

Enhancement_2: If user want to execute program and "... VTE probably contains a command", clear the command line and execute.

Maybe not everyone wants such behaviour, but could you add an option for that?

Thank you
Jan Martinek

P.S. I have geany 0.13.


  • Jan Martinek
    Jan Martinek

    Logged In: YES
    Originator: YES

    Oh no! By mistake, I had the "Override geany bindings" turned on and it was the reason why terminal grabbed all the keystrokes. So my previous post was not correct and the "Enhancement_1" proposal was useless, it is already done in geany, great!

    I still think that "After the executed program terminates, change the focus back to editor" would be a good idea. I tried to comment out the line gtk_widget_grab_focus(vc->vte); and I am quite happy with it now, but it is half-way ugly hack just for me (vte gets focus only when I deliberately click on it).

    But anyway, it showed up my previous post is now a bug report, sorry for that.

    Jan Martinek

  • Nick Treleaven
    Nick Treleaven

    Logged In: YES
    Originator: NO

    I've renamed the summary to reflect this. This could be made an option, as some people might like the VTE to be focused so they can use Ctrl-Shift-PageUp to scroll up through the program's output.

  • Nick Treleaven
    Nick Treleaven

    • summary: editor looses focus after 'execute' --> Focus editor after execute in VTE
  • Date

    Also will be good if focus will automatically returns to editor window to the old place, when you close notes or terminal window.
    (Now, when you close notes window, focus goes to toolbar.)

  • Enrico Tröger
    Enrico Tröger

    @ comment 3 (date): fixed in SVN 3676, thanks for reporting.