public bool OnKey(View v, Keycode keyCode, KeyEvent e) { // This handles the hardware keyboard input if (e.IsPrintingKey) { if (e.Action == KeyEventActions.Down) { ic.CommitText(Java.Lang.String.ValueOf(e.GetUnicodeChar(0)), 1); } return(true); } if (e.Action == KeyEventActions.Down) { SDLActivity.onNativeKeyDown(keyCode); return(true); } else if (e.Action == KeyEventActions.Up) { SDLActivity.onNativeKeyUp(keyCode); return(true); } return(false); }
public override bool SendKeyEvent(KeyEvent e) { var keyCode = e.KeyCode; if (e.Action == KeyEventActions.Down) { if (e.IsPrintingKey) { CommitText(Java.Lang.String.ValueOf(e.GetUnicodeChar(0)), 1); } SDLActivity.onNativeKeyDown(keyCode); return(true); } else if (e.Action == KeyEventActions.Up) { SDLActivity.onNativeKeyUp(keyCode); return(true); } return(base.SendKeyEvent(e)); }