-
Notifications
You must be signed in to change notification settings - Fork 859
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 CTRL+D shortcut to duplicate #6629
Conversation
@@ -1420,6 +1433,7 @@ const ObjectsList = React.forwardRef<Props, ObjectsListInterface>( | |||
{ | |||
label: i18n._(t`Duplicate`), | |||
click: () => duplicateObject(item), | |||
accelerator: 'CTRL+D', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This value does not respect the format we use, you can search accelerator
in the repo to understand how you should write it.
@@ -750,6 +750,19 @@ const ObjectsList = React.forwardRef<Props, ObjectsListInterface>( | |||
selectObjectFolderOrObjectWithContext, | |||
] | |||
); | |||
React.useEffect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you regroup this effect with the other one setting the onDelete shortcut? Also, you can add a comment to the one above the instanciation of keyboardShortcutsRef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion!
There is two PR for this feature I made another one at: |
Okay I am going to see this |
I think the strategy of having the shortcut defined on the tree view (as done in this PR #6629) is a better strategy. I'll look into it. |
I corrected accelerator and grouped onDelete with onDuplicate. I also added a comment to the one above the instantiation of keyboardShortcutsRef.
I corrected accelerator and grouped onDelete with onDuplicate. I also added a comment to the one above the instantiation of keyboardShortcutsRef.
Add CTRL+D shortcut to duplicate #6194