-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for BrowserBack and BrowserForward #28576
Comments
I think the "unknown" message is the KeyCode.Unknown defined in vs/base/common/keyCodes. But I'm not sure what logic is setting it up, could it be some mismatch with scan codes? |
@truhlikfredy Could you please try our Keybinding troubleshooting guide -- https://github.com/Microsoft/vscode/wiki/Keybindings#troubleshoot-linux-keybindings |
Solved it with workaround in the settings.
But if it's reading original scanCodes, then it should work as well, originally the key are multimedia back / forward (code 166 and 167). Often browsers react to it going to previous website, and actually that was the reason why i remapped it, because I didn't like the original behavior applications had with these keys. |
Let's continue tracking in #23991 in this case. |
#23991 case is for remaps, but in my case it's two different things (obscure keys and remapping), if it would accept the original keycode even ignoring the remaping would be grand as well. If I would remove the remappings, still the visual studio doesn't recognize back/forward keys. |
I think we recognize F keys up to F19. |
Yes, but that is the mapped value, original is this two keys https://c1.staticflickr.com/8/7277/6863731296_af6a4baf78_b.jpg And that is not recognised |
I can look into adding support in VSCode for them. Can you please press them at https://jsfiddle.net/v1gz5c5m/1/ in Chromium and let me know what values each one has, without any remap magic (xmodmapings). |
This are the original keys keydown --- code: BrowserForward, keyCode: 167, key: BrowserForward |
Can you remove the duplicate tag? Even if this problem is bit overlapping with other issues, but still this one is unique. |
How exactly did you manage to work around this issue? I don't see any way in keybindings.json to specify a keyCode or code and the keybindings editor shows unknown. Perhaps it works for you specially because you are using F14 and F15 and not the native back/forward keys? The current keybinding design in vscode seems limiting. Why doesn't it just support the names from "code" when keyboard.dispatch=code mode? Changing keyboard.dispatch to keyCode didn't seem to make a difference for me. Somewhat related issue: #8641, the same issue for the mouse button equivalent (which I don't believe send keycodes on Linux). |
Yes that what I said it works with me because I used xmodmap to map them to F14 and F15 and then added this to vscode settings:
Just because I have workaround it doesn't mean it's not an issue so that's why I asked to remove the "duplicate tag" etc... I looked at the source code and the keyboard management seems too complicated without much gain. Plus now it doesn't respect the remaps which is probably the first application I have seen and has issues with this. To debug what you get from your linux I like to use
It shows exactly what events you are emitting (keyboard, mouse etc...) |
Keyboard management is complicated because it needs to work correctly in:
|
Wow, that is impressive, didn't know the Monaco Editor is based on this as well, then not really surprised of the over-complications. It needs to be universal and consider many different combinations. |
Just to say I also have this exact issue.
|
It stopped working on me recently as it looks like vscode update reset some settings. I forgot I was making this issue and by accident googled my own solution, in this case the "keyboard.dispatch" got reset to default value so I had to set it back to the "keyCode" value. I have modified other editors, even rebuild chromium from scratch to support the F13/F14 as previous and next tabs, physically these buttons are located close to the cursor arrows and it's very pleasant to have editors/browsers setup so the whole UI is consistent and productive. |
I'm not sure how to verify this issue. I tried connecting my mouse, which has back and forward buttons, but pressing those buttons, even while trying to set the shortcut, results in the tab switching. |
Verified by remapping a key to |
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: