{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/14111","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/14111/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/14111/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/14111/events","html_url":"https://github.com/Microsoft/vscode/issues/14111","id":184283748,"number":14111,"title":"Needed validation in `contributes.keybindings` for extension manifest","user":{"login":"waderyan","id":2449568,"avatar_url":"https://avatars0.githubusercontent.com/u/2449568?v=4","gravatar_id":"","url":"https://api.github.com/users/waderyan","html_url":"https://github.com/waderyan","followers_url":"https://api.github.com/users/waderyan/followers","following_url":"https://api.github.com/users/waderyan/following{/other_user}","gists_url":"https://api.github.com/users/waderyan/gists{/gist_id}","starred_url":"https://api.github.com/users/waderyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waderyan/subscriptions","organizations_url":"https://api.github.com/users/waderyan/orgs","repos_url":"https://api.github.com/users/waderyan/repos","events_url":"https://api.github.com/users/waderyan/events{/privacy}","received_events_url":"https://api.github.com/users/waderyan/received_events","type":"User","site_admin":false},"labels":[{"id":296838217,"url":"https://api.github.com/repos/Microsoft/vscode/labels/ux","name":"ux","color":"c7def8","default":false}],"state":"closed","locked":false,"assignee":{"login":"stevencl","id":1704059,"avatar_url":"https://avatars2.githubusercontent.com/u/1704059?v=4","gravatar_id":"","url":"https://api.github.com/users/stevencl","html_url":"https://github.com/stevencl","followers_url":"https://api.github.com/users/stevencl/followers","following_url":"https://api.github.com/users/stevencl/following{/other_user}","gists_url":"https://api.github.com/users/stevencl/gists{/gist_id}","starred_url":"https://api.github.com/users/stevencl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevencl/subscriptions","organizations_url":"https://api.github.com/users/stevencl/orgs","repos_url":"https://api.github.com/users/stevencl/repos","events_url":"https://api.github.com/users/stevencl/events{/privacy}","received_events_url":"https://api.github.com/users/stevencl/received_events","type":"User","site_admin":false},"assignees":[{"login":"stevencl","id":1704059,"avatar_url":"https://avatars2.githubusercontent.com/u/1704059?v=4","gravatar_id":"","url":"https://api.github.com/users/stevencl","html_url":"https://github.com/stevencl","followers_url":"https://api.github.com/users/stevencl/followers","following_url":"https://api.github.com/users/stevencl/following{/other_user}","gists_url":"https://api.github.com/users/stevencl/gists{/gist_id}","starred_url":"https://api.github.com/users/stevencl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevencl/subscriptions","organizations_url":"https://api.github.com/users/stevencl/orgs","repos_url":"https://api.github.com/users/stevencl/repos","events_url":"https://api.github.com/users/stevencl/events{/privacy}","received_events_url":"https://api.github.com/users/stevencl/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-10-20T16:52:47Z","updated_at":"2017-11-20T14:10:56Z","closed_at":"2017-11-20T14:10:56Z","author_association":"CONTRIBUTOR","body":"While building a keymap extension I ran into an issue. \n\nI created a keybinding contribution as seen below:\n\n``` json\n{\n  \"mac\": \"ctrl+shift+pageup\",\n  \"win\": \"alt+shift+pageup\",\n  \"linux\": \"alt+shift+pageup\",\n  \"command\": \"cursorColumnSelectPageUp\",\n  \"when\": \"editorTextFocus\" \n}\n```\n\nWhat is wrong with the above? \n\nOnce I debugged the extension I found the issue. \n\n![image](https://cloud.githubusercontent.com/assets/2449568/19569406/77f42bee-96aa-11e6-937b-9c9cc4eaf2bb.png)\n\nTwo things could be fixed here:\n\n1 - The error message is too large and so I cannot see what is going on. I did figure out that I can see the same error in the debug console. It would be better if there was a way to see the complete message in the error box. (ping @bgashler1 @stevencl on this one)\n2 - I would've expected to have caught this with the JSON validation of the file. We should introduce a squiggle line indicating that the keybinding object is missing a required `\"key\"` property. \n3 - The error message should indicate the line number where the issue exists. See the debug console error message below does not give me an indication where the problem is. \n\n![image](https://cloud.githubusercontent.com/assets/2449568/19569706/9e057a44-96ab-11e6-80c3-6ba0e21e314e.png)\n\nTo fix this today, I simply need to add the `key` property. \n\n``` json\n{\n  \"mac\": \"cmd+shift+l\",\n  \"win\": \"ctrl+shift+l\",\n  \"linux\": \"ctrl+shift+l\",\n  \"key\": \"ctrl+shift+l\",\n  \"command\": \"editor.action.insertCursorAtEndOfEachLineSelected\",\n  \"when\": \"editorTextFocus\"\n}\n```\n\nAs an aside, I created https://github.com/Microsoft/vscode/issues/14112 to address the necessity of the `\"key\"` property. \n"},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/345706229","html_url":"https://github.com/Microsoft/vscode/issues/14111#issuecomment-345706229","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/14111","id":345706229,"user":{"login":"isidorn","id":1926584,"avatar_url":"https://avatars2.githubusercontent.com/u/1926584?v=4","gravatar_id":"","url":"https://api.github.com/users/isidorn","html_url":"https://github.com/isidorn","followers_url":"https://api.github.com/users/isidorn/followers","following_url":"https://api.github.com/users/isidorn/following{/other_user}","gists_url":"https://api.github.com/users/isidorn/gists{/gist_id}","starred_url":"https://api.github.com/users/isidorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isidorn/subscriptions","organizations_url":"https://api.github.com/users/isidorn/orgs","repos_url":"https://api.github.com/users/isidorn/repos","events_url":"https://api.github.com/users/isidorn/events{/privacy}","received_events_url":"https://api.github.com/users/isidorn/received_events","type":"User","site_admin":false},"created_at":"2017-11-20T14:10:56Z","updated_at":"2017-11-20T14:10:56Z","author_association":"CONTRIBUTOR","body":"Closing as dup of https://github.com/Microsoft/vscode/issues/1135"}}
{"actor":{"display_login":"isidorn"}}