mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2025-01-23 16:36:51 +00:00
Shortcut for editing opened hypha
It's `e`
This commit is contained in:
parent
1c8d1e8f7e
commit
80e3645bb0
@ -311,24 +311,25 @@
|
|||||||
bindElement(`g ${i}`, headerLinks[i-1], `Header link #${i}`);
|
bindElement(`g ${i}`, headerLinks[i-1], `Header link #${i}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
globalShortcuts.groupStart();
|
// * Hypha shortcuts
|
||||||
globalShortcuts.fakeItem('1 – 9', 'First 9 hypha′s links');
|
if (typeof editTextarea === 'undefined') {
|
||||||
bindElement('p, Alt+ArrowLeft', '.prevnext__prev', 'Next hypha');
|
globalShortcuts.fakeItem('Hypha');
|
||||||
bindElement('n, Alt+ArrowRight', '.prevnext__next', 'Previous hypha');
|
|
||||||
bindElement('s, Alt+ArrowTop', $$('.navi-title a').slice(1, -1).slice(-1)[0], 'Parent hypha');
|
|
||||||
globalShortcuts.groupEnd();
|
|
||||||
|
|
||||||
let hyphaLinks = $$('article .wikilink');
|
globalShortcuts.groupStart();
|
||||||
for (let i = 1; i <= hyphaLinks.length && i < 10; i++) {
|
globalShortcuts.fakeItem('1 – 9', 'First 9 hypha′s links');
|
||||||
bindElement(i.toString(), hyphaLinks[i-1], `Hypha link #${i}`);
|
bindElement('p, Alt+ArrowLeft', '.prevnext__prev', 'Next hypha');
|
||||||
|
bindElement('n, Alt+ArrowRight', '.prevnext__next', 'Previous hypha');
|
||||||
|
bindElement('s, Alt+ArrowTop', $$('.navi-title a').slice(1, -1).slice(-1)[0], 'Parent hypha');
|
||||||
|
bindElement('e', '.hypha-tabs__link[href^="/edit/"]', 'Edit this hypha');
|
||||||
|
globalShortcuts.groupEnd();
|
||||||
|
|
||||||
|
let hyphaLinks = $$('article .wikilink');
|
||||||
|
for (let i = 1; i <= hyphaLinks.length && i < 10; i++) {
|
||||||
|
bindElement(i.toString(), hyphaLinks[i-1], `Hypha link #${i}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// * Meta shortcuts
|
|
||||||
|
|
||||||
globalShortcuts.add('?', openShortcutsReference);
|
|
||||||
|
|
||||||
// Hypha editor shortcuts
|
// Hypha editor shortcuts
|
||||||
|
|
||||||
if (typeof editTextarea !== 'undefined') {
|
if (typeof editTextarea !== 'undefined') {
|
||||||
let editorShortcuts = new ShortcutHandler(editTextarea);
|
let editorShortcuts = new ShortcutHandler(editTextarea);
|
||||||
|
|
||||||
@ -363,5 +364,8 @@
|
|||||||
|
|
||||||
editorShortcuts.add(isMac ? 'Meta+/' : 'Ctrl+/', openShortcutsReference);
|
editorShortcuts.add(isMac ? 'Meta+/' : 'Ctrl+/', openShortcutsReference);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// * Meta shortcuts
|
||||||
|
globalShortcuts.add('?', openShortcutsReference);
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user