When we type in textbox on ng-keyup and ng-keydown event set the value of isCheckedKeyUp and isCheckedKeyDown to true which is bind to the checkboxes respectively.

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> </head> <body ng-app> <div> Text: <input type="text" ng-model="text" ng-keyup="isCheckedKeyUp=true" ng-keydown="isCheckedKeyDown=true" /><br /> Is KeyUp: <input type="checkbox" ng-model="isCheckedKeyUp" /><br /> Is KeyDown: <input type="checkbox" ng-model="isCheckedKeyDown" /> </div> </body> </html>