Package pyhook :: Module HookManager :: Class KeyboardEvent
[hide private]
[frames] | no frames]

Class KeyboardEvent

source code

object --+    
         |    
 HookEvent --+
             |
            KeyboardEvent

Holds information about a mouse event.

Instance Methods [hide private]
 
__init__(self, msg, vk_code, scan_code, ascii, flags, time, hwnd, window_name)
Initializes an instances of the class.
source code
string
GetKey(self)
Returns: Name of the virtual keycode
source code
boolean
IsExtended(self)
Returns: Is this an extended key?
source code
boolean
IsInjected(self)
Returns: Was this event generated programmatically?
source code
boolean
IsAlt(self)
Returns: Was the alt key depressed?
source code
boolean
IsTransition(self)
Returns: Is this a transition from up to down or vice versa?
source code

Inherited from HookEvent: GetMessageName

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  Key = property(fget= GetKey)
  Extended = property(fget= IsExtended)
  Injected = property(fget= IsInjected)
  Alt = property(fget= IsAlt)
  Transition = property(fget= IsTransition)

Inherited from HookEvent: MessageName

Instance Variables [hide private]
string Ascii
ASCII value, if one exists
integer KeyID
Virtual key code
integer ScanCode
Scan code

Inherited from HookEvent: Message, Time, Window, WindowName

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, msg, vk_code, scan_code, ascii, flags, time, hwnd, window_name)
(Constructor)

source code 

Initializes an instances of the class.

Overrides: object.__init__

GetKey(self)

source code 
Returns: string
Name of the virtual keycode

IsExtended(self)

source code 
Returns: boolean
Is this an extended key?

IsInjected(self)

source code 
Returns: boolean
Was this event generated programmatically?

IsAlt(self)

source code 
Returns: boolean
Was the alt key depressed?

IsTransition(self)

source code 
Returns: boolean
Is this a transition from up to down or vice versa?