{"action":"opened","issue":{"url":"https://api.github.com/repos/octalmage/robotjs/issues/219","repository_url":"https://api.github.com/repos/octalmage/robotjs","labels_url":"https://api.github.com/repos/octalmage/robotjs/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/octalmage/robotjs/issues/219/comments","events_url":"https://api.github.com/repos/octalmage/robotjs/issues/219/events","html_url":"https://github.com/octalmage/robotjs/issues/219","id":162121197,"number":219,"title":"Keyboard modifiers remain pressed down after calling keyTap or keyToggle","user":{"login":"kalharbi","id":707356,"avatar_url":"https://avatars.githubusercontent.com/u/707356?v=3","gravatar_id":"","url":"https://api.github.com/users/kalharbi","html_url":"https://github.com/kalharbi","followers_url":"https://api.github.com/users/kalharbi/followers","following_url":"https://api.github.com/users/kalharbi/following{/other_user}","gists_url":"https://api.github.com/users/kalharbi/gists{/gist_id}","starred_url":"https://api.github.com/users/kalharbi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kalharbi/subscriptions","organizations_url":"https://api.github.com/users/kalharbi/orgs","repos_url":"https://api.github.com/users/kalharbi/repos","events_url":"https://api.github.com/users/kalharbi/events{/privacy}","received_events_url":"https://api.github.com/users/kalharbi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-24T10:40:41Z","updated_at":"2016-06-24T10:40:41Z","closed_at":null,"body":"Passing a modifier (shift/alt) in `keyTap()` or `keyToggle()` results in keeping the\r\nmodifier down for any subsequent keyboard API call.\r\n\r\nExample:\r\n\r\n```javascript\r\nconst robot = require('robotjs');\r\nrobot.moveMouseSmooth(70, 130);\r\nrobot.mouseClick();\r\nrobot.keyTap('a', 'shift');\r\nrobot.typeString('bc');\r\n```\r\nWeb listener:\r\n\r\n```html\r\n<body>\r\n  <input type=\"text\" id= \"input-1\">\r\n</body>\r\n<script>\r\n  document.getElementById('input-1').onkeydown = function(e) {\r\n    const msg = \"Key Pressed: \" + e.key + \"\\n\"\r\n    + \"SHIFT?: \" + e.shiftKey + \"\\n\"\r\n    + \"ALT?: \" + e.altKey + \"\\n\";\r\n    console.log(msg);\r\n  }\r\n</script>\r\n```\r\nOutput:\r\n\r\nKey Pressed: A\r\nSHIFT?: true\r\nALT?: false\r\n+++++++++++++\r\nKey Pressed: b\r\n__SHIFT?: true__\r\nALT?: false\r\n+++++++++++++\r\nKey Pressed: c\r\n__SHIFT?: true__\r\nALT?: false\r\n\r\nThis was on OSX 10.10, node version 6, robotjs version 0.4.4"}}
{"actor":{"display_login":"kalharbi"}}