mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(key) add ability to copy path with help of Ctrl + p
This commit is contained in:
parent
f98027e64b
commit
d6c3a240b5
4 changed files with 14 additions and 0 deletions
1
HELP.md
1
HELP.md
|
|
@ -166,6 +166,7 @@ Hot keys
|
|||
| `Ctrl + с` | copy to buffer
|
||||
| `Ctrl + v` | paste from buffer
|
||||
| `Ctrl + z` | clear buffer
|
||||
| `Ctrl + p` | copy path
|
||||
| `Ctrl + r` | refresh
|
||||
| `Ctrl + d` | clear local storage
|
||||
| `Ctrl + a` | select all files in a panel
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
const Info = DOM.CurrentInfo;
|
||||
|
||||
const exec = require('execon');
|
||||
const clipboard = require('@cloudcmd/clipboard');
|
||||
|
||||
const Events = require('../dom/events');
|
||||
const Buffer = require('../dom/buffer');
|
||||
|
|
@ -415,6 +416,16 @@ function KeyProto() {
|
|||
|
||||
break;
|
||||
|
||||
case Key.P:
|
||||
if (!ctrlMeta)
|
||||
return;
|
||||
|
||||
event.preventDefault();
|
||||
clipboard
|
||||
.writeText(Info.dirPath)
|
||||
.catch(CloudCmd.log);
|
||||
|
||||
break;
|
||||
/**
|
||||
* обновляем страницу,
|
||||
* загружаем содержимое каталога
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ module.exports = {
|
|||
M : 77,
|
||||
|
||||
O : 79,
|
||||
P : 80,
|
||||
Q : 81,
|
||||
R : 82,
|
||||
S : 83,
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@
|
|||
"writejson": "^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@cloudcmd/clipboard": "^1.0.0",
|
||||
"babel-cli": "^6.18.0",
|
||||
"babel-loader": "^7.0.0",
|
||||
"babel-plugin-transform-object-assign": "^6.22.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue