{"id":13739501,"url":"https://github.com/jaclu/tmux-keybtest","last_synced_at":"2025-05-08T19:34:15.205Z","repository":{"id":243116868,"uuid":"811016580","full_name":"jaclu/tmux-keybtest","owner":"jaclu","description":"Check what keys tmux can detect from the terminal being used.","archived":false,"fork":false,"pushed_at":"2025-04-27T11:19:39.000Z","size":68,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-27T12:27:19.797Z","etag":null,"topics":["tmux","tmux-conf","tmux-config","tmux-keyboard"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaclu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-05T19:28:37.000Z","updated_at":"2025-04-27T11:19:42.000Z","dependencies_parsed_at":"2024-11-09T16:17:53.525Z","dependency_job_id":"43e185dd-2097-4204-b739-31c77964e0f0","html_url":"https://github.com/jaclu/tmux-keybtest","commit_stats":null,"previous_names":["jaclu/tmux-keybtest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaclu%2Ftmux-keybtest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaclu%2Ftmux-keybtest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaclu%2Ftmux-keybtest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaclu%2Ftmux-keybtest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaclu","download_url":"https://codeload.github.com/jaclu/tmux-keybtest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253135498,"owners_count":21859656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["tmux","tmux-conf","tmux-config","tmux-keyboard"],"created_at":"2024-08-03T04:00:34.609Z","updated_at":"2025-05-08T19:34:15.188Z","avatar_url":"https://github.com/jaclu.png","language":"Shell","funding_links":[],"categories":["Configuration"],"sub_categories":[],"readme":"# tmux-keybtest\n\n**tmux-keybtest** is a utility for identifying which key sequences tmux can\ndetect in your terminal. When you press a key, its tmux name, like `C-M-Up`,\nwill be displayed on the status line if recognized.\n\nTerminals are often rather limited in what keys they implement supported beyond the basics.\n\nIn some cases missing keys can be configured, but especially on tablets this is\nusually fairly limited.\n\nTerminals can sometimes misinterpret key presses, generating the wrong sequence\nor nothing at all. **tmux-keybtest** helps you evaluate which keys are\navailable in your current terminal and can assist in selecting a terminal with\nbetter support for key sequences.\n\nNote: If your operating system or terminal has already bound certain keys,\ntmux may not detect them. It may be possible to reconfigure your system or\nterminal to free up these keys for tmux use.\n\n## Usage\n\n1. Clone this repository and navigate to its directory.\n2. Run `keybtest.sh` this generates a `keybtest.conf` for the version of tmux\n   found and starts a tmux session that will display the tmux notation for any\n   recognized key press.\n\n### Important Notes\n\n- Some keys might not send the intended sequence, causing tmux to interpret\n  them differently.\n- Avoid running this script inside an existing tmux session, as this may\n  interfere with key detection.\n- To exit the session, press `C-x C-c`. The exit sequence is displayed in\n  the status line for convenience.\n\n### tmux Key Name Prefixes\n\n- `S-` : Shift key is pressed.\n- `C-` : Control key is pressed.\n- `M-` : Alt (Meta) key is pressed.\n\nUse the key names displayed to customize your `tmux.conf` according to your\nterminal's capabilities.\n\n## Keys Not Tested\n\n### Shift `S-`\n\n- Shifted regular keys are not tested. Instead of binding `S-a` or `S-A`,\n  use `A`.\n- non-letter regular chars (such as ! @ $) can not be bound to this\n\n### Control `C-`\n\n- Prior to 3.5\n  - Cannot be bound: `~ $ % \u0026 * { } | \"`\n  - Case is ignored: Binding `C-A` will be mapped to `C-a`. `C-A` is not a recognised key.\n    If `C-A` is really wanted, the unintuitive workaround is to use `C-S-A` / `C-S-a`\n  - Keys skipped due to collision:\n    - `C-i` is the same as `Tab`\n    - `C-m` is the same as `Enter`\n    - `C-[` is the same as `Escape`\n- 3.5a - Ironically, since `C-` uppercase is now recognized, but doesn't actually work,\n  this also causes the previous `C-S-` workaround to be ignored.\n- Prior to 3.3 - Cannot be bound: `` ` /``\n- Prior to 3.0 - Cannot be bound: `;`\n\n### Control Shift `C-S-`\n\n- From the regular keys only uppercase can be bound\n\n### Meta Shift `M-S-`\n\n- Same limitations as `S-`\n\n### Control Meta `C-M-`\n\n- Same limitations as under `C-`\n\n### Control Meta Shift `C-M-S-`\n\n- Same limitations as under `C-`\n\n## Additional Information\n\n- **Insert** is referred to as `IC` and **Delete** as `DC` in tmux. If you see\n  these, the terminal is functioning correctly.\n- If a key generates an unrecognized code, the terminal might beep. Consider\n  muting your sound before running this in public spaces.\n- Unrecognized keys will be printed. Please submit such outputs as an issue,\n  including the key/sequence and, if possible, your keyboard type.\n\n## When Terminal Generates the wrong key\n\nIf a terminal generates a sequence that tmux recognizes but is not the\nintended one (e.g., `M-Up` generates `S-F3`), bind the desired action for `M-Up` to `S-F3`.\n\n## When tmux doesn't recognize what the key sends\n\nIf a terminal generates an unrecognized but unique sequence, you can bind it\nto an action using user-keys. Tmux requires octal notation for user-keys,\nformatted as three digit values (0 padded) and prefixed with `\\`.\n\n`showkey -a` can be used to find the octals, examine the middle column.\n\nExample:\n\n    set -g user-keys[200] \"\\302\\247\"\n    bind -n User200 send Escape\n\nBe aware that the `send Escape` in this case is only sent to apps running inside tmux.\nIt is not picked up by tmux itself. For that `User200` must be used.\n\nThis is probably amongst the least intuitive features in tmux\n\n- assign a key (sequence) using `user-key[200]`\n- when using it inside tmux refer to it as `User200`\n\n## Checking Terminal Key Sequences\n\nTo determine what sequence a key generates, use the following commands outside\nof tmux:\n\n- `showkeys -a`\n- `xxd`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaclu%2Ftmux-keybtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaclu%2Ftmux-keybtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaclu%2Ftmux-keybtest/lists"}