Skip to content
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

[gui] Open and close terminal tabs keyboard shortcuts #3853

Draft
wants to merge 1 commit into
base: copy-paste-improvements
Choose a base branch
from

Conversation

sharder996
Copy link
Contributor

Tried playing around with the GUI and adding a change I'd personally like to see. Behaviour still isn't exactly how I'd like it. @andrei-toterman, a little help if you have time :)

Tabs open and close as expected with Ctrl+t/Ctrl+w or Cmd+t/Cmd+w when the vm is running and ssh connections can be made. However, if the vm is stopped (Terminal tabs are blank with the "Open shell" button), my keyboard shortcuts don't work. Maybe the intents/callback actions need to be in terminal.dart instead of terminal_tabs.dart, I'm not sure.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.94%. Comparing base (b940cde) to head (1c4b526).

Additional details and impacted files
@@                     Coverage Diff                     @@
##           copy-paste-improvements    #3853      +/-   ##
===========================================================
- Coverage                    88.95%   88.94%   -0.01%     
===========================================================
  Files                          256      256              
  Lines                        14584    14584              
===========================================================
- Hits                         12973    12972       -1     
- Misses                        1611     1612       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andrei-toterman andrei-toterman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @sharder996! Indeed if the terminal is opened, the shortcuts work. The reason for this is because the shortcuts in that map that you extended are registered only on the widget for the actual terminal view, not for the widget that displays that 'Open shell' button. So if the widget for the terminal view is not built, it won't pick up the shortcuts. I think these shortcuts and intents are not related directly to a single terminal, but to the whole tab collection. So the place where you put the Actions widget is perfect. What I think needs to change is to also introduce a Shortcuts widget to terminal_tabs.dart, so that they are associated to the widget responsible for managing all the tabs, not to every individual terminals.

@andrei-toterman
Copy link
Contributor

Also just a personal experience thing, but the terminal I use uses Ctrl+Shift+T/W, not just Ctrl+T/W. Are others not like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants