Re: Why cursor keys are not longer reported in key press events



Some research later:

Seems that build in event handler of Gtk::Window has changed behavior.


class MyWin: public Gtk::Window
{
    bool on_key_press_event( GdkEventKey* event ) override
    {
        std::cout << "KeyPressEvent" << std::endl;
        bool retval = Gtk::Window::on_key_press_event( event );
        std::cout << "Retval from native win function:" << retval <<
std::endl;

        return false;
    }
};

As we see, if cursor keys are going into the function, retval is true
which stops following handlers to see the keys.

Every handler which was introduced with
"win.signal_key_press_event().connect" will not any longer executed.

That Gtk::Window "eats" the cursor keys is new. Compiled the same
program some weeks ago the cursor keys where also present in the later
on dynamically registered handlers.

OK, can workaround by simply overriding all the window handlers...

Regards
 Klaus






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