public static void HideKeyboard()
 {
     if (!TapTipHandler.IsKeyboardVisible())
     {
         return;
     }
     TapTipHandler.PostMessage(TapTipHandler.GetKeyboardWindowHandle(), 274U, new IntPtr(61536), (IntPtr)0);
 }
        protected override void OnClick(EventArgs e)
        {
            bool firstOpen = TapTipHandler.FirstOpen;

            if (TapTipHandler.IsKeyboardVisible())
            {
                TapTipHandler.HideKeyboard();
            }
            else
            {
                TapTipHandler.FirstOpen = firstOpen;
                TapTipHandler.ShowKeyboard(true);
            }
        }
Example #3
0
        protected override void OnClick(EventArgs e)
        {
            bool firstOpen = TapTipHandler.FirstOpen;

            if (TapTipHandler.IsKeyboardVisible())
            {
                TapTipHandler.HideKeyboard();
            }
            else
            {
                //reset firstopen because it will be checked again
                TapTipHandler.FirstOpen = firstOpen;
                TapTipHandler.ShowKeyboard(true);
            }
        }
 public static void ShowKeyboard(bool force = false)
 {
     try
     {
         if (TapTipHandler.IsPhysicalKeyboardAttached() && !force && (int)SEBSettings.settingsCurrent["oskBehavior"] == 2 || (!(bool)SEBSettings.valueForDictionaryKey(SEBSettings.settingsCurrent, "touchOptimized") || TapTipHandler.IsKeyboardVisible()))
         {
             return;
         }
         if (!SEBWindowHandler.AllowedExecutables.Contains("tabtip.exe"))
         {
             SEBWindowHandler.AllowedExecutables.Add("tabtip.exe");
         }
         Process.Start(Path.Combine("C:\\Program Files", "Common Files\\Microsoft Shared\\ink", "TabTip.exe"));
         // ISSUE: reference to a compiler-generated field
         if (TapTipHandler.OnKeyboardStateChanged == null)
         {
             return;
         }
         Timer t = new Timer()
         {
             Interval = 500.0
         };
         t.Elapsed += (ElapsedEventHandler)((sender, args) =>
         {
             if (TapTipHandler.IsKeyboardVisible())
             {
                 return;
             }
             t.Stop();
             // ISSUE: reference to a compiler-generated field
             TapTipHandler.OnKeyboardStateChanged(false);
         });
         t.Start();
         // ISSUE: reference to a compiler-generated field
         TapTipHandler.OnKeyboardStateChanged(true);
     }
     catch
     {
     }
 }