I am trying to capture the Enter key when it is pressed in a GtkEntry
. Most of the resources I have found suggest connecting to the activate
signal, but the documentation for GtkEntry states (emphasis mine):
Applications should not connect to it, but may emit it with g_signal_emit_by_name() if they need to control activation programmatically.
I am curious as to the rationale behind this and also what the generally accepted alternative is. I know that I can connect to the key-press-event
signal and check the key code, but I'm wondering if there is a more elegant solution.