語言

KeyboardDevice.GetKeyStates(Key) 方法

定義

取得指定 Key的關鍵狀態集合。

public:
 System::Windows::Input::KeyStates GetKeyStates(System::Windows::Input::Key key);
public System.Windows.Input.KeyStates GetKeyStates(System.Windows.Input.Key key);
member this.GetKeyStates : System.Windows.Input.Key -> System.Windows.Input.KeyStates
Public Function GetKeyStates (key As Key) As KeyStates

參數

key
Key

關鍵是要檢查。

傳回

指定金鑰的密鑰狀態集合。

例外狀況

key 不是有效的金鑰。

適用於