GNOME Bugzilla – Bug 654821
Keymap.get_entries_for_keyval isn't working properly
Last modified: 2011-08-14 09:41:55 UTC
Created attachment 192165 [details] get_entries_for_keyval using c Hi! I'm porting my application and I'm having some problems with this method. First of all, using the old pygtk bindings, was like this: import gtk km = gtk.gdk.keymap_get_default() entries = km.get_entries_for_keyval(36) entries now contains: ((13,0,1), (13,0,3)) Now, using pygobject: from gi.repository import Gdk km = Gdk.Keymap.get_default() success, entries = km.get_entries_for_keyval(36) entries now contains: [<void at 0x94623f8>, <void at 0x9462404>] each entry should be a Gdk.KeymapKey, and it is, but it's respective attributes (keycode, group, level) aren't setted properly. This three attributes are gint, but we're getting long types and they're not the right values. Addingly, I ocasionally get coredumps by calling this method. I did a test using c, and this method is working properly, returned keymapkey's attributes are gint types. That's the reason because i'm filling the bug in pygobject. You can try running it by passing the keyval from the command line, I'm passing 36, as in python's examples. Thanks and best regards!
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find. *** This bug has been marked as a duplicate of bug 653588 ***