diff --git a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Driver/DisplayScreen.cs b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Driver/DisplayScreen.cs index 7a8d4d9f6..d23de36c3 100644 --- a/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Driver/DisplayScreen.cs +++ b/Source/Meadow.Foundation.Libraries_and_Frameworks/Graphics.MicroLayout/Driver/DisplayScreen.cs @@ -62,8 +62,8 @@ public DisplayScreen(IPixelDisplay physicalDisplay, RotationType rotation = Rota if (TouchScreen != null) { - TouchScreen.TouchDown += _touchScreen_TouchDown; - TouchScreen.TouchUp += _touchScreen_TouchUp; + TouchScreen.TouchDown += OnTouchDown; + TouchScreen.TouchUp += OnTouchUp; } if (theme?.Font != null) @@ -97,7 +97,7 @@ public Color BackgroundColor } } - private void _touchScreen_TouchUp(ITouchScreen source, TouchPoint point) + private void OnTouchUp(ITouchScreen source, TouchPoint point) { bool LookForUnclick(ControlsCollection controls) { @@ -128,7 +128,7 @@ bool LookForUnclick(ControlsCollection controls) } } - private void _touchScreen_TouchDown(ITouchScreen source, TouchPoint point) + private void OnTouchDown(ITouchScreen source, TouchPoint point) { bool LookForClick(ControlsCollection controls) { diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Mac.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Mac.cs index 15cb0fb37..1ee314298 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Mac.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Mac.cs @@ -20,7 +20,7 @@ private void MacKeyScanner() { var state = InteropMac.CGEventSourceKeyState( InteropMac.CGEventSourceStateID.hidSystemState, - keycode.Value) != 0; + keycode.Value) == 0; key.Value.SetState(state); } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Windows.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Windows.cs index 19ca45ecd..dce272eee 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Windows.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Keyboard/Driver/Keyboard.Windows.cs @@ -21,17 +21,17 @@ private void WindowsKeyScanner() if ((state & 0x8000) != 0) { // key is currently down - key.Value.SetState(true); + key.Value.SetState(false); } else if ((state & 0x0001) != 0) { // state was down since last call (is now up) - key.Value.SetState(true); key.Value.SetState(false); + key.Value.SetState(true); } else { - key.Value.SetState(false); + key.Value.SetState(true); } }