diff --git a/Source/Utility/tests/ActionShortcut_UT.mm b/Source/Utility/tests/ActionShortcut_UT.mm index 6e2850a6a..4c4f55f8b 100644 --- a/Source/Utility/tests/ActionShortcut_UT.mm +++ b/Source/Utility/tests/ActionShortcut_UT.mm @@ -22,64 +22,64 @@ TEST_CASE(PREFIX "Properly parses persistency strings") { - CHECK(ActionShortcut{u8""} == ActionShortcut{}); - CHECK(ActionShortcut{u8"1"} == ActionShortcut{49, 0}); - CHECK(ActionShortcut{u8"⌘1"} == ActionShortcut{49, NSEventModifierFlagCommand}); - CHECK(ActionShortcut{u8"⇧⌘1"} == ActionShortcut{49, NSEventModifierFlagShift | NSEventModifierFlagCommand}); - CHECK(ActionShortcut{u8"^⌘1"} == ActionShortcut{49, NSEventModifierFlagControl | NSEventModifierFlagCommand}); - CHECK(ActionShortcut{u8"⌥⌘1"} == ActionShortcut{49, NSEventModifierFlagOption | NSEventModifierFlagCommand}); - CHECK(ActionShortcut{u8"^⇧⌥⌘1"} == ActionShortcut{49, - NSEventModifierFlagShift | NSEventModifierFlagControl | - NSEventModifierFlagOption | NSEventModifierFlagCommand}); - CHECK(ActionShortcut{u8"⌘\x7f"} == ActionShortcut{127, NSEventModifierFlagCommand}); + CHECK(ActionShortcut{""} == ActionShortcut{}); + CHECK(ActionShortcut{"1"} == ActionShortcut{49, 0}); + CHECK(ActionShortcut{"⌘1"} == ActionShortcut{49, NSEventModifierFlagCommand}); + CHECK(ActionShortcut{"⇧⌘1"} == ActionShortcut{49, NSEventModifierFlagShift | NSEventModifierFlagCommand}); + CHECK(ActionShortcut{"^⌘1"} == ActionShortcut{49, NSEventModifierFlagControl | NSEventModifierFlagCommand}); + CHECK(ActionShortcut{"⌥⌘1"} == ActionShortcut{49, NSEventModifierFlagOption | NSEventModifierFlagCommand}); + CHECK(ActionShortcut{"^⇧⌥⌘1"} == ActionShortcut{49, + NSEventModifierFlagShift | NSEventModifierFlagControl | + NSEventModifierFlagOption | NSEventModifierFlagCommand}); + CHECK(ActionShortcut{"⌘\x7f"} == ActionShortcut{127, NSEventModifierFlagCommand}); } TEST_CASE(PREFIX "Handles serialized special symbols properly") { - CHECK(ActionShortcut{u8"\\r"} == ActionShortcut{13, 0}); - CHECK(ActionShortcut{u8"\\t"} == ActionShortcut{9, 0}); + CHECK(ActionShortcut{"\\r"} == ActionShortcut{13, 0}); + CHECK(ActionShortcut{"\\t"} == ActionShortcut{9, 0}); } TEST_CASE(PREFIX "Produces correct persistent strings") { - CHECK(ActionShortcut{u8"⇧^⌥⌘a"}.ToPersString() == reinterpret_cast(u8"⇧^⌥⌘a")); - CHECK(ActionShortcut{u8"⇧^⌥⌘1"}.ToPersString() == reinterpret_cast(u8"⇧^⌥⌘1")); - CHECK(ActionShortcut{u8"^⌥⌘1"}.ToPersString() == reinterpret_cast(u8"^⌥⌘1")); - CHECK(ActionShortcut{u8"⌥⌘1"}.ToPersString() == reinterpret_cast(u8"⌥⌘1")); - CHECK(ActionShortcut{u8"⌘1"}.ToPersString() == reinterpret_cast(u8"⌘1")); - CHECK(ActionShortcut{u8"1"}.ToPersString() == reinterpret_cast(u8"1")); - CHECK(ActionShortcut{u8"\x7f"}.ToPersString() == reinterpret_cast(u8"\x7f")); + CHECK(ActionShortcut{"⇧^⌥⌘a"}.ToPersString() == "⇧^⌥⌘a"); + CHECK(ActionShortcut{"⇧^⌥⌘1"}.ToPersString() == "⇧^⌥⌘1"); + CHECK(ActionShortcut{"^⌥⌘1"}.ToPersString() == "^⌥⌘1"); + CHECK(ActionShortcut{"⌥⌘1"}.ToPersString() == "⌥⌘1"); + CHECK(ActionShortcut{"⌘1"}.ToPersString() == "⌘1"); + CHECK(ActionShortcut{"1"}.ToPersString() == "1"); + CHECK(ActionShortcut{"\x7f"}.ToPersString() == "\x7f"); } TEST_CASE(PREFIX "Does proper comparison") { - CHECK(ActionShortcut{u8"⌘1"} == ActionShortcut{u8"⌘1"}); - CHECK(!(ActionShortcut{u8"⌘1"} == ActionShortcut{u8"⌘2"})); - CHECK(ActionShortcut{u8"⌘1"} != ActionShortcut{u8"⌘2"}); - CHECK(!(ActionShortcut{u8"⌘1"} != ActionShortcut{u8"⌘1"})); - CHECK(!(ActionShortcut{u8"⌘1"} == ActionShortcut{u8"^1"})); - CHECK(ActionShortcut{u8"⌘1"} != ActionShortcut{u8"^1"}); + CHECK(ActionShortcut{"⌘1"} == ActionShortcut{"⌘1"}); + CHECK(!(ActionShortcut{"⌘1"} == ActionShortcut{"⌘2"})); + CHECK(ActionShortcut{"⌘1"} != ActionShortcut{"⌘2"}); + CHECK(!(ActionShortcut{"⌘1"} != ActionShortcut{"⌘1"})); + CHECK(!(ActionShortcut{"⌘1"} == ActionShortcut{"^1"})); + CHECK(ActionShortcut{"⌘1"} != ActionShortcut{"^1"}); } TEST_CASE(PREFIX "PrettyString()") { struct TestCase { - const char8_t *input; + const char *input; NSString *pretty; } const test_cases[] = { - {.input = u8"", .pretty = @""}, - {.input = u8"⌘1", .pretty = @"⌘1"}, - {.input = u8"^1", .pretty = @"⌃1"}, - {.input = u8"⇧1", .pretty = @"⇧1"}, - {.input = u8"⌥1", .pretty = @"⌥1"}, - {.input = u8"⌘⇧⌥^1", .pretty = @"⌃⌥⇧⌘1"}, - {.input = u8"⌘A", .pretty = @"⌘A"}, - {.input = u8"⌘a", .pretty = @"⌘A"}, - {.input = u8"\uF70D", .pretty = @"F10"}, + {.input = "", .pretty = @""}, + {.input = "⌘1", .pretty = @"⌘1"}, + {.input = "^1", .pretty = @"⌃1"}, + {.input = "⇧1", .pretty = @"⇧1"}, + {.input = "⌥1", .pretty = @"⌥1"}, + {.input = "⌘⇧⌥^1", .pretty = @"⌃⌥⇧⌘1"}, + {.input = "⌘A", .pretty = @"⌘A"}, + {.input = "⌘a", .pretty = @"⌘A"}, + {.input = "\uF70D", .pretty = @"F10"}, }; for( auto &test_case : test_cases ) { auto pretty = ActionShortcut(test_case.input).PrettyString(); - INFO(reinterpret_cast(test_case.input)); + INFO(test_case.input); INFO(test_case.pretty.UTF8String); INFO(pretty.UTF8String); CHECK([pretty isEqualToString:test_case.pretty]); @@ -91,44 +91,44 @@ NSMenuItem *const it = [[NSMenuItem alloc] initWithTitle:@"Hello" action:nil keyEquivalent:@""]; SECTION("Empty") { - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"⌘1"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"⌘1"}]; [it nc_setKeyEquivalentWithShortcut:ActionShortcut{}]; CHECK([it.keyEquivalent isEqualToString:@""]); CHECK(it.keyEquivalentModifierMask == 0); } SECTION("Cmd + 1") { - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"⌘1"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"⌘1"}]; CHECK([it.keyEquivalent isEqualToString:@"1"]); CHECK(it.keyEquivalentModifierMask == NSEventModifierFlagCommand); } SECTION("Ctrl + 1") { - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"^1"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"^1"}]; CHECK([it.keyEquivalent isEqualToString:@"1"]); CHECK(it.keyEquivalentModifierMask == NSEventModifierFlagControl); } SECTION("Alt + 1") { - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"⌥1"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"⌥1"}]; CHECK([it.keyEquivalent isEqualToString:@"1"]); CHECK(it.keyEquivalentModifierMask == NSEventModifierFlagOption); } SECTION("Shift + 1") { - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"⇧1"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"⇧1"}]; CHECK([it.keyEquivalent isEqualToString:@"1"]); CHECK(it.keyEquivalentModifierMask == NSEventModifierFlagShift); } SECTION("Cmd + 0x007f") { // Special treatment for Backspace - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"⌘\u007f"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"⌘\u007f"}]; CHECK([it.keyEquivalent isEqualToString:@"\u0008"]); CHECK(it.keyEquivalentModifierMask == NSEventModifierFlagCommand); } SECTION("Cmd + 0x7f28") { // Special treatment for Forward Delete - [it nc_setKeyEquivalentWithShortcut:ActionShortcut{u8"⌘\u7f28"}]; + [it nc_setKeyEquivalentWithShortcut:ActionShortcut{"⌘\u7f28"}]; CHECK([it.keyEquivalent isEqualToString:@"\u007f"]); CHECK(it.keyEquivalentModifierMask == NSEventModifierFlagCommand); } @@ -169,328 +169,328 @@ // clang-format on struct TestCase { - const char8_t *shortcut; + const char *shortcut; ActionShortcut::EventData event; bool expected; } const test_cases[] = { // nop - {.shortcut = u8"", .event = {}, .expected = true}, - {.shortcut = u8"", .event = a, .expected = false}, - {.shortcut = u8"", .event = b, .expected = false}, + {.shortcut = "", .event = {}, .expected = true}, + {.shortcut = "", .event = a, .expected = false}, + {.shortcut = "", .event = b, .expected = false}, // a - {.shortcut = u8"a", .event = {}, .expected = false}, - {.shortcut = u8"a", .event = a, .expected = true}, - {.shortcut = u8"a", .event = b, .expected = false}, - {.shortcut = u8"a", .event = shift_a, .expected = false}, - {.shortcut = u8"a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = alt_a, .expected = false}, - {.shortcut = u8"a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"a", .event = cmd_a, .expected = false}, + {.shortcut = "a", .event = {}, .expected = false}, + {.shortcut = "a", .event = a, .expected = true}, + {.shortcut = "a", .event = b, .expected = false}, + {.shortcut = "a", .event = shift_a, .expected = false}, + {.shortcut = "a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "a", .event = shift_alt_a, .expected = false}, + {.shortcut = "a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "a", .event = ctrl_a, .expected = false}, + {.shortcut = "a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "a", .event = alt_a, .expected = false}, + {.shortcut = "a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "a", .event = cmd_a, .expected = false}, // ⇧a - {.shortcut = u8"⇧a", .event = {}, .expected = false}, - {.shortcut = u8"⇧a", .event = a, .expected = false}, - {.shortcut = u8"⇧a", .event = b, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_a, .expected = true}, - {.shortcut = u8"⇧a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = {}, .expected = false}, + {.shortcut = "⇧a", .event = a, .expected = false}, + {.shortcut = "⇧a", .event = b, .expected = false}, + {.shortcut = "⇧a", .event = shift_a, .expected = true}, + {.shortcut = "⇧a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = alt_a, .expected = false}, + {.shortcut = "⇧a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧a", .event = cmd_a, .expected = false}, // ⇧^a - {.shortcut = u8"⇧^a", .event = {}, .expected = false}, - {.shortcut = u8"⇧^a", .event = a, .expected = false}, - {.shortcut = u8"⇧^a", .event = b, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_ctrl_a, .expected = true}, - {.shortcut = u8"⇧^a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = {}, .expected = false}, + {.shortcut = "⇧^a", .event = a, .expected = false}, + {.shortcut = "⇧^a", .event = b, .expected = false}, + {.shortcut = "⇧^a", .event = shift_a, .expected = false}, + {.shortcut = "⇧^a", .event = shift_ctrl_a, .expected = true}, + {.shortcut = "⇧^a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧^a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧^a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = alt_a, .expected = false}, + {.shortcut = "⇧^a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧^a", .event = cmd_a, .expected = false}, // ⇧^⌥a - {.shortcut = u8"⇧^⌥a", .event = {}, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = b, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_ctrl_alt_a, .expected = true}, - {.shortcut = u8"⇧^⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = {}, .expected = false}, + {.shortcut = "⇧^⌥a", .event = a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = b, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_ctrl_alt_a, .expected = true}, + {.shortcut = "⇧^⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = alt_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥a", .event = cmd_a, .expected = false}, // ⇧^⌥⌘a - {.shortcut = u8"⇧^⌥⌘a", .event = {}, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = b, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = true}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌥⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = {}, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = b, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = true}, + {.shortcut = "⇧^⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = alt_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌥⌘a", .event = cmd_a, .expected = false}, // ⇧^⌘a - {.shortcut = u8"⇧^⌘a", .event = {}, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = b, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_ctrl_cmd_a, .expected = true}, - {.shortcut = u8"⇧^⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧^⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = {}, .expected = false}, + {.shortcut = "⇧^⌘a", .event = a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = b, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_ctrl_cmd_a, .expected = true}, + {.shortcut = "⇧^⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = alt_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧^⌘a", .event = cmd_a, .expected = false}, // ⇧⌥a - {.shortcut = u8"⇧⌥a", .event = {}, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = b, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_alt_a, .expected = true}, - {.shortcut = u8"⇧⌥a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = {}, .expected = false}, + {.shortcut = "⇧⌥a", .event = a, .expected = false}, + {.shortcut = "⇧⌥a", .event = b, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_alt_a, .expected = true}, + {.shortcut = "⇧⌥a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = alt_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥a", .event = cmd_a, .expected = false}, // ⇧⌥⌘a - {.shortcut = u8"⇧⌥⌘a", .event = {}, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = b, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_alt_cmd_a, .expected = true}, - {.shortcut = u8"⇧⌥⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌥⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = {}, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = b, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = shift_alt_cmd_a, .expected = true}, + {.shortcut = "⇧⌥⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = alt_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌥⌘a", .event = cmd_a, .expected = false}, // ⇧⌘a - {.shortcut = u8"⇧⌘a", .event = {}, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = b, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = shift_cmd_a, .expected = true}, - {.shortcut = u8"⇧⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⇧⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = {}, .expected = false}, + {.shortcut = "⇧⌘a", .event = a, .expected = false}, + {.shortcut = "⇧⌘a", .event = b, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = shift_cmd_a, .expected = true}, + {.shortcut = "⇧⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = alt_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⇧⌘a", .event = cmd_a, .expected = false}, // ^a - {.shortcut = u8"^a", .event = {}, .expected = false}, - {.shortcut = u8"^a", .event = a, .expected = false}, - {.shortcut = u8"^a", .event = b, .expected = false}, - {.shortcut = u8"^a", .event = shift_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = ctrl_a, .expected = true}, - {.shortcut = u8"^a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"^a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = alt_a, .expected = false}, - {.shortcut = u8"^a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"^a", .event = cmd_a, .expected = false}, + {.shortcut = "^a", .event = {}, .expected = false}, + {.shortcut = "^a", .event = a, .expected = false}, + {.shortcut = "^a", .event = b, .expected = false}, + {.shortcut = "^a", .event = shift_a, .expected = false}, + {.shortcut = "^a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "^a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "^a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "^a", .event = shift_alt_a, .expected = false}, + {.shortcut = "^a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "^a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "^a", .event = ctrl_a, .expected = true}, + {.shortcut = "^a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "^a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "^a", .event = alt_a, .expected = false}, + {.shortcut = "^a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "^a", .event = cmd_a, .expected = false}, // ^⌥a - {.shortcut = u8"^⌥a", .event = {}, .expected = false}, - {.shortcut = u8"^⌥a", .event = a, .expected = false}, - {.shortcut = u8"^⌥a", .event = b, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = ctrl_alt_a, .expected = true}, - {.shortcut = u8"^⌥a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = alt_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥a", .event = cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = {}, .expected = false}, + {.shortcut = "^⌥a", .event = a, .expected = false}, + {.shortcut = "^⌥a", .event = b, .expected = false}, + {.shortcut = "^⌥a", .event = shift_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_alt_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = ctrl_a, .expected = false}, + {.shortcut = "^⌥a", .event = ctrl_alt_a, .expected = true}, + {.shortcut = "^⌥a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = alt_a, .expected = false}, + {.shortcut = "^⌥a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "^⌥a", .event = cmd_a, .expected = false}, // ^⌥⌘a - {.shortcut = u8"^⌥⌘a", .event = {}, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = b, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = ctrl_alt_cmd_a, .expected = true}, - {.shortcut = u8"^⌥⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌥⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = {}, .expected = false}, + {.shortcut = "^⌥⌘a", .event = a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = b, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = ctrl_alt_cmd_a, .expected = true}, + {.shortcut = "^⌥⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = alt_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "^⌥⌘a", .event = cmd_a, .expected = false}, // ^⌘a - {.shortcut = u8"^⌘a", .event = {}, .expected = false}, - {.shortcut = u8"^⌘a", .event = a, .expected = false}, - {.shortcut = u8"^⌘a", .event = b, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = ctrl_cmd_a, .expected = true}, - {.shortcut = u8"^⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"^⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = {}, .expected = false}, + {.shortcut = "^⌘a", .event = a, .expected = false}, + {.shortcut = "^⌘a", .event = b, .expected = false}, + {.shortcut = "^⌘a", .event = shift_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "^⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "^⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = ctrl_cmd_a, .expected = true}, + {.shortcut = "^⌘a", .event = alt_a, .expected = false}, + {.shortcut = "^⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "^⌘a", .event = cmd_a, .expected = false}, // ⌥a - {.shortcut = u8"⌥a", .event = {}, .expected = false}, - {.shortcut = u8"⌥a", .event = a, .expected = false}, - {.shortcut = u8"⌥a", .event = b, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⌥a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⌥a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = alt_a, .expected = true}, - {.shortcut = u8"⌥a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥a", .event = cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = {}, .expected = false}, + {.shortcut = "⌥a", .event = a, .expected = false}, + {.shortcut = "⌥a", .event = b, .expected = false}, + {.shortcut = "⌥a", .event = shift_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = ctrl_a, .expected = false}, + {.shortcut = "⌥a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⌥a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = alt_a, .expected = true}, + {.shortcut = "⌥a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⌥a", .event = cmd_a, .expected = false}, // ⌥⌘a - {.shortcut = u8"⌥⌘a", .event = {}, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = b, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"⌥⌘a", .event = alt_cmd_a, .expected = true}, - {.shortcut = u8"⌥⌘a", .event = cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = {}, .expected = false}, + {.shortcut = "⌥⌘a", .event = a, .expected = false}, + {.shortcut = "⌥⌘a", .event = b, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = alt_a, .expected = false}, + {.shortcut = "⌥⌘a", .event = alt_cmd_a, .expected = true}, + {.shortcut = "⌥⌘a", .event = cmd_a, .expected = false}, // ⌘a - {.shortcut = u8"⌘a", .event = {}, .expected = false}, - {.shortcut = u8"⌘a", .event = a, .expected = false}, - {.shortcut = u8"⌘a", .event = b, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_ctrl_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_ctrl_alt_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_alt_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = shift_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = ctrl_a, .expected = false}, - {.shortcut = u8"⌘a", .event = ctrl_alt_a, .expected = false}, - {.shortcut = u8"⌘a", .event = ctrl_alt_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = ctrl_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = alt_a, .expected = false}, - {.shortcut = u8"⌘a", .event = alt_cmd_a, .expected = false}, - {.shortcut = u8"⌘a", .event = cmd_a, .expected = true}, + {.shortcut = "⌘a", .event = {}, .expected = false}, + {.shortcut = "⌘a", .event = a, .expected = false}, + {.shortcut = "⌘a", .event = b, .expected = false}, + {.shortcut = "⌘a", .event = shift_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_ctrl_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_ctrl_alt_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_ctrl_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_alt_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_alt_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = shift_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = ctrl_a, .expected = false}, + {.shortcut = "⌘a", .event = ctrl_alt_a, .expected = false}, + {.shortcut = "⌘a", .event = ctrl_alt_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = ctrl_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = alt_a, .expected = false}, + {.shortcut = "⌘a", .event = alt_cmd_a, .expected = false}, + {.shortcut = "⌘a", .event = cmd_a, .expected = true}, // other - {.shortcut = u8"]", .event = opsqbr, .expected = true}, - {.shortcut = u8"⇧}", .event = shift_opsqbr, .expected = true}, - {.shortcut = u8"\u007f", .event = bckspc, .expected = true}, - {.shortcut = u8"\u007f", .event = shift_bckspc, .expected = false}, + {.shortcut = "]", .event = opsqbr, .expected = true}, + {.shortcut = "⇧}", .event = shift_opsqbr, .expected = true}, + {.shortcut = "\u007f", .event = bckspc, .expected = true}, + {.shortcut = "\u007f", .event = shift_bckspc, .expected = false}, }; for( auto &test_case : test_cases ) { INFO(fmt::format("'{}' {} {} {} {} {}", - reinterpret_cast(test_case.shortcut), + test_case.shortcut, test_case.event.char_with_modifiers, test_case.event.char_without_modifiers, test_case.event.modifiers,