Commit 6f8f771e authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard

Implement keyboard shortcut F2 to rename files and directories in the

shellview (and in common dialogs).
parent 0b64cfb3
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment