Skip to content

Add support for F20-F24 keys in keyboard shortcuts#179591

Merged
ulugbekna merged 2 commits into
microsoft:mainfrom
iliazeus:feature/89166/keycodes-f20-f24
Apr 24, 2023
Merged

Add support for F20-F24 keys in keyboard shortcuts#179591
ulugbekna merged 2 commits into
microsoft:mainfrom
iliazeus:feature/89166/keycodes-f20-f24

Conversation

@iliazeus

Copy link
Copy Markdown
Contributor

There seems to be no real reason why these specific keys were excluded. They even had the placeholder IMappingEntry entries.

The keyCodeOrd column of the mappings array was unused in the code. Instead of renumbering the numbers in that column after the addition of new keys, I have removed it entirely.

Resolves #89166

@rebornix rebornix assigned alexdima and unassigned rebornix Apr 11, 2023
@alexdima alexdima requested a review from ulugbekna April 14, 2023 12:44
@alexdima alexdima added this to the April 2023 milestone Apr 14, 2023
@ulugbekna ulugbekna merged commit 9d583d6 into microsoft:main Apr 24, 2023
@themarkwilliams

Copy link
Copy Markdown

Apologies if this is not the right place to comment. . .

Tested this with VS Code 1.78.1 installed, F20-F24 are still showing as "unknown'.

@iliazeus

iliazeus commented May 11, 2023

Copy link
Copy Markdown
Contributor Author

@themarkwilliams can you tell me your arch/os, and how did you test it? And also which Keyboard: Dispatch value is selected in the settings?

It is working fine for me on version 1.78.1, on x64 Linux; both with code and keyCode dispatch.

@themarkwilliams

Copy link
Copy Markdown

x64, Windows 11.

I did not have a keyboard.dispatch value configured in my settings.json. I added it both ways, but it had no impact. Initial googling shows that value isn't used by Windows, but I could be wrong.

I was attempting to setup some VSCode hotkey mappings using a Stream Deck. SD Device Buttons mapped to F1 - F19 work fine in VSCode. F20-F24 all show unknown when trying to use those as the mapped key.

To make sure it isn't the SD causing the issue, I used Keyboard Manager in Powertoys to map F24 to the Enter key and the SD triggers that fine.

@ulugbekna

Copy link
Copy Markdown
Contributor

@themarkwilliams could you please create a new issue for this, so we could track it? Also, please, include the gif of pressing F20-F24 with the screencast mode on (invoke command "Developer: Toggle Screencast Mode") and keyboards troubleshooting on

@iliazeus

Copy link
Copy Markdown
Contributor Author

@ulugbekna @themarkwilliams this issue is probably caused by me forgetting to set the eventKeyCode (sixth, just before VK_ codes) column of the F20-F24 keys 🥲

https://github.com/microsoft/vscode/pull/179591/files#diff-138162afd36e83b6c3e992d79cfc212f1b3bb9753411737b37b3307baface3f8R613-R617

I left zeros there, should've probably set to 131-135, as here or here

@themarkwilliams

Copy link
Copy Markdown

Issue 182200 created - #182200

@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The F20-F24 key's are "unknown"

5 participants