mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 10:16:24 +02:00
KBM - Set up tests for keyboard hook remapping logic (#4004)
* Add test proj, refactor proj with filters, and move single remap function to a separate header * Moved all methods to header files * remove more unused commented code * Reverted sln file * Fixed sln file * Added interface wrapping SendInput calls * fixed formatting * Created test mock class * Added keyboard input logic * Fixed compilation errors and added nuget reference to CppWinRT * Added tests for single key remapping * Refactored code for adding shortcut remap tests * Separated test classes * Fixed tests in release mode * Added more tests * Resolved comments
This commit is contained in:
13
src/modules/keyboardmanager/common/InputInterface.h
Normal file
13
src/modules/keyboardmanager/common/InputInterface.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include "windows.h"
|
||||
|
||||
// Interface used to wrap keyboard input library methods
|
||||
class InputInterface
|
||||
{
|
||||
public:
|
||||
// Function to simulate input
|
||||
virtual UINT SendVirtualInput(UINT cInputs, LPINPUT pInputs, int cbSize) = 0;
|
||||
|
||||
// Function to get the state of a particular key
|
||||
virtual bool GetVirtualKeyState(int key) = 0;
|
||||
};
|
||||
Reference in New Issue
Block a user