get_entries_for_keyval



Hi,

I'm trying to decompose a keyval into it's component parts. E.g. "P"
would be shift and p. There exists a function in Gdk called
"get_entries_for_keyval" to do this, but I'm having problems making use
of it. I thought it would be something like this:

sub key_pressed {
    my ($widget, $event) = @_;
    my $keymap = Gtk2::Gdk::Keymap->get_default();
    my @entries = $keymap->get_entries_for_keyval($event->keyval());
}

I thought wrong. The error produced is:

Can't locate object method "get_entries_for_keyval" via package
"Gtk2::Gdk::Keymap"

Any help would be appreciated,
 Jon









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