modify key map and remove maxframe