Closed DoctorToBeIn23 closed 3 years ago
sorry for late reply :( I'll work around this asap
Try ctrl+r
. You can customize shortcuts on addon config. Note that r
is already reserved for replaying audio.
I cannot get it to be compatible with https://ankiweb.net/shared/info/24411424
On Thu, Nov 12, 2020 at 4:56 AM 박현우 notifications@github.com wrote:
Closed #31 https://github.com/trgkanki/cloze_hide_all/issues/31.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/trgkanki/cloze_hide_all/issues/31#event-3988305783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOLVAI6LGITNSAVI7E7NQ5DSPPEONANCNFSM4SL5MKWQ .
Do you know if it is easy to manually add it?
On Nov 12, 2020, at 4:35 PM, 박현우 notifications@github.com wrote:
That is because it's not in this list. Refer to that addon.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
You can already modify shortcuts on CHA addon settings, like this.
If you want that custom hotkey addon to support cloze (hide all), consult it on that addon's issues page.
Oh I understand your case. That addon didn't allow any other addon to add its own shortcuts. :(
Proper implementation should append
to original shortcut list, like done in CHA
def newShortuts(self, *, _old):
def _():
self.web.eval("toggle()")
shortcuts = _old(self)
shortcuts.append((getConfig("shortcutToggleMask", "ctrl+r"), _))
return shortcuts
Reviewer._shortcutKeys = wrap(Reviewer._shortcutKeys, newShortuts, "around")
But that addon is replacing the shortcuts entirely.
if config_scuts["Ω enable reviewer"].upper() == 'Y':
Reviewer._shortcutKeys = cs_review_setupShortcuts
Reviewer.sToF = functions.review_sToF
Sadly there's no easy fix, as it is a design flaw of that addon. The best option is to not use that addon, or have that addon reimplemented from scratch.
The easiest fix would be to add this line of code at line 147 of custom_shortcuts.py
(config_scuts["reviewer choice 4"], lambda: self._answerCard(4)),
('ctrl+r', lambda: self.web.eval("toggle()"), # <----------- this
Thanks for all the help, I wasnt able to get both to work together. Maybe the add on author can add this in on his?
Cloze hide all author (Eric) fixed it on his end. Now there is an issue with the shortcut command+r with the review heatmap so I changed the shortcut to command+t so you may want to change the default shortcut on the add on! Thank you for this great add on/card type!
I think it would be great it you made a short cut to toggle the mask with a press of a button, unless there already is and I am just not aware of it.