Accelerators and Access Keys

Quod Libet has a lot of hacks related to GTK+'s accelerators and access keys. Some of this is relevant to translators; all of it is relevant to people working on the code.

Accelerators

Accelerators are global keybindings, usually beginning with Control. They do not change based on the language, and are user-configurable. Often they are specified by the HIG. Accelerators are to make common tasks faster. Only one widget may have a particular accelerator, and it always activates it, even when invisible.

Browsers and SongLists can provide custom accelerators that are only available while they are active. This is not standard GTK+ behavior and cannot be extended to widgets writ large.

Because accelerators are so global, Quod Libet has a number of fake accelerators. 0-4 for rating, Q for enqueue, and a few others are not really accelerators but implemented in QL's code directly (so are not configurable). They are actually key-press-events on the SongList widget. In general, accelerators cannot be a single character (so stop asking). Most TreeViews in QL support interactive searching, which is also activated by focusing the list and typing a single character. It also interferes with text entries.

The Next/Previous accelerators are a bit odd, for cross-keyboard accessibility. Full stop and comma are easy to type on many keyboards, are either next to each other or the same key, and are almost always available in the default input mode.

Access keys

Access keys are also global keybindings. They're the underlined characters which you combine with Alt to move the widget focus. They do change based on language, and are not user-configurable. Access keys are primarily for accessibility. Multiple widgets may have the same access key, in which case pressing it cycles between them. Access keys only work when visible.

Search boxes and the main song list have a special behavior in Quod Libet: The song list has a faked access key of whatever the search box has (this works in the Search Bar, Paned Browser, and in future browsers with search entries). For this to work properly, no access key can conflict with the search bar's. Otherwise it will cycle between those two widgets rather than the song list and search bar. Translators should try to avoid conflicts with the search bar in the main window.

Access keys for top-level menu items (Music, Filters, Control, View, Help) shouldn't match any others in the UI. Switching between a menu and another widget takes twice as long; Alt+X, Escape, Alt+X, rather than just Alt+X Alt+X.