- 
                Notifications
    You must be signed in to change notification settings 
- Fork 748
add duplicate selection shortcut to hotkeys as part of editing command #6843
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 duplicate selection shortcut to hotkeys as part of editing command #6843
Conversation
| The latest updates on your projects. Learn more about Vercel for GitHub. 
 | 
| I have read the CLA Document and I hereby sign the CLA | 
| All contributors have signed the CLA  ✍️ ✅ | 
| recheck | 
        
          
                frontend/src/core/hotkeys/hotkeys.ts
              
                Outdated
          
        
      | "cell.duplicateSelection": { | ||
| name: "Duplicate selection", | ||
| group: "Editing", | ||
| key: "Ctrl-Shift-ArrowDown", | 
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.
| key: "Ctrl-Shift-ArrowDown", | |
| key: "Ctrl-Shift-ArrowDown", | |
| editable: false, | 
since right now we don't override it in the codemirror settings, this needs to be set to not editable
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.
Apologies about this - missed the codemirror related items. I do see that you use the up/down shortcuts as copy line up/down, I can convert mine to reflect that nomenclature for consistency, if that's desired?
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.
For me, it copies full lines. so i think Copy line(s) down would be fine text.
I would also maybe add Copy line(s) up as well
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.
adjust to non-editable Co-authored-by: Myles Scolnick <[email protected]>
| thank you for the contribution! | 
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 we change the text to "Copy line(s) down" and add "Copy line(s) up" as well
added the missing copy line(s) up as well
provide more descriptive name
| 
 sorry for overcomplicating a small pr, this is my first ever oss contribution - much thanks to all those working on marimo for such an awesome project! hope to be able to contribute more meaningfully after this | 
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.
amazing, thank you!

📝 Summary
Fixes #6338
🔍 Description of Changes
Adds an additional keyboard hotkey (that can be modified) for the duplicate selection shortcut and is visible from user settings under Editing (see below for screenshot of the change). The name is modified from copy line down since it technically copies the entire selection and not just a specific line on execution.
📋 Checklist