Port distance test and enable key repeat handling.