wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
16.12k stars 708 forks source link

Problem with MacBook text-to-speech interaction with Wezterm #3867

Open ArvidHammarlund opened 1 year ago

ArvidHammarlund commented 1 year ago

What Operating System(s) are you seeing this problem on?

macOS

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20230408-112425-69ae8472

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

Macbook text-to-speech isn't able to detect curser selection in Westerm, and is instead constantly repeating the name of the current tab. I don't know whether this is deemed a bug, but I haven't found any setting configuration that was applicable. If there is anyone who faced the same issue, input would be greatly appreciated!

To Reproduce

installation: Homebrew on Mac silicon.

Event: Activate TTS (can be configured in MacBook settings) in any wezterm window.

Configuration

local wezterm = require 'wezterm'

return {
  send_composed_key_when_left_alt_is_pressed = true,
  send_composed_key_when_right_alt_is_pressed = true,
  font_size = 14,
  color_scheme = "Gruvbox dark, medium (base16)",
  initial_cols = 128,
  initial_rows = 32,
  line_height = 1.25,
  keys = {
    {
      key = 'C',
      mods = 'CMD',
      action = wezterm.action.CopyTo 'Clipboard',
    },
  }
}

Expected Behavior

TTS should be able to speak out the content of any cursor selected section, as it does in default Mac terminal.

Logs

No response

Anything else?

No response

wez commented 1 year ago

Can you clarify what you mean by "any cursor-selection section"? Do you mean text in a pane that was selected by the mouse cursor ready for copying to the clipboard?

ArvidHammarlund commented 1 year ago

Do you mean text in a pane that was selected by the mouse cursor ready for copying to the clipboard?

Yes, exactly that - left click and drag. So no vim selection or similar.

I have now been able to execute the tts function on the current clipboard through a simple script in the "shortcut" app, but it still seems that the text in Wezterm isn't detected as text by the OS until it is copied to clipboard, so I am still unable to just mark a line and execute tts through [opt + esc] as is usually possible.