The previous implementation had inverted logic that prevented keyboard shortcuts from working. The check `shortcut.ctrl ? event.ctrlKey : !event.ctrlKey` meant that if ctrl wasn't specified, it required ctrl to NOT be pressed, which broke shortcuts with only meta keys. **Changes:** - Fix modifier matching: only check modifiers that are explicitly required (=== true) - Add check to prevent unwanted modifiers (e.g., if only meta+c, reject ctrl+meta+c) - Improve cross-platform meta/cmd key handling (Mac uses metaKey, Windows/Linux uses ctrlKey) - Allow meta key to permit ctrl on non-Mac platforms (meta is treated as ctrl equivalent) **Now working shortcuts in playground:** - Cmd/Ctrl+C: Copy color to clipboard - Cmd/Ctrl+S: Share color (copy URL) - Cmd/Ctrl+R: Generate random color 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.8 KiB
2.8 KiB