mirror of
https://github.com/fancive/obsidian-parallel-reader.git
synced 2026-07-22 06:53:43 +00:00
feat(keyboard): add Alt+E and Alt+Delete shortcuts in summary pane
Alt+E opens the edit modal for the active card; Alt+Delete deletes it. Complements existing Alt+Arrow navigation and Enter jump-to-source. https://claude.ai/code/session_012cK5rUGQvqkuxUZ59x7dLn
This commit is contained in:
parent
187c0d17b2
commit
597a6582a9
1 changed files with 14 additions and 0 deletions
14
src/view.ts
14
src/view.ts
|
|
@ -378,6 +378,20 @@ export class ParallelReaderView extends ItemView {
|
|||
this.moveActiveSection(1);
|
||||
return;
|
||||
}
|
||||
if (e.altKey && (e.key === 'e' || e.key === 'E')) {
|
||||
if (this.activeIdx >= 0) {
|
||||
e.preventDefault();
|
||||
this.openEditCardModal(this.activeIdx);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (e.altKey && e.key === 'Delete') {
|
||||
if (this.activeIdx >= 0) {
|
||||
e.preventDefault();
|
||||
void this.deleteCard(this.activeIdx);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!e.altKey && !e.metaKey && !e.ctrlKey && !e.shiftKey && e.key === 'Enter') {
|
||||
const line = this.jumpToActiveSection();
|
||||
if (line >= 0) e.preventDefault();
|
||||
|
|
|
|||
Loading…
Reference in a new issue