Ejemplo n.º 1
0
 def mode(self, mode):
     self._add_mode(mode)
     self._mode = mode
     self._keys = dict((k % self.defs, v) for k, v in
                       self.modes[mode]['keys'].items() +
                       self.modes[mode]['import'].items());
     if hasattr(self, 'defs'):
         client.write('/keys', '\n'.join(self._keys.keys()) + '\n')
Ejemplo n.º 2
0
 def _set_mode(self, mode, execute=True):
     self._add_mode(mode)
     self._mode = mode
     self._keys = dict((k % self.defs, v)
                       for k, v in self.modes[mode]['keys'].items() +
                       self.modes[mode]['import'].items())
     if execute:
         client.write('/keys', '\n'.join(self._keys.keys()) + '\n')
Ejemplo n.º 3
0
 def mode(self, mode):
     self._add_mode(mode)
     self._mode = mode
     self._keys = dict((k % self.defs, v)
                       for k, v in self.modes[mode]['keys'].items() +
                       self.modes[mode]['import'].items())
     if hasattr(self, 'defs'):
         client.write('/keys', '\n'.join(self._keys.keys()) + '\n')
Ejemplo n.º 4
0
 def _set_mode(self, mode, execute=True):
     self._add_mode(mode)
     self._mode = mode
     self._keys = dict((k % self.defs, v) for k, v in
                       self.modes[mode]['keys'].items() +
                       self.modes[mode]['import'].items());
     if execute:
         client.write('/keys', '\n'.join(self._keys.keys()) + '\n')
Ejemplo n.º 5
0
def send(*action):
	from pygmi import client
	action = ' '.join(action)
	client.write('/event', 'Action %s' % (action or ''))