diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index 08856c0..b792247 100644
a
|
b
|
_actions_table = { |
58 | 58 | 'XF86AudioRaiseVolume' : 'volume_up', |
59 | 59 | '<alt>F11' : 'volume_min', |
60 | 60 | '<alt>F12' : 'volume_max', |
61 | | '0x93' : 'frame', |
62 | | '0xEB' : 'rotate', |
63 | 61 | '<alt>Tab' : 'next_window', |
64 | 62 | '<alt><shift>Tab' : 'previous_window', |
65 | 63 | '<alt>Escape' : 'close_window', |
66 | | '0xDC' : 'open_search', |
67 | 64 | # the following are intended for emulator users |
68 | 65 | '<alt><shift>f' : 'frame', |
69 | 66 | '<alt><shift>q' : 'quit_emulator', |
… |
… |
_actions_table = { |
73 | 70 | '<alt><shift>s' : 'say_text', |
74 | 71 | } |
75 | 72 | |
| 73 | _action_table_olpc = { |
| 74 | '0x93' : 'frame', |
| 75 | '0xEB' : 'rotate', |
| 76 | '0xDC' : 'open_search', |
| 77 | } |
| 78 | |
76 | 79 | SPEECH_DBUS_SERVICE = 'org.laptop.Speech' |
77 | 80 | SPEECH_DBUS_PATH = '/org/laptop/Speech' |
78 | 81 | SPEECH_DBUS_INTERFACE = 'org.laptop.Speech' |
79 | 82 | |
| 83 | def host_is_xo(): |
| 84 | # FIXME: that's a loosy way to check for XO, what's the recommended way? |
| 85 | if os.access("/ofw/serial-number", os.R_OK) == 0: |
| 86 | return True |
| 87 | retrun False |
| 88 | |
80 | 89 | class KeyHandler(object): |
81 | 90 | def __init__(self, frame): |
82 | 91 | self._frame = frame |
… |
… |
class KeyHandler(object): |
94 | 103 | |
95 | 104 | self._tabbing_handler = TabbingHandler(self._frame, _TABBING_MODIFIER) |
96 | 105 | |
| 106 | if host_is_xo(): |
| 107 | _action_table += _action_table_olpc |
| 108 | |
97 | 109 | for f in os.listdir(os.path.join(config.ext_path, 'globalkey')): |
98 | 110 | if f.endswith('.py') and not f.startswith('__'): |
99 | 111 | module_name = f[:-3] |