element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.25k stars 2.01k forks source link

Document keyboard shortcut for emoji reactions #24398

Open pdurbin opened 1 year ago

pdurbin commented 1 year ago

Your use case

What would you like to do?

Under Settings->Keyboard I'd like to see how to add a reaction to the last post using only my keyboard.

From looking at the following pull request...

... I learned that I can type +:smile: (tab complete is supported) and it works great! The next step is to add it under the existing list of shortcuts, which looks like this as of Element 1.11.22:

Screen Shot 2023-02-01 at 10 46 52 AM

Why would you like to do it?

Because I'm tired of reaching for my mouse every time I'd like to add a reaction to a message. I use a keyboard shortcut for this all the time in Slack.

How would you like to achieve it?

I assume this is just a matter of editing the file or files that power the screenshot above. I took a quick look, but I don't know where they are. I could maybe try to make a pull request if someone points them out, but I've never set up a dev environment for Element, so if someone else can do this quickly, that's fine with me!

Have you considered any alternatives?

I suppose I could maintain my own list of shortcuts.

Additional context

Element and Matrix are awesome! Thank you! ❤️ 🎉 🚀

florianduros commented 1 year ago

Hi, indeed it's a good idea to add this shortcut here!

If you want to contribute to element web. You can take a look to how setup an environment and our contribution guide https://github.com/vector-im/element-web#development

To add this new shortcut, I think it needs to be added here https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/accessibility/KeyboardShortcuts.ts#L209 and https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/accessibility/KeyboardShortcuts.ts#L324

pdurbin commented 1 year ago

@florianduros thanks! I suspect you found the correct areas of the code but I'm going to link them again as permalinks (tied to a version) because I'm not sure how quickly the "develop" branch changes:

I took another look at the contribution guide and I'm a bit intimidated so if anyone listening would like to work on this, please go ahead! 😅