{"action":"created","comment":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/75388485","id":75388485,"diff_hunk":"@@ -0,0 +1,382 @@\n+<?xml version=\"1.0\" ?>\n+<MixxxKeyboardPreset mixxxVersion=\"2.0.1+\" schemaVersion=\"1\">\n+  <info>\n+    <name>Default Mapping</name>\n+    <author>Mixxx</author>\n+    <description>Default mapping for Mixxx.</description>\n+  </info>\n+  <controller>\n+    <group name=\"[AutoDJ]\">\n+      <control action=\"enabled\">\n+        <keyseq final=\"1\">Shift+F12</keyseq>\n+      </control>\n+      <control action=\"fade_now\">\n+        <keyseq final=\"1\">Shift+F11</keyseq>\n+      </control>\n+      <control action=\"shuffle_playlist\">\n+        <keyseq final=\"1\">Shift+F9</keyseq>\n+      </control>\n+      <control action=\"skip_next\">\n+        <keyseq final=\"1\">Shift+F10</keyseq>\n+      </control>\n+    </group>\n+    <group name=\"[Channel1]\">\n+      <control action=\"LoadSelectedTrack\">\n+        <keyseq final=\"1\">Shift+Left</keyseq>\n+      </control>\n+      <control action=\"back\">\n+        <keyseq lang=\"en_US\" scancode=\"30\">a</keyseq>","path":"res/controllers/Keyboard-Default.kbd.xml","position":28,"original_position":28,"commit_id":"995266eed0038476b7212100c88a58eb6366b750","original_commit_id":"995266eed0038476b7212100c88a58eb6366b750","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},"body":"I like the idea of adding the `<scancode>` element. However, if we add this element, we might as well need a `<modifiers>`. The thing, though, now that there can be two elements per key sequence instead of one, is that we should probably parent them to a `<keyseq>` element, which will support the `lang` attribute, just like the current `<keyseq>` element.\r\n\r\nHow about:\r\n```XML\r\n<control action=\"some_action\">\r\n  \r\n  <!-- Binds to \"Shift+A\" key on all not explicit listed layouts. \r\n  So, this won't work for layouts that lack a key labeled 'A'. -->\r\n  <keyseq>\r\n    <key>a</key>\r\n    <modifiers>Shift</modifiers>\r\n  </keyseq>\r\n\r\n  <!-- Binds to \"Shift+A\" on a \"en_US\" layout -->\r\n  <keyseq lang=\"en_US\">\r\n    <key>a</key>\r\n    <modifiers>Shift</modifiers>\r\n  </keyseq>\r\n\r\n  <!-- Binds to Shift+[key_with_scancode_30] to all not explicit listed layouts -->\r\n  <keyseq>\r\n    <scancode>30</scancode>\r\n    <modifiers>Shift</modifiers>\r\n  </keyseq>\r\n  \r\n  <!-- And your last example, binding to \r\n  \"Ctrl+[key_with_scancode_of_the_'a'_labled_key_on_'en_US']\" on \r\n  all not explicit listed layouts -->\r\n  <keyseq>\r\n    <scancode>\r\n      <key lang=\"en_US\">a</key>\r\n    </scancode>\r\n    \r\n    <modifiers>Shift</modifiers>\r\n  </keyseq>\r\n</control>\r\n```\r\n\r\nHowever, since a scancode says something about a key, not about a key sequence, it feels like `<scancode>` should be a child node of `<key>`, but that might be a bit overkill. What do you think?","created_at":"2016-08-18T21:01:06Z","updated_at":"2016-08-18T21:01:06Z","html_url":"https://github.com/mixxxdj/mixxx/pull/966#discussion_r75388485","pull_request_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966","_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments/75388485"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/966#discussion_r75388485"},"pull_request":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966"}}},"pull_request":{"url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966","id":74539640,"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","issue_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966","number":966,"state":"open","locked":false,"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},"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)","created_at":"2016-06-21T01:39:37Z","updated_at":"2016-08-18T21:01:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e6f7a7aa70d6106c33f8139d0040da3693aeebd7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966/commits","review_comments_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966/comments","review_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/966/comments","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/995266eed0038476b7212100c88a58eb6366b750","head":{"label":"Tomasito665:develop","ref":"develop","sha":"995266eed0038476b7212100c88a58eb6366b750","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},"repo":{"id":58553490,"name":"mixxx","full_name":"Tomasito665/mixxx","owner":{"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},"private":false,"html_url":"https://github.com/Tomasito665/mixxx","description":"Mixxx is Free DJ software that gives you everything you need to perform live mixes.","fork":true,"url":"https://api.github.com/repos/Tomasito665/mixxx","forks_url":"https://api.github.com/repos/Tomasito665/mixxx/forks","keys_url":"https://api.github.com/repos/Tomasito665/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tomasito665/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tomasito665/mixxx/teams","hooks_url":"https://api.github.com/repos/Tomasito665/mixxx/hooks","issue_events_url":"https://api.github.com/repos/Tomasito665/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/Tomasito665/mixxx/events","assignees_url":"https://api.github.com/repos/Tomasito665/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/Tomasito665/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/Tomasito665/mixxx/tags","blobs_url":"https://api.github.com/repos/Tomasito665/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tomasito665/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tomasito665/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tomasito665/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tomasito665/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/Tomasito665/mixxx/languages","stargazers_url":"https://api.github.com/repos/Tomasito665/mixxx/stargazers","contributors_url":"https://api.github.com/repos/Tomasito665/mixxx/contributors","subscribers_url":"https://api.github.com/repos/Tomasito665/mixxx/subscribers","subscription_url":"https://api.github.com/repos/Tomasito665/mixxx/subscription","commits_url":"https://api.github.com/repos/Tomasito665/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tomasito665/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tomasito665/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tomasito665/mixxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tomasito665/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/Tomasito665/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tomasito665/mixxx/merges","archive_url":"https://api.github.com/repos/Tomasito665/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tomasito665/mixxx/downloads","issues_url":"https://api.github.com/repos/Tomasito665/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/Tomasito665/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/Tomasito665/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/Tomasito665/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tomasito665/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/Tomasito665/mixxx/releases{/id}","deployments_url":"https://api.github.com/repos/Tomasito665/mixxx/deployments","created_at":"2016-05-11T14:44:42Z","updated_at":"2016-05-11T14:44:57Z","pushed_at":"2016-08-16T20:37:11Z","git_url":"git://github.com/Tomasito665/mixxx.git","ssh_url":"git@github.com:Tomasito665/mixxx.git","clone_url":"https://github.com/Tomasito665/mixxx.git","svn_url":"https://github.com/Tomasito665/mixxx","homepage":"http://mixxx.org","size":258501,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mixxxdj:master","ref":"master","sha":"967772365a8ad6ce68149461fae76b28fc6f06af","user":{"login":"mixxxdj","id":1743769,"avatar_url":"https://avatars.githubusercontent.com/u/1743769?v=3","gravatar_id":"","url":"https://api.github.com/users/mixxxdj","html_url":"https://github.com/mixxxdj","followers_url":"https://api.github.com/users/mixxxdj/followers","following_url":"https://api.github.com/users/mixxxdj/following{/other_user}","gists_url":"https://api.github.com/users/mixxxdj/gists{/gist_id}","starred_url":"https://api.github.com/users/mixxxdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixxxdj/subscriptions","organizations_url":"https://api.github.com/users/mixxxdj/orgs","repos_url":"https://api.github.com/users/mixxxdj/repos","events_url":"https://api.github.com/users/mixxxdj/events{/privacy}","received_events_url":"https://api.github.com/users/mixxxdj/received_events","type":"Organization","site_admin":false},"repo":{"id":10126031,"name":"mixxx","full_name":"mixxxdj/mixxx","owner":{"login":"mixxxdj","id":1743769,"avatar_url":"https://avatars.githubusercontent.com/u/1743769?v=3","gravatar_id":"","url":"https://api.github.com/users/mixxxdj","html_url":"https://github.com/mixxxdj","followers_url":"https://api.github.com/users/mixxxdj/followers","following_url":"https://api.github.com/users/mixxxdj/following{/other_user}","gists_url":"https://api.github.com/users/mixxxdj/gists{/gist_id}","starred_url":"https://api.github.com/users/mixxxdj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixxxdj/subscriptions","organizations_url":"https://api.github.com/users/mixxxdj/orgs","repos_url":"https://api.github.com/users/mixxxdj/repos","events_url":"https://api.github.com/users/mixxxdj/events{/privacy}","received_events_url":"https://api.github.com/users/mixxxdj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mixxxdj/mixxx","description":"Mixxx is Free DJ software that gives you everything you need to perform live mixes.","fork":false,"url":"https://api.github.com/repos/mixxxdj/mixxx","forks_url":"https://api.github.com/repos/mixxxdj/mixxx/forks","keys_url":"https://api.github.com/repos/mixxxdj/mixxx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mixxxdj/mixxx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mixxxdj/mixxx/teams","hooks_url":"https://api.github.com/repos/mixxxdj/mixxx/hooks","issue_events_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/events{/number}","events_url":"https://api.github.com/repos/mixxxdj/mixxx/events","assignees_url":"https://api.github.com/repos/mixxxdj/mixxx/assignees{/user}","branches_url":"https://api.github.com/repos/mixxxdj/mixxx/branches{/branch}","tags_url":"https://api.github.com/repos/mixxxdj/mixxx/tags","blobs_url":"https://api.github.com/repos/mixxxdj/mixxx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mixxxdj/mixxx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mixxxdj/mixxx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mixxxdj/mixxx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mixxxdj/mixxx/statuses/{sha}","languages_url":"https://api.github.com/repos/mixxxdj/mixxx/languages","stargazers_url":"https://api.github.com/repos/mixxxdj/mixxx/stargazers","contributors_url":"https://api.github.com/repos/mixxxdj/mixxx/contributors","subscribers_url":"https://api.github.com/repos/mixxxdj/mixxx/subscribers","subscription_url":"https://api.github.com/repos/mixxxdj/mixxx/subscription","commits_url":"https://api.github.com/repos/mixxxdj/mixxx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mixxxdj/mixxx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mixxxdj/mixxx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mixxxdj/mixxx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mixxxdj/mixxx/contents/{+path}","compare_url":"https://api.github.com/repos/mixxxdj/mixxx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mixxxdj/mixxx/merges","archive_url":"https://api.github.com/repos/mixxxdj/mixxx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mixxxdj/mixxx/downloads","issues_url":"https://api.github.com/repos/mixxxdj/mixxx/issues{/number}","pulls_url":"https://api.github.com/repos/mixxxdj/mixxx/pulls{/number}","milestones_url":"https://api.github.com/repos/mixxxdj/mixxx/milestones{/number}","notifications_url":"https://api.github.com/repos/mixxxdj/mixxx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mixxxdj/mixxx/labels{/name}","releases_url":"https://api.github.com/repos/mixxxdj/mixxx/releases{/id}","deployments_url":"https://api.github.com/repos/mixxxdj/mixxx/deployments","created_at":"2013-05-17T15:14:38Z","updated_at":"2016-08-13T05:41:18Z","pushed_at":"2016-08-18T20:53:11Z","git_url":"git://github.com/mixxxdj/mixxx.git","ssh_url":"git@github.com:mixxxdj/mixxx.git","clone_url":"https://github.com/mixxxdj/mixxx.git","svn_url":"https://github.com/mixxxdj/mixxx","homepage":"http://mixxx.org","size":274988,"stargazers_count":572,"watchers_count":572,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":344,"mirror_url":null,"open_issues_count":67,"forks":344,"open_issues":67,"watchers":572,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966"},"html":{"href":"https://github.com/mixxxdj/mixxx/pull/966"},"issue":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/966"},"comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/issues/966/comments"},"review_comments":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966/comments"},"review_comment":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mixxxdj/mixxx/pulls/966/commits"},"statuses":{"href":"https://api.github.com/repos/mixxxdj/mixxx/statuses/995266eed0038476b7212100c88a58eb6366b750"}}}}
{"actor":{"display_login":"Tomasito665"}}