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

Keyboard short-cut support for posting toots #20

Closed
caetano-m opened this issue Nov 28, 2022 · 4 comments
Closed

Keyboard short-cut support for posting toots #20

caetano-m opened this issue Nov 28, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@caetano-m
Copy link

A keyboard short-cut for posting toots would be very useful, since I usually am using the keyboard for composing the toot. Changing to the mouse cursor just so I can press "publish" feels unnatural and unnecessary. Additionally, there could be a composing new toot short-cut too.
Proposed short-cuts:

  • Posting toot (Ctrl+Enter)
  • New toot (Ctrl+N)

(PS: thank you very much for rescuing/enhancing this project!)

@caetano-m caetano-m added the bug Something isn't working label Nov 28, 2022
@GeopJr
Copy link
Owner

GeopJr commented Nov 28, 2022

Thanks for raising this issue!

There's already a shortcut for the New toot dialog - Ctrl + T. I'm not sure about adding a shortcut for the Publish button as you can just press Shift + Tab once (or Tab until it cycles through everything and reaches the Publish button again).

Is there another reason for it I'm missing (e.g. for mobile devices)? (not that Ctrl + Enter sounds bad but if we can avoid accidental toots, I'd opt in for that)

@caetano-m
Copy link
Author

caetano-m commented Nov 28, 2022

There's already a shortcut for the New toot dialog - Ctrl + T.

oh I see, thanks for that!

About using Shift + Tab an then Enter, I think this adds an extra step and makes the short-cut less welcoming to users who are not heavy keyboard users but still uses key short-cuts from time to time.

Another, perhaps stronger reason for a Ctrl + Enter is that it is how it works on mastodon web. Ctrl + Enter seems to be a very common short-cut for posting when Enter is not doing the job, in my experience.

Possible accidental toots is a fair point against the short-cut, and I understand if you see that as a deal-breaker, but I believe that since it needs two keys pressed simultaneously accidental toots won't be a frequent issue, as it is already not on web. Accidental posting seems more of a frequent problem when Enter = send and Shift + Enter = new line.

@GeopJr
Copy link
Owner

GeopJr commented Nov 29, 2022

Sounds good then, thanks for the info!

@GeopJr
Copy link
Owner

GeopJr commented Nov 29, 2022

Should be done as of 649362d

I decided to go with mnemonics for a middle ground between convenience and avoiding accidental executions!

For anyone reading this and is not aware of how to use mnemonics:

When you hold Alt, some labels will have their first letter underlined. This shows you the key combination to execute the related function.

For example, in the dialog below, to execute the "Publish" button, you need to press Alt+P

screenshot of tooth's compose dialog. the textview has "test" as input and the commit button has the label "Publish". The letter "P" is underlined

while for the dialog below, you need to press Alt+R
screenshot of tooth's compose dialog. the textview has "test" as input and the commit button has the label "Reply". The letter "R" is underlined

Thanks for the suggestion!

@GeopJr GeopJr closed this as completed Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants