Keyboard.IsKeyUp(Key) 메서드

정의

지정된 키가 해제되는지 여부를 확인합니다.

public:
 static bool IsKeyUp(System::Windows::Input::Key key);
public static bool IsKeyUp(System.Windows.Input.Key key);
static member IsKeyUp : System.Windows.Input.Key -> bool
Public Shared Function IsKeyUp (key As Key) As Boolean

매개 변수

key
Key

확인할 키입니다.

반품

위쪽 상태이면 그렇지 않으면 .입니다.

예제

다음 예제에서는 메서드를 사용하여 IsKeyUp 특정 키의 상태를 확인하는 방법을 보여 있습니다. Return 키가 메서드에 IsKeyUp 전달됩니다. 메서드가 반환 true되면 배경 Button 이 변경됩니다.

// Uses the Keyboard.IsKeyUp to determine if a key is up.
if (Keyboard.IsKeyUp(Key.Return))
{
    btnIsUp.Background = Brushes.Red;
}
else
{
    btnIsUp.Background = Brushes.AliceBlue;
}
' Uses the Keyboard.IsKeyUp to determine if a key is up.
If Keyboard.IsKeyUp(Key.Return) Then
    btnIsUp.Background = Brushes.Red
Else
    btnIsUp.Background = Brushes.AliceBlue
End If

설명

이 메서드를 GetKeyStates 사용하여 특정 키의 상태 집합을 확인할 수 있습니다.

적용 대상

추가 정보