Re: Gtk2::Gdk::Keysyms - different platforms



Mario Kemper <mario kemper googlemail com> writes:

   if ($event->keyval == $Gtk2::Gdk::Keysyms{Escape}) {

I imagine that can stay.  You could also do though

    ... == Gtk2::Gdk->keyval_from_name('Escape')

if that seemed like less loading, or a workaround, or whatever.

(It's also one of those ones where it's a compile-time constant too, if
you could persuade perl to eval-when-compile ... :-)

Or even I suppose go to the name with

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

if a string was easier to switch on etc.



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