Skip to content

Commit

Permalink
Merge pull request #1042 from liuycsd/pr-fix-keyboard-input-1708044792
Browse files Browse the repository at this point in the history
Fix keyboard input: fix focus onMenuClose and fix some key bindings
  • Loading branch information
stakira authored Feb 25, 2024
2 parents 8054c27 + 1458949 commit acdf556
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions OpenUtau/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Icon="/Assets/open-utau.ico"
Title="{Binding Title}" MinWidth="300" MinHeight="200"
KeyDown="OnKeyDown" PointerPressed="OnPointerPressed" Closing="WindowClosing"
Focusable="True"
TransparencyLevelHint="None"
ExtendClientAreaToDecorationsHint="{Binding ExtendToFrame}">
<Window.Styles>
Expand Down
1 change: 1 addition & 0 deletions OpenUtau/Views/PianoRollWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
x:Class="OpenUtau.App.Views.PianoRollWindow"
Icon="/Assets/open-utau.ico"
Title="{Binding NotesViewModel.WindowTitle}" MinWidth="300" MinHeight="200" KeyDown="OnKeyDown" Closing="WindowClosing"
Focusable="True"
TransparencyLevelHint="None"
ExtendClientAreaToDecorationsHint="{Binding ExtendToFrame}" Deactivated="WindowDeactivated">
<Window.Styles>
Expand Down
4 changes: 2 additions & 2 deletions OpenUtau/Views/PianoRollWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ bool OnKeyExtendedHandler(KeyEventArgs args) {
}
// to view end
if (isShift) {
playVm.MovePlayPos(notesVm.Part.position + (int)(notesVm.TickOffset));
playVm.MovePlayPos(notesVm.Part.position + (int)(notesVm.TickOffset + notesVm.Bounds.Width / notesVm.TickWidth));
return true;
}
break;
Expand Down Expand Up @@ -1349,7 +1349,7 @@ bool OnKeyExtendedHandler(KeyEventArgs args) {
}
// select none
if (isCtrl) {
notesVm.SelectAllNotes();
notesVm.DeselectNotes();
return true;
}
break;
Expand Down

0 comments on commit acdf556

Please sign in to comment.