@a83/orbiter-admin 0.3.36 → 0.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/xfce.js +16 -1
package/package.json
CHANGED
package/public/xfce.js
CHANGED
|
@@ -1095,11 +1095,26 @@
|
|
|
1095
1095
|
|
|
1096
1096
|
// ── Keyboard shortcuts ────────────────────────────────────────────────
|
|
1097
1097
|
function bindKeys() {
|
|
1098
|
+
// Capture-phase ⌘K: fires before admin-utils.js bubble-phase listener, stops it
|
|
1099
|
+
document.addEventListener('keydown', function (e) {
|
|
1100
|
+
if ((e.metaKey || e.ctrlKey) && !e.shiftKey && (e.key === 'k' || e.key === 'K')) {
|
|
1101
|
+
e.preventDefault();
|
|
1102
|
+
e.stopImmediatePropagation();
|
|
1103
|
+
if (palette && palette.classList.contains('open')) closePalette();
|
|
1104
|
+
else openPalette();
|
|
1105
|
+
}
|
|
1106
|
+
}, true);
|
|
1107
|
+
|
|
1098
1108
|
document.addEventListener('keydown', function (e) {
|
|
1099
1109
|
var mod = e.metaKey || e.ctrlKey;
|
|
1100
1110
|
|
|
1101
|
-
// ⌘K
|
|
1111
|
+
// ⌘K handled above in capture phase
|
|
1102
1112
|
if (mod && !e.shiftKey && (e.key === 'k' || e.key === 'K')) {
|
|
1113
|
+
return;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
// / — open palette (when not typing in an input)
|
|
1117
|
+
if (!mod && !e.shiftKey && !e.altKey && e.key === '/' && !isEditing(e.target)) {
|
|
1103
1118
|
e.preventDefault();
|
|
1104
1119
|
if (palette && palette.classList.contains('open')) closePalette();
|
|
1105
1120
|
else openPalette();
|