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

Declare shortcut CTRL+D to duplicate in object list #6273

Merged
merged 4 commits into from
Jul 18, 2024

Conversation

Bouh
Copy link
Collaborator

@Bouh Bouh commented Jan 25, 2024

Fix #6194

@Bouh Bouh requested a review from 4ian as a code owner January 25, 2024 14:54
Comment on lines 19 to 20
canDuplicateObject: boolean,
onDuplicateObject: () => void,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not sure what to do with this, because the fonction duplicate is called in newIDE/app/src/ObjectsList/index.js L 1424

@Bouh
Copy link
Collaborator Author

Bouh commented May 14, 2024

Any help on it?

osmaneTKT and others added 4 commits July 17, 2024 17:24
@AlexandreSi
Copy link
Collaborator

AlexandreSi commented Jul 17, 2024

I didn't realize I chose the same branch name as you did, sorry for overwriting your commits.
This push includes @osmaneTKT's commits plus the changes mentioned in #6670 (comment).
Now the shortcuts are handled at the objects list level, so it ensures the list is actually focused when a user hits F2/Ctrl+D/Delete.
I applied the same shortcuts to the objects groups list.

When merged, the PR #6670 should be closed (@osmaneTKT you will be mentioned as co-author and will be credited in the final commit).

preferences.values.userShortcutMap['RENAME_SCENE_OBJECT'] ||
defaultShortcuts.RENAME_SCENE_OBJECT
),
accelerator: 'F2',
Copy link
Collaborator

Choose a reason for hiding this comment

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

does this mean the shortcut cannot be remapped by the user?

Copy link
Collaborator

Choose a reason for hiding this comment

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

same for below

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. It's not possible with the KeyboardsShortcuts component but it's safer now to me. And the shortcuts are standard

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, fine by me

@AlexandreSi AlexandreSi merged commit 7ba8d01 into master Jul 18, 2024
6 checks passed
@AlexandreSi AlexandreSi deleted the duplicate-object branch July 18, 2024 07:53
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.

Add CTRL+D shortcut to duplicate
4 participants