Example #1
0
 private void OnKeyPressed(object sender, RawInputEventArg e)
 {
     lblCoords.Text = "X:" + e.X + " Y:" + e.Y;
     //switch (e.KeyPressEvent.Message)
     //{
     //    case Win32.WM_KEYDOWN:
     //        Debug.WriteLine(e.KeyPressEvent.KeyPressState);
     //        break;
     //     case Win32.WM_KEYUP:
     //        Debug.WriteLine(e.KeyPressEvent.KeyPressState);
     //        break;
     //}
 }
Example #2
0
 private void OnKeyPressed(object sender, RawInputEventArg e)
 {
     if (e.KeyPressEvent.Message == Win32.WM_KEYUP)
     {
         if (e.KeyPressEvent.DeviceName == SelectedDeviceName)
         {
             if (e.KeyPressEvent.VKey == 13)
             {
                 ModifyCart(selectedBarcode);
                 selectedBarcode = string.Empty;
             }
             else
             {
                 selectedBarcode += (new System.Windows.Forms.KeysConverter()).ConvertToString(e.KeyPressEvent.VKey);
             }
         }
     }
 }