Make the annotation and click-preview hotkeys switch on what they need

Ctrl+Alt+Shift+A did nothing while the master switch was off, and
Ctrl+Alt+Shift+Y did nothing unless the master switch and the click
effects were both on, with no feedback. They now enable what is missing
(and persist it, like the other toggles) before acting. Document the Y
hotkey in both READMEs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-30 09:12:17 +01:00
parent 23f72eff3d
commit 105b4be66e
3 changed files with 23 additions and 2 deletions
+3
View File
@@ -78,6 +78,9 @@ Prérequis à l'exécution :
| `Ctrl+Alt+Shift+F` | Mode focus | | `Ctrl+Alt+Shift+F` | Mode focus |
| `Ctrl+Alt+Shift+A` | Mode annotation | | `Ctrl+Alt+Shift+A` | Mode annotation |
| `Ctrl+Alt+Shift+X` | Effacer les annotations | | `Ctrl+Alt+Shift+X` | Effacer les annotations |
| `Ctrl+Alt+Shift+Y` | Montrer l'effet de clic à l'emplacement du pointeur |
Le mode annotation et l'aperçu du clic activent ce dont ils ont besoin (l'interrupteur général, et les effets de clic pour l'aperçu) lorsque c'est éteint.
**Dessiner.** Maintenez la touche `Ctrl` de droite et bougez le pointeur : un trait suit, puis s'efface après le relâchement. Pour plus de contrôle, ouvrez le **mode annotation** : une barre d'outils apparaît et la surcouche capture la souris et le clavier. **Dessiner.** Maintenez la touche `Ctrl` de droite et bougez le pointeur : un trait suit, puis s'efface après le relâchement. Pour plus de contrôle, ouvrez le **mode annotation** : une barre d'outils apparaît et la surcouche capture la souris et le clavier.
+3
View File
@@ -78,6 +78,9 @@ Run-time requirements:
| `Ctrl+Alt+Shift+F` | Focus mode | | `Ctrl+Alt+Shift+F` | Focus mode |
| `Ctrl+Alt+Shift+A` | Annotation mode | | `Ctrl+Alt+Shift+A` | Annotation mode |
| `Ctrl+Alt+Shift+X` | Clear annotations | | `Ctrl+Alt+Shift+X` | Clear annotations |
| `Ctrl+Alt+Shift+Y` | Show the click effect at the pointer |
Annotation mode and the click preview switch on what they need (the master switch, and the click effects for the preview) when it is off.
**Drawing.** Hold the right `Ctrl` key and move the pointer: a stroke follows and fades away after you release. For more control open the **annotation mode**: a toolbar appears and the overlay captures the mouse and keyboard. **Drawing.** Hold the right `Ctrl` key and move the pointer: a stroke follows and fades away after you release. For more control open the **annotation mode**: a toolbar appears and the overlay captures the mouse and keyboard.
+17 -2
View File
@@ -151,8 +151,23 @@ impl Core {
} }
Err(e) => log::warn!("set {k}: {e}"), Err(e) => log::warn!("set {k}: {e}"),
}, },
Command::ShowClick => self.engine.show_click(now), Command::ShowClick => {
Command::AnnotateToggle => self.engine.toggle_annotation_mode(), // Asking for a preview of the click effect must not silently do nothing: switch on what it needs.
if !self.cfg.general.enabled || !self.cfg.clicks.enabled {
self.cfg.general.enabled = true;
self.cfg.clicks.enabled = true;
self.commit();
}
self.engine.show_click(now);
}
Command::AnnotateToggle => {
// Annotation mode only starts while the master switch is on; leaving it needs nothing.
if !self.cfg.general.enabled {
self.cfg.general.enabled = true;
self.commit();
}
self.engine.toggle_annotation_mode();
}
Command::AnnotateClear => self.engine.clear_annotations(), Command::AnnotateClear => self.engine.clear_annotations(),
Command::Reload => self.reload(), Command::Reload => self.reload(),
Command::Status(tx) => { Command::Status(tx) => {