I had exactly the same problem, and I was able to solve it by following these steps.
<md-select-header class="demo-select-header"> <input ng-model="formData.searchTerm" type="search" placeholder="Search for a student.." aria-label class="demo-header-searchbox _md-text" ng-keydown="vm.updateSearch($event)"> </md-select-header>
Then in my controller, I defined an array of character codes that should not appear in the search text
vm.bannedCodes = [ 8,9,13,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,91,92, 106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,121,123,144,145];
function updateSearch
function updateSearch(e){ e.stopPropagation(); if(vm.bannedCodes.indexOf(e.keyCode) < 0){ if(e.keyCode == 8){ $scope.formData.searchTerm = $scope.formData.searchTerm.substring(1, $scope.formData.searchTerm.length -1); } } }