From b2972d5707fc427532aa1a22a2c5e0ecf0c679fa Mon Sep 17 00:00:00 2001 From: ClemDee Date: Thu, 20 Jun 2019 10:21:42 +0200 Subject: [PATCH] Add rename F2 shortcut in drive --- www/drive/inner.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/www/drive/inner.js b/www/drive/inner.js index 1d90beb49..151ef76d2 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -3636,6 +3636,14 @@ define([ APP.hideMenu(); }); + $content.on("keydown", function (e) { + if (e.which === 113) { + var paths = $contextMenu.data('paths'); + if (paths.length !== 1) { return; } + displayRenameInput(paths[0].element, paths[0].path); + } + }); + // Chrome considers the double-click means "select all" in the window $content.on('mousedown', function (e) { $content.focus();