mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-07 22:44:16 +00:00
fix(macos): keep Return for IME marked text commit (#25178)
Co-authored-by: jft0m <9837901+bottotl@users.noreply.github.com>
This commit is contained in:
@@ -15,6 +15,7 @@ Docs: https://docs.openclaw.ai
|
||||
|
||||
### Fixes
|
||||
|
||||
- macOS/IME input: when marked text is active, treat Return as IME candidate confirmation first in both the voice overlay composer and shared chat composer to prevent accidental sends while composing CJK text. (#25178) Thanks @bottotl.
|
||||
- macOS/Voice wake routing: default forwarded voice-wake transcripts to the `webchat` channel (instead of ambiguous `last` routing) so local voice prompts stay pinned to the control chat surface unless explicitly overridden. (#25440) Thanks @chilu18.
|
||||
- macOS/Gateway launch: prefer an available `openclaw` binary before pnpm/node runtime fallback when resolving local gateway commands, so local startup no longer fails on hosts with broken runtime discovery. (#25512) Thanks @chilu18.
|
||||
- macOS/Voice input: guard all audio-input startup paths against missing default microphones (Voice Wake, Talk Mode, Push-to-Talk, mic-level monitor, tester) to avoid launch/runtime crashes on mic-less Macs and fail gracefully until input becomes available. (#25817) Thanks @sfo2001.
|
||||
|
||||
@@ -185,6 +185,11 @@ private final class TranscriptNSTextView: NSTextView {
|
||||
self.onEscape?()
|
||||
return
|
||||
}
|
||||
// Keep IME candidate confirmation behavior: Return should commit marked text first.
|
||||
if isReturn, self.hasMarkedText() {
|
||||
super.keyDown(with: event)
|
||||
return
|
||||
}
|
||||
if isReturn, event.modifierFlags.contains(.command) {
|
||||
self.onSend?()
|
||||
return
|
||||
|
||||
@@ -486,6 +486,10 @@ private final class ChatComposerNSTextView: NSTextView {
|
||||
override func keyDown(with event: NSEvent) {
|
||||
let isReturn = event.keyCode == 36
|
||||
if isReturn {
|
||||
if self.hasMarkedText() {
|
||||
super.keyDown(with: event)
|
||||
return
|
||||
}
|
||||
if event.modifierFlags.contains(.shift) {
|
||||
super.insertNewline(nil)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user