{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/18785","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/18785/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/18785/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/18785/events","html_url":"https://github.com/godotengine/godot/issues/18785","id":322174775,"number":18785,"title":"No key release event if window loses focus (Input.is_action_pressed)","user":{"login":"aomimezura","id":17459043,"avatar_url":"https://avatars0.githubusercontent.com/u/17459043?v=4","gravatar_id":"","url":"https://api.github.com/users/aomimezura","html_url":"https://github.com/aomimezura","followers_url":"https://api.github.com/users/aomimezura/followers","following_url":"https://api.github.com/users/aomimezura/following{/other_user}","gists_url":"https://api.github.com/users/aomimezura/gists{/gist_id}","starred_url":"https://api.github.com/users/aomimezura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aomimezura/subscriptions","organizations_url":"https://api.github.com/users/aomimezura/orgs","repos_url":"https://api.github.com/users/aomimezura/repos","events_url":"https://api.github.com/users/aomimezura/events{/privacy}","received_events_url":"https://api.github.com/users/aomimezura/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-11T05:45:44Z","updated_at":"2018-05-15T11:07:56Z","closed_at":null,"author_association":"NONE","body":"<!-- Please search existing issues for potential duplicates before filing yours:\r\nhttps://github.com/godotengine/godot/issues?q=is%3Aissue\r\n-->\r\n\r\n**Godot version:**\r\n<!-- Specify commit hash if non-official. -->\r\n3.0.2\r\n\r\n**OS/device including version:**\r\n<!-- Specify GPU model and drivers if graphics-related. -->\r\nUbuntu Linux\r\n\r\n**Issue description:**\r\n<!-- What happened, and what was expected. -->\r\nInput.is_action_pressed continues to return true if window loses focus before key is released. It continues to trigger even when the game regains focus.\r\n\r\n**Steps to reproduce:**\r\ncheck Input.is_action_pressed() in a loop (like _physics_process). Start pressing the key, then click another window to cause the game to lose focus. Input.is_action_pressed() continues to return true, even when returning to the game window. You must press the key again to fix it.\r\n\r\n**Minimal reproduction project:**\r\n<!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. -->\r\n[input_action_bug_test.zip](https://github.com/godotengine/godot/files/1994082/input_action_bug_test.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/389129020","html_url":"https://github.com/godotengine/godot/issues/18785#issuecomment-389129020","issue_url":"https://api.github.com/repos/godotengine/godot/issues/18785","id":389129020,"user":{"login":"puppetmaster-","id":10463138,"avatar_url":"https://avatars3.githubusercontent.com/u/10463138?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetmaster-","html_url":"https://github.com/puppetmaster-","followers_url":"https://api.github.com/users/puppetmaster-/followers","following_url":"https://api.github.com/users/puppetmaster-/following{/other_user}","gists_url":"https://api.github.com/users/puppetmaster-/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetmaster-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetmaster-/subscriptions","organizations_url":"https://api.github.com/users/puppetmaster-/orgs","repos_url":"https://api.github.com/users/puppetmaster-/repos","events_url":"https://api.github.com/users/puppetmaster-/events{/privacy}","received_events_url":"https://api.github.com/users/puppetmaster-/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T11:07:56Z","updated_at":"2018-05-15T11:07:56Z","author_association":"NONE","body":"Try this but it only works in Godot 3.\r\n\r\n```\r\nfunc _notification(what):\r\n\tif what == MainLoop.NOTIFICATION_WM_FOCUS_OUT:\r\n\t\tInput.action_release(myAction)\r\n```\r\n\r\nI don't know why this solution doesn't work in Godot 2.1.5 but maybe a developer can look at it."}}
{"actor":{"display_login":"puppetmaster-"}}