How to handle KeyCode Events in Windows Phone 8/8.1/10 ?

If you want handle key Code events in windows phone 8/8.1/10,then just copy the below Code in "Keydown" Event Handler.The Below Key Code is For "Enter" key Press. You can change whatever Key you want "Intellisence in visual Studio" suggest the Key you want.
  1. private void txtPassword_KeyDown(object sender, KeyEventArgs e)    
  2. {    
  3.     if (e.Key.Equals(Key.Enter))    
  4.     {    
  5.         this.Focus();    
  6.   
  7.         login();    
  8.   
  9.     }    
  10. }  
If any doubts please Comment Below.