Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar/0024-accessibility_0001_cp_accessibility_keyboard.patch.patch
blob: 67b1f2ec495d380c1fb0b21fa8d83e400e9c9580 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
From 0ebe85157993bc1793488edbe479ed9149e5bf43 Mon Sep 17 00:00:00 2001
From: Unknown <unknown@unknown.org>
Date: Mon, 1 Nov 2010 17:56:53 +0100
Subject: [PATCH sugar 24/74] accessibility_0001_cp_accessibility_keyboard.patch

---
 bin/sugar-session                              |    7 ++
 configure.ac                                   |    1 +
 data/icons/Makefile.am                         |    1 +
 data/icons/module-accessibility.svg            |   92 +++++++++++++++++++
 extensions/cpsection/Makefile.am               |   15 +++-
 extensions/cpsection/accessibility/Makefile.am |    6 ++
 extensions/cpsection/accessibility/__init__.py |   25 +++++
 extensions/cpsection/accessibility/model.py    |   55 +++++++++++
 extensions/cpsection/accessibility/view.py     |  114 ++++++++++++++++++++++++
 src/jarabe/model/Makefile.am                   |    1 +
 src/jarabe/model/accessibility.py              |   76 ++++++++++++++++
 11 files changed, 391 insertions(+), 2 deletions(-)
 create mode 100644 data/icons/module-accessibility.svg
 create mode 100644 extensions/cpsection/accessibility/Makefile.am
 create mode 100644 extensions/cpsection/accessibility/__init__.py
 create mode 100644 extensions/cpsection/accessibility/model.py
 create mode 100644 extensions/cpsection/accessibility/view.py
 create mode 100644 src/jarabe/model/accessibility.py

diff --git a/bin/sugar-session b/bin/sugar-session
index 40c9db7..a1d7cac 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -1,6 +1,7 @@
 #!/usr/bin/env python
 # Copyright (C) 2006, Red Hat, Inc.
 # Copyright (C) 2009, One Laptop Per Child Association Inc
+# Copyright (C) 2010, Plan Ceibal <comunidad@plan.ceibal.edu.uy>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -193,6 +194,7 @@ def bootstrap():
     gobject.idle_add(setup_notification_service_cb)
     gobject.idle_add(setup_file_transfer_cb)
     gobject.idle_add(show_software_updates_cb)
+    gobject.idle_add(setup_accessibility_cb)
 
     if sys.modules.has_key('xklavier'):
         gobject.idle_add(setup_keyboard_cb)
@@ -204,6 +206,11 @@ def set_fonts():
     settings = gtk.settings_get_default()
     settings.set_property("gtk-font-name", "%s %f" % (face, size))
 
+def setup_accessibility_cb():
+    from jarabe.model import accessibility
+    accessibility_manager = accessibility.AccessibilityManager()
+    accessibility_manager.setup_accessibility()
+
 def main():
     try:
         from sugar import env
diff --git a/configure.ac b/configure.ac
index 237b2ad..df9614f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,7 @@ data/icons/Makefile
 data/Makefile
 data/sugar-emulator.desktop
 extensions/cpsection/aboutcomputer/Makefile
+extensions/cpsection/accessibility/Makefile
 extensions/cpsection/aboutme/Makefile
 extensions/cpsection/datetime/Makefile
 extensions/cpsection/frame/Makefile
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index a35643a..2497c4a 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -3,6 +3,7 @@ sugardir = $(pkgdatadir)/data/icons
 sugar_DATA =                        \
 	module-about_me.svg             \
 	module-about_my_computer.svg    \
+	module-accessibility.svg        \
 	module-date_and_time.svg        \
 	module-frame.svg                \
 	module-keyboard.svg             \
diff --git a/data/icons/module-accessibility.svg b/data/icons/module-accessibility.svg
new file mode 100644
index 0000000..245a47e
--- /dev/null
+++ b/data/icons/module-accessibility.svg
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   version="1.0"
+   width="55"
+   height="55"
+   id="svg795">
+  <defs
+     id="defs797" />
+  <g
+     id="layer1">
+    <path
+       d="m -23.738584,30.440666 a 8.901969,11.301082 0 1 1 -17.803937,0 8.901969,11.301082 0 1 1 17.803937,0 z"
+       transform="matrix(1.2765958,0,0,1.0558659,19.192898,-13.127946)"
+       id="path12"
+       style="fill:none;stroke:#ffffff" />
+    <path
+       d="m 30.145644,37.823484 c -0.583589,6.659344 -6.7511,11.52268 -13.775517,10.862567 C 9.3457054,48.02594 4.1243814,42.092348 4.7079694,35.433004 5.2915594,28.773661 20.67887,20.597949 14.885997,24.011638 -12.777062,40.313232 24.43362,62.068174 30.145644,37.823484 z"
+       id="path1405-0"
+       style="fill:none;stroke:#ffffff;stroke-width:1.44962609;stroke-opacity:1" />
+    <rect
+       width="2.916333"
+       height="21.188446"
+       ry="1.3939767"
+       x="18.332197"
+       y="13.76814"
+       id="rect1438-8"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.50547338;stroke-opacity:1" />
+    <rect
+       width="2.8716421"
+       height="19.140917"
+       ry="1.259271"
+       x="-35.091366"
+       y="-38.207035"
+       transform="matrix(0,-1,-1,0,0,0)"
+       id="rect1438-1-87"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.41987956;stroke-opacity:1" />
+    <rect
+       width="2.5733202"
+       height="15.766372"
+       ry="1.0372615"
+       x="-5.4068875"
+       y="-65.997124"
+       transform="matrix(-0.55477829,0.83199823,-0.68762037,-0.72607041,0,0)"
+       id="rect1438-0-4"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.21988189;stroke-opacity:1" />
+    <rect
+       width="2.0588"
+       height="12.916228"
+       ry="0.84975183"
+       x="6.7647386"
+       y="-38.278324"
+       transform="matrix(-0.21998034,0.97550431,-0.88967727,-0.45658992,0,0)"
+       id="rect1438-0-1-8"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.98759735;stroke-opacity:1" />
+    <rect
+       width="0.98179615"
+       height="13.275604"
+       ry="0.87339497"
+       x="-30.243309"
+       y="-41.495876"
+       transform="matrix(0,-1,-1,0,0,0)"
+       id="rect1438-1-8-5"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.69142139;stroke-opacity:1" />
+    <rect
+       width="0.97070193"
+       height="11.568416"
+       ry="0.76108003"
+       x="50.822704"
+       y="-8.6089849"
+       transform="matrix(0.89791652,0.44016579,0.56230073,-0.82693282,0,0)"
+       id="rect1438-1-8-0-0"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.64177793;stroke-opacity:1" />
+    <rect
+       width="1.6299056"
+       height="7.7739253"
+       ry="0.51144254"
+       x="72.759727"
+       y="35.364716"
+       transform="matrix(0.9888174,0.14913131,-0.60877492,0.79334299,0,0)"
+       id="rect1438-0-1-7-7"
+       style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.68172067;stroke-opacity:1" />
+    <path
+       d="m 79.67578,18.634508 a 3.2829957,3.0304577 0 1 1 -6.565992,0 3.2829957,3.0304577 0 1 1 6.565992,0 z"
+       transform="matrix(1.5397454,0,0,1.4719643,-97.932275,-17.750188)"
+       id="path1603-2"
+       style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-opacity:1" />
+  </g>
+</svg>
diff --git a/extensions/cpsection/Makefile.am b/extensions/cpsection/Makefile.am
index a92b5dd..d623380 100644
--- a/extensions/cpsection/Makefile.am
+++ b/extensions/cpsection/Makefile.am
@@ -1,5 +1,16 @@
-SUBDIRS = aboutme aboutcomputer datetime frame keyboard language \
-    modemconfiguration network power updater
+SUBDIRS = \
+	aboutme \
+	aboutcomputer \
+	accessibility \
+	datetime \
+	frame \
+	keyboard \
+	language \
+	modemconfiguration \
+	network \
+	power \
+	updater \
+	#
 
 sugardir = $(pkgdatadir)/extensions/cpsection
 sugar_PYTHON = __init__.py
diff --git a/extensions/cpsection/accessibility/Makefile.am b/extensions/cpsection/accessibility/Makefile.am
new file mode 100644
index 0000000..70d26f4
--- /dev/null
+++ b/extensions/cpsection/accessibility/Makefile.am
@@ -0,0 +1,6 @@
+sugardir = $(pkgdatadir)/extensions/cpsection/accessibility
+
+sugar_PYTHON = 		\
+	__init__.py	\
+	model.py	\
+	view.py		
diff --git a/extensions/cpsection/accessibility/__init__.py b/extensions/cpsection/accessibility/__init__.py
new file mode 100644
index 0000000..3467372
--- /dev/null
+++ b/extensions/cpsection/accessibility/__init__.py
@@ -0,0 +1,25 @@
+# Copyright (C) 2010 Plan Ceibal
+#
+# Author: Esteban Arias <earias@plan.ceibal.edu.uy>
+# Contact information: comunidad@plan.ceibal.edu.uy 
+# Plan Ceibal http://www.ceibal.edu.uy
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+from gettext import gettext as _
+
+CLASS = 'accessibility'
+ICON = 'module-accessibility'
+TITLE = _('Accessibility')
+
diff --git a/extensions/cpsection/accessibility/model.py b/extensions/cpsection/accessibility/model.py
new file mode 100644
index 0000000..5136460
--- /dev/null
+++ b/extensions/cpsection/accessibility/model.py
@@ -0,0 +1,55 @@
+# Copyright (C) 2010 Plan Ceibal
+#
+# Author: Esteban Arias <earias@plan.ceibal.edu.uy>
+# Contact information: comunidad@plan.ceibal.edu.uy 
+# Plan Ceibal http://www.ceibal.edu.uy
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import subprocess
+import gconf
+
+from gettext import gettext as _
+from jarabe.model import accessibility
+
+keyboard = accessibility.Keyboard()
+
+KEYWORDS = ['mouse_keys', 'sticky_keys', 'bounce_keys']
+
+def get_mouse_keys():
+    return keyboard.get_mouse_keys()
+
+def set_mouse_keys(activar):
+    keyboard.set_mouse_keys(activar)
+
+def print_mouse_keys():
+    print str(get_mouse_keys())
+
+def get_sticky_keys():    
+    return keyboard.get_sticky_keys()
+
+def set_sticky_keys(activar):
+    keyboard.set_sticky_keys(activar)
+
+def print_sticky_keys():
+    print str(get_sticky_keys())
+
+def get_bounce_keys():
+    return keyboard.get_bounce_keys()
+
+def set_bounce_keys(activar):
+    keyboard.set_bounce_keys(activar)
+
+def print_bounce_keys():
+    print str(get_bounce_keys())
diff --git a/extensions/cpsection/accessibility/view.py b/extensions/cpsection/accessibility/view.py
new file mode 100644
index 0000000..9f291ac
--- /dev/null
+++ b/extensions/cpsection/accessibility/view.py
@@ -0,0 +1,114 @@
+# Copyright (C) 2010 Plan Ceibal
+#
+# Author: Esteban Arias <earias@plan.ceibal.edu.uy>
+# Contact information: comunidad@plan.ceibal.edu.uy 
+# Plan Ceibal http://www.ceibal.edu.uy
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+import gtk
+from gettext import gettext as _
+
+from sugar.graphics import style
+
+from jarabe import config
+from jarabe.controlpanel.sectionview import SectionView
+from jarabe.controlpanel.inlinealert import InlineAlert
+
+class accessibility(SectionView):
+    def __init__(self, model, alerts=None):
+        SectionView.__init__(self)
+
+        self._model = model
+        self.set_border_width(style.DEFAULT_SPACING * 2)
+        self.set_spacing(style.DEFAULT_SPACING)
+        group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
+     
+        separator_pm = gtk.HSeparator()
+        self.pack_start(separator_pm, expand=False)
+        separator_pm.show()
+
+        label_pm_teclado = gtk.Label(_('Keyboard'))
+        label_pm_teclado.set_alignment(0, 0)
+        self.pack_start(label_pm_teclado, expand=False)
+        label_pm_teclado.show()
+
+        self.box_pm = gtk.VBox()
+        self.box_pm.set_border_width(style.DEFAULT_SPACING * 2)
+        self.box_pm.set_spacing(style.DEFAULT_SPACING)       
+
+        self._view_mouse_keys()
+        self._view_sticky_keys()
+        self._view_bounce_keys()
+
+        self.pack_start(self.box_pm, expand=False)
+        self.box_pm.show()
+    
+    def _set_mouse_keys(self, widget):
+        state = widget.get_active()
+        self._model.set_mouse_keys(state)
+
+    def _set_sticky_keys(self, widget):
+        state = widget.get_active()
+        self._model.set_sticky_keys(state)
+
+    def _set_bounce_keys(self, widget):
+        state = widget.get_active()
+        self._model.set_bounce_keys(state)
+
+    def undo(self):
+        self._model.set_mouse_keys(self.init_state_mouse_keys)
+        self._model.set_sticky_keys(self.init_state_sticky_keys)
+        self._model.set_bounce_keys(self.init_state_bounce_keys)
+
+    def _view_mouse_keys(self):
+        self.btn_mouse_keys = gtk.CheckButton(_('Mouse Keys'))
+        self._mouse_pm_change_handler = self.btn_mouse_keys.connect("toggled", self._set_mouse_keys)
+        self.init_state_mouse_keys = self._model.get_mouse_keys() 
+        self.btn_mouse_keys.set_active(self.init_state_mouse_keys)            
+        self.box_pm.pack_start(self.btn_mouse_keys, True, True, 2)
+        self.btn_mouse_keys.show()
+
+        lbl_mouse = gtk.Label(_('Move the mouse pointer with keyboard number.'))
+        lbl_mouse.set_alignment(0, 0)
+        self.box_pm.pack_start(lbl_mouse, True, True, 2)
+        lbl_mouse.show()
+
+    def _view_sticky_keys(self):
+        self.btn_sticky_keys = gtk.CheckButton(_('Sticky Keys'))
+        self._sticky_pm_change_handler = self.btn_sticky_keys.connect("toggled", self._set_sticky_keys)
+        self.init_state_sticky_keys = self._model.get_sticky_keys()
+        self.btn_sticky_keys.set_active(self.init_state_sticky_keys)
+        self.box_pm.pack_start(self.btn_sticky_keys, True, True, 2)
+        self.btn_sticky_keys.show()
+
+        lbl_sticky = gtk.Label(_('Instead of having to press two keys at once (such as CTRL + Q), you can press one key at a time.'))
+        lbl_sticky.set_line_wrap(True)
+        lbl_sticky.set_alignment(0, 0)
+        self.box_pm.pack_start(lbl_sticky, True, True, 2)
+        lbl_sticky.show()
+
+    def _view_bounce_keys(self):
+        self.btn_bounce_keys = gtk.CheckButton(_('Bounce Keys'))
+        self._bounce_pm_change_handler = self.btn_bounce_keys.connect("toggled", self._set_bounce_keys)
+        self.init_state_bounce_keys = self._model.get_bounce_keys()
+        self.btn_bounce_keys.set_active(self.init_state_bounce_keys)
+        self.box_pm.pack_start(self.btn_bounce_keys, True, True, 2)
+        self.btn_bounce_keys.show()
+
+        lbl_bounce = gtk.Label(_('Ignore rapid, repeated keypresses of the same key.'))
+        lbl_bounce.set_alignment(0, 0)
+        self.box_pm.pack_start(lbl_bounce, True, True, 2)
+        lbl_bounce.show()
diff --git a/src/jarabe/model/Makefile.am b/src/jarabe/model/Makefile.am
index bd9bef2..ee8b865 100644
--- a/src/jarabe/model/Makefile.am
+++ b/src/jarabe/model/Makefile.am
@@ -2,6 +2,7 @@ sugardir = $(pythondir)/jarabe/model
 sugar_PYTHON =			\
 	adhoc.py		\
 	__init__.py		\
+	accessibility.py	\
 	buddy.py		\
 	bundleregistry.py	\
 	filetransfer.py		\
diff --git a/src/jarabe/model/accessibility.py b/src/jarabe/model/accessibility.py
new file mode 100644
index 0000000..b851b3c
--- /dev/null
+++ b/src/jarabe/model/accessibility.py
@@ -0,0 +1,76 @@
+# Copyright (C) 2010 Plan Ceibal
+#
+# Author: Esteban Arias <earias@plan.ceibal.edu.uy>
+# Contact information: comunidad@plan.ceibal.edu.uy 
+# Plan Ceibal http://www.ceibal.edu.uy
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import subprocess
+import gconf
+
+from gettext import gettext as _
+
+class Keyboard:
+
+    def get_mouse_keys(self):
+        client = gconf.client_get_default()
+        return client.get_bool("/desktop/sugar/accessibility/keyboard/mousekeys_enable")
+
+    def set_mouse_keys(self, activar):
+        client = gconf.client_get_default()
+        client.set_bool("/desktop/sugar/accessibility/keyboard/mousekeys_enable", activar)
+        self.run_config_keyboard()
+
+    def get_sticky_keys(self):    
+        client = gconf.client_get_default()
+        return client.get_bool("/desktop/sugar/accessibility/keyboard/stickykeys_enable")
+
+    def set_sticky_keys(self, activar):
+        client = gconf.client_get_default()
+        client.set_bool("/desktop/sugar/accessibility/keyboard/stickykeys_enable", activar)
+        self.run_config_keyboard()
+
+    def get_bounce_keys(self):
+        client = gconf.client_get_default()
+        return client.get_bool("/desktop/sugar/accessibility/keyboard/bouncekeys_enable")
+
+    def set_bounce_keys(self, activar):
+        client = gconf.client_get_default()
+        client.set_bool("/desktop/sugar/accessibility/keyboard/bouncekeys_enable", activar)
+        self.run_config_keyboard()
+
+    def run_config_keyboard(self):
+        cmd = ['ax']
+        if self.get_sticky_keys():
+            cmd.append('+stickykeys')
+        else:
+            cmd.append('-stickykeys')
+        if self.get_bounce_keys():
+            cmd.append('+bouncekeys')
+        else:
+            cmd.append('-bouncekeys')
+        if self.get_mouse_keys():
+            cmd += ['+mousekeys', 'mousemaxspeed', '3000', 'mousetimetomax', '1000', '-timeout', '-repeatkeys']
+        else:
+            cmd += ['-mousekeys', 'mousemaxspeed', '3000', 'mousetimetomax', '1000', '+timeout', '+repeatkeys']
+        subprocess.call(cmd)
+
+class AccessibilityManager:
+    def setup_accessibility(self):
+        client = gconf.client_get_default()
+        is_accessibility = client.dir_exists("/desktop/sugar/accessibility")
+        if is_accessibility:
+            keyboard = Keyboard()
+            keyboard.run_config_keyboard()
-- 
1.7.6