in reply to Use Gtk3::Gdk to intercept keypresses
[Disclaimer: I'm not a user of Gtk3. The following is based on its documentation.]
Firstly, a note on your error messages. The code
Gtk3::Gdk->keyval_name($event->keyval)
passes the class name, Gtk3::Gdk, as the first argument to keyval_name(). It's equivalent to
keyval_name('Gtk3::Gdk', $event->keyval)
From the messages, it's discarding $event->keyval, leaving
keyval_name('Gtk3::Gdk')
Presumably, $event->keyval returns a number, which seems to be what keyval_name() wants; however, its getting a string, hence: "Argument "Gtk3::Gdk" isn't numeric ...".
You might try:
Gtk3::Gdk::keyval_name($event->keyval)
However, before doing that, I suggest you look at the "Porting from Gtk2 to Gtk3" section of the Gtk3 documentation. It has some information on Keysyms; although, I don't know if that helps you directly with this issue. Other parts may also be useful if you are indeed porting a current Gtk2 application to Gtk3.
— Ken
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use Gtk3::Gdk to intercept keypresses
by Anonymous Monk on Feb 13, 2019 at 09:36 UTC | |
by kcott (Archbishop) on Feb 14, 2019 at 03:06 UTC | |
by Anonymous Monk on Feb 13, 2019 at 09:51 UTC | |
by Anonymous Monk on Feb 13, 2019 at 19:07 UTC |