Win32: add Keyboard
This commit is contained in:
19
Pilz.Win32/Mapped/Keyboard.vb
Normal file
19
Pilz.Win32/Mapped/Keyboard.vb
Normal file
@@ -0,0 +1,19 @@
|
||||
Imports Pilz.Win32.Native
|
||||
|
||||
Imports Keys = System.Windows.Forms.Keys
|
||||
|
||||
Namespace Mapped
|
||||
|
||||
Public Class Keyboard
|
||||
|
||||
Public Shared Function IsKeyDown(keyCode As Integer) As Boolean
|
||||
Return (User32.GetKeyState(keyCode) & &H8000) < 0
|
||||
End Function
|
||||
|
||||
Public Shared Function IsKeyDown(keyCode As Keys) As Boolean
|
||||
Return IsKeyDown(CInt(keyCode))
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
@@ -14,6 +14,10 @@ Namespace Native
|
||||
Public Shared Function ChildWindowFromPointEx(ByVal hWndParent As IntPtr, ByVal pt As POINT, ByVal uFlags As UInteger) As IntPtr
|
||||
End Function
|
||||
|
||||
<DllImport(LIB_USER32)>
|
||||
Public Shared Function GetKeyState(keyCode As Integer) As Short
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
End Namespace
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<PropertyGroup>
|
||||
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
|
||||
<IncrementVersionOnBuild>1.yyyy.Mdd.Hmm</IncrementVersionOnBuild>
|
||||
<Version>1.2023.1027.851</Version>
|
||||
<Version>1.2023.1113.1443</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
|
||||
Reference in New Issue
Block a user