How to disable keyboard navigation of buttons?



I'm working on an RPN calculator application.  Actually, a
microcode-level simulation of early HP calculators such as
the HP-35, HP-45, and HP-55.  I originally wrote it in 1995
using Xlib, but last month I revised it to use GTK+.

I'm using button widgets for the calculator buttons.  The
simulator configuration file contains a mapping of GDK
keycodes to buttons.  For the main window, key_press_event and
key_release_event are connected to a function that tells the
simulation that the calculator button has been pressed or
released.  (It really should tell the actual GTK+ button to press
and release, but I haven't figured out how to do that.)

Anyhow, this works fine for most keys, but not for the arrows
and enter key, apparently because they're used for keyboard
navigation.  Obviously since I'm explicitly attaching a key
to each button, navigation with arrows and enter is completely
unnecessary.  How can I disable it?

I tried resetting the GTK_CAN_FOCUS flag on GTK+ button objects,
but it didn't solve the problem.

The simulator home page is:
    http://www.brouhaha.com/~eric/software/casmsim/

The version with keyboard support is not yet released, but can
be checked out from Subversion.

Thanks!
Eric




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