Implement keyboard shortcut F2 to rename files and directories in the

shellview (and in common dialogs).
This commit is contained in:
Chris Morgan 2001-02-13 02:20:35 +00:00 committed by Alexandre Julliard
parent 0b64cfb3f7
commit 6f8f771e01
1 changed files with 20 additions and 1 deletions

View File

@ -1267,10 +1267,29 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
msg.pt = 0;*/
LPNMLVKEYDOWN plvKeyDown = (LPNMLVKEYDOWN) lpnmh;
/* initiate a rename of the selected file or directory */
if(plvKeyDown->wVKey == VK_F2)
{
/* see how many files are selected */
int i = ListView_GetSelectedCount(This->hWndList);
/* get selected item */
if(i == 1)
{
/* get selected item */
i = ListView_GetNextItem(This->hWndList, -1,
LVNI_SELECTED);
ListView_EnsureVisible(This->hWndList, i, 0);
ListView_EditLabelA(This->hWndList, i);
}
}
#if 0
TranslateAccelerator(This->hWnd, This->hAccel, &msg)
#endif
FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey);
else
FIXME("LVN_KEYDOWN key=0x%08x\n",plvKeyDown->wVKey);
}
break;
default: