Got a response elsewhere. For those who are interested ...
public Foo() { this.InitializeComponent(); Window.Current.CoreWindow.CharacterReceived += KeyPress; } void KeyPress(CoreWindow sender, CharacterReceivedEventArgs args) { args.Handled = true; Debug.WriteLine("KeyPress " + Convert.ToChar(args.KeyCode)); return; }
Even better, move Window.Current.CoreWindow.CharacterReceived += KeyPress; in the GotFocus event handler and add Window.Current.CoreWindow.CharacterReceived -= KeyPress; to the LostFocus event handler.
source share