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

Flip Language Shortcut #12

Closed
adham-elaraby opened this issue Apr 15, 2021 · 7 comments · Fixed by #15
Closed

Flip Language Shortcut #12

adham-elaraby opened this issue Apr 15, 2021 · 7 comments · Fixed by #15
Labels
enhancement New feature or request

Comments

@adham-elaraby
Copy link

Have been looking for a front end for a while, this is a great implementation!

However I do find the Google Ctrl + Shift + S shortcut--which switches the input language--very helpful.

Maybe this could be a future addition/enhancement.

Regards

@itsnotsaved
Copy link

On Gtranslate, it auto switch translation language to source language when select translation language as source language. I guess you can understand what i said ;)

@thedaviddelta
Copy link
Owner

Hello and thank for your interest in the project.

I've just created a branch for this enhancement, and added the language switch hotkey, as well as a theme switch one.
The problem is that nearly all the Ctrl or Ctrl+Shift shortcuts are taken by web browsers. I've been investigating and, in the case of Ctrl+Shift, only Q, U, D, F and L are available in all browsers. Even though the Ctrl+Shift + S one, it's only taken by Firefox.

For the moment I've added Ctrl+Shift + S as the language switch hotkey, just like GTranslate, and Ctrl+Shift + U as the theme switch, but we'd have to think maybe about picking more fitting hotkeys (so we change the second to a taken but more fitting one) or picking hotkeys that aren't taken by browser (so we change the first to an available one).

What do you think?

Regards, David.

PS: About @itsnotsaved comment, I've understood you and I think it's a good solution. Currently Lingva simply doesn't show the taken language but I'm looking forward to changing it in this PR even though it has no correlation with shortcuts.

@thedaviddelta thedaviddelta added the enhancement New feature or request label Apr 19, 2021
@adham-elaraby
Copy link
Author

Perfect it works! Currently I'm on Firefox and had to disable the Ctrl + Shift +S shortcut from the settings, but I do understand that this wouldn't be ideal for everyone.

Perhaps using the Alt key would open up new possibilities like Ctrl + Alt + S

@thedaviddelta
Copy link
Owner

I've thought about that, but I don't like the idea of using Alt as a modifier as it isn't commonly used in websites because operating systems usually have their own Alt hotkeys, and because it's not considered very ergonomic.
I'm open to any suggestion for both hotkeys (mainly using Ctrl or Ctrl+Shift) from anyone as there's no special hurry to get this to production.

@thedaviddelta
Copy link
Owner

At the end I added both Ctrl + Shift + S and Ctrl + Shift + F for swapping the languages, and Ctrl + Shift + L for swiching the theme. What do you think? I'll merge de PR tonight.

@adham-elaraby
Copy link
Author

Thats a good solution

@thedaviddelta
Copy link
Owner

Glad you liked it!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants