On Fri, Oct 31, 2003 at 03:25:50AM -0300, alejandro david weil wrote:
> I hooked key_press event.. and all was ok until I wanted to 'handle'
> deadkeys .. well actually.. the deadkey event comes as a keypress.
>
> But I can't handle it, I could save it for later use.. but still don't know
> how can I use that when other key comes.
Okay, you'll have to help me here -- why do you want to use a deadkey in
your specific application? Normally deadkeys are taken care of at the
underlying X level, no?
> When a keypress comes I do:
> 1. check it's a keypress event
> 2. check if keyval & 0xff00 == 0xff00, if it's that, -> contrrol key
> 3. if not control key:
> 4. oldstr = oldstr + unichar(gtk.gdk.keyval_to_unicode( keyval ))
[snip]
> Is there some kind of value that I can keep, to process next keypress
> with, in order to apply the char modification?
You can do all this manually by storing something like self._last_key
(you could even store it as widget.set_data("_last_key", XXX) and then
blocking insert_text (and setting it yourself) if you really wanted.
Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/