From bc8e7a7659ed883d4bc69f8976bb3ef8a045d81e Mon Sep 17 00:00:00 2001 From: Unknown6656 Date: Fri, 19 Aug 2016 19:38:05 +0200 Subject: [PATCH] Reverted the changed XOR-call --- source/Cosmos.HAL/ScanMapBase.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/source/Cosmos.HAL/ScanMapBase.cs b/source/Cosmos.HAL/ScanMapBase.cs index 79f0d2efa..082036ce0 100644 --- a/source/Cosmos.HAL/ScanMapBase.cs +++ b/source/Cosmos.HAL/ScanMapBase.cs @@ -59,9 +59,9 @@ namespace Cosmos.HAL if (ctrl) if (alt) - key = xor(shift, caps) ? map.ControlAltShift : map.ControlAlt; + key = shift ^ caps ? map.ControlAltShift : map.ControlAlt; else - key = xor(shift, caps) ? map.ControlShift : map.Control; + key = shift ^ caps ? map.ControlShift : map.Control; else if (shift) key = caps ? map.ShiftCaps : num ? map.ShiftNum @@ -82,8 +82,5 @@ namespace Cosmos.HAL return found ? keyev : null; } - -#warning TODO: WHY IS XOR FOR BOOLEANS NOT IMPLEMENTED!? - internal static bool xor(bool b1, bool b2) => (b1 || b2) && !(b1 && b2); } }