MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / OnListViewKeyDown

Method OnListViewKeyDown

Explorer++/Explorer++/ShellBrowser/ListView.cpp:526–569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526void ShellBrowser::OnListViewKeyDown(const NMLVKEYDOWN *lvKeyDown)
527{
528 switch (lvKeyDown->wVKey)
529 {
530 case 'A':
531 if (IsKeyDown(VK_CONTROL) && !IsKeyDown(VK_SHIFT) && !IsKeyDown(VK_MENU))
532 {
533 ListViewHelper::SelectAllItems(m_hListView, TRUE);
534 SetFocus(m_hListView);
535 }
536 break;
537
538 case 'I':
539 if (IsKeyDown(VK_CONTROL) && !IsKeyDown(VK_SHIFT) && !IsKeyDown(VK_MENU))
540 {
541 ListViewHelper::InvertSelection(m_hListView);
542 SetFocus(m_hListView);
543 }
544 break;
545
546 case VK_BACK:
547 if (IsKeyDown(VK_CONTROL) && !IsKeyDown(VK_SHIFT) && !IsKeyDown(VK_MENU))
548 {
549 TCHAR szRoot[MAX_PATH];
550 HRESULT hr = GetDisplayName(m_directoryState.pidlDirectory.get(), szRoot,
551 SIZEOF_ARRAY(szRoot), SHGDN_FORPARSING);
552
553 if (SUCCEEDED(hr))
554 {
555 BOOL bRes = PathStripToRoot(szRoot);
556
557 if (bRes)
558 {
559 m_navigationController->BrowseFolder(szRoot);
560 }
561 }
562 }
563 else
564 {
565 m_navigationController->GoUp();
566 }
567 break;
568 }
569}
570
571ShellBrowser::ItemInfo_t &ShellBrowser::GetItemByIndex(int index)
572{

Callers

nothing calls this directly

Calls 5

IsKeyDownFunction · 0.85
GetDisplayNameFunction · 0.85
GoUpMethod · 0.80
getMethod · 0.45
BrowseFolderMethod · 0.45

Tested by

no test coverage detected