如何在powershell中发送ctrl + `

How to send ctrl + ` in powershell

我想使用 powershell 发送击键 ctrl + `(不是 ~) ,但似乎无法正常工作。

我尝试了以下方法,但效果不佳。

[System.Windows.Forms.SendKeys]::SendWait("^{`}")
[System.Windows.Forms.SendKeys]::SendWait("^{\`}")

你试过吗?

[System.Windows.Forms.SendKeys]::SendWait('^`')

在双引号字符串中,backroom 用作转义字符。要么将其加倍使用单引号字符串。反斜杠在那里没有做任何有用的事情,因为除了在正则表达式中,PowerShell 不使用反斜杠进行转义。