Inheritance: RoutedEventArgs, IKeyRoutedEventArgs
Example #1
0
 private void TextInputBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         sendText();
     }
 }
Example #2
0
 /// <summary>
 /// Method invoked when the user presses a key on the keyboard.
 /// If the Enter key is pressed begin the login process.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PasswordPasswordBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         Button_Click(null, null);
     }
 }
Example #3
0
 /// <summary>
 /// 密码输入框回车键
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TxtPassWork_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         Login();
     }
 }
Example #4
0
 private void OnValueKeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Space)
     {
         OnValueSelected(sender);
     }
 }
Example #5
0
 private void OnKeyDownHandler(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         try
         {
             var    returnset = conn.Query <Bobdataset>(SQLBOX.Text);
             string all       = "";
             if (returnset != null && returnset.Count() > 0)
             {
                 foreach (var line in returnset)
                 {
                     all = all + "\n" +
                           line.Run_id.ToString() + " | " +
                           line.Steer_angl.ToString() + " | " +
                           line.Dist_left.ToString() + " | " +
                           line.Dist_right.ToString() + " | " +
                           line.Gyro_x.ToString() + " | " + line.Gyro_y.ToString() + " | " + line.Gyro_z.ToString() + " | " +
                           line.Accel_x.ToString() + " | " + line.Accel_y.ToString() + " | " + line.Accel_z.ToString() + " | "
                     ;
                 }
             }
             TEXTBOX.Text = all;
         }
         catch (Exception ex)
         {
             TEXTBOX.Text = ex.Message;
         }
     }
 }
Example #6
0
 private void keyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         //model.Provider.Search((sender as TextBox).Text);
     }
 }
 void TextBoxKeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Escape)
     {
         this.DetachFromTargetElement();
     }
 }
Example #8
0
 /// <summary>
 /// This handles the enter key in the url address box
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void address_KeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         NavigateWebview(address.Text);
     }
 }
Example #9
0
		protected override void OnKeyDown(KeyRoutedEventArgs e)
		{
			base.OnKeyDown(e);
			if (e.Key == VirtualKey.Control)
			{
				_isCtrlKeyPressed = true;
				return;
			}

			if (!_isCtrlKeyPressed)
				return;

			switch (e.Key)
			{
				case VirtualKey.N:
					SafelyExecute(ViewModel.NewCommand);
					break;
				case VirtualKey.O:
					SafelyExecute(ViewModel.OpenCommand);
					break;
				case VirtualKey.S:
					SafelyExecute(ViewModel.SaveCommand);
					break;
			}
		}
 private void Username_OnKeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         Password.Focus(FocusState.Programmatic);
     }
 }
 private void TextBox_OnKeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter && viewModel != null && viewModel.SendCommand.CanExecute(null))
     {
         viewModel.SendCommand.Execute(null);
     }
 }
Example #12
0
 private void txtKeywords_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         Search(SearchType.Enter);
     }
 }
 private void ItemText_OnKeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         SaveButton_OnClick(null, null);
     }
 }
 private void tbAddress_KeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         geocode(tbAddress.Text);
     }
 }
Example #15
0
 private void Page_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.F11)
     {
         ToggleMenu();
     }
 }
Example #16
0
 private void TextBox_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         this.Frame.Focus(FocusState.Programmatic);
     }
 }
        private void TxtBoxWatchedEps_OnKeyDown(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key != VirtualKey.Enter) return;

            (DataContext as AnimeItemViewModel).OnFlyoutEpsKeyDown.Execute(e);
            WatchedEpsFlyout.Hide();
        }
        private void searchTextbox_KeyDown(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == Windows.System.VirtualKey.Enter)
            {
                //DataManager.FindWords(searchTextbox.Text);

                //matchedItemsListbox.Items.Clear();

                //if (AppData.Words != null)
                //{
                //    foreach (Word w in AppData.Words)
                //    {
                //        matchedItemsListbox.Items.Add(new DetailWordItem(w));
                //    }
                //}

                //hide keyboard TODO: find better solution
                searchTextbox.IsEnabled = false;
                searchTextbox.IsEnabled = true;

                //works but textbox has still focus and i have to unfocus it somehow, otherwise
                //the keyboard doesn't show up again if i click in the textbox and i have to first unfocus
                //it manually
                //InputPane.GetForCurrentView().TryHide();
            }
        }
 private void Page_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         SearchStrain(sender, e);
     }
 }
Example #20
0
 private void Web_Address_KeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         DoWebNavigate();
     }
 }
Example #21
0
 void Source_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         OnEnter();
     }
 }
Example #22
0
 private void ListViewItem_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter || e.Key == Windows.System.VirtualKey.Space)
     {
         ListViewItem_Tapped(sender, null);
     }
 }
Example #23
0
        private void AutoSuggestBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
        {
            if (isStrainListFull == false)
            {
                return;
            }

            if (StrainChosen != null)
            {
                if (StrainChosen.ToLower().Equals(StrainList.Text.ToLower()))
                {
                    if (e.Key == Windows.System.VirtualKey.Enter)
                    {
                        StrainList.IsSuggestionListOpen = false;
                        PagesUtilities.SleepSeconds(0.2);

                        SubmitString(null, null);
                    }
                }
                else
                {
                    UsageContext.ChosenStrain = null;
                }
            }
        }
Example #24
0
 private void Page_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 { // enter key
     if (e.Key == VirtualKey.Enter)
     {
         ContinueMedicalRegister(sender, e);
     }
 }
 private async void TextBox_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         await DoSearch();
     }
 }
Example #26
0
 private void TestFrame_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (_keyInputReceived != null)
     {
         _keyInputReceived.IsChecked = true;
     }
 }
Example #27
0
 private void TextBox_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         //DefinationFrame.Navigate(typeof(Dictionary_DefinationPage), QueryTextBox.Text);
     }
 }
 private async void PasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         await Login();
     }
 }
Example #29
0
 private void SearchBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Down)
     {
         UpdateSearchSuggestions(true);
     }
 }
Example #30
0
 private void UrlInput_KeyDown( object sender, KeyRoutedEventArgs e )
 {
     if( e.Key == Windows.System.VirtualKey.Enter )
     {
         TryAddUrl();
     }
 }
Example #31
0
 /// <summary>
 /// 가상 키보드 엔터 누를 시 다음 페이지 이동
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void txtSearch_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         MoveNextPage();
     }
 }
Example #32
0
        private async void SearchRepositoriesTextBox_KeyUp(object sender, KeyRoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(SearchRepositoriesTextBox.Text))
                return;

            App.Store.Dispatch(await ActionCreators.SearchRepositories(SearchRepositoriesTextBox.Text));
        }
Example #33
0
 protected override async void OnKeyUp(KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter && ViewModel.SendCommand.CanExecute(null))
     {
         ViewModel.SendCommand.Execute(null);
     }
 }
Example #34
0
 protected override void OnKeyDown(KeyRoutedEventArgs e)
 {
     if (e.Key != VirtualKey.Enter)
     {
         tbInput.Focus(FocusState.Programmatic);
     }
 }
Example #35
0
 /// <summary>
 /// Handles the KeyUp event to add the <c>Goal</c> to the <c>ListView</c></summary>
 /// <remarks>If the key that raised the event is <c>VirtualKey.Enter</c> then call the
 /// <see cref="AddButton_Click(object, RoutedEventArgs)"/> event handler method.
 /// </remarks>
 /// <param name="sender"></param>
 /// <param name="e"> Contains the event data of the event, used the <c>e.Key</c> property
 /// to see if the key preesed is Enter</param>
 private void MainPage_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         AddButton_Click(new object(), new Windows.UI.Xaml.RoutedEventArgs());
     }
 }
Example #36
0
 private void Go_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         Display.Source = new Windows.UI.Xaml.Media.Imaging.BitmapImage(new Uri(Value.Text));
     }
 }
 private void password_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         SaveButton_Click(sender, new RoutedEventArgs());
     }
 }
 private void RepeatPassword_OnKeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         Register(sender, e);
     }
 }
 private void OnTraceLineKeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         Trace();
     }
 }
Example #40
0
 private void searchBox_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         btnNavigateUrl_Click_1(sender,e);
     }
 }
Example #41
0
 private void AddressBox_OnKeyUp(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         Browser.Focus(FocusState.Keyboard);
     }
 }
 private void TextInput_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         ButtonSave.Focus(FocusState.Programmatic);
     }
 }
 private void PasswordBox_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == VirtualKey.Enter)
     {
         ((LoginViewModel)this.DataContext).LoginCommand.Execute(null);
     }
 }
Example #44
0
        private static void FrameworkElement_KeyDown(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == VirtualKey.Enter)
            {
                DependencyObject o = sender as DependencyObject;
                ICommand command = GetCommand(sender as DependencyObject);

                FrameworkElement element = e.OriginalSource as FrameworkElement;
                if (element != null)
                {
                    // If the command argument has been explicitly set (even to NULL)
                    if (GetHasCommandArgument(o))
                    {
                        object commandArgument = GetCommandArgument(o);

                        // Execute the command
                        if (command.CanExecute(commandArgument))
                        {
                            command.Execute(commandArgument);
                        }
                    }
                    else if (command.CanExecute(element.DataContext))
                    {
                        command.Execute(element.DataContext);
                    }
                }
            }
        }
Example #45
0
        private void Timeline_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
        {
            switch (e.Key)
            {
            case Windows.System.VirtualKey.Down:
            case Windows.System.VirtualKey.GamepadDPadDown:
            case Windows.System.VirtualKey.GamepadLeftThumbstickDown:
                e.Handled = true;
                break;

            case Windows.System.VirtualKey.Up:
            case Windows.System.VirtualKey.GamepadDPadUp:
            case Windows.System.VirtualKey.GamepadLeftThumbstickUp:
                e.Handled = true;
                break;

            case Windows.System.VirtualKey.Space:
            case Windows.System.VirtualKey.Enter:
            case Windows.System.VirtualKey.GamepadA:
                var item = TimelinePanel.GetTopItem();
                if (item == null || !item.IsActionable)
                {
                    break;
                }
                item.Scale(duration: 200, centerX: (float)item.DesiredSize.Width / 2, centerY: (float)item.DesiredSize.Height / 2, scaleX: 0.9f, scaleY: 0.9f).StartAsync();
                break;
            }
        }
Example #46
0
 private void Grid_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         checkName();
     }
 }
 private void txtRePassword_KeyDown(object sender, KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         this.createNewAccount();
     }
 }
Example #48
0
 //Detects when the enter key has been pressed on the keyboard
 private void enterKeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     //when the enter key has been pressed
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         btnSaveScore_Click(sender, e);//Call the same method that is used for the enter word button
     }
 }
Example #49
0
 private void SearchBox_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Down && SamplePickerGrid.Visibility == Windows.UI.Xaml.Visibility.Visible)
     {
         // If we try and navigate down out of the textbox (and there's search results), go to the search results.
         DispatcherHelper.ExecuteOnUIThreadAsync(() => SamplePickerGridView.Focus(FocusState.Keyboard));
     }
 }
 void meHost_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (IsFullscreen && e.Key == Windows.System.VirtualKey.Escape)
     {
         FullscreenToggle();
     }
     e.Handled = true;
 }
Example #51
0
 private void OnHotspotKeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter || e.Key == Windows.System.VirtualKey.Space)
     {
         var item = sender as ContentControl;
         item.Opacity = 0.5;
     }
 }
 private void pageTitleKeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key != Windows.System.VirtualKey.Enter)
     {
         return;
     }
     gridScrollViewer.Focus(Windows.UI.Xaml.FocusState.Keyboard);
 }
Example #53
0
 private void Page_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     e.Handled = true;
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         GoToLoginPage(null, null);
     }
 }
Example #54
0
 protected override void OnKeyDown(Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     base.OnKeyDown(e);
     if (e.Key == VirtualKey.Enter || e.Key == VirtualKey.Space)
     {
         // Issue #84: https://github.com/timheuer/callisto/issues/84
         OnTapped(new TappedRoutedEventArgs());
     }
 }
Example #55
0
 private void OnHotspotKeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter || e.Key == Windows.System.VirtualKey.Space)
     {
         var item = sender as ContentControl;
         item.Opacity = 1.0;
         SelectedItem = item.DataContext != SelectedItem ? item.DataContext as Hotspot : null;
     }
 }
 /// <summary>
 /// Pivot controls trap key presses that we need to route to various pages. Pass them through via
 /// a message.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainPagePivot_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (sender is Pivot)
     {
         Messenger.Default.Send <Tuple <int, KeyRoutedEventArgs> >(
             Tuple.Create <int, KeyRoutedEventArgs>(MainPagePivot.SelectedIndex, e),
             "MainPagePivot_KeyDown");
     }
 }
Example #57
0
 private void LoginScrollViewer_KeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
 {
     if (e.Key == Windows.System.VirtualKey.Enter)
     {
         FocusManager.TryMoveFocus(FocusNavigationDirection.Next);
         // Make sure to set the Handled to true, otherwise the RoutedEvent might fire twice
         e.Handled = true;
     }
 }
        private void OnKeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
        {
            if (Element is VisualElement element)
            {
                e.Handled = HardwareKeyPageRenderer.ProcessVirualKey(element, e.Key);
            }

            //System.Diagnostics.Debug.WriteLine("HardwareKeyListenerEffect.OnControlKeyPress [" + e.Event + "][" + e.Handled + "][" + e.KeyCode + "]");
        }
Example #59
0
        private void OnKeyDown(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
        {
            var result = _keyboardCommandHandler.Handle(e);

            if (result.ShouldHandle)
            {
                e.Handled = true;
            }
        }
Example #60
0
        private void DisplayActivityChange(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
        {
            if (!e.Key.ToString().Contains("Number"))
            {
                return;
            }
            string numPressed = e.Key.ToString().Replace("Number", "");

            this.Frame.Navigate(typeof(ControlPages.CurrentActivityPage), numPressed);
        }