2020-04-09 00:11:58 +08:00
|
|
|
#pragma once
|
|
|
|
#include "Shortcut.h"
|
2020-07-24 07:43:49 +08:00
|
|
|
#include <variant>
|
2020-04-09 00:11:58 +08:00
|
|
|
|
|
|
|
// This class stores all the variables associated with each shortcut remapping
|
|
|
|
class RemapShortcut
|
|
|
|
{
|
|
|
|
public:
|
2020-07-24 07:43:49 +08:00
|
|
|
std::variant<DWORD, Shortcut> targetShortcut;
|
2020-04-09 00:11:58 +08:00
|
|
|
bool isShortcutInvoked;
|
|
|
|
ModifierKey winKeyInvoked;
|
|
|
|
|
2020-07-24 07:43:49 +08:00
|
|
|
RemapShortcut(const std::variant<DWORD, Shortcut>& sc) :
|
2020-04-09 00:11:58 +08:00
|
|
|
targetShortcut(sc), isShortcutInvoked(false), winKeyInvoked(ModifierKey::Disabled)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
RemapShortcut() :
|
2020-07-24 07:43:49 +08:00
|
|
|
targetShortcut(Shortcut()), isShortcutInvoked(false), winKeyInvoked(ModifierKey::Disabled)
|
2020-04-09 00:11:58 +08:00
|
|
|
{
|
|
|
|
}
|
2020-08-14 07:32:15 +08:00
|
|
|
|
|
|
|
inline bool operator==(const RemapShortcut& sc) const
|
|
|
|
{
|
|
|
|
return targetShortcut == sc.targetShortcut && isShortcutInvoked == sc.isShortcutInvoked && winKeyInvoked == sc.winKeyInvoked;
|
|
|
|
}
|
2020-04-09 00:11:58 +08:00
|
|
|
};
|