{"action":"created","issue":{"url":"https://api.github.com/repos/boppreh/keyboard/issues/171","repository_url":"https://api.github.com/repos/boppreh/keyboard","labels_url":"https://api.github.com/repos/boppreh/keyboard/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/boppreh/keyboard/issues/171/comments","events_url":"https://api.github.com/repos/boppreh/keyboard/issues/171/events","html_url":"https://github.com/boppreh/keyboard/issues/171","id":324665762,"number":171,"title":"Scan Codes Not Unique?","user":{"login":"Apollys","id":37650759,"avatar_url":"https://avatars3.githubusercontent.com/u/37650759?v=4","gravatar_id":"","url":"https://api.github.com/users/Apollys","html_url":"https://github.com/Apollys","followers_url":"https://api.github.com/users/Apollys/followers","following_url":"https://api.github.com/users/Apollys/following{/other_user}","gists_url":"https://api.github.com/users/Apollys/gists{/gist_id}","starred_url":"https://api.github.com/users/Apollys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Apollys/subscriptions","organizations_url":"https://api.github.com/users/Apollys/orgs","repos_url":"https://api.github.com/users/Apollys/repos","events_url":"https://api.github.com/users/Apollys/events{/privacy}","received_events_url":"https://api.github.com/users/Apollys/received_events","type":"User","site_admin":false},"labels":[{"id":38835503,"url":"https://api.github.com/repos/boppreh/keyboard/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-19T22:40:34Z","updated_at":"2018-05-19T23:05:58Z","closed_at":null,"author_association":"NONE","body":"Since [this issue](https://github.com/boppreh/keyboard/issues/161), I've switched to using scan codes for all hotkey-related things.  Things were going smoothly until...\r\n\r\n```\r\nD:\\>python -m keyboard\r\n{\"event_type\": \"down\", \"scan_code\": 82, \"name\": \"insert\", \"time\": 1526769257.152305, \"is_keypad\": false}\r\n{\"event_type\": \"up\", \"scan_code\": 82, \"name\": \"insert\", \"time\": 1526769257.224113, \"is_keypad\": false}\r\n{\"event_type\": \"down\", \"scan_code\": 82, \"name\": \"0\", \"time\": 1526769258.5705125, \"is_keypad\": true}\r\n0{\"event_type\": \"up\", \"scan_code\": 82, \"name\": \"0\", \"time\": 1526769258.6413236, \"is_keypad\": true}\r\n```\r\n\r\nHow do I distinguish between keys with the same `\"scan_code\"` but different `\"is_keypad\"` values in `keyboard.add_hotkey()` and `keyboard.send()`?"},"comment":{"url":"https://api.github.com/repos/boppreh/keyboard/issues/comments/390438391","html_url":"https://github.com/boppreh/keyboard/issues/171#issuecomment-390438391","issue_url":"https://api.github.com/repos/boppreh/keyboard/issues/171","id":390438391,"user":{"login":"boppreh","id":231856,"avatar_url":"https://avatars1.githubusercontent.com/u/231856?v=4","gravatar_id":"","url":"https://api.github.com/users/boppreh","html_url":"https://github.com/boppreh","followers_url":"https://api.github.com/users/boppreh/followers","following_url":"https://api.github.com/users/boppreh/following{/other_user}","gists_url":"https://api.github.com/users/boppreh/gists{/gist_id}","starred_url":"https://api.github.com/users/boppreh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boppreh/subscriptions","organizations_url":"https://api.github.com/users/boppreh/orgs","repos_url":"https://api.github.com/users/boppreh/repos","events_url":"https://api.github.com/users/boppreh/events{/privacy}","received_events_url":"https://api.github.com/users/boppreh/received_events","type":"User","site_admin":false},"created_at":"2018-05-19T23:05:58Z","updated_at":"2018-05-19T23:05:58Z","author_association":"OWNER","body":"Ah, one more thing. Due to a variety of situations where Windows does something dumb (e.g. scan code = 0), the library is capable of sending raw virtual key codes if you provide a negative number for the scan code. So 'send(-72)' will send an event for *virtual key code* 72, not *scan code*. You just have to check what are the virtual key codes for the keys you want. "}}
{"actor":{"display_login":"boppreh"}}