in reply to Re: Use Gtk3::Gdk to intercept keypresses
in thread Use Gtk3::Gdk to intercept keypresses

Using this:

Gtk3::Gdk::keyval_name($event->keyval)

instead of this:

Gtk3::Gdk->keyval_name($event->keyval)

...was the first thing I tried, and for some inexplicable reason, it produces the same error message.

I had also checked the Gtk2 > Gtk3 migration documents. The change to Keysyms seems to be a red herring; the test code translates a value like 65478 into a keycode like f10, which bypasses the corresponding key symbol GDK_F10 entirely.

Replies are listed 'Best First'.
Re^3: Use Gtk3::Gdk to intercept keypresses
by kcott (Archbishop) on Feb 14, 2019 at 03:06 UTC
    "The change to Keysyms seems to be a red herring; ..."

    Fair enough. I didn't spend any time investigating that avenue, but was somewhat doubtful, hence: "... although, I don't know if that helps you directly ...".

    From your follow-up post:

    "Correction: Gtk3::Gdk::keyval_name does work."

    Glad to hear it. I don't know if that's the best solution — as stated, "I'm not a user of Gtk3." — but at least it is a solution. Others may come up with something better.

    — Ken

Re^3: Use Gtk3::Gdk to intercept keypresses
by Anonymous Monk on Feb 13, 2019 at 09:51 UTC

    Correction: Gtk3::Gdk::keyval_name does work. I was getting the same error message because my code contained two ->keyval_name calls, only one of which had been updated.

      ?Have you tried $event->keyval_name