Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some keybindings #3

Open
bbuccianti opened this issue Jul 4, 2020 · 1 comment
Open

Some keybindings #3

bbuccianti opened this issue Jul 4, 2020 · 1 comment

Comments

@bbuccianti
Copy link

bbuccianti commented Jul 4, 2020

I'm accustomed to using some console keybindings like C-m for Enter, C-g for cancel, C-w to deleting a word. Would be possible to add those?

@mortie
Copy link
Owner

mortie commented Aug 10, 2020

The input field of Mauncher is just a regular GTK text entry widget, so it respects all keybinds you've configured in GTK. You can make all GTK text input fields act more emacs-like by enabling Emacs input; with GNOME Tweak Tool, that's in Keyboard & Mouse -> Keyboard -> Emacs Input (there's probably some way to do it via the CLI too). This covers the C-w keybind, in Mauncher as well as all other GTK3 software.

This doesn't cover C-g for cancel and C-m for enter though. It would probably be a good idea to add a way to configure additional keybinds for that kind of stuff.

If you don't want to wait for me to get around to adding a config option for this, you could play with the code in https://github.com/mortie/mauncher/blob/master/mauncher-win.c#L86 to make it respond however you want. The documentation for the GdkKeyEvent type is here: https://developer.gnome.org/gdk3/unstable/gdk3-Event-Structures.html#GdkEventKey. Triggering an Enter event should basically be on_enter(GTK_ENTRY(widget), data);.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants