aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Tools/KeyBindings.py
blob: b55e35551d777b5549e5b1b3fc4aa0c8bba0a83c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

keyBindings = { }

def addKeyBinding(key, context, action):
	if (context, action) in keyBindings:
		keyBindings[(context, action)].append(key)
	else:
		keyBindings[(context, action)] = [key]

def queryKeyBinding(context, action):
	if (context, action) in keyBindings:
		return keyBindings[(context, action)]
	else:
		return [ ]

def getKeyDescription(key):
	return "key_%0x" % key