Example #1
0
        /// <summary>
        /// Initialize the composer.
        /// </summary>
        public static void Init()
        {
            KeyboardLeds.StartMonitoring();
            KeyboardLayout.CheckForChanges();

            m_timeout       = new DispatcherTimer();
            m_timeout.Tick += (o, e) => ResetSequence();
        }
Example #2
0
        /// <summary>
        /// Get input from the keyboard hook; return true if the key was handled
        /// and needs to be removed from the input chain.
        /// </summary>
        public static bool OnKey(WM ev, VK vk, SC sc, LLKHF flags)
        {
            // Remember when the user touched a key for the last time
            m_last_key_time = DateTime.Now;

            // We need to check the keyboard layout before we save the dead
            // key, otherwise we may be saving garbage.
            KeyboardLayout.CheckForChanges();

            KeyboardLayout.SaveDeadKey();
            bool ret = OnKeyInternal(ev, vk, sc, flags);

            KeyboardLayout.RestoreDeadKey();

            return(ret);
        }
Example #3
0
        /// <summary>
        /// Get input from the keyboard hook; return true if the key was handled
        /// and needs to be removed from the input chain.
        /// </summary>
        public static bool OnKey(WM ev, VK vk, SC sc, LLKHF flags)
        {
            // Remember when the user touched a key for the last time
            m_last_key_time = DateTime.Now;

            // Do nothing if we are disabled; NOTE: this disables stats, too
            if (Settings.Disabled.Value)
            {
                return(false);
            }

            // We need to check the keyboard layout before we save the dead
            // key, otherwise we may be saving garbage.
            KeyboardLayout.CheckForChanges();

            KeyboardLayout.SaveDeadKey();
            bool ret = OnKeyInternal(ev, vk, sc, flags);

            KeyboardLayout.RestoreDeadKey();

            return(ret);
        }
Example #4
0
 /// <summary>
 /// Initialize the composer.
 /// </summary>
 public static void Init()
 {
     StartMonitoringKeyboardLeds();
     KeyboardLayout.CheckForChanges();
 }