summaryrefslogtreecommitdiff
path: root/caribou/settings/caribou_settings.py
blob: e89ba3d8396183d305120871f8970f89f3243f1b (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
from caribou.settings.setting_types import *
from caribou import _

CaribouSettings = SettingsTopGroup(
    _("Caribou Preferences"), "/org/gnome/caribou/", "org.gnome.caribou",
    [SettingsGroup("scanning", _("Scanning"), [
                BooleanSetting(
                    "scan_enabled", _("Enable scanning"), False,
                    _("Enable switch scanning"),
                    insensitive_when_false=["scanning_general",
                                            "scanning_input"]),
                SettingsGroup("scanning_general", _("General"), [
                        IntegerSetting("scan_grouping", _("Scanning mode"),
                                       1,
                                       _("Scanning type, subgroups, rows or linear"),
                                       allowed=[(1, _("Subgroups")),
                                                (2, _("Rows")),
                                                (3, _("Linear"))],
                                       entry_type=ENTRY_COMBO),
                        FloatSetting("step_time", _("Step time"), 1.0,
                                     _("Time between key transitions"),
                                     min=0.1, max=60.0),
                        BooleanSetting("inverse_scanning",
                                       _("Inverse scanning"), False,
                                       _("Step with the switch, activate by dwelling")),
                        BooleanSetting(
                            "autorestart",
                            _("Auto-restart scanning"), False,
                            _("Automatically restart scanning after item activation")),
                        IntegerSetting("scan_cycles", _("Scan cycles"),
                                       1, allowed=[(1, _("One")),
                                                   (2, _("Two")),
                                                   (3, _("Three")),
                                                   (4, _("Four")),
                                                   (5, _("Five"))],
                                       entry_type=ENTRY_COMBO)
                        ]),
                SettingsGroup("scanning_input", _("Input"), [
                        StringSetting("switch_device", _("Switch device"),
                                      "keyboard",
                                      _("Switch device, keyboard or mouse"),
                                      entry_type=ENTRY_RADIO,
                                      allowed=[("keyboard", _("Keyboard")),
                                               ("mouse", _("Mouse"))],
                                      children=[
                                StringSetting("keyboard_key", _("Switch key"),
                                              "space",
                                              _("Key to use with scanning mode"),
                                              allowed=[
                                        ("Shift_R", _("Right shift")),
                                        ("Shift_L", _("Left shift")),
                                        ("space", _("Space")),
                                        ("ISO_Level3_Shift", _("Alt Gr")),
                                        ("Num_Lock", _("Num lock"))]),
                                IntegerSetting("mouse_button", _("Switch button"),
                                               2,
                                               _(
                                        "Mouse button to use in the scanning "
                                        "mode"), 
                                               allowed=[(1, _("Button 1")),
                                                        (2, _("Button 2")),
                                                        (3, _("Button 3"))],
                                               entry_type=ENTRY_COMBO)
                                ]),
                        ]),
                ])
        ])