34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 | meta = plugin_meta()
last = 0
# register
def __init__(self, parent):
self.parent = parent
conf.add_plugin_defaults(self.meta["config"], self.module)
try:
for i,keyname in enumerate(conf.switch_key.split(",")): # allow multiple keys
keybinder.bind(keyname, self.switch, ((-1 if i else +1))) # forward +1 or backward -1
except:
__print__(dbg.ERR, "plugin global_key: Key `%s` could not be registered" % conf.switch_key)
|
|
| 34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 | meta = plugin_meta()
last = 0
# register
def __init__(self, parent):
self.parent = parent
conf.add_plugin_defaults(self.meta, self.module)
try:
for i,keyname in enumerate(conf.switch_key.split(",")): # allow multiple keys
keybinder.bind(keyname, self.switch, ((-1 if i else +1))) # forward +1 or backward -1
except:
__print__(dbg.ERR, "plugin global_key: Key `%s` could not be registered" % conf.switch_key)
|