{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/action-input/pulls/comments/206320257","pull_request_review_id":141715090,"id":206320257,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjMyMDI1Nw==","diff_hunk":"@@ -0,0 +1,49 @@\n+import ActionMap from \"../../src/action/ActionMap.js\";\n+import ActionManager from \"../../src/action/ActionManager.js\";\n+\n+import AddValueFilter from \"./AddValueFilter.js\";\n+import DummyInputSource from \"./DummyInputSource.js\";\n+\n+/**\n+ * This demonstrates how to set up a completely custom ActionManager, using none of the default input sources, maps, or filters.\n+ */\n+export default function initInput() {\n+  // Create an action manager without defaults\n+  let actionManager = new ActionManager(false);\n+\n+  actionManager.addInputSource(\n+    \"dummy\", // will be mapped to /input/dummy/0/\n+    new DummyInputSource([\n+      { path: \"moo\", parameters: { goo: \"doo\" } }, // Will generate /input/dummy/0/moo inputs\n+      { path: \"nums\", parameters: { value: 22 } } // Will generate /input/dummy/0/nums inputs\n+    ])\n+  );\n+\n+  // Add a custom filter that adds value based on filter parameters in the JSON binding\n+  actionManager.addFilter(\"add-value\", new AddValueFilter());\n+\n+  // Add and switch to a custom action map\n+  actionManager.addActionMap(\"custom\", new ActionMap([...actionManager.filters], \"./custom.json\"));","path":"example/all-custom/index.js","position":25,"original_position":26,"commit_id":"2e28ca39b2482a9d7a3dc03e847445615133c5c9","original_commit_id":"140068df8577f73d0b3ec3f62ab511da83fe760c","user":{"login":"fernandojsg","id":782511,"node_id":"MDQ6VXNlcjc4MjUxMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/782511?v=4","gravatar_id":"","url":"https://api.github.com/users/fernandojsg","html_url":"https://github.com/fernandojsg","followers_url":"https://api.github.com/users/fernandojsg/followers","following_url":"https://api.github.com/users/fernandojsg/following{/other_user}","gists_url":"https://api.github.com/users/fernandojsg/gists{/gist_id}","starred_url":"https://api.github.com/users/fernandojsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fernandojsg/subscriptions","organizations_url":"https://api.github.com/users/fernandojsg/orgs","repos_url":"https://api.github.com/users/fernandojsg/repos","events_url":"https://api.github.com/users/fernandojsg/events{/privacy}","received_events_url":"https://api.github.com/users/fernandojsg/received_events","type":"User","site_admin":false},"body":"Ok I thought that once you added a filter to your app it will get registered directly on the actionmanager (for example similar to when you include an aframe component, that it's automatically being registered).\r\nbut that's fine I just wanted to clarify it","created_at":"2018-07-30T21:02:00Z","updated_at":"2018-07-30T21:02:00Z","html_url":"https://github.com/mozilla/action-input/pull/14#discussion_r206320257","pull_request_url":"https://api.github.com/repos/mozilla/action-input/pulls/14","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mozilla/action-input/pulls/comments/206320257"},"html":{"href":"https://github.com/mozilla/action-input/pull/14#discussion_r206320257"},"pull_request":{"href":"https://api.github.com/repos/mozilla/action-input/pulls/14"}},"in_reply_to_id":202326401},"pull_request":{"url":"https://api.github.com/repos/mozilla/action-input/pulls/14","id":171802678,"node_id":"MDExOlB1bGxSZXF1ZXN0MTcxODAyNjc4","html_url":"https://github.com/mozilla/action-input/pull/14","diff_url":"https://github.com/mozilla/action-input/pull/14.diff","patch_url":"https://github.com/mozilla/action-input/pull/14.patch","issue_url":"https://api.github.com/repos/mozilla/action-input/issues/14","number":14,"state":"open","locked":false,"title":"ActionManager API for discussion","user":{"login":"TrevorFSmith","id":34779,"node_id":"MDQ6VXNlcjM0Nzc5","avatar_url":"https://avatars2.githubusercontent.com/u/34779?v=4","gravatar_id":"","url":"https://api.github.com/users/TrevorFSmith","html_url":"https://github.com/TrevorFSmith","followers_url":"https://api.github.com/users/TrevorFSmith/followers","following_url":"https://api.github.com/users/TrevorFSmith/following{/other_user}","gists_url":"https://api.github.com/users/TrevorFSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorFSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorFSmith/subscriptions","organizations_url":"https://api.github.com/users/TrevorFSmith/orgs","repos_url":"https://api.github.com/users/TrevorFSmith/repos","events_url":"https://api.github.com/users/TrevorFSmith/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorFSmith/received_events","type":"User","site_admin":false},"body":"This is a bit of pseudocode demonstrating the rough idea of how I envision an app writer using the action-input lib.\r\n\r\nThe basic idea is that the app writer declares (perhaps extends) how to map low level inputs to high level actions (perhaps via filters) in JSON files (in this code they're *.map files) and then uses the event or polling API to track events.\r\n\r\nThe app writer is also responsible for the logic of which maps are active at any time, so they'll probably have maps for different XR modes (flat, portal, and immersive) and for different situations like when the game is running, paused, or in a configuration menu.\r\n\r\nI don't expect to merge this PR, just putting it here for discussion.","created_at":"2018-02-27T22:24:43Z","updated_at":"2018-07-30T21:02:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b29d6e942e46b3430b5651a6dea91d6563ef1b74","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/action-input/pulls/14/commits","review_comments_url":"https://api.github.com/repos/mozilla/action-input/pulls/14/comments","review_comment_url":"https://api.github.com/repos/mozilla/action-input/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/action-input/issues/14/comments","statuses_url":"https://api.github.com/repos/mozilla/action-input/statuses/2e28ca39b2482a9d7a3dc03e847445615133c5c9","head":{"label":"TrevorFSmith:master","ref":"master","sha":"2e28ca39b2482a9d7a3dc03e847445615133c5c9","user":{"login":"TrevorFSmith","id":34779,"node_id":"MDQ6VXNlcjM0Nzc5","avatar_url":"https://avatars2.githubusercontent.com/u/34779?v=4","gravatar_id":"","url":"https://api.github.com/users/TrevorFSmith","html_url":"https://github.com/TrevorFSmith","followers_url":"https://api.github.com/users/TrevorFSmith/followers","following_url":"https://api.github.com/users/TrevorFSmith/following{/other_user}","gists_url":"https://api.github.com/users/TrevorFSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorFSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorFSmith/subscriptions","organizations_url":"https://api.github.com/users/TrevorFSmith/orgs","repos_url":"https://api.github.com/users/TrevorFSmith/repos","events_url":"https://api.github.com/users/TrevorFSmith/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorFSmith/received_events","type":"User","site_admin":false},"repo":{"id":121775490,"node_id":"MDEwOlJlcG9zaXRvcnkxMjE3NzU0OTA=","name":"action-input","full_name":"TrevorFSmith/action-input","owner":{"login":"TrevorFSmith","id":34779,"node_id":"MDQ6VXNlcjM0Nzc5","avatar_url":"https://avatars2.githubusercontent.com/u/34779?v=4","gravatar_id":"","url":"https://api.github.com/users/TrevorFSmith","html_url":"https://github.com/TrevorFSmith","followers_url":"https://api.github.com/users/TrevorFSmith/followers","following_url":"https://api.github.com/users/TrevorFSmith/following{/other_user}","gists_url":"https://api.github.com/users/TrevorFSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/TrevorFSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TrevorFSmith/subscriptions","organizations_url":"https://api.github.com/users/TrevorFSmith/orgs","repos_url":"https://api.github.com/users/TrevorFSmith/repos","events_url":"https://api.github.com/users/TrevorFSmith/events{/privacy}","received_events_url":"https://api.github.com/users/TrevorFSmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TrevorFSmith/action-input","description":"A framework-agnostic web input library that responsively handles flat, portal, and immersive display modes.","fork":true,"url":"https://api.github.com/repos/TrevorFSmith/action-input","forks_url":"https://api.github.com/repos/TrevorFSmith/action-input/forks","keys_url":"https://api.github.com/repos/TrevorFSmith/action-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TrevorFSmith/action-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TrevorFSmith/action-input/teams","hooks_url":"https://api.github.com/repos/TrevorFSmith/action-input/hooks","issue_events_url":"https://api.github.com/repos/TrevorFSmith/action-input/issues/events{/number}","events_url":"https://api.github.com/repos/TrevorFSmith/action-input/events","assignees_url":"https://api.github.com/repos/TrevorFSmith/action-input/assignees{/user}","branches_url":"https://api.github.com/repos/TrevorFSmith/action-input/branches{/branch}","tags_url":"https://api.github.com/repos/TrevorFSmith/action-input/tags","blobs_url":"https://api.github.com/repos/TrevorFSmith/action-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TrevorFSmith/action-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TrevorFSmith/action-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/TrevorFSmith/action-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TrevorFSmith/action-input/statuses/{sha}","languages_url":"https://api.github.com/repos/TrevorFSmith/action-input/languages","stargazers_url":"https://api.github.com/repos/TrevorFSmith/action-input/stargazers","contributors_url":"https://api.github.com/repos/TrevorFSmith/action-input/contributors","subscribers_url":"https://api.github.com/repos/TrevorFSmith/action-input/subscribers","subscription_url":"https://api.github.com/repos/TrevorFSmith/action-input/subscription","commits_url":"https://api.github.com/repos/TrevorFSmith/action-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/TrevorFSmith/action-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/TrevorFSmith/action-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/TrevorFSmith/action-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/TrevorFSmith/action-input/contents/{+path}","compare_url":"https://api.github.com/repos/TrevorFSmith/action-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TrevorFSmith/action-input/merges","archive_url":"https://api.github.com/repos/TrevorFSmith/action-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TrevorFSmith/action-input/downloads","issues_url":"https://api.github.com/repos/TrevorFSmith/action-input/issues{/number}","pulls_url":"https://api.github.com/repos/TrevorFSmith/action-input/pulls{/number}","milestones_url":"https://api.github.com/repos/TrevorFSmith/action-input/milestones{/number}","notifications_url":"https://api.github.com/repos/TrevorFSmith/action-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TrevorFSmith/action-input/labels{/name}","releases_url":"https://api.github.com/repos/TrevorFSmith/action-input/releases{/id}","deployments_url":"https://api.github.com/repos/TrevorFSmith/action-input/deployments","created_at":"2018-02-16T16:49:43Z","updated_at":"2018-07-19T18:55:53Z","pushed_at":"2018-07-19T18:55:51Z","git_url":"git://github.com/TrevorFSmith/action-input.git","ssh_url":"git@github.com:TrevorFSmith/action-input.git","clone_url":"https://github.com/TrevorFSmith/action-input.git","svn_url":"https://github.com/TrevorFSmith/action-input","homepage":"","size":236,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"0077322a15ffa0ffc53b3f7c40f733aa3827c1b6","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":120940619,"node_id":"MDEwOlJlcG9zaXRvcnkxMjA5NDA2MTk=","name":"action-input","full_name":"mozilla/action-input","owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/action-input","description":"A framework-agnostic input library that progressively handles flat, portal, and immersive web apps.","fork":false,"url":"https://api.github.com/repos/mozilla/action-input","forks_url":"https://api.github.com/repos/mozilla/action-input/forks","keys_url":"https://api.github.com/repos/mozilla/action-input/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/action-input/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/action-input/teams","hooks_url":"https://api.github.com/repos/mozilla/action-input/hooks","issue_events_url":"https://api.github.com/repos/mozilla/action-input/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/action-input/events","assignees_url":"https://api.github.com/repos/mozilla/action-input/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/action-input/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/action-input/tags","blobs_url":"https://api.github.com/repos/mozilla/action-input/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/action-input/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/action-input/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/action-input/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/action-input/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/action-input/languages","stargazers_url":"https://api.github.com/repos/mozilla/action-input/stargazers","contributors_url":"https://api.github.com/repos/mozilla/action-input/contributors","subscribers_url":"https://api.github.com/repos/mozilla/action-input/subscribers","subscription_url":"https://api.github.com/repos/mozilla/action-input/subscription","commits_url":"https://api.github.com/repos/mozilla/action-input/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/action-input/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/action-input/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/action-input/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/action-input/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/action-input/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/action-input/merges","archive_url":"https://api.github.com/repos/mozilla/action-input/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/action-input/downloads","issues_url":"https://api.github.com/repos/mozilla/action-input/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/action-input/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/action-input/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/action-input/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/action-input/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/action-input/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/action-input/deployments","created_at":"2018-02-09T18:25:00Z","updated_at":"2018-05-05T16:06:34Z","pushed_at":"2018-07-19T18:55:52Z","git_url":"git://github.com/mozilla/action-input.git","ssh_url":"git@github.com:mozilla/action-input.git","clone_url":"https://github.com/mozilla/action-input.git","svn_url":"https://github.com/mozilla/action-input","homepage":"","size":82,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":3,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/action-input/pulls/14"},"html":{"href":"https://github.com/mozilla/action-input/pull/14"},"issue":{"href":"https://api.github.com/repos/mozilla/action-input/issues/14"},"comments":{"href":"https://api.github.com/repos/mozilla/action-input/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/action-input/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/action-input/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/action-input/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/action-input/statuses/2e28ca39b2482a9d7a3dc03e847445615133c5c9"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"fernandojsg"}}