Ejemplo n.º 1
0
        private static void _ShiftPressed(object sender, Xbox360DeviceEventArgs e)
        {
            Xbox360InputDevice dev = null;

            foreach (var d in Tablets)
            {
                if (d.Receiver != null && d.ReceiverIndex == e.Index)
                {
                    dev = d.Tablet as Xbox360InputDevice;
                    break;
                }
            }

            if (dev != null && dev.OrangeHeld)
            {
                _CheckKeys(TabletOptionButton.TabletButton.Hidden, (int)Keypress.GetFullKeyCode(Keypress.KeyCode.CapsLock), true);
                _CheckKeys(TabletOptionButton.TabletButton.Hidden, (int)Keypress.GetFullKeyCode(Keypress.KeyCode.CapsLock), false);
            }
        }
Ejemplo n.º 2
0
        private static void _ChatpadKeyStateChanged(object sender, ChatpadKeyStateEventArgs e)
        {
            Xbox360InputDevice dev = null;

            foreach (var d in Tablets)
            {
                if (d.Receiver != null && d.ReceiverIndex == e.Index)
                {
                    dev = d.Tablet as Xbox360InputDevice;
                    break;
                }
            }

            if (dev != null)
            {
                var k = Keypress.GetChatpadKeyCode(new Keypress.ChatpadKeyCode(e.KeyCode, dev.OrangeHeld, dev.GreenHeld, dev.ShiftHeld));

                if (k.HasValue)
                {
                    _CheckKeys(TabletOptionButton.TabletButton.Hidden, (int)k.Value, e.Held);
                }
            }
        }