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);
            }
        }
Esempio n. 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 bool IsKeyboardVisible()
        {
            if (TapTipHandler.FirstOpen)
            {
                TapTipHandler.FirstOpen = false;
                return(false);
            }
            IntPtr keyboardWindowHandle = TapTipHandler.GetKeyboardWindowHandle();
            bool   flag = false;

            if (keyboardWindowHandle != IntPtr.Zero)
            {
                keyboardWindowHandle.MaximizeWindow();
                flag = ((int)TapTipHandler.GetWindowLong(keyboardWindowHandle, -16) & 134217728) != 134217728;
            }
            return(flag);
        }
        private static void OnXulRunnerTextBlur(object sender, EventArgs e)
        {
            TapTipHandler._textFocusHappened = false;
            Timer t = new Timer()
            {
                Interval = 100.0
            };

            t.Elapsed += (ElapsedEventHandler)((x, y) =>
            {
                if (!TapTipHandler._textFocusHappened)
                {
                    TapTipHandler.HideKeyboard();
                }
                t.Stop();
            });
            t.Start();
        }
 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
     {
     }
 }
 private static void OnXulRunnerTextFocus(object sender, EventArgs e)
 {
     TapTipHandler._textFocusHappened = true;
     TapTipHandler.ShowKeyboard(false);
 }
 public static IntPtr GetKeyboardWindowHandle()
 {
     return(TapTipHandler.FindWindow("IPTip_Main_Window", (string)null));
 }