mirror of
https://github.com/ducbao414/win32.run.git
synced 2025-12-18 10:12:50 +09:00
add shortcut key to go up directory level
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
|
||||
} else if(type == 'RecycleBin'){
|
||||
menu_obj = (await import('./context_menu/RecycleBin')).make({type, originator});
|
||||
|
||||
|
||||
} else {
|
||||
console.log('unknown context menu type')
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
page_index = Math.min(history.length - 1, page_index + 1);
|
||||
}
|
||||
|
||||
function up(){
|
||||
export function up(){
|
||||
let parent_id = $hardDrive[history[page_index]].parent;
|
||||
open(parent_id);
|
||||
}
|
||||
|
||||
@@ -172,11 +172,11 @@
|
||||
}
|
||||
|
||||
function on_keydown(e){
|
||||
console.log('keyevent in my computer');
|
||||
|
||||
if(my_computer_instance.window.z_index != $zIndex) return;
|
||||
if(renaming) return;
|
||||
if(id == null) return;
|
||||
console.log('not skip');
|
||||
console.log('keyevent in my computer');
|
||||
|
||||
if(!(e.ctrlKey || e.metaKey)) return;
|
||||
if(e.key == 'c'){
|
||||
@@ -188,6 +188,10 @@
|
||||
} else if(e.key == 'a'){
|
||||
let els = node_ref.querySelectorAll('.fs-item');
|
||||
ds.setSelection(els, true);
|
||||
} else if(e.key == 'ArrowUp'){
|
||||
e.preventDefault();
|
||||
my_computer_instance.up();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user