{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/5503","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/5503/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/5503/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/5503/events","html_url":"https://github.com/godotengine/godot/issues/5503","id":163186860,"number":5503,"title":"a method to know current keyboard layout","user":{"login":"SuperUserNameMan","id":9801802,"avatar_url":"https://avatars.githubusercontent.com/u/9801802?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperUserNameMan","html_url":"https://github.com/SuperUserNameMan","followers_url":"https://api.github.com/users/SuperUserNameMan/followers","following_url":"https://api.github.com/users/SuperUserNameMan/following{/other_user}","gists_url":"https://api.github.com/users/SuperUserNameMan/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperUserNameMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperUserNameMan/subscriptions","organizations_url":"https://api.github.com/users/SuperUserNameMan/orgs","repos_url":"https://api.github.com/users/SuperUserNameMan/repos","events_url":"https://api.github.com/users/SuperUserNameMan/events{/privacy}","received_events_url":"https://api.github.com/users/SuperUserNameMan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/godotengine/godot/labels/feature%20proposal","name":"feature proposal","color":"1144ff"},{"url":"https://api.github.com/repos/godotengine/godot/labels/topic:core","name":"topic:core","color":"ffdd44"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-06-30T14:58:23Z","updated_at":"2016-07-02T16:18:44Z","closed_at":null,"body":"**Operating system or device - Godot version:**\r\nofficial 2.0.3stable\r\n\r\n**Issue description** (what happened, and what was expected):\r\n\r\nI would like to know what is the current keyboard layout (AZERTY, QWERTY, QWERTZ, DWOWAKR, etc) so the game automatically setup keyboard mapping without asking the player for interactions or configurations.\r\n\r\n**Current workarounds**\r\n\r\nA workaround is to \"guess\" according to what returns ``OS.get_locale()``, but is not safe.\r\n\r\nAn other workaround when it is about mapping \"WASD\", is to use \"ESDF\" instead, but it might not be 100% universal, and might disturb some hardcore-gamers.\r\n\r\nAn other workaround for \"WASD\" that make AZERTY (\"ZQSD\") and QWERTx (\"WASD\") and QZERTY (\"ZASD\") all work out  of the box, is to map [WZ] [AQ] [S] [D].\r\n\r\nPS : and if you also want to support DVORAK (\",AOE\") keyboard out of the box, you'll have to map [WZ,] [AQ] [SO] [DE].\r\n\r\n**Steps to reproduce:**\r\n\r\n\r\n**Link to minimal example project** (optional but very welcome):\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/230109709","html_url":"https://github.com/godotengine/godot/issues/5503#issuecomment-230109709","issue_url":"https://api.github.com/repos/godotengine/godot/issues/5503","id":230109709,"user":{"login":"SuperUserNameMan","id":9801802,"avatar_url":"https://avatars.githubusercontent.com/u/9801802?v=3","gravatar_id":"","url":"https://api.github.com/users/SuperUserNameMan","html_url":"https://github.com/SuperUserNameMan","followers_url":"https://api.github.com/users/SuperUserNameMan/followers","following_url":"https://api.github.com/users/SuperUserNameMan/following{/other_user}","gists_url":"https://api.github.com/users/SuperUserNameMan/gists{/gist_id}","starred_url":"https://api.github.com/users/SuperUserNameMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuperUserNameMan/subscriptions","organizations_url":"https://api.github.com/users/SuperUserNameMan/orgs","repos_url":"https://api.github.com/users/SuperUserNameMan/repos","events_url":"https://api.github.com/users/SuperUserNameMan/events{/privacy}","received_events_url":"https://api.github.com/users/SuperUserNameMan/received_events","type":"User","site_admin":false},"created_at":"2016-07-02T16:18:44Z","updated_at":"2016-07-02T16:18:44Z","body":"@Zylann :\r\n\r\nMaybe we could write a tiny tutorial or a note to add to the godot documentation to try to make other game-developers slightly more aware that there is something else than QWERTY, and that hard-coding key mapping is evil ?\r\n\r\n\r\nAs for us who are already aware of that and who would like to automate the key mapping according to the player kb layout, we could use some simple workarounds like this one :\r\n- we could present the player a simple interface asking him to click on a button among \"AZERTY\", \"QWERTY\", \"QWERTZ\" etc and \"OTHER\". Each button would set a different preset, and clicking \"OTHER\" would ask the player to press a key for \"up\", an other for \"down\", etc.\r\n\r\nThat would be as much complicated than picked a flag to select a language.\r\nAnd also, it would be reliable on all platforms.\r\n\r\nWhat do you think ?"}}
{"actor":{"display_login":"SuperUserNameMan"}}