Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

feat(svg-editor): keyboard shortcuts

WodenJay5ff62dc29761
diff --git a/skills/ppt-master/scripts/svg_editor/static/app.js b/skills/ppt-master/scripts/svg_editor/static/app.js
index e77f9012..410e3371 100644
--- a/skills/ppt-master/scripts/svg_editor/static/app.js
+++ b/skills/ppt-master/scripts/svg_editor/static/app.js
@@ -360,6 +360,37 @@
updateSelectionPanel();
}
+ // ================================================================
+ // Keyboard shortcuts
+ // ================================================================
+ function initKeyboardShortcuts() {
+ document.addEventListener("keydown", function (e) {
+ // Ctrl+A / Cmd+A: select all elements
+ if ((e.ctrlKey || e.metaKey) && e.key === "a") {
+ // Don't intercept if focus is in textarea
+ if (document.activeElement === annotationText) return;
+
+ e.preventDefault();
+ var svg = svgContent.querySelector("svg");
+ if (!svg) return;
+
+ svg.querySelectorAll(".svg-selectable").forEach(function (el) {
+ var eid = el.id;
+ if (eid) {
+ selectedElementIds.add(eid);
+ el.classList.add("svg-selected");
+ }
+ });
+ updateSelectionPanel();
+ }
+
+ // Escape: clear selection
+ if (e.key === "Escape") {
+ clearSelection();
+ }
+ });
+ }
+
// ================================================================
// 6. Add annotation -- POST /api/slide/{name}/annotate
// ================================================================
@@ -568,4 +599,5 @@
// ================================================================
loadSlides();
initRubberBand();
+ initKeyboardShortcuts();
})();