fix key code for info tool, handle block recursion