egui icon indicating copy to clipboard operation
egui copied to clipboard

Fix Ctrl+Shift+Z redo shortcut

Open YgorSouza opened this issue 1 year ago • 2 comments

This shortcut was previously triggering the Undo action due to the matches_logically method ignoring the state of the Shift key. This was solved by simply inverting the order of the undo and redo arms, so the undo is not matched if the shortcut corresponds to redo.

YgorSouza avatar Oct 13 '24 09:10 YgorSouza

Preview available at https://egui-pr-preview.github.io/pr/5258-fix-redo-shortcut Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

github-actions[bot] avatar Oct 13 '24 09:10 github-actions[bot]

Not sure if this is the best solution, or if it would be better to just use matches_exact instead. I don't know if there would be any undesirable side effects on different keyboards.

Edit: according to the consume_shortcut documentation, the correct approach is to order the shortcuts from most to least "specific" as is done in this PR, so I'm leaving it as is.

YgorSouza avatar Oct 13 '24 09:10 YgorSouza