[devmgmt]
authorChristoph von Wittich <christoph_vw@reactos.org>
Sun, 27 Apr 2014 08:15:59 +0000 (08:15 +0000)
committerChristoph von Wittich <christoph_vw@reactos.org>
Sun, 27 Apr 2014 08:15:59 +0000 (08:15 +0000)
improve keyboard navigation

svn path=/trunk/; revision=63013

reactos/base/applications/mscutils/devmgmt/mainwnd.c

index e08341a..3447d1d 100644 (file)
@@ -304,7 +304,7 @@ InitMainWnd(PMAIN_WND_INFO Info)
                                      0);
     SetMenuDefaultItem(Info->hShortcutMenu, IDC_PROP, FALSE);
 
-    /* create seperate thread to emum devices */
+    /* create separate thread to emum devices */
     DevEnumThread = CreateThread(NULL,
                                  0,
                                  DeviceEnumThread,
@@ -418,6 +418,23 @@ OnNotify(PMAIN_WND_INFO Info,
         }
         break;
 
+        case NM_RETURN:
+        {
+            HTREEITEM hSelected = TreeView_GetSelection(Info->hTreeView);
+            if (Info->Display == DevicesByType)
+            {
+                OpenPropSheet(Info->hTreeView, hSelected);
+            }
+            else if (Info->Display == DevicesByConnection)
+            {
+                if (hSelected != TreeView_GetRoot(Info->hTreeView))
+                {
+                    OpenPropSheet(Info->hTreeView, hSelected);
+                }
+            }    
+        }
+        break;
+        
         case NM_DBLCLK:
         {
             HTREEITEM hSelected = TreeView_GetSelection(Info->hTreeView);