Detect if user Idle on windows universal app

后端 未结 1 1617
无人共我
无人共我 2020-12-06 08:03

I\'m developing a class library for windows 10 universal apps (mobile and desktop device families only). I need to invoke an event if the user has been idle(no touch, mouse

相关标签:
1条回答
  • 2020-12-06 08:19

    You can detect global input with various events on the app's CoreWindow:

    Touch and mouse input with CoreWindow.PointerPressed, PointerMoved, and PointerReleased.

    Keyboard input: KeyUp and KeyDown (the soft keys) and CharacterReceived (for characters generated via chords & text suggestions)

    Use these to detect the user is active and idle out if it goes too long without any of these events.

    0 讨论(0)
提交回复
热议问题