feat(fe/panel_files): enable hotkeys for deleting and moving

This commit is contained in:
hexxa 2022-02-15 17:31:35 +08:00 committed by Hexxa
parent ecb35e2de1
commit de3476dbad

View file

@ -112,6 +112,8 @@ export class FilesPanel extends React.Component<Props, State, {}> {
this.hotkeyHandler = new HotkeyHandler();
this.hotkeyHandler.add({ key: "a", ctrl: true }, this.selectAll);
this.hotkeyHandler.add({ key: "q", ctrl: true }, this.onClickUpload);
this.hotkeyHandler.add({ key: "Delete" }, this.delete);
this.hotkeyHandler.add({ key: "v", ctrl: true }, this.moveHere);
document.addEventListener("keyup", this.hotkeyHandler.handle);
}