PowerToys/src/modules/keyboardmanager/common/InputInterface.h
Arjun Balgovind 1533c9315f
[Keyboard Manager] Enable App-specific shortcuts in the KBM backend (#4628)
* Enable app specific shortcut remapping

* Fixed lowercase function call

* Add test file

* Moved GetForegroundProcess to II and added tests

* Fixed runtime error while testing due to heap allocation across dll boundary

* Renamed function

* Remove unused code

* Changed process checking step to include substrings

* Changed back to exact match included match without file extension
2020-07-06 16:45:53 -07:00

18 lines
498 B
C++

#pragma once
#include "windows.h"
#include <string>
// 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;
// Function to get the foreground process name
virtual void GetForegroundProcess(_Out_ std::wstring& foregroundProcess) = 0;
};