Ejemplo n.º 1
0
        private void DeactivateFrontend()
        {
            Logger.Debug?.Print(LogClass.ServiceAm, $"Deactivating software keyboard frontend");

            _inputMode           = KeyboardInputMode.ControllerAndKeyboard;
            _canAcceptController = false;

            _dynamicTextInputHandler.TextProcessingEnabled = false;
            _dynamicTextInputHandler.SetText(_textValue, _cursorBegin);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Registers the z-Order commands.
 /// </summary>
 private void AddCommandHandler(RoutedUICommand command, Action <List <INode> > method)
 {
     KeyboardInputMode.AddCommand(command,
                                  (sender, args) => {
         var nodes = ResolveParameter(args.Parameter);
         if (nodes != null)
         {
             method.Invoke(nodes);
             args.Handled = true;
         }
     },
                                  (sender, args) => {
         var nodes       = ResolveParameter(args.Parameter);
         args.CanExecute = nodes != null;
         args.Handled    = true;
     });
 }
Ejemplo n.º 3
0
        private void ActivateFrontend()
        {
            Logger.Debug?.Print(LogClass.ServiceAm, $"Activating software keyboard frontend");

            _inputMode = KeyboardInputMode.ControllerAndKeyboard;

            _npads.Update(true);

            NpadButton buttons = _npads.GetCurrentButtonsOfAllNpads();

            // Block the input if the current accept key is pressed so the applet won't be instantly closed.
            _canAcceptController = (buttons & NpadButton.A) == 0;

            _dynamicTextInputHandler.TextProcessingEnabled = true;

            _keyboardRenderer.UpdateCommandState(null, null, true);
            _keyboardRenderer.UpdateTextState(null, null, null, null, true);
        }
Ejemplo n.º 4
0
 private void AdvanceInputMode()
 {
     _inputMode = (KeyboardInputMode)((int)(_inputMode + 1) % (int)KeyboardInputMode.Count);
 }