{"action":"created","comment":{"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/comments/58964174","id":58964174,"diff_hunk":"@@ -240,13 +241,28 @@ static int GetTypedChar(SDL_Keysym *sym)\n     }\n }\n \n+// Check whether the event is (windows|command|meta)+enter and if so toggle fullscreen\n+static boolean fullscreenKeyShortcut(SDL_Keysym *sym)\n+{\n+    if(sym->scancode == SDL_SCANCODE_RETURN && sym->mod & (KMOD_LGUI | KMOD_RGUI))\n+    {\n+        I_ToggleFullScreen();\n+        return true;\n+    }\n+    return false;\n+}\n+\n void I_HandleKeyboardEvent(SDL_Event *sdlevent)\n {\n     event_t event;\n \n     switch (sdlevent->type)\n     {\n         case SDL_KEYDOWN:\n+            if(fullscreenKeyShortcut(&sdlevent->key.keysym))","path":"src/i_input.c","position":30,"original_position":30,"commit_id":"130f184221d69b055530576ddcbcde6cc1a84d8f","original_commit_id":"130f184221d69b055530576ddcbcde6cc1a84d8f","user":{"login":"fragglet","id":96821,"avatar_url":"https://avatars.githubusercontent.com/u/96821?v=3","gravatar_id":"","url":"https://api.github.com/users/fragglet","html_url":"https://github.com/fragglet","followers_url":"https://api.github.com/users/fragglet/followers","following_url":"https://api.github.com/users/fragglet/following{/other_user}","gists_url":"https://api.github.com/users/fragglet/gists{/gist_id}","starred_url":"https://api.github.com/users/fragglet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fragglet/subscriptions","organizations_url":"https://api.github.com/users/fragglet/orgs","repos_url":"https://api.github.com/users/fragglet/repos","events_url":"https://api.github.com/users/fragglet/events{/privacy}","received_events_url":"https://api.github.com/users/fragglet/received_events","type":"User","site_admin":false},"body":"Space between if and (","created_at":"2016-04-07T23:59:17Z","updated_at":"2016-04-07T23:59:17Z","html_url":"https://github.com/chocolate-doom/chocolate-doom/pull/696#discussion_r58964174","pull_request_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696","_links":{"self":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/comments/58964174"},"html":{"href":"https://github.com/chocolate-doom/chocolate-doom/pull/696#discussion_r58964174"},"pull_request":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696"}}},"pull_request":{"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696","id":65584298,"html_url":"https://github.com/chocolate-doom/chocolate-doom/pull/696","diff_url":"https://github.com/chocolate-doom/chocolate-doom/pull/696.diff","patch_url":"https://github.com/chocolate-doom/chocolate-doom/pull/696.patch","issue_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/696","number":696,"state":"open","locked":false,"title":"[sdl2-branch] toggle fullscreen with cmd+enter","user":{"login":"jmtd","id":63694,"avatar_url":"https://avatars.githubusercontent.com/u/63694?v=3","gravatar_id":"","url":"https://api.github.com/users/jmtd","html_url":"https://github.com/jmtd","followers_url":"https://api.github.com/users/jmtd/followers","following_url":"https://api.github.com/users/jmtd/following{/other_user}","gists_url":"https://api.github.com/users/jmtd/gists{/gist_id}","starred_url":"https://api.github.com/users/jmtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmtd/subscriptions","organizations_url":"https://api.github.com/users/jmtd/orgs","repos_url":"https://api.github.com/users/jmtd/repos","events_url":"https://api.github.com/users/jmtd/events{/privacy}","received_events_url":"https://api.github.com/users/jmtd/received_events","type":"User","site_admin":false},"body":"This morning's breakfast coding... Only tested on Mac so far\r\n\r\nSpecial-case listen for LGUI/RGUI + enter (which is Command on Mac;\r\nWindows key on Windows; Meta or whatever on Linux) and toggle\r\nfullscreen.\r\n\r\nWe might want to handle Mac slightly differently: I think the OS itself\r\nbasically does the equivalent of SDL's FULLSCREEN_WINDOWED whenever something\r\ntries to become fullscreen. As things currently stand, this works on Mac, and\r\nyou can additionally fullscreen by clicking the green fullscreen (formerly\r\nmaximize) icon in the window titlebar. Switching from/to fullscreen between\r\nfullscreen-via-shortcut or fullscreen-via-maximize button works as expected.\r\n\r\nHowever, when you are fullscreen-via-maximize-button, if you push the mouse\r\npointer to the top edge, the titlebar scrolls down and you could click to\r\nde-maximize. This does not happen if you are fullscreen-via-shortcut. Further\r\ninvestigation required.","created_at":"2016-04-07T07:19:53Z","updated_at":"2016-04-07T23:59:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59212c2dad1c2350f7d0b3f278ab0cca008e9e67","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696/commits","review_comments_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696/comments","review_comment_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/696/comments","statuses_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/statuses/130f184221d69b055530576ddcbcde6cc1a84d8f","head":{"label":"jmtd:sdl2-fullscreen-toggle","ref":"sdl2-fullscreen-toggle","sha":"130f184221d69b055530576ddcbcde6cc1a84d8f","user":{"login":"jmtd","id":63694,"avatar_url":"https://avatars.githubusercontent.com/u/63694?v=3","gravatar_id":"","url":"https://api.github.com/users/jmtd","html_url":"https://github.com/jmtd","followers_url":"https://api.github.com/users/jmtd/followers","following_url":"https://api.github.com/users/jmtd/following{/other_user}","gists_url":"https://api.github.com/users/jmtd/gists{/gist_id}","starred_url":"https://api.github.com/users/jmtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmtd/subscriptions","organizations_url":"https://api.github.com/users/jmtd/orgs","repos_url":"https://api.github.com/users/jmtd/repos","events_url":"https://api.github.com/users/jmtd/events{/privacy}","received_events_url":"https://api.github.com/users/jmtd/received_events","type":"User","site_admin":false},"repo":{"id":34379235,"name":"chocolate-doom","full_name":"jmtd/chocolate-doom","owner":{"login":"jmtd","id":63694,"avatar_url":"https://avatars.githubusercontent.com/u/63694?v=3","gravatar_id":"","url":"https://api.github.com/users/jmtd","html_url":"https://github.com/jmtd","followers_url":"https://api.github.com/users/jmtd/followers","following_url":"https://api.github.com/users/jmtd/following{/other_user}","gists_url":"https://api.github.com/users/jmtd/gists{/gist_id}","starred_url":"https://api.github.com/users/jmtd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmtd/subscriptions","organizations_url":"https://api.github.com/users/jmtd/orgs","repos_url":"https://api.github.com/users/jmtd/repos","events_url":"https://api.github.com/users/jmtd/events{/privacy}","received_events_url":"https://api.github.com/users/jmtd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmtd/chocolate-doom","description":"Chocolate Doom is a Doom source port that is conservative and historically accurate.","fork":true,"url":"https://api.github.com/repos/jmtd/chocolate-doom","forks_url":"https://api.github.com/repos/jmtd/chocolate-doom/forks","keys_url":"https://api.github.com/repos/jmtd/chocolate-doom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmtd/chocolate-doom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmtd/chocolate-doom/teams","hooks_url":"https://api.github.com/repos/jmtd/chocolate-doom/hooks","issue_events_url":"https://api.github.com/repos/jmtd/chocolate-doom/issues/events{/number}","events_url":"https://api.github.com/repos/jmtd/chocolate-doom/events","assignees_url":"https://api.github.com/repos/jmtd/chocolate-doom/assignees{/user}","branches_url":"https://api.github.com/repos/jmtd/chocolate-doom/branches{/branch}","tags_url":"https://api.github.com/repos/jmtd/chocolate-doom/tags","blobs_url":"https://api.github.com/repos/jmtd/chocolate-doom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmtd/chocolate-doom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmtd/chocolate-doom/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmtd/chocolate-doom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmtd/chocolate-doom/statuses/{sha}","languages_url":"https://api.github.com/repos/jmtd/chocolate-doom/languages","stargazers_url":"https://api.github.com/repos/jmtd/chocolate-doom/stargazers","contributors_url":"https://api.github.com/repos/jmtd/chocolate-doom/contributors","subscribers_url":"https://api.github.com/repos/jmtd/chocolate-doom/subscribers","subscription_url":"https://api.github.com/repos/jmtd/chocolate-doom/subscription","commits_url":"https://api.github.com/repos/jmtd/chocolate-doom/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmtd/chocolate-doom/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmtd/chocolate-doom/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmtd/chocolate-doom/issues/comments{/number}","contents_url":"https://api.github.com/repos/jmtd/chocolate-doom/contents/{+path}","compare_url":"https://api.github.com/repos/jmtd/chocolate-doom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmtd/chocolate-doom/merges","archive_url":"https://api.github.com/repos/jmtd/chocolate-doom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmtd/chocolate-doom/downloads","issues_url":"https://api.github.com/repos/jmtd/chocolate-doom/issues{/number}","pulls_url":"https://api.github.com/repos/jmtd/chocolate-doom/pulls{/number}","milestones_url":"https://api.github.com/repos/jmtd/chocolate-doom/milestones{/number}","notifications_url":"https://api.github.com/repos/jmtd/chocolate-doom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmtd/chocolate-doom/labels{/name}","releases_url":"https://api.github.com/repos/jmtd/chocolate-doom/releases{/id}","deployments_url":"https://api.github.com/repos/jmtd/chocolate-doom/deployments","created_at":"2015-04-22T08:44:13Z","updated_at":"2015-06-30T14:49:50Z","pushed_at":"2016-04-07T07:14:47Z","git_url":"git://github.com/jmtd/chocolate-doom.git","ssh_url":"git@github.com:jmtd/chocolate-doom.git","clone_url":"https://github.com/jmtd/chocolate-doom.git","svn_url":"https://github.com/jmtd/chocolate-doom","homepage":"http://www.chocolate-doom.org/","size":17384,"stargazers_count":2,"watchers_count":2,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"chocolate-doom:sdl2-branch","ref":"sdl2-branch","sha":"5ad3fa6c5ee4731f8688931ff76595df55dd9bc5","user":{"login":"chocolate-doom","id":6140118,"avatar_url":"https://avatars.githubusercontent.com/u/6140118?v=3","gravatar_id":"","url":"https://api.github.com/users/chocolate-doom","html_url":"https://github.com/chocolate-doom","followers_url":"https://api.github.com/users/chocolate-doom/followers","following_url":"https://api.github.com/users/chocolate-doom/following{/other_user}","gists_url":"https://api.github.com/users/chocolate-doom/gists{/gist_id}","starred_url":"https://api.github.com/users/chocolate-doom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chocolate-doom/subscriptions","organizations_url":"https://api.github.com/users/chocolate-doom/orgs","repos_url":"https://api.github.com/users/chocolate-doom/repos","events_url":"https://api.github.com/users/chocolate-doom/events{/privacy}","received_events_url":"https://api.github.com/users/chocolate-doom/received_events","type":"Organization","site_admin":false},"repo":{"id":230912,"name":"chocolate-doom","full_name":"chocolate-doom/chocolate-doom","owner":{"login":"chocolate-doom","id":6140118,"avatar_url":"https://avatars.githubusercontent.com/u/6140118?v=3","gravatar_id":"","url":"https://api.github.com/users/chocolate-doom","html_url":"https://github.com/chocolate-doom","followers_url":"https://api.github.com/users/chocolate-doom/followers","following_url":"https://api.github.com/users/chocolate-doom/following{/other_user}","gists_url":"https://api.github.com/users/chocolate-doom/gists{/gist_id}","starred_url":"https://api.github.com/users/chocolate-doom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chocolate-doom/subscriptions","organizations_url":"https://api.github.com/users/chocolate-doom/orgs","repos_url":"https://api.github.com/users/chocolate-doom/repos","events_url":"https://api.github.com/users/chocolate-doom/events{/privacy}","received_events_url":"https://api.github.com/users/chocolate-doom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chocolate-doom/chocolate-doom","description":"Chocolate Doom is a Doom source port that is conservative and historically accurate.","fork":false,"url":"https://api.github.com/repos/chocolate-doom/chocolate-doom","forks_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/forks","keys_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/teams","hooks_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/hooks","issue_events_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/events{/number}","events_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/events","assignees_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/assignees{/user}","branches_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/branches{/branch}","tags_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/tags","blobs_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/git/refs{/sha}","trees_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/statuses/{sha}","languages_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/languages","stargazers_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/stargazers","contributors_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/contributors","subscribers_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/subscribers","subscription_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/subscription","commits_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/commits{/sha}","git_commits_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/git/commits{/sha}","comments_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/comments{/number}","issue_comment_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/comments{/number}","contents_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/contents/{+path}","compare_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/merges","archive_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/downloads","issues_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues{/number}","pulls_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls{/number}","milestones_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/milestones{/number}","notifications_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/labels{/name}","releases_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/releases{/id}","deployments_url":"https://api.github.com/repos/chocolate-doom/chocolate-doom/deployments","created_at":"2009-06-18T22:15:53Z","updated_at":"2016-04-07T17:01:34Z","pushed_at":"2016-04-07T23:58:11Z","git_url":"git://github.com/chocolate-doom/chocolate-doom.git","ssh_url":"git@github.com:chocolate-doom/chocolate-doom.git","clone_url":"https://github.com/chocolate-doom/chocolate-doom.git","svn_url":"https://github.com/chocolate-doom/chocolate-doom","homepage":"https://www.chocolate-doom.org/","size":21599,"stargazers_count":188,"watchers_count":188,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":81,"mirror_url":null,"open_issues_count":168,"forks":81,"open_issues":168,"watchers":188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696"},"html":{"href":"https://github.com/chocolate-doom/chocolate-doom/pull/696"},"issue":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/696"},"comments":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/issues/696/comments"},"review_comments":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696/comments"},"review_comment":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/pulls/696/commits"},"statuses":{"href":"https://api.github.com/repos/chocolate-doom/chocolate-doom/statuses/130f184221d69b055530576ddcbcde6cc1a84d8f"}}}}