public ButtonMapping(PS3Remote.Button button)
            {
                this.button = button;

                Mappings = new List <SendInputAPI.Keyboard.KeyCode>();
            }
        private void remote_ButtonDown(object sender, PS3Remote.ButtonEventArgs e)
        {
            if (DebugLog.isLogging)
            {
                DebugLog.write("Button down: " + e.button.ToString());
            }

            int y = 0;
            int x = 0;

            switch (e.button)
            {
            case PS3Remote.Button.Arrow_Up:
                y -= increment;
                break;

            case PS3Remote.Button.Arrow_Down:
                y += increment;
                break;

            case PS3Remote.Button.Arrow_Left:
                x -= increment;
                break;

            case PS3Remote.Button.Arrow_Right:
                x += increment;
                break;

            case PS3Remote.Button.R1:
                increment++;
                if (increment >= 100)
                {
                    increment = 5;
                }
                break;

            case PS3Remote.Button.L1:
                increment--;
                if (increment <= 0)
                {
                    increment = 5;
                }
                break;

            case PS3Remote.Button.Enter:
                MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.LeftDown);
                return;

            case PS3Remote.Button.PopUp_Menu:
                MouseOperations.MouseEvent(MouseOperations.MouseEventFlags.RightDown);
                return;
            }

            lastButton = e.button;

            if (x != 0 || y != 0)
            {
                //keyboard.sendKeysDown(mapping.keysMapped);
                //keyboard.releaseLastKeys();

                var position = MouseOperations.GetCursorPosition();
                position.X += x;
                position.Y += y;
                MouseOperations.SetCursorPosition(position);


                timerRepeat.Enabled = true;
                return;
            }

            //keyboard.sendKeysDown(mapping.keysMapped);
        }