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

Klaus <[email protected]>
Newsgroups gmane.comp.gnome.gtkmm
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.