728x90
반응형
public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent e)
{
base.OnKeyDown(keyCode, e);
// work
return true;
}
// or
public override bool DispatchKeyEvent(KeyEvent e)
{
base.DispatchKeyEvent(e);
// work
if (e.Action == KeyEventActions.Up)
{
KeyEventClass.CurrentHandler?.OnKeyUpEvent(e.ScanCode);
}
return true;
}
If you don't turn on the number lock, there are times when Android keydownevent comes in twice.
It is difficult to control the number lock, so you can return the event to true.
728x90
반응형
'프로그래밍 > Xamarin(자마린)' 카테고리의 다른 글
[Xamarin, c#, UWP] UWP, How to Disable Caret Browsing in code(key F7), Disable Cursor Browsing in uwp app (0) | 2022.10.11 |
---|---|
[UWP] 풀스크린 모드로 변경 및 풀스크린 모드(FullScreen & Mode) (0) | 2022.06.07 |
[Xamarin] How to open another app with data (0) | 2021.12.22 |
[Xamarin] How to open another app. (0) | 2021.12.22 |
댓글