{"action":"created","issue":{"url":"https://api.github.com/repos/Smithay/client-toolkit/issues/16","repository_url":"https://api.github.com/repos/Smithay/client-toolkit","labels_url":"https://api.github.com/repos/Smithay/client-toolkit/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/Smithay/client-toolkit/issues/16/comments","events_url":"https://api.github.com/repos/Smithay/client-toolkit/issues/16/events","html_url":"https://github.com/Smithay/client-toolkit/pull/16","id":341317720,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNDk1OTkz","number":16,"title":"Add key repetition","user":{"login":"trimental","id":40879396,"node_id":"MDQ6VXNlcjQwODc5Mzk2","avatar_url":"https://avatars0.githubusercontent.com/u/40879396?v=4","gravatar_id":"","url":"https://api.github.com/users/trimental","html_url":"https://github.com/trimental","followers_url":"https://api.github.com/users/trimental/followers","following_url":"https://api.github.com/users/trimental/following{/other_user}","gists_url":"https://api.github.com/users/trimental/gists{/gist_id}","starred_url":"https://api.github.com/users/trimental/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trimental/subscriptions","organizations_url":"https://api.github.com/users/trimental/orgs","repos_url":"https://api.github.com/users/trimental/repos","events_url":"https://api.github.com/users/trimental/events{/privacy}","received_events_url":"https://api.github.com/users/trimental/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-15T12:35:15Z","updated_at":"2018-07-17T00:22:44Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/Smithay/client-toolkit/pulls/16","html_url":"https://github.com/Smithay/client-toolkit/pull/16","diff_url":"https://github.com/Smithay/client-toolkit/pull/16.diff","patch_url":"https://github.com/Smithay/client-toolkit/pull/16.patch"},"body":"This pull request adds key repetition as a possible utility for the keyboard module. The work isn't there yet for release as there will at least need to be a setting for enabling/disabling it and bitflags to control what keys are repeatable. I'm pull requesting to see your views on the key repetition and whether it would be suitable for the client toolkit. I saw the pull request for winit but that looked pretty stale and I think it would fit better as an option in the client toolkit then in winit. I used threads, channels and sleeping as opposed to something like tokio as its simpler and lighter, the only downside I can think of is that threads might last a few hundred milliseconds longer due to sleeping (which I'm not sure whether that matters?) however cpu wise it should be pretty light. I don't know how releases work but maybe it would be a minor breakage if it was defaulted to off?"},"comment":{"url":"https://api.github.com/repos/Smithay/client-toolkit/issues/comments/405420586","html_url":"https://github.com/Smithay/client-toolkit/pull/16#issuecomment-405420586","issue_url":"https://api.github.com/repos/Smithay/client-toolkit/issues/16","id":405420586,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTQyMDU4Ng==","user":{"login":"trimental","id":40879396,"node_id":"MDQ6VXNlcjQwODc5Mzk2","avatar_url":"https://avatars0.githubusercontent.com/u/40879396?v=4","gravatar_id":"","url":"https://api.github.com/users/trimental","html_url":"https://github.com/trimental","followers_url":"https://api.github.com/users/trimental/followers","following_url":"https://api.github.com/users/trimental/following{/other_user}","gists_url":"https://api.github.com/users/trimental/gists{/gist_id}","starred_url":"https://api.github.com/users/trimental/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trimental/subscriptions","organizations_url":"https://api.github.com/users/trimental/orgs","repos_url":"https://api.github.com/users/trimental/repos","events_url":"https://api.github.com/users/trimental/events{/privacy}","received_events_url":"https://api.github.com/users/trimental/received_events","type":"User","site_admin":false},"created_at":"2018-07-17T00:22:44Z","updated_at":"2018-07-17T00:22:44Z","author_association":"CONTRIBUTOR","body":"I also think the current implementation is crude at present but I am unsure what you mean by not using threads, I think to do something like this you need to use threads either directly or indirectly. As for the threads spawning every key press I can make it so only one thread exist for the key repetition and thread sleeping can be replaced by tick from the chan crate. That being said if you want it done without threads directly I can use something like tokio. 👍"}}
{"actor":{"display_login":"trimental"}}