element-hq / element-call

Group calls powered by Matrix
https://call.element.io
GNU Affero General Public License v3.0
590 stars 91 forks source link

Keyboard shortcuts #218

Open jaywink opened 2 years ago

jaywink commented 2 years ago

I keep trying to use 'm' to mute/unmute like in Jitsi. Or ctrl+d like in Meet. Having tried to look around the UI for keyboard shortcuts, I couldn't find a place where they would be defined.

Are they keyboard shortcuts for mute/unmute for example and what are they?

robertlong commented 2 years ago

@ara4n @jakewb-b @gaelledel any idea what hotkeys we'd want to use and where we might advertise them in the UI? Maybe in the tooltip when you hover over the video/mic mute buttons?

@pixlwave does this interfere with your work? What hotkeys did you choose?

pixlwave commented 2 years ago

It might depend how it is implemented as to whether anything will conflict, but I've used menu bar items so in theory the app will only call the item if it doesn't see the keystroke handled anywhere else. Not that it matters, I can totally remove the shortcuts if they're handled natively anyway.

I was totally unoriginal and went with m for mic toggle and v for video toggle. Will probably add space for push to talk, now I've seen its possible.

robertlong commented 2 years ago

I think we can handle them with window.addEventListener("keydown", onKeyDown) etc.

It won't work if the window isn't focused so you may still want to handle that, especially for something like push to talk.

I don't know that space is a good option for push to talk. It's used as an accessibility key for selecting objects when navigating with tab.

We also should add a few settings to configure these hotkeys. @gaelledel can I add a few text fields for these hotkeys? As in you click the input, it changes the text of the input to say Press any Key or Button and you press the key and then the text changes to that. The setting will be saved in local storage.

BloodyIron commented 2 years ago

Yeah Push to Talk for VoIP has been requested now for Element for over 4 years now. As the original requestor ( https://github.com/vector-im/element-web/issues/5993 ), I still want to see this implemented in Element/Matriox system-wide. And this must work when any of the apps do not have focus, as that typically defeats the point of push to talk. Nobody is going to alt-tab back to the window to push-to-talk, that's problematic workflow that is unrealistic for humans.

And I also agree this should be configurable for which key.