projects
/
dana
/
openbox.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
merge the C branch into HEAD
[dana/openbox.git]
/
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 = ()