Re: How to make a GtkButton respond to a key press



On 03/06/2015 08:23 AM, Michael Cronenworth wrote:
On 03/06/2015 08:52 AM, Michael Torrie wrote:
No, this is not quite what I am asking for.  Capturing keyboard events
is fine, but I need the button to click visually, for feedback purposes.
  Just like what happens if you define the control key shortcut and press
that.

So the question is either, how can I get GtkButton to respond to a
non-modifier hotkey, or how can I programmatically get GtkButton to
visually depress and release?

You can call g_signal_emit_by_name() for the GtkButton "activate" signal to get the 
visual animation of a button press and release.

Ahh. Yes this is what I want mostly. Is there any way to get it to
animate down and hold there, say when a person is holding down the key?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]