Mattermost, Inc.

Accepting Pull Requests: Keyboard Shortcuts

Hi everyone! We’d also like to share our plan for keyboard shortcuts.

Same thing as the slash commands thread, we’d love to get help and feedback from community members interested in implementing features.

f you’re interested in being a part of this effort, please join the discussion here and share what you’d like to work on. We can discuss any questions about the shortcuts, and open accepting pull request tickets for people to work on.

1 Like

Scrolling through messages in the current channel is at least awkward, or not even possible, with keyboards that lack PgUp/PgDn/Home/End keys. For example, the MacBook Pro and Apple’s Magic Keyboard do not have such keys, but they do offer arrow keys.

Therefore, it would be great if Mattermost keyboard shortcuts could be customized by users. The main customization I would prefer would be to use [up arrow] and [down arrow] to scroll through messages. (I have no need for editing my last message, so I wouldn’t care if that shortcut became unbound, or I could rebind it to something else.)

I think all the keyboard actions should be made user-customizable in Mattermost.

It would be very useful to support some of the UNIX-like and Emacs-like input buffer navigation shortcuts. Users of UNIX shells, Emacs, and IRC clients like irssi are very familiar with these keyboard shortcuts.

For example, off the top of my head: (edit: these are not done, as of Mattermost 2.1):

  • CTRL P: load previous input buffer from input history
  • CTRL N: load next input buffer from input history
  • CTRL U: delete current line
  • CTRL W: delete word preceding cursor

Edit: oops, my bad, these are actually already done, as of Mattermost 2.1:

  • CTRL A: move cursor to beginning of input buffer
  • CTRL E: move cursor to end of input buffer
  • CTRL B: move cursor backward one character in input buffer
  • CTRL F: move cursor forward one character in input buffer
  • CTRL D: delete next character (to the right of the cursor)
  • CTRL K: kill line from cursor to end of line

Customizable shortcuts might be something good to add in future - for your scrolling case though, we should probably just add an additional shortcut that works better, I don’t think customizing the built-in browser commands makes sense.

What operating system are you on? Most of these seem to work for me already on OS X, with the exception of CTRL U and CTRL W.

My bad, you’re right, most of the ones I cited are already done. I should have tested first, sorry. I’ve edited the post for clarity.

But the ones that remain unfinished, CTRL P/N and CTRL U and W, are pretty useful and common. What do you think about those?

I’m on OS X, by the way.

My concern is that scrolling is such a frequently-used action, on my MacBook I’d really like it to be bound to my up/down arrows. That way I only have to hit one button to activate it, rather than two. I scroll messages all the time, much more frequently than I edit messages. (Especially since there isn’t a compact theme yet.)

Would it make sense to add an option, “Use up/down arrow keys for message scrolling (note: this disables up-arrow for editing last message)”? That would be very useful for many people while the general shortcut customization feature is being developed.

I would definitely rip off Slack Shortcuts here (specially the ones related to navigation) since it is the major complaint after migrating from it.

These guys were used pretty often, even by non-tech people:

  • CMD/CTRL + K: Open quick switcher (we would still need the quick switcher).
  • Alt + Shift + Up: Previous channel or direct message with unread messages.
  • Alt + Shift + Down: Next channel or direct message with unread messages.
  • Alt + Left: Previous channel in your history.
  • Alt + Right: Next channel in your history.

I would not be conservative and tie those shortcuts to a single setup though, once we agree on a list of them we can easily create multiple setups. :stuck_out_tongue_closed_eyes:

Thanks for the feedback @augustohp! I agree that those ones are important, I think they’re all covered in the list. Having a quick channel switcher is probably one of the most important ones in my mind.

Would you be interested in working on any of these navigation related shortcuts?

I can see how that would be useful until the customization feature is developed, if you’re interested in working on it we could probably open an accepting pull requests ticket on it.

I definitely would!
Some guidance would be much welcome though :blush:

It would be awesome to have the switcher but what parts do we have and what are the ones we don’t. How we would implement it on Mattermost? Should I come up with an implementation so you could have a look?

PS: I have no background in Go but I managed to do my first pull request recently, that is why the outlines and design discussions are so valuable to me. I don’t feel confident to do it all by myself.

Hi @augustohp, if you want to discuss specific questions it might be easiest to join the developers channel in our team site https://pre-release.mattermost.com/core. There’s also a UX Design channel for discussing UX questions.

+1 for using the slack list as a starting point

Hi!

One of my favorite Mattermost feature is the possibility to reply directly to a message. In a previous forum post i a keyboard shortcut was planned to be able to do this however I don’t see it back in the current googledocs sheet. Is this something that could be reintroduced?

link to previous forum post:
http://forum.mattermost.org/t/keyboard-shortcuts/520/3

Thanks @James56 for the feedback!

I’m not aware of plans to add a shortcut to reply to a message quite yet. The image you’re referencing to has a shortcut to add an emoji reaction for the previous message.

If you would like to see the feature implemented, I encourage you to add a feature request in our Feature Idea forums so it can be discussed (for instance, which shortcut would make most sense) and upvoted.