Unit Tests and ScanCodeHelper complete

extended-keycode-rework
Clive Galway 2 years ago
parent 14f82c0dae
commit dddf8ec6e6

@ -41,9 +41,24 @@ namespace AutoHotInterception.Helpers
public static SpecialKey Numlock { get; set; } = new SpecialKey("Numlock", 69, ExtMode.E0, CodeType.High, Order.Normal);
public static SpecialKey Pause { get; set; } = new SpecialKey("Pause", 69, ExtMode.E0, CodeType.Low, Order.Prefixed);
public static SpecialKey Home { get; set; } = new SpecialKey("Home", 71, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey Up { get; set; } = new SpecialKey("Up", 72, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey PgUp { get; set; } = new SpecialKey("PgUp", 73, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey Left { get; set; } = new SpecialKey("Left", 75, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey Right { get; set; } = new SpecialKey("Right", 77, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey End { get; set; } = new SpecialKey("End", 79, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey Down { get; set; } = new SpecialKey("Down", 80, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey PgDn { get; set; } = new SpecialKey("PgDn", 81, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey Insert { get; set; } = new SpecialKey("Insert", 82, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey Delete { get; set; } = new SpecialKey("Delete", 83, ExtMode.E1, CodeType.High, Order.Wrapped);
public static SpecialKey LeftWindows { get; } = new SpecialKey("Left Windows", 91, ExtMode.E1, CodeType.High, Order.Normal);
public static SpecialKey RightWindows { get; } = new SpecialKey("Right Windows", 92, ExtMode.E1, CodeType.High, Order.Normal);
public static SpecialKey Apps { get; } = new SpecialKey("Apps", 93, ExtMode.E1, CodeType.High, Order.Normal);
public static List<SpecialKey> List { get; set; } = new List<SpecialKey>()
{
NumpadEnter, RightControl, NumpadDiv, RightShift, RightAlt, Numlock, Pause, Home
NumpadEnter, RightControl, NumpadDiv, RightShift, RightAlt, Numlock, Pause,
Home, Up, PgUp, Left, Right, End, Down, PgDn, Insert, Delete,
LeftWindows, RightWindows, Apps
};
}

@ -55,6 +55,18 @@ namespace UnitTests
new TestKey("Numlock", Stroke(69, 0), Stroke(69, 1), Result(325, 1), Result(325, 0)),
new TestKey("Pause", Stroke(29, 4, 69, 0), Stroke(29, 5, 69, 1), Result(null, null, 69, 1), Result(null, null, 69, 0)),
new TestKey("Home", Stroke(42, 2, 71, 2), Stroke(71, 3, 42, 3), Result(null, null, 327, 1), Result(null, null, 327, 0)),
new TestKey("Up", Stroke(42, 2, 72, 2), Stroke(72, 3, 42, 3), Result(null, null, 328, 1), Result(null, null, 328, 0)),
new TestKey("PgUp", Stroke(42, 2, 73, 2), Stroke(73, 3, 42, 3), Result(null, null, 329, 1), Result(null, null, 329, 0)),
new TestKey("Left", Stroke(42, 2, 75, 2), Stroke(75, 3, 42, 3), Result(null, null, 331, 1), Result(null, null, 331, 0)),
new TestKey("Right", Stroke(42, 2, 77, 2), Stroke(77, 3, 42, 3), Result(null, null, 333, 1), Result(null, null, 333, 0)),
new TestKey("End", Stroke(42, 2, 79, 2), Stroke(79, 3, 42, 3), Result(null, null, 335, 1), Result(null, null, 335, 0)),
new TestKey("Down", Stroke(42, 2, 80, 2), Stroke(80, 3, 42, 3), Result(null, null, 336, 1), Result(null, null, 336, 0)),
new TestKey("PgDn", Stroke(42, 2, 81, 2), Stroke(81, 3, 42, 3), Result(null, null, 337, 1), Result(null, null, 337, 0)),
new TestKey("Insert", Stroke(42, 2, 82, 2), Stroke(82, 3, 42, 3), Result(null, null, 338, 1), Result(null, null, 338, 0)),
new TestKey("Delete", Stroke(42, 2, 83, 2), Stroke(83, 3, 42, 3), Result(null, null, 339, 1), Result(null, null, 339, 0)),
new TestKey("Left Windows", Stroke(91, 2), Stroke(91, 3), Result(347, 1), Result(347, 0)),
new TestKey("Right Windows", Stroke(92, 2), Stroke(92, 3), Result(348, 1), Result(348, 0)),
new TestKey("Apps", Stroke(93, 2), Stroke(93, 3), Result(349, 1), Result(349, 0)),
};
[SetUp]

Loading…
Cancel
Save