[Glade-users] Modifer keys and text view

Tristan Van Berkom tristan.van.berkom at gmail.com
Sat Oct 11 17:21:58 EDT 2008


oops looks like this draft was never sent, better late than never...

Hi,
    Glade will not add unexpected accelerators if thats what you are asking.

There is a gotcha though, if you DO want keyboard accelerators in your
app, that should be possible, only currently accelerators take precedence
to the widgets in the application recieving events, so - to work around this
we have a hack in play (some apps use this, glade actually uses it so that
delete/cntl-c/cntl-v etc. works both as accelerators to copy/paste widgets and
also works in text entries in the property editor).

Basically if you want both, you need to catch the toplevel window's
key-press-event, manually feed the event to the focused window and
then pass the event back to the window if the focused widget didnt
handle the event - example of this can be found here:
  http://svn.gnome.org/viewvc/glade3/trunk/src/glade-window.c?view=markup
(see the hijack_key_press() function)

Cheers,
                -Tristan

On Fri, Oct 10, 2008 at 1:31 AM, Peter Keller <psilord at cs.wisc.edu> wrote:
> Hello,
>
> I want to write a text editing application where I'd like to enter many
> special characters created by using shift, alt, and control, plus chords
> of them, with the key in question.
>
> Using glade-3, are there any gotchas I should worry about while implementing
> such a thing? Stuff like ctrl-c or alt-w sending all kinds of wrong things
> to the application, that sort of thing...
>
> Thank you.
>
> -pete
> _______________________________________________
> Glade-users maillist  -  Glade-users at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-users
>


More information about the Glade-users mailing list