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

The Ctrl T shortcut is not fast enough #301

Open
guillaumebrunerie opened this issue Sep 24, 2023 · 3 comments
Open

The Ctrl T shortcut is not fast enough #301

guillaumebrunerie opened this issue Sep 24, 2023 · 3 comments

Comments

@guillaumebrunerie
Copy link

When creating a new note, the Ctrl T shortcut is supposed to open the AwesomeTTS dialog with the text of the current field copied into AwesomeTTS's field. It mostly works, except that if I press Ctrl T too fast after typing in the field, then AwesomeTTS somehow doesn’t manage to catch up and doesn’t reflect what is in my note. Similarly, I noticed that if I type a first word, pause for a bit, then type a second word and immediately press Ctrl T, then only the first word will be copied.

Would it be possible to make it so that pressing Ctrl T guarantees that what gets copied is exactly what is in the field in the note?

@slabzzz
Copy link

slabzzz commented Oct 15, 2023

I second this. Happened on my mac

@luc-vocab
Copy link
Collaborator

This could have something to do with the typing timer in Anki. Half of anki is in python, the other half is a web app, and the two halves need to communicate when fields are being edited, but this won't happen on every keystroke for performance reasons.

Can you help describe what your workflow is for adding audio ? Do you add the audio tag to the same field where your source text is, or into a separate field ?

@guillaumebrunerie
Copy link
Author

I add the audio in the same field.

So for instance I open the "Add note" dialog with A, it defaults to a very simple type of note with only two fields (front and back). I type a word in the first field, press Tab to move to the next field, type a word there, and then press Ctrl-T and Ctrl-Enter to create and add sound at the end of the second field.

If I wait half a second or so before pressing Ctrl-T, then all works fine, but if I type too fast (without waiting before typing the second word and pressing Ctrl-T), then Ctrl-Enter fails as no word got transferred to the AwesomeTTS dialog.

Is there a way to (synchronously) force synchronization between the web app and the Python backend whenever one presses Ctrl-T, and before opening the AwesomeTTS dialog? That would solve it, I guess.

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