mobile-shell / mobile-shell/mosh
Home/End keys not working on a urxvt terminal under mosh
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 14.5k
- Forks
- 865
- PR merge metrics
- No merged PRs in 30d
Description
I noticed that both Home/End keys are not working on shell command line under mosh. After fiddling around, the root cause per my investigation is due to the keycode translation between another term and mosh (xterm): Home key is defined as ^[[7 under urxvt. Yet internally, mosh uses xterm, so Home key is expected to be ^[[H.
My speculation is that mosh does not do the correct job of translating Home keycode from rxvt-unicode-256color term to xterm correctly. I did the same test under tmux -- note tmux is running inside xterm. Again, the keycode translation is also incorrect from tmux-256color to xterm.
How to reproduce the issue:
- start a urxvt terminal.
- mosh into another remote box.
- type 'pwd' or whatever under the command-line: do not press Enter, but press 'Home' to see what happens.
mosh version: 1.4.0.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Home/End behavior in an urxvt terminal while connected with mosh, then compare the reported key sequences with the expected xterm sequences. Trace the terminal keycode translation in mosh and confirm that Home and End work at the remote shell prompt without breaking the existing tmux or xterm behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100