improve tab key functionality; fixes #11