Example #1
0
        // Used to follow entry
        public void SetText(string text, KeyToPress key)
        {
            // Firefox is pesky wrt text boxes. Gotta wait an extra sec
            if (BrowserWindow.Instance.Browser == BrowserWindow.Browsers.Firefox)
            {
                Thread.Sleep(1000);
            }
            SetText(text);
            switch (key)
            {
            case KeyToPress.Enter:
                WebElement.SendKeys(Keys.Enter);
                break;

            case KeyToPress.Tab:
                WebElement.SendKeys(Keys.Tab);
                break;
            }
        }
Example #2
0
    void ChooseRandomKey()
    {
        for (int i = 0; i < 1; i++)
        {
            keyToPress = (KeyToPress)Random.Range(0, (float)KeyToPress.LENGTH);
        }

        switch (keyToPress)
        {
        case KeyToPress.Q:
            skeletonAnimation.AnimationName = "Q";
            break;

        case KeyToPress.W:
            skeletonAnimation.AnimationName = "W";
            break;

        case KeyToPress.E:
            skeletonAnimation.AnimationName = "E";
            break;

        case KeyToPress.R:
            skeletonAnimation.AnimationName = "R";
            break;

        case KeyToPress.T:
            skeletonAnimation.AnimationName = "T";
            break;

        case KeyToPress.Z:
            skeletonAnimation.AnimationName = "Z";
            break;
        }

        keyPrefab.gameObject.SetActive(true);
    }
Example #3
0
 private void SendKey()
 {
     this.inputSimulator.Keyboard.KeyPress(KeyToPress);
     Debug.Print("Keypress sent: " + KeyToPress.ToString());
 }