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

[GSoC'24] Keyboard Shortcuts Customization, Documentation #8345

Merged
merged 12 commits into from
Aug 31, 2024

Conversation

tahamukhtar20
Copy link
Contributor

@tahamukhtar20 tahamukhtar20 commented Aug 25, 2024

Motivation and context

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

  • New Features

    • Introduced a new section on "Shortcuts Customization," providing step-by-step instructions for users to personalize their keyboard and mouse shortcuts.
  • Improvements

    • Enhanced organization of keyboard and mouse shortcuts with a structured format, categorizing them for easier identification of conflicts.
    • Expanded descriptions to clarify the functionality and customizability of shortcuts, improving overall usability.
    • Refined layout with collapsible sections for better navigation through the shortcuts list.

Copy link
Contributor

coderabbitai bot commented Aug 25, 2024

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The document has been revised to improve the organization and clarity of keyboard and mouse shortcuts in the CVAT application. It now categorizes shortcuts, introduces a customization section with instructions, and enhances navigation through a refined layout.

Changes

Files Change Summary
site/content/en/docs/manual/advanced/shortcuts.md Expanded descriptions of shortcuts, restructured format for better categorization, added customization section with instructions and visual aids, and improved layout for navigation.

Poem

🐇
In the land of shortcuts, oh so bright,
Custom keys now dance with delight.
With every click and every key,
A tailored path for you and me!
So hop along, let’s customize,
In CVAT’s world, we’ll surely rise!
🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Member

@bsekachev bsekachev left a comment

Choose a reason for hiding this comment

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

Some screenshots need to be updated, e.g:
shortcuts08.png
shortcuts06.png
shortcuts04.png
shortcuts03.png

site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
@tahamukhtar20 tahamukhtar20 marked this pull request as ready for review August 30, 2024 11:21
@tahamukhtar20 tahamukhtar20 requested a review from mdacoca as a code owner August 30, 2024 11:21
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9fc70ef and 49dbfa9.

Files ignored due to path filters (9)
  • site/content/en/images/shortcuts01.png is excluded by !**/*.png
  • site/content/en/images/shortcuts02.png is excluded by !**/*.png
  • site/content/en/images/shortcuts03.png is excluded by !**/*.png
  • site/content/en/images/shortcuts04.png is excluded by !**/*.png
  • site/content/en/images/shortcuts05.png is excluded by !**/*.png
  • site/content/en/images/shortcuts06.png is excluded by !**/*.png
  • site/content/en/images/shortcuts07.png is excluded by !**/*.png
  • site/content/en/images/shortcuts08.png is excluded by !**/*.png
  • site/content/en/images/shortcuts09.png is excluded by !**/*.png
Files selected for processing (1)
  • site/content/en/docs/manual/advanced/shortcuts.md (1 hunks)
Additional context used
LanguageTool
site/content/en/docs/manual/advanced/shortcuts.md

[style] ~40-~40: In American English, abbreviations like “etc.” require a period.
Context: ...tching tabs) or ctrl + w (closing tabs) etc, are reserved by the browser and shortc...

(ETC_PERIOD)


[uncategorized] ~54-~54: Possible missing comma found.
Context: ... - If pressed cancel it will remain the same otherwise the conflicting shortcut will...

(AI_HYDRA_LEO_MISSING_COMMA)

Additional comments not posted (1)
site/content/en/docs/manual/advanced/shortcuts.md (1)

5-5: Approved: Updated description.

The updated description accurately reflects the customizable nature of the shortcuts, aligning with the PR's objectives.

Comment on lines 8 to 58
| `Space` | Start/stop automatic changing frames |
| `` ` `` or `~` | Focus on the element to change the current frame |
| | _Modes_ |
| `N` | Repeat the latest procedure of drawing with the same parameters |
| `M` | Activate or deactivate mode to merging shapes |
| `Alt+M` | Activate or deactivate mode to splitting shapes |
| `G` | Activate or deactivate mode to grouping shapes |
| `Shift+G` | Reset group for selected shapes (in group mode) |
| `Esc` | Cancel any active canvas mode |
| | _Image operations_ |
| `Ctrl+R` | Change image angle (add 90 degrees) |
| `Ctrl+Shift+R` | Change image angle (subtract 90 degrees) |
| | _Operations with objects_ |
| `Ctrl` | Switch automatic bordering for polygons and polylines during drawing/editing |
| Hold `Ctrl` | When the shape is active and fix it |
| `Alt+Click` on point | Deleting a point (used when hovering over a point of polygon, polyline, points) |
| `Shift+Click` on point | Editing a shape (used when hovering over a point of polygon, polyline or points) |
| `Right-Click` on shape | Display of an object element from objects sidebar |
| `T+L` | Change locked state for all objects in the sidebar |
| `L` | Change locked state for an active object |
| `T+H` | Change hidden state for objects in the sidebar |
| `H` | Change hidden state for an active object |
| `Q` or `/` | Change occluded property for an active object |
| `Del` or `Shift+Del` | Delete an active object. Use shift to force delete of locked objects |
| `-` or `_` | Put an active object "farther" from the user (decrease z axis value) |
| `+` or `=` | Put an active object "closer" to the user (increase z axis value) |
| `Ctrl+C` | Copy shape to CVAT internal clipboard |
| `Ctrl+V` | Paste a shape from internal CVAT clipboard |
| Hold `Ctrl` while pasting | When pasting shape from the buffer for multiple pasting. |
| `Ctrl+B` | Make a copy of the object on the following frames |
| `Ctrl+(0..9)` | Changes a label for an activated object or for the next drawn object if no objects are activated |
| | _Operations are available only for track_ |
| `K` | Change keyframe property for an active track |
| `O` | Change outside property for an active track |
| `R` | Go to the next keyframe of an active track |
| `E` | Go to the previous keyframe of an active track |
| | _Attribute annotation mode_ |
| `Up Arrow` | Go to the next attribute (up) |
| `Down Arrow` | Go to the next attribute (down) |
| `Tab` | Go to the next annotated object in current frame |
| `Shift+Tab` | Go to the previous annotated object in current frame |
| `<number>` | Assign a corresponding value to the current attribute |
| | _Standard 3d mode_ |
| `Shift+Up Arrow` | Increases camera roll angle |
| `Shift+Down Arrow` | Decreases camera roll angle |
| `Shift+Left Arrow` | Decreases camera pitch angle |
| `Shift+Right Arrow` | Increases camera pitch angle |
| `Alt+O` | Move the camera up |
| `Alt+U` | Move the camera down |
| `Alt+J` | Move the camera left |
| `Alt+L` | Move the camera right |
| `Alt+I` | Performs zoom in |
| `Alt+K` | Performs zoom out |
These shortcuts are organized by scopes. Some are global, meaning they work across the entire application, while others are specific to certain sections or workspaces. This setup allows for shortcut reuse in different scopes, depending on whether they might conflict. For example, global shortcuts must be unique since they apply across all pages and workspaces. However, similar shortcuts can be used in different workspaces, like having the same shortcuts in both the Standard Workspace and the Standard 3D Workspace, as these two do not coexist.

| **Scope** | **Shortcut Conflicts** |
|----------------------------------|----------------------------------------------------------------------------------------------|
| **Global** | Must be unique across all scopes, as they apply universally. |
| **Annotation Page** | Must be unique across all scopes, except Labels Editor. |
| **Standard Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Standard 3D Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Attribute Annotation Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Review Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Tag Annotation Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Control Sidebar** | Must be unique across itself, all workspaces, Annotation Page and Global Scope. |
| **Objects Sidebar** | Must be unique across itself, all workspaces, Annotation Page and Global Scope. |
| **Labels Editor** | Must be unique across itself and Global Scope. |

## Shortcuts Customization

You can customize shortcuts in the CVAT settings.

- Open Settings:\
![](/images/shortcuts01.png)

- Go to the Shortcuts tab:\
![](/images/shortcuts02.png)

- You'll see the shortcuts customization menu:\
![](/images/shortcuts03.png)

- As it can be seen there is a warning, that some shortcuts are reserved by the browser and cannot be overridden by CVAT, there isn't a specific list available for such combinations, but shortcuts such as ctrl + tab (switching tabs) or ctrl + w (closing tabs) etc, are reserved by the browser and shortcuts such as alt + f4 (closing the window) are reserved by the operating system.

- All sections collapsable, so you can easily navigate through the list of shortcuts. Here is the Global scope expanded:\
![](/images/shortcuts04.png)

- To add a custom shortcut all you have to do is click in the input field and start pressing the sequence you want to assign to the action. As an example `f3` has been set here for Show Shortcuts along with `f1`:\
![](/images/shortcuts05.png)

- Shortcuts can be any combination of modifiers(ctrl, shift or alt) and up to one non-modifier key e.g. `ctrl+shift+key` etc.\
![](/images/shortcuts06.png)

- But if you try to add a shortcut that is already in use, you will get a warning message:\
![](/images/shortcuts07.png)

- If pressed cancel it will remain the same otherwise the conflicting shortcut will be unset.\
![](/images/shortcuts08.png)

- If you want to reset all the shortcuts to default, you can do so by clicking the Restore Defaults button at the top of the shortcut settings.\
![](/images/shortcuts09.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

Approved: Enhanced structure and detailed customization instructions.

The changes significantly enhance the document's usability by categorizing shortcuts and providing detailed customization instructions. The inclusion of visual aids is particularly helpful.

However, consider the following minor corrections:

  • Line 40: Add a period after "etc" as it is an abbreviation.
  • Line 54: Insert a comma after "cancel" for better readability.

Consider applying these corrections:

- ...ctrl + w (closing tabs) etc, are reserved...
+ ...ctrl + w (closing tabs) etc., are reserved...

- If pressed cancel it will remain the same otherwise...
+ If pressed, cancel it will remain the same, otherwise...
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
CVAT provides a wide range of customizable shortcuts, with many UI elements offering shortcut hints when hovered over with the mouse.
![](/images/image075.jpg)
| Shortcut | Common |
| -------------------------- | -------------------------------------------------------------------------------------------------------- |
| | _Main functions_ |
| `F1` | Open/hide the list of available shortcuts |
| `F2` | Go to the settings page or go back |
| `Ctrl+S` | Go to the settings page or go back |
| `Ctrl+Z` | Cancel the latest action related with objects |
| `Ctrl+Shift+Z` or `Ctrl+Y` | Cancel undo action |
| Hold `Mouse Wheel` | To move an image frame (for example, while drawing) |
| | _Player_ |
| `F` | Go to the next frame |
| `D` | Go to the previous frame |
| `V` | Go forward with a step |
| `C` | Go backward with a step |
| `Right` | Search the next frame that satisfies to the filters <br> or next frame which contain any objects |
| `Left` | Search the previous frame that satisfies to the filters <br> or previous frame which contain any objects |
| `Space` | Start/stop automatic changing frames |
| `` ` `` or `~` | Focus on the element to change the current frame |
| | _Modes_ |
| `N` | Repeat the latest procedure of drawing with the same parameters |
| `M` | Activate or deactivate mode to merging shapes |
| `Alt+M` | Activate or deactivate mode to splitting shapes |
| `G` | Activate or deactivate mode to grouping shapes |
| `Shift+G` | Reset group for selected shapes (in group mode) |
| `Esc` | Cancel any active canvas mode |
| | _Image operations_ |
| `Ctrl+R` | Change image angle (add 90 degrees) |
| `Ctrl+Shift+R` | Change image angle (subtract 90 degrees) |
| | _Operations with objects_ |
| `Ctrl` | Switch automatic bordering for polygons and polylines during drawing/editing |
| Hold `Ctrl` | When the shape is active and fix it |
| `Alt+Click` on point | Deleting a point (used when hovering over a point of polygon, polyline, points) |
| `Shift+Click` on point | Editing a shape (used when hovering over a point of polygon, polyline or points) |
| `Right-Click` on shape | Display of an object element from objects sidebar |
| `T+L` | Change locked state for all objects in the sidebar |
| `L` | Change locked state for an active object |
| `T+H` | Change hidden state for objects in the sidebar |
| `H` | Change hidden state for an active object |
| `Q` or `/` | Change occluded property for an active object |
| `Del` or `Shift+Del` | Delete an active object. Use shift to force delete of locked objects |
| `-` or `_` | Put an active object "farther" from the user (decrease z axis value) |
| `+` or `=` | Put an active object "closer" to the user (increase z axis value) |
| `Ctrl+C` | Copy shape to CVAT internal clipboard |
| `Ctrl+V` | Paste a shape from internal CVAT clipboard |
| Hold `Ctrl` while pasting | When pasting shape from the buffer for multiple pasting. |
| `Ctrl+B` | Make a copy of the object on the following frames |
| `Ctrl+(0..9)` | Changes a label for an activated object or for the next drawn object if no objects are activated |
| | _Operations are available only for track_ |
| `K` | Change keyframe property for an active track |
| `O` | Change outside property for an active track |
| `R` | Go to the next keyframe of an active track |
| `E` | Go to the previous keyframe of an active track |
| | _Attribute annotation mode_ |
| `Up Arrow` | Go to the next attribute (up) |
| `Down Arrow` | Go to the next attribute (down) |
| `Tab` | Go to the next annotated object in current frame |
| `Shift+Tab` | Go to the previous annotated object in current frame |
| `<number>` | Assign a corresponding value to the current attribute |
| | _Standard 3d mode_ |
| `Shift+Up Arrow` | Increases camera roll angle |
| `Shift+Down Arrow` | Decreases camera roll angle |
| `Shift+Left Arrow` | Decreases camera pitch angle |
| `Shift+Right Arrow` | Increases camera pitch angle |
| `Alt+O` | Move the camera up |
| `Alt+U` | Move the camera down |
| `Alt+J` | Move the camera left |
| `Alt+L` | Move the camera right |
| `Alt+I` | Performs zoom in |
| `Alt+K` | Performs zoom out |
These shortcuts are organized by scopes. Some are global, meaning they work across the entire application, while others are specific to certain sections or workspaces. This setup allows for shortcut reuse in different scopes, depending on whether they might conflict. For example, global shortcuts must be unique since they apply across all pages and workspaces. However, similar shortcuts can be used in different workspaces, like having the same shortcuts in both the Standard Workspace and the Standard 3D Workspace, as these two do not coexist.
| **Scope** | **Shortcut Conflicts** |
|----------------------------------|----------------------------------------------------------------------------------------------|
| **Global** | Must be unique across all scopes, as they apply universally. |
| **Annotation Page** | Must be unique across all scopes, except Labels Editor. |
| **Standard Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Standard 3D Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Attribute Annotation Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Review Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Tag Annotation Workspace** | Must be unique across itself, Annotation Page and Global Scope. |
| **Control Sidebar** | Must be unique across itself, all workspaces, Annotation Page and Global Scope. |
| **Objects Sidebar** | Must be unique across itself, all workspaces, Annotation Page and Global Scope. |
| **Labels Editor** | Must be unique across itself and Global Scope. |
## Shortcuts Customization
You can customize shortcuts in the CVAT settings.
- Open Settings:\
![](/images/shortcuts01.png)
- Go to the Shortcuts tab:\
![](/images/shortcuts02.png)
- You'll see the shortcuts customization menu:\
![](/images/shortcuts03.png)
- As it can be seen there is a warning, that some shortcuts are reserved by the browser and cannot be overridden by CVAT, there isn't a specific list available for such combinations, but shortcuts such as ctrl + tab (switching tabs) or ctrl + w (closing tabs) etc, are reserved by the browser and shortcuts such as alt + f4 (closing the window) are reserved by the operating system.
- All sections collapsable, so you can easily navigate through the list of shortcuts. Here is the Global scope expanded:\
![](/images/shortcuts04.png)
- To add a custom shortcut all you have to do is click in the input field and start pressing the sequence you want to assign to the action. As an example `f3` has been set here for Show Shortcuts along with `f1`:\
![](/images/shortcuts05.png)
- Shortcuts can be any combination of modifiers(ctrl, shift or alt) and up to one non-modifier key e.g. `ctrl+shift+key` etc.\
![](/images/shortcuts06.png)
- But if you try to add a shortcut that is already in use, you will get a warning message:\
![](/images/shortcuts07.png)
- If pressed cancel it will remain the same otherwise the conflicting shortcut will be unset.\
![](/images/shortcuts08.png)
- If you want to reset all the shortcuts to default, you can do so by clicking the Restore Defaults button at the top of the shortcut settings.\
![](/images/shortcuts09.png)
- As it can be seen there is a warning, that some shortcuts are reserved by the browser and cannot be overridden by CVAT, there isn't a specific list available for such combinations, but shortcuts such as ctrl + tab (switching tabs) or ctrl + w (closing tabs) etc., are reserved by the browser and shortcuts such as alt + f4 (closing the window) are reserved by the operating system.
- If pressed, cancel it will remain the same, otherwise the conflicting shortcut will be unset.\
Tools
LanguageTool

[style] ~40-~40: In American English, abbreviations like “etc.” require a period.
Context: ...tching tabs) or ctrl + w (closing tabs) etc, are reserved by the browser and shortc...

(ETC_PERIOD)


[uncategorized] ~54-~54: Possible missing comma found.
Context: ... - If pressed cancel it will remain the same otherwise the conflicting shortcut will...

(AI_HYDRA_LEO_MISSING_COMMA)

site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
site/content/en/docs/manual/advanced/shortcuts.md Outdated Show resolved Hide resolved
Copy link

@bsekachev bsekachev merged commit f36f18e into cvat-ai:develop Aug 31, 2024
14 checks passed
bschultz96 pushed a commit to bschultz96/cvat that referenced this pull request Sep 12, 2024
@tahamukhtar20 tahamukhtar20 deleted the Documentation branch September 24, 2024 18:39
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