Fix for autocomplete interfering with variable naming - MAGN-5292

Allow auto-insertion of highlighted autocomplete item only on certain keys:
Tab
Enter
Dot

@Benglin please review

Again I don't have UI test cases for autocomplete as of yet.