アプリケーションでを使用してKeybinderいGtk+3ますが、キーの組み合わせがありません。コードは次のとおりです。
#!/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