{"action":"created","issue":{"url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966","repository_url":"https://api.github.com/repos/mixxxdj/mixxx","labels_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966/labels{/name}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966/comments","events_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966/events","html_url":"https://github.com/mixxxdj/mixxx/pull/966","id":161332132,"number":966,"title":"KeyboardController","user":{"login":"Tomasito665","id":12563382,"avatar_url":"https://avatars.githubusercontent.com/u/12563382?v=3","gravatar_id":"","url":"https://api.github.com/users/Tomasito665","html_url":"https://github.com/Tomasito665","followers_url":"https://api.github.com/users/Tomasito665/followers","following_url":"https://api.github.com/users/Tomasito665/following{/other_user}","gists_url":"https://api.github.com/users/Tomasito665/gists{/gist_id}","starred_url":"https://api.github.com/users/Tomasito665/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tomasito665/subscriptions","organizations_url":"https://api.github.com/users/Tomasito665/orgs","repos_url":"https://api.github.com/users/Tomasito665/repos","events_url":"https://api.github.com/users/Tomasito665/events{/privacy}","received_events_url":"https://api.github.com/users/Tomasito665/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-06-21T01:39:37Z","updated_at":"2016-08-31T13:41:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966","html_url":"https://github.com/mixxxdj/mixxx/pull/966","diff_url":"https://github.com/mixxxdj/mixxx/pull/966.diff","patch_url":"https://github.com/mixxxdj/mixxx/pull/966.patch"},"body":"## Keyboard controller\r\nThis PR brings the `KeyboardController` to life, a controller whose life cycle is regulated in `ControllerManager`, just like every other `Controller`. Its task is to communicate with `KeyboardEventFilter`, which is instructed about current mappings when a new mapping is loaded.\r\n\r\nWhen the user presses a key sequence known to `KeyboardEventFilter`, it passes the `ConfigKey` bound to the pressed key sequence to `KeyboardController`, which then does or does not set the Mixxx control, depending on whether the controller is enabled or not. The user can enable / disable it both via controller preferences and via main menu bar's _Enable Keyboard Shortcuts_ checkbox.\r\n\r\n#### Keyboard controller presets\r\nKeyboard mappings are stored to disk as `*.kbd.xml` files and can hold mappings for multiple keyboard languages. However, it usually just contains info for one layout. That's because _Mixxx_ is now able to translate key sequences from one keyboard layout to the other, runtime. Therefore, it is possible to start Mixxx with keyboard layout _en_US_, switch to _ru_RU_ and then to _el_GR_ and the keyboard mappings will keep working on each switch (naturally, tooltips will update as well).\r\n\r\n#### Layouts tool\r\nMapping translations are made using keyboard layout tables found in `layouts.cpp`, to which layouts can be added or removed with the _layouts_tool_. The tool uses the X11 API to get the current keyboard map from X. Therefore, this tool does only work on Linux.\r\n\r\n#### From config files to XML presets\r\nThe `kbdcfg_to_kbdxml` tool can be given multiple legacy `*.kbd.cfg` files (one per layout) and outputs one single `*.kbd.xml` file. The tool is also given the `layouts.cpp` file, so that it can explicitly add mappings for specific layouts or leave them out, depending on whether the specific mapping is translatable or not. This tool is used to create `Keyboard-Default.kbd.xml`, the default keyboard preset.\r\n\r\n#### Other\r\n- If not obvious: restarting Mixxx is not longer required to switch to a custom mapping (there's no utility yet to make custom mappings, though. So, custom mappings will have to be made by hand, for now)\r\n- Keyboard works instantly on Mixxx startup, without having to manually give focus to one of the control widgets.\r\n- Key W and key S are now usable on Greek layouts (Explanation of the problem: http://pastebin.com/v4KVmrD4)"},"comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/issues/comments/243767229","html_url":"https://github.com/mixxxdj/mixxx/pull/966#issuecomment-243767229","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966","id":243767229,"user":{"login":"daschuer","id":1777442,"avatar_url":"https://avatars.githubusercontent.com/u/1777442?v=3","gravatar_id":"","url":"https://api.github.com/users/daschuer","html_url":"https://github.com/daschuer","followers_url":"https://api.github.com/users/daschuer/followers","following_url":"https://api.github.com/users/daschuer/following{/other_user}","gists_url":"https://api.github.com/users/daschuer/gists{/gist_id}","starred_url":"https://api.github.com/users/daschuer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daschuer/subscriptions","organizations_url":"https://api.github.com/users/daschuer/orgs","repos_url":"https://api.github.com/users/daschuer/repos","events_url":"https://api.github.com/users/daschuer/events{/privacy}","received_events_url":"https://api.github.com/users/daschuer/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T13:41:11Z","updated_at":"2016-08-31T13:41:11Z","body":"> @daschuer: The keyboard controller is already linked with the Enable keyboard shortcuts menu checkbox ;)\r\n\r\nBaybe there is a bug ... , I will retest more carefully. \r\n\r\n> A C++ conversion tool for this won't be hard to write. We could use it in the Upgrade class. What are your thoughts on this?\r\n\r\nPerfect! \r\n\r\nTo all: \r\nI think we could merge once the remaining issues are ironed out. How about merge this to 2.1? \r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"daschuer"}}