+ self.keys = {
+ 'switch_to_chat': 'C',
+ 'switch_to_play': 'P',
+ 'switch_to_annotate': 'E',
+ 'switch_to_portal': 'p',
+ 'switch_to_study': '?',
+ 'switch_to_edit': 'E',
+ 'flatten': 'f',
+ 'hex_move_upleft': 'w',
+ 'hex_move_upright': 'e',
+ 'hex_move_right': 'd',
+ 'hex_move_downright': 'c',
+ 'hex_move_downleft': 'x',
+ 'hex_move_left': 's',
+ 'square_move_up': 'w',
+ 'square_move_left': 'a',
+ 'square_move_down': 's',
+ 'square_move_right': 'd',
+ }
+ if os.path.isfile('config.json'):
+ with open('config.json', 'r') as f:
+ keys_conf = json.loads(f.read())
+ for k in keys_conf:
+ self.keys[k] = keys_conf[k]