void HandleAndroidKeyPress(object sender, View.KeyEventArgs e)
        {
            if (e.Event.Action == KeyEventActions.Multiple)
            {
                lock (androidActionListLock)
                {
                    stringToProcess += e.Event.Characters;
                }
            }
            if (e.Event.Action == KeyEventActions.Down ||
                e.Event.Action == KeyEventActions.Up)
            {
                var newAction = new AndroidKeyboardAction();

                newAction.Action = e.Event.Action;
                var stringTyped = e.Event.Characters;

                newAction.AndroidKeycode = e.KeyCode;

                newAction.Key = AndroidKeycodeToXnaKeys(e.KeyCode);

                lock (androidActionListLock)
                {
                    var unicodeChar = e.Event.UnicodeChar;

                    if (unicodeChar > 0 && e.Event.Action == KeyEventActions.Down)
                    {
                        stringToProcess += (char)unicodeChar;
                    }

                    androidActionsToProcess.Add(newAction);
                }
            }
        }
Esempio n. 2
0
        void HandleAndroidKeyPress(object sender, View.KeyEventArgs e)
        {
            if (e.Event.Action == KeyEventActions.Down ||
                e.Event.Action == KeyEventActions.Up)
            {
                var newAction = new AndroidKeyboardAction();

                newAction.Action = e.Event.Action;

                newAction.AndroidKeycode = e.KeyCode;

                newAction.Key = AndroidKeycodeToXnaKeys(e.KeyCode);

                lock (androidActionListLock)
                {
                    androidActionsToProcess.Add(newAction);
                }
            }
        }
Esempio n. 3
0
		void HandleAndroidKeyPress (object sender, View.KeyEventArgs e) 
		{
			if (e.Event.Action == KeyEventActions.Down ||
			   e.Event.Action == KeyEventActions.Up)
			{
				var newAction = new AndroidKeyboardAction ();

				newAction.Action = e.Event.Action;

				newAction.AndroidKeycode = e.KeyCode;

				newAction.Key = AndroidKeycodeToXnaKeys (e.KeyCode);
			
				lock (androidActionListLock)
				{
					androidActionsToProcess.Add (newAction);
				}
			}
		}