protected TextClick? GetTextClick(GlobalKeyboardMessage Message, GlobalKeyboardEventSourceCallbackData keyboardHookStruct) {

            var ret = default(TextClick?);

            //System.Diagnostics.Debug.WriteLine($@"{Message}: {keyboardHookStruct.ScanCode} => {keyboardHookStruct.KeyCode}" );

            if (Message.IsKeyDown()) {

                var virtualKeyCode = keyboardHookStruct.Data.KeyCode;
                var scanCode = keyboardHookStruct.Data.ScanCode;
                var fuState = keyboardHookStruct.Data.Flags;

                if (keyboardHookStruct.Data.KeyCode == KeyCode.Packet) {
                    var ch = (char)scanCode;

                    ret = new TextClick(new[] { ch });
                } else {
                    var UnicodeFlags = ToUnicodeExFlags.None;
                    
                    if (fuState.HasFlag(KeyboardHookStructFlags.Extended)) {
                        UnicodeFlags |= ToUnicodeExFlags.Menu;
                    }

                    if (State.TryGetCharFromKeyboardState(virtualKeyCode, scanCode, UnicodeFlags, out var chars)) {
                        if (chars is { } V1 && V1.Length > 0) {
                            ret = new TextClick(V1);
                        }
                    }

                }
            }

            return ret;
        }
        protected EventSourceEventArgs<KeyInput> GetInputEventArgs(GlobalKeyboardMessage Message, GlobalKeyboardEventSourceCallbackData keyboardHookStruct) {

            var keyData = keyboardHookStruct.Data.KeyCode;

            var isKeyDown = Message.IsKeyDown();
            var isKeyUp = Message.IsKeyUp();

            var isExtendedKey = keyboardHookStruct.Data.Flags.HasFlag(KeyboardHookStructFlags.Extended);

            var Status = KeyStatusValue.Compute(isKeyDown, isKeyUp);

            var Data = new KeyInput(keyData, isExtendedKey, keyboardHookStruct.Data.ScanCode, Status);
            var ret = EventSourceEventArgs.Create(keyboardHookStruct.Data.Time, Data, keyboardHookStruct);

            return ret;
        }