Files
Wino-Mail/Wino.Core.UWP/Services/KeyPressService.cs

16 lines
496 B
C#
Raw Normal View History

2024-04-18 01:44:37 +02:00
using Windows.System;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Wino.Core.Domain.Interfaces;
2025-02-16 11:54:23 +01:00
namespace Wino.Core.UWP.Services;
public class KeyPressService : IKeyPressService
2024-04-18 01:44:37 +02:00
{
2025-02-16 11:54:23 +01:00
public bool IsCtrlKeyPressed()
=> Window.Current?.CoreWindow?.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down) ?? false;
2024-04-18 01:44:37 +02:00
2025-02-16 11:54:23 +01:00
public bool IsShiftKeyPressed()
=> Window.Current?.CoreWindow?.GetKeyState(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down) ?? false;
2024-04-18 01:44:37 +02:00
}