update box drawing, fix keypress