* Support modifier+key combinations in send-key (ctrl+enter, shift+tab, etc.)
The send-key command only supported a few hardcoded ctrl+letter combos
and bare special keys. Generic modifier combinations like ctrl+enter
(needed for GitHub Copilot CLI submission) returned "Unknown key".
Now the parser splits on + and - separators, accumulates modifier flags
(ctrl, shift, alt/opt, cmd/super), and resolves the base key via a new
keycodeForNamedKey helper that maps named keys (enter, tab, escape,
backspace, space, arrow keys) to virtual keycodes.
Closes#1990
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix delete key mapping and filter empty parts in modifier parser
- Separate "delete" (forward delete, kVK_ForwardDelete) from "backspace"
(kVK_Delete) in keycodeForNamedKey. The original mapping had both
pointing to kVK_Delete (which is actually Backspace on macOS).
- Filter empty strings from split results to reject malformed inputs
like "+shift+a" that would produce an empty modifier part.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fix single named keys silently failing and remove force unwrap in send-key
Single named keys like "space", "up", "delete" were rejected by
guard parts.count >= 2 before reaching keycodeForNamedKey(). Now
standalone named keys are handled before the modifier-combo path.
Also replaced parts.last! with guard let for safe unwrapping.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>