calc_keypress_avg