diff --git a/src/Artemis.UI.Linux/Providers/Input/Enums/LinuxAbsoluteAxis.cs b/src/Artemis.UI.Linux/Providers/Input/Enums/LinuxAbsoluteAxis.cs index 60e3fbbb7..51d76a288 100644 --- a/src/Artemis.UI.Linux/Providers/Input/Enums/LinuxAbsoluteAxis.cs +++ b/src/Artemis.UI.Linux/Providers/Input/Enums/LinuxAbsoluteAxis.cs @@ -30,5 +30,21 @@ namespace Artemis.UI.Linux.Providers.Input ABS_VOLUME = 0x20, ABS_MISC = 0x28, + + ABS_MT_SLOT = 0x2f, /* MT slot being modified */ + ABS_MT_TOUCH_MAJOR = 0x30, /* Major axis of touching ellipse */ + ABS_MT_TOUCH_MINOR = 0x31, /* Minor axis (omit if circular) */ + ABS_MT_WIDTH_MAJOR = 0x32, /* Major axis of approaching ellipse */ + ABS_MT_WIDTH_MINOR = 0x33, /* Minor axis (omit if circular) */ + ABS_MT_ORIENTATION = 0x34, /* Ellipse orientation */ + ABS_MT_POSITION_X = 0x35, /* Center X touch position */ + ABS_MT_POSITION_Y = 0x36, /* Center Y touch position */ + ABS_MT_TOOL_TYPE = 0x37, /* Type of touching device */ + ABS_MT_BLOB_ID = 0x38, /* Group a set of packets as a blob */ + ABS_MT_TRACKING_ID = 0x39, /* Unique ID of initiated contact */ + ABS_MT_PRESSURE = 0x3a, /* Pressure on contact area */ + ABS_MT_DISTANCE = 0x3b, /* Contact hover distance */ + ABS_MT_TOOL_X = 0x3c, /* Center X tool position */ + ABS_MT_TOOL_Y = 0x3d, /* Center Y tool position */ } } \ No newline at end of file diff --git a/src/Artemis.UI.Linux/Providers/Input/LinuxInputProvider.cs b/src/Artemis.UI.Linux/Providers/Input/LinuxInputProvider.cs index 65422712d..de6eeda8a 100644 --- a/src/Artemis.UI.Linux/Providers/Input/LinuxInputProvider.cs +++ b/src/Artemis.UI.Linux/Providers/Input/LinuxInputProvider.cs @@ -52,7 +52,7 @@ namespace Artemis.UI.Linux.Providers.Input KeyboardKey key = InputUtilities.KeyFromKeyCode((LinuxKeyboardKeyCodes)args.Code); bool isDown = args.Value != 0; - _logger.Verbose($"Keyboard Key: {(LinuxKeyboardKeyCodes)args.Code} | Down: {isDown}"); + //_logger.Verbose($"Keyboard Key: {(LinuxKeyboardKeyCodes)args.Code} | Down: {isDown}"); var identifier = keyboard.InputId; @@ -72,7 +72,7 @@ namespace Artemis.UI.Linux.Providers.Input OnKeyboardDataReceived(device, key, isDown); break; default: - _logger.Verbose($"Unknown keyboard event type: {args.Type}"); + //_logger.Verbose($"Unknown keyboard event type: {args.Type}"); break; } } @@ -100,7 +100,7 @@ namespace Artemis.UI.Linux.Providers.Input bool isDown = args.Value != 0; MouseButton button = InputUtilities.MouseButtonFromButtonCode((LinuxKeyboardKeyCodes)args.Code); - _logger.Verbose($"Mouse Button: {(LinuxKeyboardKeyCodes)args.Code} | Down: {isDown}"); + //_logger.Verbose($"Mouse Button: {(LinuxKeyboardKeyCodes)args.Code} | Down: {isDown}"); OnMouseButtonDataReceived(device, button, isDown); break; @@ -108,7 +108,7 @@ namespace Artemis.UI.Linux.Providers.Input case LinuxInputEventType.REL: LinuxRelativeAxis relativeAxis = (LinuxRelativeAxis)args.Code; - _logger.Verbose($"Relative mouse: axis={relativeAxis} | value={args.Value}"); + //_logger.Verbose($"Relative mouse: axis={relativeAxis} | value={args.Value}"); switch (relativeAxis) { @@ -126,8 +126,26 @@ namespace Artemis.UI.Linux.Providers.Input break; } break; + case LinuxInputEventType.ABS: + LinuxAbsoluteAxis absoluteAxis = (LinuxAbsoluteAxis)args.Code; + + //_logger.Verbose($"Absolute mouse: axis={absoluteAxis} | value={args.Value}"); + + switch (absoluteAxis) + { + case LinuxAbsoluteAxis.ABS_X: + OnMouseMoveDataReceived(device, args.Value, 0, 0, 0); + break; + case LinuxAbsoluteAxis.ABS_Y: + OnMouseMoveDataReceived(device, 0, args.Value, 0, 0); + break; + } + break; + case LinuxInputEventType.SYN: + //ignore + break; default: - _logger.Verbose($"Unknown mouse event type: {args.Type}"); + //_logger.Verbose($"Unknown mouse event type: {args.Type}"); break; } }