Skip to content

AI-native design editor. Open-source Figma alternative.

Update src/app/shell/keyboard/opacity.ts

Sadko183019fe849a
diff --git a/src/app/shell/keyboard/opacity.ts b/src/app/shell/keyboard/opacity.ts
index 93dce8d94..13c846108 100644
--- a/src/app/shell/keyboard/opacity.ts
+++ b/src/app/shell/keyboard/opacity.ts
@@ -13,15 +13,25 @@ type OpacityShortcutOptions = {
const DIGIT_OPACITY = {
Digit0: 1,
+ Numpad0: 1,
Digit1: 0.1,
+ Numpad1: 0.1,
Digit2: 0.2,
+ Numpad2: 0.2,
Digit3: 0.3,
+ Numpad3: 0.3,
Digit4: 0.4,
+ Numpad4: 0.4,
Digit5: 0.5,
+ Numpad5: 0.5,
Digit6: 0.6,
+ Numpad6: 0.6,
Digit7: 0.7,
+ Numpad7: 0.7,
Digit8: 0.8,
- Digit9: 0.9
+ Numpad8: 0.8,
+ Digit9: 0.9,
+ Numpad9: 0.9
} as const
export function bindOpacityKeys({ store, setOpacityTarget, runCommand }: OpacityShortcutOptions) {
@@ -29,7 +39,7 @@ export function bindOpacityKeys({ store, setOpacityTarget, runCommand }: Opacity
if (isEditing(e)) return
if (store.state.editingTextId) return
if (store.state.numberFieldFocused) return
- if (e.metaKey || e.ctrlKey || e.altKey) return
+ if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return
if (store.state.selectedIds.size === 0) return
if (!(e.code in DIGIT_OPACITY)) return