microsoft / microsoft/terminal
Menu item accelerator does not get set for f1-f12 keys
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
_No response_
### Windows build number
_No response_
### Other Software
_No response_
### Steps to reproduce
You need a build of terminal that has #17281 in it to repro this
- Add an action to your new tab dropdown with `f1` as the keybinding
- Open the new tab dropdown
- The action shows up, but the accelerator does not (there should be an accelerator that says the keybinding is `f1`)
Example json snippet to test this:
```
"keybindings": [
{
"id": "Terminal.CopyToClipboard",
"keys": "f1"
}
],
"newTabMenu":
[
{
"type": "action",
"id": "Terminal.CopyToClipboard"
}
],
```
Preliminary investigation shows that `MapVirtualKeyW` (called in `TerminalPage::_SetAcceleratorForMenuItem`) returns `0` for any of the keys `f1` through `f12`, and that's the issue
### Expected Behavior
Accelerator should show up with `f1` in it
### Actual Behavior
There is no accelerator
Contributor guide
Research direction
Start at TerminalPage::_SetAcceleratorForMenuItem and reproduce the issue with the provided keybinding and newTabMenu configuration. Inspect how MapVirtualKeyW results are handled for F1-F12, then verify that the new tab dropdown displays the corresponding accelerator, such as F1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100