{"action":"created","issue":{"url":"https://api.github.com/repos/mawww/kakoune/issues/909","repository_url":"https://api.github.com/repos/mawww/kakoune","labels_url":"https://api.github.com/repos/mawww/kakoune/issues/909/labels{/name}","comments_url":"https://api.github.com/repos/mawww/kakoune/issues/909/comments","events_url":"https://api.github.com/repos/mawww/kakoune/issues/909/events","html_url":"https://github.com/mawww/kakoune/issues/909","id":187028740,"number":909,"title":"[Questions] Terminal and bindings limitations","user":{"login":"occivink","id":5473453,"avatar_url":"https://avatars.githubusercontent.com/u/5473453?v=3","gravatar_id":"","url":"https://api.github.com/users/occivink","html_url":"https://github.com/occivink","followers_url":"https://api.github.com/users/occivink/followers","following_url":"https://api.github.com/users/occivink/following{/other_user}","gists_url":"https://api.github.com/users/occivink/gists{/gist_id}","starred_url":"https://api.github.com/users/occivink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/occivink/subscriptions","organizations_url":"https://api.github.com/users/occivink/orgs","repos_url":"https://api.github.com/users/occivink/repos","events_url":"https://api.github.com/users/occivink/events{/privacy}","received_events_url":"https://api.github.com/users/occivink/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-03T10:58:20Z","updated_at":"2016-11-03T15:13:37Z","closed_at":"2016-11-03T15:13:37Z","body":"While trying to remap some keys I experienced some limitations as to what can and cannot be bound.\r\nI don't know much about the inner workings of terminal emulation, but some cursory experimentation led me to the following:\r\n* `alt` modifier bindings are pretty much okay with any key\r\n* `shift` doesn't really exist as a modifier only the alternate key representation is sent, so something like `<s-space>` or `<s-ret>` is not possible\r\n* `ctrl` modifier bindings are only okay with `a-z`\r\n\r\nSo now the questions:\r\nDo these limitations come from the terminal emulation and cannot be overcome?\r\nIf so, do they extend to non-terminal UIs?\r\n"},"comment":{"url":"https://api.github.com/repos/mawww/kakoune/issues/comments/258171733","html_url":"https://github.com/mawww/kakoune/issues/909#issuecomment-258171733","issue_url":"https://api.github.com/repos/mawww/kakoune/issues/909","id":258171733,"user":{"login":"mawww","id":51221,"avatar_url":"https://avatars.githubusercontent.com/u/51221?v=3","gravatar_id":"","url":"https://api.github.com/users/mawww","html_url":"https://github.com/mawww","followers_url":"https://api.github.com/users/mawww/followers","following_url":"https://api.github.com/users/mawww/following{/other_user}","gists_url":"https://api.github.com/users/mawww/gists{/gist_id}","starred_url":"https://api.github.com/users/mawww/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mawww/subscriptions","organizations_url":"https://api.github.com/users/mawww/orgs","repos_url":"https://api.github.com/users/mawww/repos","events_url":"https://api.github.com/users/mawww/events{/privacy}","received_events_url":"https://api.github.com/users/mawww/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T15:13:37Z","updated_at":"2016-11-03T15:13:37Z","body":"Hello,\r\n\r\nWe dont currently treat `shift` as a modifier, because doing that means we would have to handle equivalence of `A` and `<s-a>` or `<` and `<s-,>` in Kakoune code, meaning we would either have to assume a qwerty keyboard, or have a way to know the actual layout of the user keyboard to map correctly `<s-whatever>`.\r\n\r\nRegarding `ctrl`, we are hitting limitations of the terminal, Kakoune itself can support any keys with the `ctrl` modifier, but terminals do not, we receive the exact same thing for `<c-m>` or `<ret>`, regardless of the actual key that was pressed, same thing for `<c-i>` and `<tab>`. For that, non terminal UIs will have no problem to send these keystrokes to Kakoune, and Kakoune should handle them just fine.\r\n\r\nCheers,\r\n\r\nMaxime."}}
{"actor":{"display_login":"mawww"}}