def keystroke(*keys)
      return if keys.empty?

      keybd_event keys.first, 0, KEYBD_EVENT_KEYDOWN, 0
      sleep KEYBD_KEYDELAY
      keystroke *keys[1..-1]
      sleep KEYBD_KEYDELAY
      keybd_event keys.first, 0, KEYBD_EVENT_KEYUP, 0
    end
def keystroke(*keys)
      return if keys.empty?

      keybd_event keys.first, 0, KEYBD_EVENT_KEYDOWN, 0
      sleep KEYBD_KEYDELAY
      keystroke *keys[1..-1]
      sleep KEYBD_KEYDELAY
      keybd_event keys.first, 0, KEYBD_EVENT_KEYUP, 0
    end
Send keystroke to the focused window, keystrokes are virtual keycodes

 @example send 2+2<CR>

     keystroke(VK_2, VK_ADD, VK_2, VK_RETURN)