Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More hotkeys / keyboard shortcuts #3232

Closed
2 of 6 tasks
richvdh opened this issue Feb 15, 2017 · 71 comments
Closed
2 of 6 tasks

More hotkeys / keyboard shortcuts #3232

richvdh opened this issue Feb 15, 2017 · 71 comments
Labels
A11y A-Shortcuts Keyboard shortcuts O-Occasional Affects or can be seen by some users regularly or most users rarely T-Enhancement Z-Mozilla

Comments

@richvdh
Copy link
Member

richvdh commented Feb 15, 2017

We have a few requests for extra hotkeys, but I thought a single issue would be useful to help track them.

So far we have:

Working:

  • ctrl-d / ctrl-e in voip calls to mute/unmute mic / camera
  • ctrl-k to jump to named room
  • up/down to navigate within room list
  • tab/shift-tab to navigate focus as normal (other than in MessageComposer, where it tab-completes)
  • page-up/page-down to navigate within the main scrollpanel
  • ctrl-home/ctrl-end to jump to beginning or end of main scrollpanel

Broken:

We should add hotkeys for

This is related to #302, but I think that's more about tab indexes and making it possible to "click" buttons without a mouse, while this is all about hotkeys that don't require particular elements to be focussed.

@albuic
Copy link

albuic commented May 24, 2017

+1 pour le #301 (Next unread room)

@frankiebee
Copy link

frankiebee commented May 26, 2017

Sorry to bug but:

  • ctrl-k to jump to named room
    does not work in macOsx native app or on chrome

  • up/down
    up/down does not seem to work

@t3chguy
Copy link
Member

t3chguy commented May 26, 2017

@frankiebee I believe on Mac it is Cmd+k

@frankiebee
Copy link

that does not work either

@anton-ryzhov
Copy link

What about pretty standard feature — Enter for newline, Ctrl-Enter for send?

And another hotkey-related request. I's really useful to close all chats to keep all messages unread. Currently it can be done with Home button in the bottom of left menu.
Will it be nice to have hotkey for this? For example Telegram uses ESC for this — very convenient and expectable.

@t3chguy
Copy link
Member

t3chguy commented Jun 21, 2017

@anton-ryzhov more commonly its Shift-Enter for newline and Enter for send.

@anton-ryzhov
Copy link

anton-ryzhov commented Jun 21, 2017

@t3chguy Definitely it should be configurable.

@t3chguy
Copy link
Member

t3chguy commented Jun 21, 2017

@anton-ryzhov it's down to your browser how it handles input boxes

@aperezdc
Copy link

The Ctrl+K shortcut does not work for me either in WebKitGTK+ based browsers (or in Revolt, which also uses it).

@t3chguy
Copy link
Member

t3chguy commented Jun 21, 2017

Ctrl+K was removed while a PR undergoes testing, it will be added back when it is tested. matrix-org/matrix-react-sdk#895

@anton-ryzhov
Copy link

@t3chguy

it's down to your browser how it handles input boxes

What do you mean? It is a <textarea> , it doesn't send form by default in browsers. But in riot it does — this is riots behaviour, no?

@t3chguy
Copy link
Member

t3chguy commented Jun 21, 2017

Depends, it can also be a contenteditable div.
<div aria-describedby="placeholder-1soc8" class="public-DraftEditor-content" contenteditable="true" role="textbox" spellcheck="true" style="outline: none; white-space: pre-wrap; word-wrap: break-word;"><div data-contents="true"><div data-block="true" data-editor="1soc8" data-offset-key="2cmcm-0-0"><div data-offset-key="2cmcm-0-0" class="public-DraftStyleDefault-block public-DraftStyleDefault-ltr"><span data-offset-key="2cmcm-0-0"><br data-text="true"></span></div></div></div></div>

but yes the handling could be defined in riot, feel free to contribute a PR

@tanius
Copy link

tanius commented Jul 4, 2017

Adding to the list :-)

  • Ctrl+Home / Ctrl+End to jump to beginning or end of multiline text input in the Composer. "Like in normal editors."
  • Ctrl+PageUp / Ctrl+PageDown to jump to beginning / end of the main scrollpanel. Currently assigned to Ctrl+Home / Ctrl+End but needs a new binding if implementing the task just above. PageUp / PageDown currently scrolls through the main scrollpanel, so the new proposal seems a good fit to me.

Edit: Forget these. I just saw in riot.im/develop/ (with the "New Composer" enabled) that the Up and Down arrow buttons will now move the caret to the very beginning / very end when in the first / last line, respectively. So one can simply keep them pressed until at the very first / last character. Since chat messages are just a few lines, that's perfectly fine.

@Alpherie
Copy link

Enter for newline, Ctrl-Enter for send would definitely be nice, I prefer this way.

@coreinsane
Copy link

It would be nice to Bind the shortcuts for yourself, for example on mouse buttons, and so on.

@t3chguy
Copy link
Member

t3chguy commented Aug 9, 2017

@coreinsane I presume you mean on electron app as mouse buttons tend to be bound at browser level

@coreinsane
Copy link

Yes you got the point, im using windows desktop client.

@coreinsane
Copy link

Is there any improvement on windows desktop client hotkey features? Like customisable hotkeys, can be bound on mouse, etc.

@pvagner
Copy link
Contributor

pvagner commented Nov 9, 2017

It would be nice to add some more hotkeys related to the infinite scrolling functionality of the room timeline because hotkeys such as ctrl+home, ctrl+end, pageup and page down are usually clashing with standard browser keyboard commands when caret browsing is turned on (e.g. by pressing F7 in Firefox). I would like to have at least shortcuts for scrolling to the bottom and then scroll to prev / next page.

@eatonphil
Copy link

Are Riot hotkeys documented somewhere permanently?

@ptman
Copy link
Contributor

ptman commented Jan 3, 2019

@eatonphil I started documenting them here #7165

@BurnyBoi
Copy link

BurnyBoi commented Feb 7, 2019

I would like to suggest another one that might be useful:

ctrl + alt + (up or down) - Navigate between your community filters on the left nav. This is similar to what happens in Discord to switch between guilds.

@madduck
Copy link

madduck commented Feb 7, 2019

All of these shortcuts should be configurable. Please do not create a jumble of hardcoded key combos.

@SimonBrandner SimonBrandner added O-Occasional Affects or can be seen by some users regularly or most users rarely and removed P2 labels Dec 27, 2021
@HarHarLinks
Copy link
Contributor

Add keys to open Threads, Pins, Notifications panels.

@lech
Copy link

lech commented Jul 10, 2022

All of these shortcuts should be configurable. Please do not create a jumble of hardcoded key combos.

This would be seriously helpful as rather than CTRL+Y to redo CTRL+SHIFT+Z is an alternate key combination to perform the same thing in most modern applications depending on the platform.

In addition in one of the latest updates the "Search" icon is now just displaying as "CTRL+K" when the sidebar is collapsed 😞

@presto8
Copy link

presto8 commented Dec 4, 2022

What is the policy or thinking of multiple shortcuts for the same action? I prefer to keep my fingers on the home row which makes accessing the arrow keys non-optimal. Shortcuts like Alt+Shift+Down for next unread room are very awkward to type for people used to vim/emacs type bindings.

Ctrl+K is wonderful for jump to room. Would it be possible to get Ctrl+J to "jump" to next unread conversation (Ctrl+Shift+J cycles back in the list.)

Thanks!

@vertigo220
Copy link

It was already mentioned, but ctrl+tab is used pretty universally to switch back and forth between tabs in all browsers, Notepad++, PDF programs, etc, and I definitely think it should be used here for switching back and forth between rooms. The best implementation of this would be to show a drop-down list of rooms when it's pressed, and pressing it once just switches back to the last room whereas holding the ctrl key down and pressing tab repeatedly moves through the list to choose a different room. See Notepad++ for an example.

Hotkeys should also be customizable if at all possible, so people can decide for themselves which ones they want and don't want and what key combinations they want to use for them. That would solve a lot of issues of people asking for specific hotkeys or asking if changes can be made to them.

@HarHarLinks
Copy link
Contributor

ctrl+tab is used pretty universally to switch back and forth between tabs in all browsers

exactly the reason that element can't adopt this shortcut: it (at least E web) runs in the browser.

@vertigo220
Copy link

exactly the reason that element can't adopt this shortcut: it (at least E web) runs in the browser.

Fair enough. Too much work to have separate shortcuts in browser vs desktop I take it? Because it would work in desktop, but I can see that might be more work having two separate versions to maintain.

@Miirek
Copy link

Miirek commented Feb 26, 2024

Please add a ⌘-0 (CMD+zero) app shortcut to call main conversation window. I cannot do it by myself because menu field is changing with room title. In mac app version, of course ;-)
Thanx, M.

@t3chguy
Copy link
Member

t3chguy commented Feb 26, 2024

Cmd-0 is a pre-existing browser shortcut for reset zoom.

image

@Miirek
Copy link

Miirek commented Feb 26, 2024

Ah, I see. It also depends on localization. In my case it is ⌘-é So I suggest ⌘-1 or something else - the need to pick mouse, find minimized window and click is quite frustrating and time consuming - when you are used to use mostly keyboard ;-) Most mac apps uses some kind of a shorcut to view main app window (mail, messages, even MS Skype does ...)

@t3chguy
Copy link
Member

t3chguy commented Feb 26, 2024

You just want it to open the app? You can normally do this in your OS. https://support.apple.com/en-gb/guide/mac-help/mchlp2271/mac#:~:text=On%20your%20Mac%2C%20choose%20Apple,Keyboard%20Shortcuts%20on%20the%20right.&text=Select%20App%20Shortcuts%20on%20the,specific%20app%20or%20All%20Applications.

Element is a single instance app so it'll open the existing window if the app is already running.

@Miirek
Copy link

Miirek commented Feb 26, 2024

@t3chguy - thanks for quick response ... sure, application is already opened - but window is minimized. When I want to focus to the main window I use ⌘-tab to switch between apps until its Element and sometimes window pops up (it was only in background, behind other windows) but very often nothing shows. This means window is minimized and must be clicked. And from some other apps I'm used to push ⌘-0 or ⌘-1 or ⌘-⇧-0 or something else to call main window. It seems to me, that adding simple shortcut to the window is easiest way to achieve it ;-) Sometimes it can be done without developers assistance, but its not this case - menu item with main window has mutating title, so I cant assign a hotkey from outside.
Adding global hotkey is not always working - one has to choose an unusual combination which doesnt already exist ...
Anyway, thanks for your time.

@t3chguy
Copy link
Member

t3chguy commented Feb 26, 2024

Why can you not assign the global hotkey to just run the Element.app executable rather than trying to do magic dependant on window titles?

@Miirek
Copy link

Miirek commented Feb 26, 2024

I have one - ⌘-⇧-^-E - this is a combination which works for me and is not in conflict with some other app. I'm just suggesting to follow a common (IMHO) behavior ...

@t3chguy
Copy link
Member

t3chguy commented Feb 26, 2024

Adding such a global shortcut would be blocked on the ability to have customisable keybinds otherwise it'd conflict for people, we avoid global shortcuts for that reason

@Miirek
Copy link

Miirek commented Feb 26, 2024

I don't want global - I don't like it, it can cause problems, conflicts, unintended behavior and so. I prefer local, in-app shortcut.

@t3chguy
Copy link
Member

t3chguy commented Feb 26, 2024

Sorry, how would a non-global shortcut help you bring the app to foreground given it wouldn't be receiving keys if it wasn't already in foreground focus?

@Miirek
Copy link

Miirek commented Feb 27, 2024

As described earlier - I switch between apps using ⌘-Tab to focus to Element and then I miss a shortcut to call minimized window. Thats all.
image

@t3chguy
Copy link
Member

t3chguy commented Feb 27, 2024

Sure, but if its minimized then a local shortcut won't be picked up, only a global one would, as the window is not in focus.

@Miirek
Copy link

Miirek commented Feb 27, 2024

Hmmm, I dont agree, try with, for example, Messages app - minimize app window and press ⌘-0 and you will see window coming to the screen. Even when the window is closed. Of course you must have Messages active and focused (in top bar)

@t3chguy
Copy link
Member

t3chguy commented Feb 27, 2024

It may well be that way in Messages, but AFAICT it isn't that way for Electron apps

@Miirek
Copy link

Miirek commented Feb 27, 2024

Thats something I don't know. I've assumed, that Skype is an Electron app also. And it has such a shortcut.

@CyberShadow
Copy link

CyberShadow commented Feb 27, 2024

To configure a local keyboard shortcut, you need to specify an accelerator property when creating a MenuItem within the Menu module.

Could it be this? Just a menu item accelerator? It would track with this:

Of course you must have Messages active and focused (in top bar)

So if the app's global menu is active, then its menu shortcuts should also be in effect.

@richvdh
Copy link
Member Author

richvdh commented Feb 27, 2024

This issue appears pretty outdated. At least some of the things under the "broken" and "things we should add" lists are now fixed. In any case, it's never going to be "done".

As the original reporter, I'm not really interested in the debate about the particular intricacies of global shortcuts in OSX. I'd suggest if you want to continue the conversation you open a specific issue for it. Meanwhile, I'm closing this one.

@richvdh richvdh closed this as completed Feb 27, 2024
@CyberShadow
Copy link

I'm not really interested in the debate about the particular intricacies of global shortcuts in OSX

@richvdh I think you can click "Unsubscribe" and stop receiving notifications even if you're the author.

FWIW / FYI, I see @t3chguy edited the issue to track the status of some items, so perhaps it might not be useful to you but it might be useful for the project? (I don't have an opinion either way)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11y A-Shortcuts Keyboard shortcuts O-Occasional Affects or can be seen by some users regularly or most users rarely T-Enhancement Z-Mozilla
Projects
None yet
Development

No branches or pull requests