{"action":"closed","issue":{"url":"https://api.github.com/repos/nwjs/nw.js/issues/2337","labels_url":"https://api.github.com/repos/nwjs/nw.js/issues/2337/labels{/name}","comments_url":"https://api.github.com/repos/nwjs/nw.js/issues/2337/comments","events_url":"https://api.github.com/repos/nwjs/nw.js/issues/2337/events","html_url":"https://github.com/nwjs/nw.js/issues/2337","id":42718887,"number":2337,"title":"Shortcut API: registered shortcuts swallow DOM KeyboardEvents","user":{"login":"reppners","id":3855704,"avatar_url":"https://avatars.githubusercontent.com/u/3855704?v=3","gravatar_id":"","url":"https://api.github.com/users/reppners","html_url":"https://github.com/reppners","followers_url":"https://api.github.com/users/reppners/followers","following_url":"https://api.github.com/users/reppners/following{/other_user}","gists_url":"https://api.github.com/users/reppners/gists{/gist_id}","starred_url":"https://api.github.com/users/reppners/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reppners/subscriptions","organizations_url":"https://api.github.com/users/reppners/orgs","repos_url":"https://api.github.com/users/reppners/repos","events_url":"https://api.github.com/users/reppners/events{/privacy}","received_events_url":"https://api.github.com/users/reppners/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-09-14T11:50:26Z","updated_at":"2015-03-12T06:10:26Z","closed_at":"2015-03-12T06:10:26Z","body":"If a keyboard shortcut is registered via the Shortcut API e.g.\r\n    \r\n    'ctrl+shift+c'\r\n\r\nand somewhere on the DOM a listener for 'keydown' is registered ( by using jQuery on(...) )\r\n\r\n    el.on('keydown', function (e) {\r\n        console.log('you pressed ' + e.which + ' with modifiers');\r\n\r\n        if (e.ctrlKey) {\r\n            console.log('ctrl');\r\n        }\r\n\r\n        if (e.altKey) {\r\n            console.log('alt');\r\n        }\r\n\r\n        if (e.metaKey) {\r\n            console.log('meta');\r\n        }\r\n\r\n        if (e.shiftKey) {\r\n            console.log('shift');\r\n        }\r\n    });\r\n\r\nthis event listener will not fire for the key combo ctrl+shift+c even if the focus is on the element where the listener is registered. The node-webkit shortcut listener will execute just fine.\r\n\r\nSo the event is somehow swallowed by Node-Webkit. Is this on purpose? Can this be fixed easily? If anybody can point me in a direction I will happily try to fix this myself and supply a pull request.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4363863-shortcut-api-registered-shortcuts-swallow-dom-keyboardevents?utm_campaign=plugin&utm_content=tracker%2F51989&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F51989&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}