-
Notifications
You must be signed in to change notification settings - Fork 435
Attempt at Solving Rider's IDE keybindings issues #6887
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
Conversation
Is't that like overriding Rider shortcuts? |
Yes but only in the webview. We basically override
So in the test plan I couldn't make the best test plan because you can't replicate this error in the debugger so if you can't replicate the error then replicating that the solution works is also hard which is why the PR is titled "Attempt at Solving Rider's IDE keybindings". I do think this should ideally work but I am not 100% sure because I couldn't replicate the error in debugger even with Rider IDE. One way I tested this was by running this in the debugger and doing backspaces in the webview and verified that my print statements were printed but only when I did backspace in webview and nowhere else.
Yup I agree |
Looking at the code I do not see how that is happening only in the webview and not always? Could you please point me to a bit of code which is ensuring this is only happening for the webview?
You don't need debugger to test this though. Or do you mean it does not work with |
@arafatkatze any updates? |
@jdorfman My understanding was that it was gonna be covered by others(@tomaszgolebiowski @PiotrKarczmarz ) |
I'm looking how to improve this solution and make it more universal across different IDEs, and more specially, between different keymaps used by users (the root cause why some keys/shortcuts aren't working in the webview - they are used by a current keymap and don't reach webview at all). |
This PR is marked as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed automatically in 5 days. |
Linear
Problem
The JetBrains IDE was intercepting certain keyboard events (backspace and shift+enter) in the Cody chat webview before they could reach the chat interface. This caused issues with:
Solution
Added two action handlers that intercept these keyboard events before the IDE's default handlers:
WebViewBackspaceAction
- Intercepts backspace key eventsWebViewShiftEnterAction
- Intercepts shift+enter key eventsThese actions do nothing when triggered, effectively preventing the IDE from handling these keys while allowing the events to bubble down naturally to the webview. This restores expected text editing behavior in the chat interface.
Implementation Details
DumbAwareEDTAction
Test plan
NOTE: This test is not a perfect. guarantee because I can't replicate the issue in the debugger at all because debugger has some strangeness with the Keymaps(this is despite the fact that I built the rider plugin).
Verified that in the Cody chat webview: