def change_var_state(w, size, key):
    (var, pos) = self.var_list._w.get_focus()
    if (var is None):
        return
    iinfo = get_inspect_info(var.id_path)
    focus_index = None
    if ((key == 'enter') or (key == '\\') or (key == ' ')):
        iinfo.show_detail = (not iinfo.show_detail)
    elif (key == 'h'):
        focus_index = collapse_current(var, pos, iinfo)
    elif (key == 'l'):
        iinfo.show_detail = True
    elif (key == 'd'):
        iinfo.display_type = 'default'
    elif (key == 't'):
        iinfo.display_type = 'type'
    elif (key == 'r'):
        iinfo.display_type = 'repr'
    elif (key == 's'):
        iinfo.display_type = 'str'
    elif (key == 'i'):
        iinfo.display_type = 'id'
    elif (key == 'c'):
        iinfo.display_type = CONFIG['custom_stringifier']
    elif (key == 'H'):
        iinfo.highlighted = (not iinfo.highlighted)
    elif (key == '@'):
        iinfo.repeated_at_top = (not iinfo.repeated_at_top)
    elif (key == '*'):
        levels = ['public', 'private', 'all', 'public']
        iinfo.access_level = levels[(levels.index(iinfo.access_level) + 1)]
    elif (key == 'w'):
        iinfo.wrap = (not iinfo.wrap)
    elif (key == 'm'):
        iinfo.show_methods = (not iinfo.show_methods)
    self.update_var_view(focus_index=focus_index)
def change_var_state(w, size, key):
    (var, pos) = self.var_list._w.get_focus()
    if (var is None):
        return
    iinfo = get_inspect_info(var.id_path)
    focus_index = None
    if ((key == 'enter') or (key == '\\') or (key == ' ')):
        iinfo.show_detail = (not iinfo.show_detail)
    elif (key == 'h'):
        focus_index = collapse_current(var, pos, iinfo)
    elif (key == 'l'):
        iinfo.show_detail = True
    elif (key == 'd'):
        iinfo.display_type = 'default'
    elif (key == 't'):
        iinfo.display_type = 'type'
    elif (key == 'r'):
        iinfo.display_type = 'repr'
    elif (key == 's'):
        iinfo.display_type = 'str'
    elif (key == 'i'):
        iinfo.display_type = 'id'
    elif (key == 'c'):
        iinfo.display_type = CONFIG['custom_stringifier']
    elif (key == 'H'):
        iinfo.highlighted = (not iinfo.highlighted)
    elif (key == '@'):
        iinfo.repeated_at_top = (not iinfo.repeated_at_top)
    elif (key == '*'):
        levels = ['public', 'private', 'all', 'public']
        iinfo.access_level = levels[(levels.index(iinfo.access_level) + 1)]
    elif (key == 'w'):
        iinfo.wrap = (not iinfo.wrap)
    elif (key == 'm'):
        iinfo.show_methods = (not iinfo.show_methods)
    self.update_var_view(focus_index=focus_index)