[orca-list] seems that learn mode does not work in my machine



Hi all.
Unless I am doing something wrong, the learn mode is not working in my machine with latest orca built from master, although I suspect that the same is happen with orca 3.10.

I am doing the following steps:
1. Press capslock+h.
2. Wait until the instructions are spoken by orca.
3. press f1.

Nothing happens, only f1 is announced by orca.

I suspect that the problem is related to the folloing line in orca.py inside the function _processKeyboardEvent.

if orca_state.learnModeEnabled and not keyboardEvent.modifiers:

I inserted some debug messages in the code as follows:

    # Special modes.
    if not isPressedEvent and keyboardEvent.event_string == "Escape":
        script.exitLearnMode(keyboardEvent)
    if orca_state.learnModeEnabled:
        debug.println(debug.LEVEL_FINE, "JVE: Learn mode true")
    if not keyboardEvent.modifiers:
        debug.println(debug.LEVEL_FINE, "JVE: not modifiers")
    if orca_state.learnModeEnabled and not keyboardEvent.modifiers:
        debug.println(debug.LEVEL_FINE, "JVE: testing for F1")
        if keyboardEvent.event_string == "F1":
            debug.println(debug.LEVEL_FINE, "JVE: F1")
            orca_state.learnModeEnabled = False
            return helpForOrca()

Here is a snippet of the debug after the above modifications.

KEYBOARDEVENT: type=<enum ATSPI_KEY_PRESSED_EVENT of type AtspiEventType>
                id=65470
                hw_code=67
                modifiers=16400
                event_string=(F1)
                keyval_name=(F1)
                is_text=True
                timestamp=174637134
                time=1382799896.467958
                keyType=function
                shouldEcho=True

KeyboardEvent.present: F1
SPEECH OUTPUT: 'F1 '
JVE: Learn mode true
KEYBOARDEVENT: type=<enum ATSPI_KEY_PRESSED_EVENT of type AtspiEventType>
                id=65470
                hw_code=67
                modifiers=16400
                event_string=(F1)
                keyval_name=(F1)
                is_text=True
                timestamp=174637134
                time=1382799896.474200
                keyType=function
                shouldEcho=True

IGNORING EVENT DUE TO TIMESTAMP

Note that only my first debug message, "JVE: Learn mode true", is printed.
What is wrong?
Thanks.

--
{}S José Vilmar Estácio de Souza


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]