Exemplo n.º 1
0
 private void PublishKeyPress(FunctionKeys functionKey)
 {
     if (keyStateService.SimulateKeyStrokes)
     {
         var virtualKeyCode = functionKey.ToVirtualKeyCode();
         if (virtualKeyCode != null)
         {
             Log.InfoFormat("Publishing function key '{0}' => as virtual key code {1}", functionKey, virtualKeyCode);
             publishService.KeyDownUp(virtualKeyCode.Value);
         }
     }
 }
Exemplo n.º 2
0
        private void PublishKeyPress(FunctionKeys functionKey)
        {
            if (keyStateService.SimulateKeyStrokes)
            {
                Log.DebugFormat("KeyDownUp called with functionKey '{0}'.", functionKey);

                var virtualKeyCode = functionKey.ToVirtualKeyCode();
                if (virtualKeyCode != null)
                {
                    publishService.KeyDownUp(virtualKeyCode.Value);
                }
            }
        }