@@ -98,6 +98,20 @@ protected override void OnKeyDown(KeyEventArgs e)
9898 }
9999 }
100100
101+ protected override void OnKeyUp ( KeyEventArgs e )
102+ {
103+ base . OnKeyUp ( e ) ;
104+ if ( e . Key == Key . LeftShift )
105+ {
106+ if ( s_unityProjectsParent . SelectedItem != null )
107+ {
108+ s_unityProjectsParent . ContainerFromIndex ( GetUnityProjectSelectedIndex ( ) ) ! . Focus ( ) ;
109+ s_projectSearchBoxAutoComplete . Text = string . Empty ;
110+ }
111+ return ;
112+ }
113+ }
114+
101115 protected override void OnOpened ( EventArgs e )
102116 {
103117 base . OnOpened ( e ) ;
@@ -184,6 +198,7 @@ public static void MoveSelectedProjectDown()
184198 s_unityProjectsParent . SelectedIndex = targetIndex ;
185199 for ( int i = 0 ; i < s_unityProjectsParent . Items . Count ; i ++ )
186200 ( ( UnityProjectView ) s_unityProjectsParent . Items [ i ] ) . Update ( UnityHubUtils . UnityProjects [ i ] ) ;
201+ s_unityProjectsParent . SetSelectedItem ( targetIndex ) ;
187202 }
188203
189204 public static void MoveSelectedProjectUp ( )
@@ -202,6 +217,7 @@ public static void MoveSelectedProjectUp()
202217 s_unityProjectsParent . SelectedIndex = targetIndex ;
203218 for ( int i = 0 ; i < s_unityProjectsParent . Items . Count ; i ++ )
204219 ( ( UnityProjectView ) s_unityProjectsParent . Items [ i ] ) . Update ( UnityHubUtils . UnityProjects [ i ] ) ;
220+ s_unityProjectsParent . SetSelectedItem ( targetIndex ) ;
205221 }
206222
207223 static Control CreateContent ( ) => new DockPanel
@@ -721,15 +737,15 @@ public static MenuItem[] CreateProjectMenuItems(Func<UnityProject> unityProjectG
721737 new MenuItem
722738 {
723739 Header = UnityHubNativeNetApp . Config . language . Menu_MoveUpInList ,
724- HotKey = new ( Key . Up , KeyModifiers . Alt | KeyModifiers . Shift ) ,
725- InputGesture = new ( Key . Up , KeyModifiers . Alt | KeyModifiers . Shift ) ,
740+ HotKey = new ( Key . Up , KeyModifiers . Shift ) ,
741+ InputGesture = new ( Key . Up , KeyModifiers . Shift ) ,
726742 } . OnLayoutUpdate ( ( item ) => item . IsEnabled = unityProjectGetter is not null && UnityHubUtils . UnityProjects . Skip ( 1 ) . Contains ( unityProjectGetter ( ) ) )
727743 . OnClick ( MoveSelectedProjectUp ) ,
728744 new MenuItem
729745 {
730746 Header = UnityHubNativeNetApp . Config . language . Menu_MoveDownInList ,
731- HotKey = new ( Key . Down , KeyModifiers . Alt | KeyModifiers . Shift ) ,
732- InputGesture = new ( Key . Down , KeyModifiers . Alt | KeyModifiers . Shift ) ,
747+ HotKey = new ( Key . Down , KeyModifiers . Shift ) ,
748+ InputGesture = new ( Key . Down , KeyModifiers . Shift ) ,
733749 } . OnLayoutUpdate ( ( item ) => item . IsEnabled = unityProjectGetter is not null && UnityHubUtils . UnityProjects . SkipLast ( 1 ) . Contains ( unityProjectGetter ( ) ) )
734750 . OnClick ( MoveSelectedProjectDown ) ,
735751 ] ;
0 commit comments