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

Ctrl + Shift + . for changing fonts also selects next synonym #132

Open
rayzhv opened this issue Aug 1, 2020 · 3 comments
Open

Ctrl + Shift + . for changing fonts also selects next synonym #132

rayzhv opened this issue Aug 1, 2020 · 3 comments

Comments

@rayzhv
Copy link

rayzhv commented Aug 1, 2020

On Windows 10.0.18362
Left v130

When I put the cursor at the end of a word that has synonyms and try to change fonts using the Ctrl + Shift + . shortcut, the font changes successfully but the word gets replaced with the next synonym. This seems to be an unintentional side effect of changing fonts.

@codemacabre
Copy link

codemacabre commented Aug 22, 2020

I've noticed similar behaviour after using almost any shortcut involving Shift. In my particular case, I often use Ctrl + Shift + Left Arrow or Ctrl + Shift + Right Arrow to select several words but due to the synonym dictionary, it seems that the Shift key causes it to replace with a synonym instead.

@rayzhv Do you get the same synonym-changing behaviour by just pressing Shift after initially triggering this with Ctrl + Shift + . ?

@codemacabre
Copy link

A cursory glance at the code suggests that this may be the reason:

document.onkeyup = (e) => {
if (e.keyCode === 16) { // Shift
left.stats.applySynonym()
left.update()
return
}

My understanding of the keyboard shortcut is for the combination of Shift + Tab to initiate a sort of 'synonym mode', then releasing the Shift would enter the synonym, but it appears that releasing the Shift does this anyway; there doesn't appear to be any check for when to apply a synonym or not, other than whether a synonym is available / selected when the Shift key is released.

@neauoire do you have any flags for when the user is in 'synonym mode' or anything like that, or would you object to something like that being implemented?

@Lucaffo
Copy link

Lucaffo commented Jun 28, 2021

I've realized that can be a keyboard layout problem. In most non US Keyboard to do a '[' you have to use shift+alt. In a US keyboard you have to press only the '[' key.

This means that, if you don't have an american keyboard, you can't use most of the shortcuts. 😭

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

No branches or pull requests

3 participants