microsoft / microsoft/terminal
Support the Alt+X keybinding to toggle between an Unicode character and its hex encoding
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
Description of the new feature/enhancement
As suggested by @MurraySargent:
A number of Microsoft applications (e.g. Word, Notepad) allow you to press Alt+X to switch between a Unicode character and its hex encoding. For instance you can enter a hex number like "222b", press Alt+X and get "∫". Pressing Alt+X again, will turn it back into "222b".
This appears to be a useful alternative to the old Alt+Numpad input, which fails to work on keyboards without numpad. However I'm unsure whether implementing this feature is trivially possible without running into edge cases (it requires us to erase characters previously sent to the shell).
Proposed technical implementation details (optional)
RichEdit's CTxtRange::HexToUnicode().
Contributor guide
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 investigating how terminal input is handled and whether RichEdit's CTxtRange::HexToUnicode() is applicable. Trace how input already sent to the shell could be replaced, including the edge cases mentioned in the issue. Done means Alt+X toggles a Unicode character and its hexadecimal encoding without breaking ordinary terminal input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100