[orca-list] Window switcher script for Orca


Few weeks ago I doed a simple script for Orca, with easyest the window switching. In GNOME2 and GNOME3 fallback session have a window switcher applet, with presenting active windows with a popup menu. Unfortunately doesn't associate keybinding for this applet, so users always need go to the propel top or bottom extended panel, search the window switcher applet, press space key, sleect the want window and press ENTER key to activate a window. This applet presented window menu items not associated mnemonic letters.

I doed a similar function for Orca, with possible using for example in orca-customizations.py file. I would like thank you Marcus Habermehl the lot of help my questions answering.
The script working following:
If you press Orca modifier+F10 key, will be presenting a popup menu, and the awailable window titles and icons presenting a context menue, similar with Window Switcher applet. Of course, the GNOME Desktop Environment screen areas are awailable too in the menu (desktop, top and bottom extended panels). The first menu item automaticaly selected, and Orca spokening automaticaly the first menu item.
All menu items have mnemonic letter to easyest the window activation.
The script switching right the selected window, independent the window have the active workspace or an another workspace. Of course, if the selected window have an another workspace, workspace switching happening too.

I attaching both GNOME2 and GNOME3 compatible scripts. If anybody would like using the script, need copying the proper window_switch.py file in the ~/.local/share/orca/window_switch.py file, and need paste he's orca-customizations.py with following code:
import window_switch
def showwindows(script, inputEvent):
    return True

switchwindowHandler = orca.input_event.InputEventHandler(
    "Present active windows with a context menue")
    1 << orca.settings.MODIFIER_ORCA,
    1 << orca.settings.MODIFIER_ORCA,

I tested the scripts with GNOME 2.30, GNOME3 fallback session and Unity 2d.
I found only one bug, with I don't no how can possible resolving yet, if anybody have ydea, please give me a hint: If have for example two equals mnemonic letter associated menus, and the first menu item mnemonic letter equals with an another menu item, menu jumping of the mnemonic letter happening first time if you press two time the proper mnemonic letter. For example, if you have two h beginning mnemonic letter associated menues, and the first selected menu item mnemonic letter is h, the jumping of the another h associated menu item happening if you first time press the h key double. This situation doesn't happening if I not using the select_first method, or the focus moved before mnemonic jump with arrow key. If the script not containing the select_first method, Orca doesn't spokening the first awailable menu item.

When I doed the script, I not want using list type control (treeview for example), because mnemonic letters prowide fast window switching possibility if the user known the window mnemonic letter. Now all window titles the first letter will be the menu item mnemonic letter.

Joanie, your openion have a chance to land this script in Orca for upstream level when the next development version developing is beginning? If not, future prowide possibility with new Orca plugin support to redistribute similar functions? How will be working future the plugin support? Users how can possible installing external plugins, how can will be possible the plugins localization?


Attachment: window_switch_gnome3.py
Description: Text Data

Attachment: window_switch.py
Description: Text Data

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