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

2015-03-06 Thread Michael Torrie
On 03/05/2015 09:31 PM, Jim Charlton wrote: I presume you have a callback function connected to the button press event. Just create code to intercept the keyboard event and go to a callback function that sees what key was pressed and then calls the same function that would have been called

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

2015-03-06 Thread Jim Charlton
On 15-03-06 06:52 AM, Michael Torrie wrote: On 03/05/2015 09:31 PM, Jim Charlton wrote: I presume you have a callback function connected to the button press event. Just create code to intercept the keyboard event and go to a callback function that sees what key was pressed and then calls the

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

2015-03-06 Thread Michael Cronenworth
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

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

2015-03-06 Thread Phil Wolff
When using Glade to design a UI, I've noticed that the Button dialog has an Activatable/Actionable section which includes an on/off Use Action Appearance selection. This suggests that you might look into GtkActionable and kin... On 2015/03/06 07:55, Jim Charlton wrote: On 15-03-06 06:52 AM,

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

2015-03-06 Thread Michael Torrie
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

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

2015-03-05 Thread Jim Charlton
On 15-03-05 07:58 PM, Michael Torrie wrote: Maybe I'm just not reading right, but I cannot figure out how to make a GtkButton respond to a single key press. For example, if I made a simple calculator like the one that comes with Gnome, how can I make it so when I press '1' on my keyboard, the 1