C# 클래스 MouseKeyboardActivityMonitor.KeyboardState

Contains a snapshor of a keyboard state at certain moment and provides methods of querying waether specific keys are pressed or locked.
This class is basically a managed wrapper of GetKeyboardState API function http://msdn.microsoft.com/en-us/library/ms646299
파일 보기 프로젝트 열기: katopz/oskz-vcsharp

공개 메소드들

메소드 설명
AreAllDown ( IEnumerable keys ) : bool

Idicates weather every of specified keys were down at the moment when snapshot was created. The method returns flase if even one of them was up.

GetCurrent ( ) : KeyboardState

Makes a snapshot of a keyboard state to the moment of call and returns an instance of KeyboardState class.

IsDown ( Keys key ) : bool

Indicates wether specified key was down at the moment when snapshot was created or not.

IsToggled ( Keys key ) : bool

Indiceate weather specified key was toggled at the moment when snapshot was created or not.

비공개 메소드들

메소드 설명
GetHighBit ( byte value ) : bool
GetKeyState ( Keys key ) : byte
GetLowBit ( byte value ) : bool
GetNativeState ( ) : byte[]
KeyboardState ( byte keyboardStateNative ) : System

메소드 상세

AreAllDown() 공개 메소드

Idicates weather every of specified keys were down at the moment when snapshot was created. The method returns flase if even one of them was up.
public AreAllDown ( IEnumerable keys ) : bool
keys IEnumerable Keys to verify wether they were down or not.
리턴 bool

GetCurrent() 공개 정적인 메소드

Makes a snapshot of a keyboard state to the moment of call and returns an instance of KeyboardState class.
public static GetCurrent ( ) : KeyboardState
리턴 KeyboardState

IsDown() 공개 메소드

Indicates wether specified key was down at the moment when snapshot was created or not.
public IsDown ( Keys key ) : bool
key Keys Key (corresponds to the virtual code of the key)
리턴 bool

IsToggled() 공개 메소드

Indiceate weather specified key was toggled at the moment when snapshot was created or not.
public IsToggled ( Keys key ) : bool
key Keys Key (corresponds to the virtual code of the key)
리턴 bool