{"action":"opened","number":665,"pull_request":{"url":"https://api.github.com/repos/kovidgoyal/kitty/pulls/665","id":196499016,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2NDk5MDE2","html_url":"https://github.com/kovidgoyal/kitty/pull/665","diff_url":"https://github.com/kovidgoyal/kitty/pull/665.diff","patch_url":"https://github.com/kovidgoyal/kitty/pull/665.patch","issue_url":"https://api.github.com/repos/kovidgoyal/kitty/issues/665","number":665,"state":"open","locked":false,"title":"Added keyboard-mapping based on symbol (use \"mapsym\" in config)","user":{"login":"Ma-Shell","id":3225318,"node_id":"MDQ6VXNlcjMyMjUzMTg=","avatar_url":"https://avatars0.githubusercontent.com/u/3225318?v=4","gravatar_id":"","url":"https://api.github.com/users/Ma-Shell","html_url":"https://github.com/Ma-Shell","followers_url":"https://api.github.com/users/Ma-Shell/followers","following_url":"https://api.github.com/users/Ma-Shell/following{/other_user}","gists_url":"https://api.github.com/users/Ma-Shell/gists{/gist_id}","starred_url":"https://api.github.com/users/Ma-Shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ma-Shell/subscriptions","organizations_url":"https://api.github.com/users/Ma-Shell/orgs","repos_url":"https://api.github.com/users/Ma-Shell/repos","events_url":"https://api.github.com/users/Ma-Shell/events{/privacy}","received_events_url":"https://api.github.com/users/Ma-Shell/received_events","type":"User","site_admin":false},"body":"This pull-request adds the option to add keyboard shortcuts based on symbols instead of GLFW-keys.\r\nThe necessity of using GLFW-keys is quite annoying to any user of non-English keyboards, since some keys can simply not be mapped (see #643).\r\nIn order to not break with the current mappings, it adds a new identifier to the config: `mapsym`.\r\ne.g.: `mapsym kitty_mod+* change_font_size all +2.0`\r\ncan be used on a german keyboard to map the \"+\"-key (which becomes a \"*\", when pressed together with shift). It is important to always specify the symbol with modifiers applied, (i.e. mapping shift+x will not work, since there is usually no way to get a lower-case x at the same time as shift -> use shift+X) when mapping.\r\n\r\nTechnical details:\r\nKeybindings are stored and processed in python, just like ordinary key-presses.\r\nIn C, there is the array `needs_special_sym_handling`, which takes the utf-8-encoded symbol as the index mangled with the mod-keys for early decisions whether a mapping should be sent to python (much like the `needs_special_handling`-array). Note that this is only an early detection, whether the pressed keys might need special treatment, since the actual decision, whether to treat it in a special manner is taken in Python. For that reason, it is not necessary for the `needs_special_sym_handling`-table to uniquely map each symbol to a different entry and thus, it does not have to be big enough to store every symbol/mod-combination.\r\n\r\nThe symbols that are used are are given by `xkb_state_key_get_utf8`. There is one downside to that function: When using Ctrl+Shift, it does not generate any symbols. My proposal here is to simply ignore the Ctrl while resolving the symbol, if Shift is pressed, as well.\r\nThe current implementation otherwise explicitly does not generate the symbol-text, if either Ctrl, Alt, or Super are pressed. For this purpose, however, I changed that behaviour, which is not really necessary in my opinion. (i.e. formerly pressing Ctrl+Shift+Z would simply enter nothing, if that was not bound to any combination while with the change it enters a capital Z.)\r\n","created_at":"2018-06-21T15:53:33Z","updated_at":"2018-06-21T15:53:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kovidgoyal/kitty/pulls/665/commits","review_comments_url":"https://api.github.com/repos/kovidgoyal/kitty/pulls/665/comments","review_comment_url":"https://api.github.com/repos/kovidgoyal/kitty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kovidgoyal/kitty/issues/665/comments","statuses_url":"https://api.github.com/repos/kovidgoyal/kitty/statuses/99b04539f987756acedf40f7bd8527767b0ed08d","head":{"label":"Ma-Shell:symbol_binding","ref":"symbol_binding","sha":"99b04539f987756acedf40f7bd8527767b0ed08d","user":{"login":"Ma-Shell","id":3225318,"node_id":"MDQ6VXNlcjMyMjUzMTg=","avatar_url":"https://avatars0.githubusercontent.com/u/3225318?v=4","gravatar_id":"","url":"https://api.github.com/users/Ma-Shell","html_url":"https://github.com/Ma-Shell","followers_url":"https://api.github.com/users/Ma-Shell/followers","following_url":"https://api.github.com/users/Ma-Shell/following{/other_user}","gists_url":"https://api.github.com/users/Ma-Shell/gists{/gist_id}","starred_url":"https://api.github.com/users/Ma-Shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ma-Shell/subscriptions","organizations_url":"https://api.github.com/users/Ma-Shell/orgs","repos_url":"https://api.github.com/users/Ma-Shell/repos","events_url":"https://api.github.com/users/Ma-Shell/events{/privacy}","received_events_url":"https://api.github.com/users/Ma-Shell/received_events","type":"User","site_admin":false},"repo":{"id":137404885,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc0MDQ4ODU=","name":"kitty","full_name":"Ma-Shell/kitty","owner":{"login":"Ma-Shell","id":3225318,"node_id":"MDQ6VXNlcjMyMjUzMTg=","avatar_url":"https://avatars0.githubusercontent.com/u/3225318?v=4","gravatar_id":"","url":"https://api.github.com/users/Ma-Shell","html_url":"https://github.com/Ma-Shell","followers_url":"https://api.github.com/users/Ma-Shell/followers","following_url":"https://api.github.com/users/Ma-Shell/following{/other_user}","gists_url":"https://api.github.com/users/Ma-Shell/gists{/gist_id}","starred_url":"https://api.github.com/users/Ma-Shell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ma-Shell/subscriptions","organizations_url":"https://api.github.com/users/Ma-Shell/orgs","repos_url":"https://api.github.com/users/Ma-Shell/repos","events_url":"https://api.github.com/users/Ma-Shell/events{/privacy}","received_events_url":"https://api.github.com/users/Ma-Shell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ma-Shell/kitty","description":"A cross-platform, fast, feature full, GPU based terminal emulator","fork":true,"url":"https://api.github.com/repos/Ma-Shell/kitty","forks_url":"https://api.github.com/repos/Ma-Shell/kitty/forks","keys_url":"https://api.github.com/repos/Ma-Shell/kitty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ma-Shell/kitty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ma-Shell/kitty/teams","hooks_url":"https://api.github.com/repos/Ma-Shell/kitty/hooks","issue_events_url":"https://api.github.com/repos/Ma-Shell/kitty/issues/events{/number}","events_url":"https://api.github.com/repos/Ma-Shell/kitty/events","assignees_url":"https://api.github.com/repos/Ma-Shell/kitty/assignees{/user}","branches_url":"https://api.github.com/repos/Ma-Shell/kitty/branches{/branch}","tags_url":"https://api.github.com/repos/Ma-Shell/kitty/tags","blobs_url":"https://api.github.com/repos/Ma-Shell/kitty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ma-Shell/kitty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ma-Shell/kitty/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ma-Shell/kitty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ma-Shell/kitty/statuses/{sha}","languages_url":"https://api.github.com/repos/Ma-Shell/kitty/languages","stargazers_url":"https://api.github.com/repos/Ma-Shell/kitty/stargazers","contributors_url":"https://api.github.com/repos/Ma-Shell/kitty/contributors","subscribers_url":"https://api.github.com/repos/Ma-Shell/kitty/subscribers","subscription_url":"https://api.github.com/repos/Ma-Shell/kitty/subscription","commits_url":"https://api.github.com/repos/Ma-Shell/kitty/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ma-Shell/kitty/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ma-Shell/kitty/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ma-Shell/kitty/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ma-Shell/kitty/contents/{+path}","compare_url":"https://api.github.com/repos/Ma-Shell/kitty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ma-Shell/kitty/merges","archive_url":"https://api.github.com/repos/Ma-Shell/kitty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ma-Shell/kitty/downloads","issues_url":"https://api.github.com/repos/Ma-Shell/kitty/issues{/number}","pulls_url":"https://api.github.com/repos/Ma-Shell/kitty/pulls{/number}","milestones_url":"https://api.github.com/repos/Ma-Shell/kitty/milestones{/number}","notifications_url":"https://api.github.com/repos/Ma-Shell/kitty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ma-Shell/kitty/labels{/name}","releases_url":"https://api.github.com/repos/Ma-Shell/kitty/releases{/id}","deployments_url":"https://api.github.com/repos/Ma-Shell/kitty/deployments","created_at":"2018-06-14T20:16:33Z","updated_at":"2018-06-21T15:00:47Z","pushed_at":"2018-06-21T15:26:21Z","git_url":"git://github.com/Ma-Shell/kitty.git","ssh_url":"git@github.com:Ma-Shell/kitty.git","clone_url":"https://github.com/Ma-Shell/kitty.git","svn_url":"https://github.com/Ma-Shell/kitty","homepage":"","size":11164,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kovidgoyal:master","ref":"master","sha":"815dd99f7c16988b33c1c8c1bd081583b2c36a74","user":{"login":"kovidgoyal","id":1308621,"node_id":"MDQ6VXNlcjEzMDg2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1308621?v=4","gravatar_id":"","url":"https://api.github.com/users/kovidgoyal","html_url":"https://github.com/kovidgoyal","followers_url":"https://api.github.com/users/kovidgoyal/followers","following_url":"https://api.github.com/users/kovidgoyal/following{/other_user}","gists_url":"https://api.github.com/users/kovidgoyal/gists{/gist_id}","starred_url":"https://api.github.com/users/kovidgoyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kovidgoyal/subscriptions","organizations_url":"https://api.github.com/users/kovidgoyal/orgs","repos_url":"https://api.github.com/users/kovidgoyal/repos","events_url":"https://api.github.com/users/kovidgoyal/events{/privacy}","received_events_url":"https://api.github.com/users/kovidgoyal/received_events","type":"User","site_admin":false},"repo":{"id":71056775,"node_id":"MDEwOlJlcG9zaXRvcnk3MTA1Njc3NQ==","name":"kitty","full_name":"kovidgoyal/kitty","owner":{"login":"kovidgoyal","id":1308621,"node_id":"MDQ6VXNlcjEzMDg2MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/1308621?v=4","gravatar_id":"","url":"https://api.github.com/users/kovidgoyal","html_url":"https://github.com/kovidgoyal","followers_url":"https://api.github.com/users/kovidgoyal/followers","following_url":"https://api.github.com/users/kovidgoyal/following{/other_user}","gists_url":"https://api.github.com/users/kovidgoyal/gists{/gist_id}","starred_url":"https://api.github.com/users/kovidgoyal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kovidgoyal/subscriptions","organizations_url":"https://api.github.com/users/kovidgoyal/orgs","repos_url":"https://api.github.com/users/kovidgoyal/repos","events_url":"https://api.github.com/users/kovidgoyal/events{/privacy}","received_events_url":"https://api.github.com/users/kovidgoyal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kovidgoyal/kitty","description":"A cross-platform, fast, feature full, GPU based terminal emulator","fork":false,"url":"https://api.github.com/repos/kovidgoyal/kitty","forks_url":"https://api.github.com/repos/kovidgoyal/kitty/forks","keys_url":"https://api.github.com/repos/kovidgoyal/kitty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kovidgoyal/kitty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kovidgoyal/kitty/teams","hooks_url":"https://api.github.com/repos/kovidgoyal/kitty/hooks","issue_events_url":"https://api.github.com/repos/kovidgoyal/kitty/issues/events{/number}","events_url":"https://api.github.com/repos/kovidgoyal/kitty/events","assignees_url":"https://api.github.com/repos/kovidgoyal/kitty/assignees{/user}","branches_url":"https://api.github.com/repos/kovidgoyal/kitty/branches{/branch}","tags_url":"https://api.github.com/repos/kovidgoyal/kitty/tags","blobs_url":"https://api.github.com/repos/kovidgoyal/kitty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kovidgoyal/kitty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kovidgoyal/kitty/git/refs{/sha}","trees_url":"https://api.github.com/repos/kovidgoyal/kitty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kovidgoyal/kitty/statuses/{sha}","languages_url":"https://api.github.com/repos/kovidgoyal/kitty/languages","stargazers_url":"https://api.github.com/repos/kovidgoyal/kitty/stargazers","contributors_url":"https://api.github.com/repos/kovidgoyal/kitty/contributors","subscribers_url":"https://api.github.com/repos/kovidgoyal/kitty/subscribers","subscription_url":"https://api.github.com/repos/kovidgoyal/kitty/subscription","commits_url":"https://api.github.com/repos/kovidgoyal/kitty/commits{/sha}","git_commits_url":"https://api.github.com/repos/kovidgoyal/kitty/git/commits{/sha}","comments_url":"https://api.github.com/repos/kovidgoyal/kitty/comments{/number}","issue_comment_url":"https://api.github.com/repos/kovidgoyal/kitty/issues/comments{/number}","contents_url":"https://api.github.com/repos/kovidgoyal/kitty/contents/{+path}","compare_url":"https://api.github.com/repos/kovidgoyal/kitty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kovidgoyal/kitty/merges","archive_url":"https://api.github.com/repos/kovidgoyal/kitty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kovidgoyal/kitty/downloads","issues_url":"https://api.github.com/repos/kovidgoyal/kitty/issues{/number}","pulls_url":"https://api.github.com/repos/kovidgoyal/kitty/pulls{/number}","milestones_url":"https://api.github.com/repos/kovidgoyal/kitty/milestones{/number}","notifications_url":"https://api.github.com/repos/kovidgoyal/kitty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kovidgoyal/kitty/labels{/name}","releases_url":"https://api.github.com/repos/kovidgoyal/kitty/releases{/id}","deployments_url":"https://api.github.com/repos/kovidgoyal/kitty/deployments","created_at":"2016-10-16T14:48:28Z","updated_at":"2018-06-21T12:59:37Z","pushed_at":"2018-06-21T07:42:59Z","git_url":"git://github.com/kovidgoyal/kitty.git","ssh_url":"git@github.com:kovidgoyal/kitty.git","clone_url":"https://github.com/kovidgoyal/kitty.git","svn_url":"https://github.com/kovidgoyal/kitty","homepage":"","size":11162,"stargazers_count":3356,"watchers_count":3356,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":157,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":157,"open_issues":10,"watchers":3356,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kovidgoyal/kitty/pulls/665"},"html":{"href":"https://github.com/kovidgoyal/kitty/pull/665"},"issue":{"href":"https://api.github.com/repos/kovidgoyal/kitty/issues/665"},"comments":{"href":"https://api.github.com/repos/kovidgoyal/kitty/issues/665/comments"},"review_comments":{"href":"https://api.github.com/repos/kovidgoyal/kitty/pulls/665/comments"},"review_comment":{"href":"https://api.github.com/repos/kovidgoyal/kitty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kovidgoyal/kitty/pulls/665/commits"},"statuses":{"href":"https://api.github.com/repos/kovidgoyal/kitty/statuses/99b04539f987756acedf40f7bd8527767b0ed08d"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":124,"deletions":22,"changed_files":6}}
{"actor":{"display_login":"Ma-Shell"}}