Skip to content

Conversation

@m-byte
Copy link
Contributor

@m-byte m-byte commented Apr 7, 2020

As mentioned in #370, it would be nice to use the tool window with keyboard keys. Right now, only the escape key is enabled, but this should be a good starting point for discussion.
An extension of this would be for the enter/return key to first step through all input boxes and then confirm the dialog. (Maybe it would be better to press return twice without any other keys in between to avoid accidental confirmation when editing the last input)

@m-byte m-byte force-pushed the toolwindow-keys branch 2 times, most recently from fe17837 to 452df31 Compare April 7, 2020 21:07
@m-byte m-byte force-pushed the toolwindow-keys branch from 452df31 to 19c4c48 Compare April 7, 2020 21:24
@carrotIndustries
Copy link
Member

We have install_esc_to_close(Gtk::Window &win) in gtk_util.hpp to reduce the boilerplate.

@m-byte
Copy link
Contributor Author

m-byte commented Apr 8, 2020

Do you have any idea how I can find out when enter is pressed while focus is on a Gtk::Entry?
I tried signal_key_press_event().connect(), but return/enter seems to be filtered out.

@carrotIndustries
Copy link
Member

signal_activate it is. See https://github.com/horizon-eda/horizon/blob/master/src/dialogs/ask_datum.cpp#L36 for an example of how this is to be used.

@pwnorbitals
Copy link

Has this PR been abandonned @m-byte ?

@m-byte
Copy link
Contributor Author

m-byte commented Apr 30, 2021 via email

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

Successfully merging this pull request may close these issues.

3 participants