Exemple #1
0
    def getAppKeyBindings(self):
        """Returns the application-specific keybindings for this script."""

        keyBindings = keybindings.KeyBindings()
        bindings = self.structuralNavigation.keyBindings
        for keyBinding in bindings.keyBindings:
            keyBindings.add(keyBinding)

        return keyBindings
Exemple #2
0
    def getAppKeyBindings(self):
        """Returns the application-specific keybindings for this script."""

        keyBindings = keybindings.KeyBindings()

        messageKeys = ["F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8", "F9"]
        for messagekey in messageKeys:
            keyBindings.add(
                keybindings.KeyBinding(
                    messagekey, keybindings.defaultModifierMask,
                    keybindings.ORCA_MODIFIER_MASK,
                    self.inputEventHandlers["readPreviousMessageHandler"]))

        return keyBindings
Exemple #3
0
    def getAppKeyBindings(self):
        """Returns the application-specific keybindings for this script."""

        keyBindings = keybindings.KeyBindings()

        keyBindings.add(
            keybindings.KeyBinding(
                "a",
                keybindings.defaultModifierMask,
                keybindings.ORCA_MODIFIER_MASK,
                self.inputEventHandlers["presentInputLineHandler"]))

        keyBindings.add(
            keybindings.KeyBinding(
                "r",
                keybindings.defaultModifierMask,
                keybindings.ORCA_MODIFIER_MASK,
                self.inputEventHandlers["setDynamicColumnHeadersHandler"],
                1))

        keyBindings.add(
            keybindings.KeyBinding(
                "r",
                keybindings.defaultModifierMask,
                keybindings.ORCA_MODIFIER_MASK,
                self.inputEventHandlers["clearDynamicColumnHeadersHandler"],
                2))

        keyBindings.add(
            keybindings.KeyBinding(
                "c",
                keybindings.defaultModifierMask,
                keybindings.ORCA_MODIFIER_MASK,
                self.inputEventHandlers["setDynamicRowHeadersHandler"],
                1))

        keyBindings.add(
            keybindings.KeyBinding(
                "c",
                keybindings.defaultModifierMask,
                keybindings.ORCA_MODIFIER_MASK,
                self.inputEventHandlers["clearDynamicRowHeadersHandler"],
                2))

        bindings = self.structuralNavigation.keyBindings
        for keyBinding in bindings.keyBindings:
            keyBindings.add(keyBinding)

        return keyBindings
Exemple #4
0
    f = os.popen("acpi")
    braille.displayMessage(f.read(80))
    f.close()
    return True


def decirHoraYFecha(script, inputEvent=None):
    speech.speak(strftime("Son las %H y %M, %A, %d de %B de %Y", localtime()))
    braille.displayMessage(strftime("%H:%M | %d/%m/%Y", localtime()))

    return True


decirInfoBateriaHandler = input_event.InputEventHandler(
    decirInfoBateria, _("Lee el estado de la batería"))
decirHoraYFechaHandler = input_event.InputEventHandler(
    decirHoraYFecha, _("Dicela hora y fecha"))

teclas = keybindings.KeyBindings()

teclas.add(
    keybindings.KeyBinding("h", 1 << settings.MODIFIER_ORCA,
                           1 << settings.MODIFIER_ORCA,
                           decirHoraYFechaHandler))
teclas.add(
    keybindings.KeyBinding("e", 1 << settings.MODIFIER_ORCA,
                           1 << settings.MODIFIER_ORCA,
                           decirInfoBateriaHandler))
settings.keyBindingsMap = {}
settings.keyBindingsMap["default"] = teclas