Skip to content

Improved Keyboard Shortcuts, Drag-and-Drop Functionality, and UI Enhancements #5615

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

Merged
merged 40 commits into from
Sep 17, 2024

Conversation

jonoomph
Copy link
Member

@jonoomph jonoomph commented Sep 12, 2024

Overall, this PR significantly improves user control over keyboard shortcuts, enhances the drag-and-drop experience, and addresses several critical bugs related to file management and crashes, while also refining the user interface and documentation.

Keyboard Shortcuts:

  • Updated and Refined Shortcuts:

    • Added multiple shortcuts for the same actions, supporting user-defined alternates.
    • Improved shortcut handling to ensure they work correctly across different UI elements (timeline, file view, etc.).
    • Resolved issues with conflicting or duplicate shortcuts, enhancing overall shortcut reliability.
    • New Ripple Delete Shortcut (Shift+Delete) and Ripple Select (Shift+Click).
    • Added Nudge (Ctrl+Left/Right) and Nudge Big (Ctrl+Shift+Left/Right).
    • Added "Cut" (Ctrl+X) to the context menu and shortcut support.
  • Shortcut Editing and Preferences:

    • Users can now edit all keyboard shortcuts in the preferences panel, with changes taking effect immediately—no restart required.
    • Added support for | delimiters between multiple shortcuts in preferences.
    • Restoring Defaults: Improved support for resetting keyboard shortcuts to defaults, with more granular control per tab.

Drag-and-Drop Enhancements:

  • Multi-Selection Support:

    • Refactored drag-and-drop functionality for clips and transitions, now supporting multi-selection and maintaining the correct order when dragging multiple items from the file view to the timeline.
    • Improved snapping of dragged items to the FPS grid, ensuring proper alignment.
    • Added a small drag threshold to prevent accidental tiny movements (e.g., 5-pixel threshold).
  • Improved Context Menu for Timeline:

    • Context-Aware Pasting: The paste operation now respects the position of the context menu, preventing issues where the cursor position unintentionally changes the paste target.

File and Clip Management:

  • Action Duplication:

    • Updated the duplication functionality to allow for duplicating .svg files when file view is in focus and duplicating timeline items when timeline is in focus.
  • File Deletion from File View:

    • Extended the "Delete" functionality to remove items from the project when the file view is in focus.

Bug Fixes and Refactors:

  • Crash Fixes:

    • Fixed crash when dropping files onto the timeline from the OS, ensuring proper grid snapping and avoiding file stacking issues.
  • Improved Transaction Handling:

    • Refined transaction handling for multi-selection updates (dragging, adding, slicing), ensuring undo/redo works correctly when deleting multiple clips or transitions.
  • Fixes for Sorting and Preferences:

    • Resolved regression in sorting keyboard shortcuts in preferences by their translated titles.
    • Fixed an issue where preferences weren't reloading correctly after restoring defaults.

UI and Documentation Updates:

  • Expanded the documentation for slicing options, ripple actions, and deletion behaviors.
  • Updated default keybindings to more closely align with video editing standards.
  • Added documentation for restoring preferences, transitions, and keyboard shortcut updates.

…tion.setShortcut for all keyboard shortcuts, which fixes many, many keyboard focus issues when using keybinds. Also, all keyboard shortcuts can be edited and updated without restarting OpenShot. Also added many missing keyboard shortcuts.
@github-actions github-actions bot added the conflicts A PR with unresolved merge conflicts label Sep 12, 2024
Copy link

Merge conflicts have been detected on this PR, please resolve.

…ith video editing norms and industry standards (including many alternates), and a few unimplemented features.
…ores MOST settings, except a few it ignores.
…o user's can more accurately reset certain settings. Also, support requires restart now (if any restarts are changed).
… can easily add alternate key-presses to various actions. Combined alternates into single settings entries.

- Fixed nudge to use +/- 1 frame
- Added nudgeBig to use +/1 5 frames
- Added Cut (Ctrl+X) to copy and remove selection
…sed first in another widget, and then crashing when accessing the event later). Also, fixed bug where dropping multiple files on timeline (from OS) would stack them. Now they are correctly snapped to FPS grid and positioned back to back.
…rting multi-selection for Files. They are added in the order they are selected.
…f the cursor position (since sometimes teh cursor moves down in the context menu, changing the position of the Paste operation)
… a bit, to simplify grouping multi-select updates (dragging, adding, slicing)
…ction fixes. Also, fixing a few actions which were not being invoked correctly on the main window. Lastly, I give focus back to the timeline after a new clip is dropped on. This allows the keybinds to continue working without needing to click the main window again.
…ing a few of the keyboard shortcut names (for consistency).
…HIFT+Click (ripple select), and added new keyboard shortcut for ripple select.
…hods (this keeps the shortcuts active, even if the actions are hidden)
…ndow event filter, to ignore only specific timeline actions when other docks are selected. Extend 'deleteItem' shortcut to delete project files (if files view has focus). Fixed undo/redo transaction issue when deleting multiple clips + transitions.
…e (in file view) or duplicate the select timeline items (at the cursor position)
@jonoomph jonoomph changed the title Huge refactor of Keyboard shortcuts Improved Keyboard Shortcuts, Drag-and-Drop Functionality, and UI Enhancements Sep 16, 2024
…ear in red. Duplicates shortcuts are ignored in OpenShot and must be fixed before they will work. Also updated the Keyboard preferences documentation and fixed the shortcut for "Properties" (which happened to be a duplicate)
…or ripple sliced (only the clip which was right clicked on)
…eview, Split File, Edit Title. Added double click functions to project files. Made preview/split file dialog close with ESC key. Renamed a few menus (Split Clips -> Split File, Export Clips -> Export Files). Updated documentation with updated keyboard names and shortcuts.
…eview, Split File, Edit Title. Added double click functions to project files. Made preview/split file dialog close with ESC key. Renamed a few menus (Split Clips -> Split File, Export Clips -> Export Files). Updated documentation with updated keyboard names and shortcuts. Updating translations.
@jonoomph jonoomph merged commit 5211899 into develop Sep 17, 2024
10 checks passed
@jonoomph jonoomph deleted the improved-shortcuts branch September 17, 2024 17:28
Copy link

sentry-io bot commented Sep 18, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ AttributeError: 'NoneType' object has no attribute 'info' windows.main_window in actionModels_trigger View Issue
  • ‼️ TypeError: 'NoneType' object is not iterable windows.views.timeline in dragLeaveEvent View Issue
  • ‼️ TypeError: Wrong number or type of arguments for overloaded function 'new_Timeline'. openshot in __init__ View Issue
  • ‼️ ValueError: x and y must have same first dimension, but have shapes (1889,) and (1890,) windows.graphModelsWindow in update_plot View Issue
  • ‼️ IndexError: tuple index out of range windows.graphModelsWindow in update_plot View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts A PR with unresolved merge conflicts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant