blob: f6b0febf86e9c421609f8e4ad5a32120e56bd7c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import gtk
import dbus
# FIXME These should be handled by the wm, but it's incovenient
# to do that with matchbox at the moment
def setup_global_keys(window, shell = None):
if not shell:
bus = dbus.SessionBus()
proxy_obj = bus.get_object('com.redhat.Sugar.Shell', '/com/redhat/Sugar/Shell')
shell = dbus.Interface(proxy_obj, 'com.redhat.Sugar.Shell')
window.connect("key-press-event", __key_press_event_cb, shell)
def __key_press_event_cb(window, event, shell):
if event.keyval == gtk.keysyms.F3:
shell.toggle_console()
|