我Keybinder
在Gtk+3
应用程序中使用 a ,但它没有得到任何组合键。这是代码:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gi
gi.require_version('Keybinder', '3.0')
from gi.repository import Keybinder
from gi.repository import Gtk
def test_func(data):
print data
if __name__ == '__main__':
wnd = Gtk.Window()
wnd.connect('delete-event', Gtk.main_quit)
wnd.show_all()
if not Keybinder.bind('<Super>q', test_func, 'Hi there!'):
print "Keybinder.bind() failed."
Gtk.main()
我希望程序test_func
在我按下Windows+q
组合键时执行,但它什么也不做。如果它有所作为Debian Jessie
,我会继续运行它。xfce4