コード例 #1
0
        public void MapKeys_GBCulture_ReturnsVKCodeList()
        {
            var mapper = new VirtualKeyMapper(gb);

            var expectedList = new VirtualKeyCode[] { VirtualKeyCode.OEM_1, VirtualKeyCode.OEM_COMMA, VirtualKeyCode.OEM_3, VirtualKeyCode.OEM_4, VirtualKeyCode.OEM_MINUS, VirtualKeyCode.DECIMAL };
            var vkList       = mapper.MapKeys("Key_Colon", "Key_Comma", "Key_Apostrophe", "Key_LeftBracket", "Key_Minus", "Key_Numpad_Decimal");

            Assert.Equal(expectedList, vkList);
        }
コード例 #2
0
        public void GetKey_RUCulture_ReturnsVKCode(string keyName, VirtualKeyCode vkCode)
        {
            var mapper = new VirtualKeyMapper(ru);

            Assert.Equal(vkCode, mapper.MapKey(keyName));
        }