AwesomeTTS / awesometts-anki-addon

AwesomeTTS text-to-speech add-on for Anki
GNU General Public License v3.0
481 stars 100 forks source link

Hotkey (crtl + T) doesn't work in browser #161

Open cereska opened 3 years ago

cereska commented 3 years ago

Hey,

when I'm in browser and want to add a sound to existing note and press the ctrl + t hotkey, nothing happens. The add-on window doesn't show up. It works fine when adding audio to new notes. Would you be able to look into that? Thanks in advance.


Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2 Platform: Windows 10 AwesomeTTS v1.28 (but it also happened in the past few versions)

luc-vocab commented 3 years ago

Could you try running with debug logging enabled (https://github.com/AwesomeTTS/awesometts-anki-addon/wiki/Debug-Logging) and see whether anything gets printed to the log file when you press Ctrl+T ?

cereska commented 3 years ago

Hey, this is what is in the log file:

20210315-08:30:41,686 DEBUG [config.py:64] Executing 'SELECT name FROM sqlite_master WHERE type=? AND name=?' with ('table', 'general') 20210315-08:30:41,686 DEBUG [config.py:67] Executing 'PRAGMA table_info(general)' 20210315-08:30:41,686 DEBUG [config.py:67] Executing 'SELECT * FROM general' 20210315-08:30:41,800 DEBUG [connectionpool.py:428] https://ankiweb.net:443 "POST /update/desktop HTTP/1.1" 200 57

Still experiencing the same in AwesomeTTS v1.35.

edit: Attaching full debug info just in case.

Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 10
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2021-03-15 08:00:04

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
'' ['BeautifyAnki', 0, 'None', mod]
Add Table ['1237621971', 2020-07-25T14:19, 'None', mod]
AnkiWebView Inspector ['31746032', 2019-05-03T00:43, 'None', '']
AwesomeTTS - Add speech to your flashcards ['1436550454', 2021-03-15T02:26, 'None', '']
Batch Remove Formatting eg bold italics etc ['1734822644', 2018-09-24T17:34, 'None', '']
Beautify Anki Material design  Deck Background and icon  ['1150874988', 2020-05-31T02:53, 'None', '']
Customize Sidebar ['1988760596', 2020-01-15T22:01, 'None', mod]
Hierarchical Tags 2 ['594329229', 2021-03-07T03:25, 'None', '']
Korean Support ['1336389630', 2021-02-24T22:35, 'None', mod]
Life Drain ['715575551', 2020-08-13T15:25, 'None', '']
Mini Format Pack ['295889520', 2018-07-24T19:45, 'None', '']
No Distractions Full Screen Clean review interface  TabletTouch support ['1049863218', 2020-08-14T00:59, 'v4.1.8', mod]
Quizlet to Anki 21 Importer with audio support ['1362209126', 2020-09-10T19:28, 'None', '']
Resize images in editor ['1103084694', 2020-08-02T15:04, 'None', mod]
Review Heatmap ['review_heatmap', 2020-04-30T15:23, 'None', '']
Search and Replace Tags ['138501288', 2017-08-29T20:58, 'None', '']
True Retention by Card Maturity ['923360400', 2017-08-29T21:00, 'None', '']
right hand reviews  hjkl answer shortcuts  Handy Answer Keys configurable ['850294128', 2019-12-22T00:40, 'None', '']
zzz Switch Note Type Hotkey ['565948788', 2020-02-14T08:34, 'None', mod]

===IDs of active AnkiWeb add-ons===
1049863218 1103084694 1150874988 1237621971 1336389630 1362209126 138501288 1436550454 1734822644 1988760596 295889520 31746032 565948788 594329229 715575551 850294128 923360400

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Japanese Support ['3918629684', 2019-07-12T08:54, 'None', '']
Kanji Colorizer stroke order diagrams ['1964372878', 2020-11-03T19:33, 'None', '']
Spelling Police ['1410276506', 2020-03-03T03:13, 'None', mod]
True Retention ['613684242', 2017-11-19T21:43, 'None', '']
luc-vocab commented 3 years ago

Hi, are you still having this issue in the latest versions ?

cereska commented 3 years ago

Hey, unfortunately the issue still persists on Anki 2.1.35&2.1.44 and AwesomeTTS 1.47.

luc-vocab commented 3 years ago

what happens when you map the shortcut to another key in awesometts, are you able to get it to work ?

cereska commented 3 years ago

Hey, I experimented a bit after reading your comment and it seems that in the default configuration, the "Ctrl + T" shortcut is mapped for everything except audio removal. That means that in browser, both mass adding audio to selected notes and adding audio to an active field of a selected note are under the same hotkey. My bet is Anki doesn't know which of the windows should be opened, so that's why just doesn't show any xD

I changed the hot-key for mass adding audio to something else and finally the ctrl + T worked in the editor part of the browser :)