]> Dogcows Code - chaz/openbox/blob - python/keymap.py
dont skip enter events
[chaz/openbox] / python / keymap.py
1 from input import Keyboard
2
3 def set(map):
4 """Set your keymap"""
5 global _map
6 Keyboard.clearBinds()
7 for key, func in map:
8 Keyboard.bind(key, run)
9 _map = map
10
11 def run(keydata, client):
12 """Run a key press event through the keymap"""
13 for key, func in _map:
14 if (keydata.keychain == key):
15 func(keydata, client)
16
17 _map = ()
This page took 0.037544 seconds and 4 git commands to generate.