Cleaning up the solution. Separating Shared.WinRT, Services and Synchronization. Removing synchronization from app. Reducing bundle size by 45mb.
This commit is contained in:
25
Wino.Shared.WinRT/Services/KeyPressService.cs
Normal file
25
Wino.Shared.WinRT/Services/KeyPressService.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
using Windows.System;
|
||||
using Windows.UI.Core;
|
||||
using Wino.Domain.Interfaces;
|
||||
|
||||
|
||||
|
||||
|
||||
#if NET8_0
|
||||
using Microsoft.UI.Xaml;
|
||||
#else
|
||||
using Microsoft.UI.Xaml;
|
||||
#endif
|
||||
|
||||
namespace Wino.Shared.WinRT.Services
|
||||
{
|
||||
public class KeyPressService : IKeyPressService
|
||||
{
|
||||
public bool IsCtrlKeyPressed()
|
||||
=> Window.Current?.CoreWindow?.GetKeyState(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down) ?? false;
|
||||
|
||||
public bool IsShiftKeyPressed()
|
||||
=> Window.Current?.CoreWindow?.GetKeyState(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down) ?? false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user