1 '''
2 General SUE script.
3
4 @author: Ramona Bunk
5 @organization: IT Science Center Ruegen gGmbH, Germany
6 @copyright: Copyright (c) 2007, 2008 ITSC Ruegen
7
8 @license: I{The BSD License}
9 All rights reserved. This program and the accompanying materials are made
10 available under the terms of the BSD license which accompanies
11 this distribution, and is available at
12 U{http://www.opensource.org/licenses/bsd-license.php}
13 '''
14
15 import AccessEngine
16 from AccessEngine import AEScript, AccessEngineAPI
17 from AccessEngine import AEConstants
18
19 from Tools.i18n import bind, _
20
21
22 __uie__ = dict(kind='script', tier=None, all_tiers=True)
23
24
25
26
27
29 '''
30 This script contains functionallity, that fits in no other script.
31 '''
33 '''
34 To register general tasks.
35 '''
36 self.registerTask('quit sue', self.quit)
37
38
39 kbd = AccessEngineAPI.getInputDevice(None, 'keyboard')
40 AccessEngineAPI.addInputModifiers(self, kbd, kbd.AEK_ALT_L,
41 kbd.AEK_SHIFT_L, kbd.AEK_ALT_R,
42 kbd.AEK_SHIFT_R, kbd.AEK_CAPS_LOCK)
43 pairs = [[kbd.AEK_ALT_L, kbd.AEK_SHIFT_L], [kbd.AEK_ALT_R, kbd.AEK_SHIFT_R]]
44
45
46 for pair in pairs:
47 self.registerCommand(kbd, 'quit sue',
48 _('quit sue'), False, pair+[kbd.AEK_Q])
49
50 - def quit(self, **kwargs):
55