auto retab and change key for buffer and tab switch