{"action":"created","issue":{"url":"https://api.github.com/repos/brownplt/code.pyret.org/issues/35","repository_url":"https://api.github.com/repos/brownplt/code.pyret.org","labels_url":"https://api.github.com/repos/brownplt/code.pyret.org/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/brownplt/code.pyret.org/issues/35/comments","events_url":"https://api.github.com/repos/brownplt/code.pyret.org/issues/35/events","html_url":"https://github.com/brownplt/code.pyret.org/issues/35","id":106485832,"number":35,"title":"key events","user":{"login":"schanzer","id":77126,"avatar_url":"https://avatars.githubusercontent.com/u/77126?v=3","gravatar_id":"","url":"https://api.github.com/users/schanzer","html_url":"https://github.com/schanzer","followers_url":"https://api.github.com/users/schanzer/followers","following_url":"https://api.github.com/users/schanzer/following{/other_user}","gists_url":"https://api.github.com/users/schanzer/gists{/gist_id}","starred_url":"https://api.github.com/users/schanzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schanzer/subscriptions","organizations_url":"https://api.github.com/users/schanzer/orgs","repos_url":"https://api.github.com/users/schanzer/repos","events_url":"https://api.github.com/users/schanzer/events{/privacy}","received_events_url":"https://api.github.com/users/schanzer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2015-09-15T05:59:13Z","updated_at":"2016-08-15T19:35:19Z","closed_at":null,"body":"This comes as no surprise to anyone, but I've been knee-deep in it with WeScheme for the last few days so I figured I might as well file a report. This is based on the Pyret program found at https://code.pyret.org/editor#share=0BzzMl1BJlJDkeFFTUVhURk1rd0E&v=v0.5r1428\r\n\r\n1) Caps lock is ignored  (CapsLock+k -> k, instead of K)\r\n2) Shift modifier is ignored  (Shift+k -> k, instead of K)\r\n3) Alt/Opt modifier is ignored (Alt-c -> c, instead of ç)\r\n\r\nI don't know how much of the old jsBigBang code Pyret inherited, but here's the issue: the only way to get modifier keys (shift, alt, etc) is to listen for keydown events, and the only [easy] way to get the modified character (ç) is to listen for keypress events. \r\n\r\nI briefly attempted to reconstruct the typed character solely from the keydown event, but that got complicated fast. For WeScheme, I instead signed up the key-event handler for both down *and* press, and then had it sift through some conditions to know when to ignore one and listen for the other. It feels like a bit of a fragile solution, but I don't expect anyone to re-assign the extended ASCII character set anytime soon. :) \r\n\r\nHope this is helpful!"},"comment":{"url":"https://api.github.com/repos/brownplt/code.pyret.org/issues/comments/239904773","html_url":"https://github.com/brownplt/code.pyret.org/issues/35#issuecomment-239904773","issue_url":"https://api.github.com/repos/brownplt/code.pyret.org/issues/35","id":239904773,"user":{"login":"justinpombrio","id":434946,"avatar_url":"https://avatars.githubusercontent.com/u/434946?v=3","gravatar_id":"","url":"https://api.github.com/users/justinpombrio","html_url":"https://github.com/justinpombrio","followers_url":"https://api.github.com/users/justinpombrio/followers","following_url":"https://api.github.com/users/justinpombrio/following{/other_user}","gists_url":"https://api.github.com/users/justinpombrio/gists{/gist_id}","starred_url":"https://api.github.com/users/justinpombrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justinpombrio/subscriptions","organizations_url":"https://api.github.com/users/justinpombrio/orgs","repos_url":"https://api.github.com/users/justinpombrio/repos","events_url":"https://api.github.com/users/justinpombrio/events{/privacy}","received_events_url":"https://api.github.com/users/justinpombrio/received_events","type":"User","site_admin":false},"created_at":"2016-08-15T19:35:19Z","updated_at":"2016-08-15T19:35:19Z","body":"Per the thread on pyret-discuss:\r\n\r\n> The best proposed solution is to add another kind of key event (call\r\n> it `on-key-detailed` for now) that is provided with much more\r\n> information than `on-key`.  The goal, of course, is to keep `on-key`\r\n> simple, while providing the richer functionality.\r\n\r\nRegardless of the more detailed function, `on-key` could still reflect weather shift is used, and produce \"K\" when you type \"shift-k\". I believe this is standard behavior: in OpenGL you get the capitalized key, and in JavaScript you get both the capitalized and lowercase key."}}
{"actor":{"display_login":"justinpombrio"}}