Forum: Ruby-Gnome 2 Gtk::Entry and arrow key events

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Pietro G. (Guest)
on 2007-07-31 21:14

i'm implementing history in a Gtk::Entry.

if i do:

@entry.signal_connect("key_press_event") do |widget, event|
  if event.state.control_mask? and event.keyval == Gdk::Keyval::GDK_p
    # show previous thing
  elsif event.state.control_mask? and event.keyval == Gdk::Keyval::GDK_n
    #show next thing

everything works, but if i try using Gdk::Keyval::GDK_uparrow and
Gdk::Keyval::GDK_downarrow, it doesn't: the arrow events are captured
before this code, and the previous or next widget is activated.

what can i do?
This topic is locked and can not be replied to.