Package dtk :: Package ui :: Module global_key :: Class GlobalKey

Class GlobalKey

source code


Class to handle global key.

Instance Methods
 
__init__(self)
Init for global key.
source code
 
bind(self, binding_string, action)
Binding keymap with given action.
source code
 
unbind(self, binding_string)
Unbind keymap.
source code
 
grab(self)
Grab key.
source code
 
ungrab(self)
Ungrab key.
source code
 
regrab(self)
Regrab key.
source code
 
run(self)
GlobalKey thread loop.
source code
 
exit(self)
Exit global key.
source code

Inherited from threading.Thread: __repr__, daemon, getName, ident, isAlive, isDaemon, is_alive, join, name, setDaemon, setName, start

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 

Init for global key.

Overrides: object.__init__

bind(self, binding_string, action)

source code 

Binding keymap with given action.

Parameters:
  • binding_string - Keymap string, return by function `get_keyevent_name` of module dtk.ui.keymap.
  • action - Callback.

unbind(self, binding_string)

source code 

Unbind keymap.

Parameters:
  • binding_string - Keymap string that return by function `get_keyevent_name` of module dtk.ui.keymap.

run(self)

source code 

GlobalKey thread loop.

Overrides: threading.Thread.run