mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 10:46:33 +02:00
[KBM] Fix remaps to arrow keys/Home/Ins, etc not working with Windows Terminal (#7143)
* Added MapVirtualKey call to set scancode before calling SendInput * Updated comment * Update comment with link * Added test for dummy key scan code
This commit is contained in:
@@ -41,5 +41,19 @@ namespace RemappingLogicTests
|
||||
Assert::AreEqual(true, bool(input[i].ki.dwFlags & KEYEVENTF_EXTENDEDKEY));
|
||||
}
|
||||
}
|
||||
|
||||
// Test if SetKeyEvent sets the scan code field to 0 for dummy key
|
||||
TEST_METHOD (SetKeyEvent_ShouldSetScanCodeFieldTo0_WhenArgumentIsDummyKey)
|
||||
{
|
||||
const int nInputs = KeyboardManagerConstants::DUMMY_KEY_EVENT_SIZE;
|
||||
INPUT input[nInputs] = {};
|
||||
|
||||
int index = 0;
|
||||
KeyboardManagerHelper::SetDummyKeyEvent(input, index, 0);
|
||||
|
||||
// Assert that wScan for both inputs is 0
|
||||
Assert::AreEqual<unsigned int>(0, input[0].ki.wScan);
|
||||
Assert::AreEqual<unsigned int>(0, input[1].ki.wScan);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user