Keyboard binding #1863

Closed
edijs wants to merge 0 commits from gitlab-mr-iid-593 into develop
Member

Closes #369

Pressing . keyboard button will show new status.

This is prototype of keyboard binding feature (#148).

Closes #369 Pressing `.` keyboard button will show new status. This is prototype of keyboard binding feature (#148).
Member

If I try this on Mentions and Direct messages pages, I get this console error. 😞

Uncaught TypeError: Cannot read property 'id' of undefined

Screenshot_at_Feb_17_20-54-39

If I try this on `Mentions` and `Direct messages` pages, I get this console error. :disappointed: ```Uncaught TypeError: Cannot read property 'id' of undefined``` ![Screenshot_at_Feb_17_20-54-39](/attachments/eaf240cf-5fda-4e5c-a47c-a7e3117f5b2c)
Member

I think we need to use keyup instead of keydown.

I think we need to use `keyup` instead of `keydown`.
Author
Member

I can't reproduce your issue on my end. Are these errors related to the PR?

I can't reproduce your issue on my end. Are these errors related to the PR?
Member

Yes, since I get the errors whenever press down on . key.

Yes, since I get the errors whenever press down on `.` key.
Owner

disagree. this isn't a mouse click.

disagree. this isn't a mouse click.
Owner

error occurs because you need to validate if there's any new statuses to show. Since there's no statuses at all in TL, it breaks.

Or something like that.

error occurs because you need to validate if there's any new statuses to show. Since there's no statuses at all in TL, it breaks. Or something like that.
Author
Member

Got it, let me fix it. Thanks @hj

Got it, let me fix it. Thanks @hj
Owner

feels a bit scary putting non-configurable always-on hotkeys that are being listened to at all times in the application. we currently do stuff like arrows, tab, esc, but only in very specific situations (text input, or with a modal open). I do agree that hotkeys are very useful and we'd want them, but we also don't want to step on the shoes of people who use browser plugins for keyboard navigation by not having ours configurable.

feels a bit scary putting non-configurable always-on hotkeys that are being listened to at all times in the application. we currently do stuff like arrows, tab, esc, but only in very specific situations (text input, or with a modal open). I do agree that hotkeys are very useful and we'd want them, but we also don't want to step on the shoes of people who use browser plugins for keyboard navigation by not having ours configurable.
Author
Member

Are we going to add this feature? #148

Are we going to add this feature? https://git.pleroma.social/pleroma/pleroma-fe/issues/148
Owner

I agree that keybindings should be configurable. People using keyboard navigation (Sakakey, VimFX (yeah, rip)) can temporarily disable them. At least I do with websites with decent hotkeys (TT-RSS). Websites' hotkeys could interfere with extensions but I think most of them can suppress websites' hotkeys, at least sakakey does. Sakakey also fails to enter "ignore" mode correctly and still suppresses esc making it impossible to exit lighbox without putting site to blacklist.

I agree that keybindings should be configurable. People using keyboard navigation (Sakakey, VimFX (yeah, rip)) can temporarily disable them. At least I do with websites with decent hotkeys (TT-RSS). Websites' hotkeys could interfere with extensions but I think most of them can suppress websites' hotkeys, at least sakakey does. Sakakey also fails to enter "ignore" mode correctly and still suppresses `esc` making it impossible to exit lighbox without putting site to blacklist.
Owner

I don't think keybinds should necessarily be configurable at this early stage, but we do need to add them asap since we're adding them, so making some sort of framework/reusable base for them would be great.

I don't think keybinds should necessarily be configurable at this early stage, but we do need to add them asap since we're adding them, so making some sort of framework/reusable base for them would be great.
Owner

I'll take your word for it that they won't get in the way of different plugins (that I don't use) and we're fine with this for now.

I'll take your word for it that they won't get in the way of different plugins (that I don't use) and we're fine with this for now.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma/pleroma-fe!1863
No description provided.