iTerm2 Python API提供接受字符串的异步发送文本。我可以将“s”字符作为输入发送到当前会话,但我想知道如何模拟按键盘上的“alt-s”。以下是我目前掌握的情况:
#!/usr/bin/env python3.7
import iterm2
async def main(connection):
app = await iterm2.async_get_app(connection)
s = app.current_terminal_window.current_tab.current_session
await s.async_send_text('s')
iterm2.run_until_complete(main)
当前API不接受带有类似ALT.Fromhttps://gitlab.com/gnachman/iterm2/-/issues/8387的修饰符的按键行程
相关问题 更多 >
编程相关推荐