Пример #1
0
        protected override void Page_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
        {
            if (ParentShellPageInstance != null)
            {
                if (ParentShellPageInstance.CurrentPageType == typeof(GenericFileBrowser))
                {
                    // Don't block the various uses of enter key (key 13)
                    var focusedElement = FocusManager.GetFocusedElement() as FrameworkElement;
                    if (args.KeyCode == 13 || focusedElement is Button || focusedElement is TextBox || focusedElement is PasswordBox ||
                        Interaction.FindParent <ContentDialog>(focusedElement) != null)
                    {
                        return;
                    }

                    base.Page_CharacterReceived(sender, args);
                    AllView.Focus(FocusState.Keyboard);
                }
            }
        }
Пример #2
0
        private void CoreWindow_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
        {
            if (IsReadOnly)
            {
                return;
            }

            var character = (char)args.KeyCode;

            // skip certain control keys that are still passed as characters
            if (character == '\b')
            {
                return;
            }

            Text = Text.Insert(_cursorIndex, character.ToString());
            MoveCursor(1);

            args.Handled = true;
        }
Пример #3
0
        protected override void Page_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
        {
            if (ParentShellPageInstance != null)
            {
                if (ParentShellPageInstance.CurrentPageType == typeof(GridViewBrowser) && !IsRenamingItem)
                {
                    // Don't block the various uses of enter key (key 13)
                    var focusedElement = FocusManager.GetFocusedElement() as FrameworkElement;
                    if (args.KeyCode == 13 ||
                        focusedElement is Button ||
                        focusedElement is TextBox ||
                        focusedElement is PasswordBox ||
                        DependencyObjectHelpers.FindParent <ContentDialog>(focusedElement) != null)
                    {
                        return;
                    }

                    base.Page_CharacterReceived(sender, args);
                }
            }
        }
Пример #4
0
        private void CoreWindow_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
        {
            if (!Connected)
            {
                return;
            }

            var ch = char.ConvertFromUtf32((int)args.KeyCode);

            switch (ch)
            {
            case "\b":
            case "\t":
            case "\n":
                return;

            case "\r":
                //LogText = "";
                lock (_rawText)
                {
                    _rawTextLength  = 0;
                    _rawTextChanged = true;
                }
                return;

            default:
                break;
            }

            // Since I get the same key twice in TerminalKeyDown and in CoreWindow_CharacterReceived
            // I lookup whether KeyPressed should handle the key here or there.
            var code = Terminal.GetKeySequence(ch, false, false);

            if (code == null)
            {
                args.Handled = Terminal.KeyPressed(ch, false, false);
            }
        }
Пример #5
0
        protected virtual void Page_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
        {
            char letterPressed = Convert.ToChar(args.KeyCode);

            ParentShellPageInstance.InteractionOperations.PushJumpChar(letterPressed);
        }
Пример #6
0
 private void Window_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     OnTextInput(sender, new TextInputEventArgs((char)args.KeyCode));
 }
Пример #7
0
 private void Window_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     _textQueue.Enqueue((char)args.KeyCode);
 }
 private void App_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     System.Diagnostics.Debug.Write($"CR:{args.KeyCode} ");
 }
Пример #9
0
 private void TimeoutBlock_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     restartTimer();
 }
 private void OnCharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     this.messenger.Send(args);
 }
Пример #11
0
 private void CoreWindow_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     args.Handled = true;
     ViewModel.KeyPressed(Convert.ToChar(args.KeyCode));
 }
Пример #12
0
 private void OnKeyReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     CurrentSnapshot.KeyCharPressesList.Add((char)args.KeyCode);
 }
 /// <summary>
 /// Retrieves the <see cref="VirtualKey"/> that was found by the <see cref="CharacterReceivedEventArgs"/>.
 /// </summary>
 /// <param name="args">
 /// The <see cref="CharacterReceivedEventArgs"/>.
 /// </param>
 /// <returns>
 /// Returns the <see cref="VirtualKey"/> representation of the <see cref="CharacterReceivedEventArgs"/>
 /// </returns>
 public static VirtualKey VirtualKeyReceived(this CharacterReceivedEventArgs args)
 {
     return((VirtualKey)args.KeyCode);
 }
Пример #14
0
 private void CoreWindow_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     MessagingCenter.Send <xx.App, string>((xx.App)obj.xxApp, "KeyboardListener", args.KeyCode.ToString());
 }
Пример #15
0
 private void OnCharacterReceived(CoreWindow window, CharacterReceivedEventArgs args)
 {
     Char(this, args.KeyCode);
 }
Пример #16
0
 private void window_CharacterReceived(CoreWindow sender, CharacterReceivedEventArgs args)
 {
     Reset();
 }