elk
elk copied to clipboard
feat: keyboard shortcuts
implements https://github.com/elk-zone/elk/issues/39
TODOs
- [x] MVP
- [x] add 'Keyboard Shortcuts' modal with instructions
- [x] open via
?
->shift + ?
- [x] close modal via
shift + ?
/esc
- [x] open via
- [x] add first basic shortcut:
c
for 'Compose' - [x] add first two sequence navigation shortcuts:
- [x]
g..h
Open Home Timeline - [x]
g..n
Open Notifications
- [x]
- [x] technical details
- [x] enable/disable based on isAuthenticated status
- [x] disable when focused on INPUT/TEXTBOX/contenteditable
- [x] Toot active/open(?/hover?) specific actions
- [x] Favourite
f
- [x] Boost
b
- [x] Favourite
- [x] navigate timeline prev/next status
- [x] Next status
j
- [x] Prev status
k
- [x] Next status
- [x] styling & design
- [x] basic design 'Keyboard Shortcuts' modal
- [x] responsive
- [x] add 'Keyboard Shortcuts' modal with instructions
- [x] define list of shortcuts to provide with this PR (limited number for a first iteration?)
- [x] use I18n (started off with en-US for prototyping)
- [ ] define next steps / create follow-up issue(s)
Options for improvement
- [ ] performance / ressource utilization
- [ ] disable event listeners for mobile devices (without hardware keyboard)
- [ ] UI/UX
- [ ] for page navigation (e.g.
g .. h
/g .. n
) show a notification message ~"Going to home" by @edimitchel
- [ ] for page navigation (e.g.
- [ ] code / architecture
- [ ] simplify / find better solution for
j
/k
navigation. Current solution uses DOM & querySelectors, hard to maintain / comes with high risk of regressions while working on other features.. - [ ] export composables for each keybinding, components self-register triggers, centralised tracking of listeners (ref discord) by @QiroNT
- [ ] simplify / find better solution for