Improve key mapping speed by trying successful keys first