I use Geany as the external editor for my file managers (Krusader, Double Commander etc.). One very common operation is to open a file in the edit, inspect it for a few seconds (scrolling around), then exit, ideally without keeping the file as an open tab, since it wasn't opened from Geany itself, but rather from the file manager, typically while checking out a large number of files (e.g. the source files of a project).
To do this, I currently have to press Ctrl+W, then Alt+F4 (or <Primary>+Q). It would be really nice if I could define Esc as a key binding for exiting Geany, if it's pressed in the main window. Is there a way to do that? (I tried Keybindings, but pressing Esc closes the dialog that records the shortcut).
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1124
(I tried Keybindings, but pressing Esc closes the dialog that records the shortcut).
Yes, the GTK toolkit hijacks esc as the close dialog key, happens on any dialog, not just the keybinding one.
Possibly not a good key to use for that reason.
Just out of interest why do you need to keep closing Geany? It should open new files in the existing instance if one is running, so you only need to close the tab.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1124#issuecomment-231008420
Just out of interest why do you need to keep closing Geany? It should open new files in the existing instance if one is running, so you only need to close the tab.
I need to switch from Geany to my file manager. If I do so using Alt+Tab, Geany will keep accumulating files.
What I want to reproduce is the flow in Midnight Commander: F4 to edit, Esc to escape.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1124#issuecomment-231040791
It would be really nice if I could define Esc as a key binding for exiting Geany, if it's pressed in the main window. Is there a way to do that? (I tried Keybindings, but pressing Esc closes the dialog that records the shortcut).
As @elextr pointed out, <kbd>Escape</kbd> is unfortunately handled specially by GTK to close the dialog -- which is nice 99% of the time until you want to select <kbd>Escape</kbd> as a keybinding. But you can manually edit the keybinding without the fancy dialog by first selecting the row and then clicking again on the *Shortcut* column (no double click as it would pop up the dialog): it should enter text editing mode on the shortcut, and there you can manually write `Escape`. Validated with <kbd>Return</kbd> and save the preferences, and you should have Quit bound to <kbd>Escape</kbd>
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1124#issuecomment-231056876
Closed #1124.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1124#event-715606415
That did the trick. Thanks!
![image](https://cloud.githubusercontent.com/assets/33569/18076461/f647dcc0-6e32-11e6...)
No, but if you want to open Geany only temporarily and it not interfere with your other possible session, you can run `geany -c someotherconfdir -i` instead of `geany`, so it opens a instance very time, and don't mess with your principal Geany config.
Otherwise, I don't know, a very tiny plugin could do that: send `GEANY_KEYS_FILE_CLOSE` followed by `GEANY_KEYS_FILE_QUIT` on a custom keybinding.
github-comments@lists.geany.org