[Keyboard Manager] Cleanup header file references to improve incremental build time (#4880)

* Remove WinUI include in KeyboardManagerState.h

* Changed include steps

* Clean up headers in KeyboardManagerUI except XamlBridge.h

* Cleaned up headers in KeyboardManager common and test

* Cleaned up headers in KeyboardManager project

* Removed headers from XamlBridge

* Removed some headers from kbm common pch

* Added MP flag to reduce build time

* Added missing include
This commit is contained in:
Arjun Balgovind
2020-07-13 11:49:09 -07:00
committed by GitHub
parent 7db5d6a307
commit 6a9badd31b
37 changed files with 291 additions and 180 deletions

View File

@@ -1,5 +1,22 @@
#include "pch.h"
#include "Shortcut.h"
#include "../common/keyboard_layout.h"
#include "../common/shared_constants.h"
#include <interface/lowlevel_keyboard_event_data.h>
#include "Helpers.h"
#include "InputInterface.h"
// Constructor to initialize Shortcut from it's virtual key code string representation.
Shortcut::Shortcut(const std::wstring& shortcutVK) :
winKey(ModifierKey::Disabled), ctrlKey(ModifierKey::Disabled), altKey(ModifierKey::Disabled), shiftKey(ModifierKey::Disabled), actionKey(NULL)
{
auto keys = KeyboardManagerHelper::splitwstring(shortcutVK, ';');
for (auto it : keys)
{
auto vkKeyCode = std::stoul(it);
SetKey(vkKeyCode);
}
}
// Function to return the number of keys in the shortcut
int Shortcut::Size() const