Re: Space and Enter triggering buttons



On Wed, 4 Jan 2006 13:02:16 -0500
zentara <zentara zentara net> wrote:

Hi,
How do you solve the problem of the space or enter
key triggering the last button that was clicked with a mouse.

Here is a simplified example with 1 button. When the app
has focus, hitting the space or enter key signals the button.
I want to prevent that.

Yeah, it was pretty simple

$window->signal_connect( 'key_press_event' => sub{ return 1  } );

that prevents the default focus from connecting any space or enter
to the last focussed button.


-- 
I'm not really a human, but I play one on earth.
http://zentara.net/japh.html



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