Beispiel #1
0
        private void keyboardToolStripMenuItem_Click(object sender, EventArgs e)
        {
            KeyboardDlg dlg = new KeyboardDlg();

            dlg.ShowDialog();
        }
Beispiel #2
0
        public KeyboardDlg()
        {
            m_currentKeyboard = eKeyboard.eTab_KeyPad;

            //m_mousedown = false;
            InitializeComponent();
            s_dlg          = this;
            m_formActive   = true;
            m_highLightKey = -1;
            m_myKeyCode    = new Hashtable();
            m_shiftKeyDown = false;

            m_myKeyCode.Add(81, new Key('q', eKeyboard.eTab_KeyPad, new Rectangle(0, 0, 36, 58), false, 81));      // Q
            m_myKeyCode.Add(87, new Key('w', eKeyboard.eTab_KeyPad, new Rectangle(36, 0, 36, 58), false, 87));     // W
            m_myKeyCode.Add(69, new Key('e', eKeyboard.eTab_KeyPad, new Rectangle(72, 0, 36, 58), false, 69));     // E
            m_myKeyCode.Add(82, new Key('r', eKeyboard.eTab_KeyPad, new Rectangle(108, 0, 36, 58), false, 82));    // R
            m_myKeyCode.Add(84, new Key('t', eKeyboard.eTab_KeyPad, new Rectangle(144, 0, 36, 58), false, 84));    // T
            m_myKeyCode.Add(89, new Key('y', eKeyboard.eTab_KeyPad, new Rectangle(180, 0, 36, 58), false, 89));    // Y
            m_myKeyCode.Add(85, new Key('u', eKeyboard.eTab_KeyPad, new Rectangle(216, 0, 36, 58), false, 85));    // U
            m_myKeyCode.Add(73, new Key('i', eKeyboard.eTab_KeyPad, new Rectangle(252, 0, 36, 58), false, 73));    // I
            m_myKeyCode.Add(79, new Key('o', eKeyboard.eTab_KeyPad, new Rectangle(288, 0, 36, 58), false, 79));    // O
            m_myKeyCode.Add(80, new Key('p', eKeyboard.eTab_KeyPad, new Rectangle(324, 0, 36, 58), false, 80));    // P

            m_myKeyCode.Add(65, new Key('a', eKeyboard.eTab_KeyPad, new Rectangle(0, 58, 36, 58), false, 65));     // A
            m_myKeyCode.Add(83, new Key('s', eKeyboard.eTab_KeyPad, new Rectangle(36, 58, 36, 58), false, 83));    // S
            m_myKeyCode.Add(68, new Key('d', eKeyboard.eTab_KeyPad, new Rectangle(72, 58, 36, 58), false, 68));    // D
            m_myKeyCode.Add(70, new Key('f', eKeyboard.eTab_KeyPad, new Rectangle(108, 58, 36, 58), false, 70));   // F
            m_myKeyCode.Add(71, new Key('g', eKeyboard.eTab_KeyPad, new Rectangle(144, 58, 36, 58), false, 71));   // G
            m_myKeyCode.Add(72, new Key('h', eKeyboard.eTab_KeyPad, new Rectangle(180, 58, 36, 58), false, 72));   // H
            m_myKeyCode.Add(74, new Key('j', eKeyboard.eTab_KeyPad, new Rectangle(216, 58, 36, 58), false, 74));   // J
            m_myKeyCode.Add(75, new Key('k', eKeyboard.eTab_KeyPad, new Rectangle(252, 58, 36, 58), false, 75));   // K
            m_myKeyCode.Add(76, new Key('l', eKeyboard.eTab_KeyPad, new Rectangle(288, 58, 36, 58), false, 76));   // L
            m_myKeyCode.Add(8, new Key('\b', eKeyboard.eTab_KeyPad, new Rectangle(324, 58, 36, 58), false, 8));    // Backspace

            m_myKeyCode.Add(144, new Key('?', eKeyboard.eTab_KeyPad, new Rectangle(0, 116, 36, 58), false, 144));  // Num Key
            m_myKeyCode.Add(90, new Key('z', eKeyboard.eTab_KeyPad, new Rectangle(36, 116, 36, 58), false, 90));   // Z
            m_myKeyCode.Add(88, new Key('x', eKeyboard.eTab_KeyPad, new Rectangle(72, 116, 36, 58), false, 88));   // X
            m_myKeyCode.Add(67, new Key('c', eKeyboard.eTab_KeyPad, new Rectangle(108, 116, 36, 58), false, 67));  // C
            m_myKeyCode.Add(86, new Key('v', eKeyboard.eTab_KeyPad, new Rectangle(144, 116, 36, 58), false, 86));  // V
            m_myKeyCode.Add(66, new Key('b', eKeyboard.eTab_KeyPad, new Rectangle(180, 116, 36, 58), false, 66));  // B
            m_myKeyCode.Add(78, new Key('n', eKeyboard.eTab_KeyPad, new Rectangle(216, 116, 36, 58), false, 78));  // N
            m_myKeyCode.Add(77, new Key('m', eKeyboard.eTab_KeyPad, new Rectangle(252, 116, 36, 58), false, 77));  // N
            m_myKeyCode.Add(28, new Key('.', eKeyboard.eTab_KeyPad, new Rectangle(288, 116, 36, 58), false, 28));  // .
            m_myKeyCode.Add(13, new Key('\n', eKeyboard.eTab_KeyPad, new Rectangle(324, 116, 36, 58), false, 13)); // Enter


            m_myKeyCode.Add(160, new Key('.', eKeyboard.eTab_KeyPad, new Rectangle(288, 174, 36, 58), false, 160)); // LShiftKey
            //m_myKeyCode.Add(160, new Key('.', eKeyboard.eTab_KeyPad, new Rectangle(288, 174, 36, 58), false, 160)); // SYMBOL
            m_myKeyCode.Add(32, new Key(' ', eKeyboard.eTab_KeyPad, new Rectangle(288, 174, 36, 58), false, 32));   // Space
            //m_myKeyCode.Add(160, new Key('.', eKeyboard.eTab_KeyPad, new Rectangle(288, 174, 36, 58), false, 160)); // SYMBOL
            m_myKeyCode.Add(161, new Key('.', eKeyboard.eTab_KeyPad, new Rectangle(288, 174, 36, 58), false, 161)); // RShiftKey



            m_myKeyCodeShift.Add(51, new Key('#', eKeyboard.eTab_NumPad, new Rectangle(0, 0, 36, 58), true, 51));      //
            m_myKeyCode.Add(49, new Key('1', eKeyboard.eTab_NumPad, new Rectangle(36, 0, 36, 58), false, 49));         //
            m_myKeyCode.Add(50, new Key('2', eKeyboard.eTab_NumPad, new Rectangle(72, 0, 36, 58), false, 50));         //
            m_myKeyCode.Add(51, new Key('3', eKeyboard.eTab_NumPad, new Rectangle(108, 0, 36, 58), false, 51));        //
            m_myKeyCodeShift.Add(57, new Key('(', eKeyboard.eTab_NumPad, new Rectangle(144, 0, 36, 58), true, 57));    //
            m_myKeyCodeShift.Add(48, new Key(')', eKeyboard.eTab_NumPad, new Rectangle(180, 0, 36, 58), true, 48));    //
            m_myKeyCodeShift.Add(189, new Key('_', eKeyboard.eTab_NumPad, new Rectangle(216, 0, 36, 58), true, 189));  //
            m_myKeyCode.Add(189, new Key('-', eKeyboard.eTab_NumPad, new Rectangle(252, 0, 36, 58), false, 189));      //
            m_myKeyCodeShift.Add(187, new Key('+', eKeyboard.eTab_NumPad, new Rectangle(288, 0, 36, 58), true, 187));  //
            m_myKeyCodeShift.Add(50, new Key('@', eKeyboard.eTab_NumPad, new Rectangle(324, 0, 36, 58), true, 50));    //

            m_myKeyCodeShift.Add(56, new Key('*', eKeyboard.eTab_NumPad, new Rectangle(0, 58, 36, 58), true, 56));     //
            m_myKeyCode.Add(52, new Key('4', eKeyboard.eTab_NumPad, new Rectangle(36, 58, 36, 58), false, 52));        //
            m_myKeyCode.Add(53, new Key('5', eKeyboard.eTab_NumPad, new Rectangle(72, 58, 36, 58), false, 53));        //
            m_myKeyCode.Add(54, new Key('6', eKeyboard.eTab_NumPad, new Rectangle(108, 58, 36, 58), false, 54));       //
            m_myKeyCode.Add(191, new Key('/', eKeyboard.eTab_NumPad, new Rectangle(144, 58, 36, 58), false, 191));     //
            m_myKeyCodeShift.Add(186, new Key(':', eKeyboard.eTab_NumPad, new Rectangle(180, 58, 36, 58), true, 186)); //
            m_myKeyCode.Add(186, new Key(';', eKeyboard.eTab_NumPad, new Rectangle(216, 58, 36, 58), false, 186));     //
            m_myKeyCode.Add(222, new Key('\'', eKeyboard.eTab_NumPad, new Rectangle(252, 58, 36, 58), false, 222));    //
            m_myKeyCodeShift.Add(222, new Key('"', eKeyboard.eTab_NumPad, new Rectangle(288, 58, 36, 58), true, 222)); //
            //m_myKeyCode.Add(8, new Key('\b', eKeyboard.eTab_NumPad, new Rectangle(324, 58, 36, 58), false, 8)); // Backspace

            //m_myKeyCode.Add(144, new Key('?', eKeyboard.eTab_NumPad, new Rectangle(0, 116, 36, 58), false, 144)); // Num Key
            m_myKeyCode.Add(55, new Key('7', eKeyboard.eTab_NumPad, new Rectangle(36, 116, 36, 58), false, 55));        //
            m_myKeyCode.Add(56, new Key('8', eKeyboard.eTab_NumPad, new Rectangle(72, 116, 36, 58), false, 56));        //
            m_myKeyCode.Add(57, new Key('9', eKeyboard.eTab_NumPad, new Rectangle(108, 116, 36, 58), false, 57));       //
            m_myKeyCodeShift.Add(52, new Key('$', eKeyboard.eTab_NumPad, new Rectangle(144, 116, 36, 58), true, 52));   //
            m_myKeyCodeShift.Add(191, new Key('?', eKeyboard.eTab_NumPad, new Rectangle(180, 116, 36, 58), true, 191)); //
            m_myKeyCodeShift.Add(49, new Key('!', eKeyboard.eTab_NumPad, new Rectangle(216, 116, 36, 58), true, 49));   //
            m_myKeyCode.Add(188, new Key(',', eKeyboard.eTab_NumPad, new Rectangle(252, 116, 36, 58), false, 188));     //
            m_myKeyCode.Add(187, new Key('=', eKeyboard.eTab_NumPad, new Rectangle(288, 116, 36, 58), false, 187));     //
            //m_myKeyCode.Add(13, new Key('\n', eKeyboard.eTab_NumPad, new Rectangle(324, 116, 36, 58), false, 13)); // Enter


            m_myKeyCodeShift.Add(81, new Key('Q', eKeyboard.eTab_KeyPad, new Rectangle(0, 0, 36, 58), true, 81));     // Q
            m_myKeyCodeShift.Add(87, new Key('W', eKeyboard.eTab_KeyPad, new Rectangle(36, 0, 36, 58), true, 87));    // W
            m_myKeyCodeShift.Add(69, new Key('E', eKeyboard.eTab_KeyPad, new Rectangle(72, 0, 36, 58), true, 69));    // E
            m_myKeyCodeShift.Add(82, new Key('R', eKeyboard.eTab_KeyPad, new Rectangle(108, 0, 36, 58), true, 82));   // R
            m_myKeyCodeShift.Add(84, new Key('T', eKeyboard.eTab_KeyPad, new Rectangle(144, 0, 36, 58), true, 84));   // T
            m_myKeyCodeShift.Add(89, new Key('Y', eKeyboard.eTab_KeyPad, new Rectangle(180, 0, 36, 58), true, 89));   // Y
            m_myKeyCodeShift.Add(85, new Key('U', eKeyboard.eTab_KeyPad, new Rectangle(216, 0, 36, 58), true, 85));   // U
            m_myKeyCodeShift.Add(73, new Key('I', eKeyboard.eTab_KeyPad, new Rectangle(252, 0, 36, 58), true, 73));   // I
            m_myKeyCodeShift.Add(79, new Key('O', eKeyboard.eTab_KeyPad, new Rectangle(288, 0, 36, 58), true, 79));   // O
            m_myKeyCodeShift.Add(80, new Key('P', eKeyboard.eTab_KeyPad, new Rectangle(324, 0, 36, 58), true, 80));   // P

            m_myKeyCodeShift.Add(65, new Key('A', eKeyboard.eTab_KeyPad, new Rectangle(0, 58, 36, 58), true, 65));    // A
            m_myKeyCodeShift.Add(83, new Key('S', eKeyboard.eTab_KeyPad, new Rectangle(36, 58, 36, 58), true, 83));   // S
            m_myKeyCodeShift.Add(68, new Key('D', eKeyboard.eTab_KeyPad, new Rectangle(72, 58, 36, 58), true, 68));   // D
            m_myKeyCodeShift.Add(70, new Key('F', eKeyboard.eTab_KeyPad, new Rectangle(108, 58, 36, 58), true, 70));  // F
            m_myKeyCodeShift.Add(71, new Key('G', eKeyboard.eTab_KeyPad, new Rectangle(144, 58, 36, 58), true, 71));  // G
            m_myKeyCodeShift.Add(72, new Key('H', eKeyboard.eTab_KeyPad, new Rectangle(180, 58, 36, 58), true, 72));  // H
            m_myKeyCodeShift.Add(74, new Key('J', eKeyboard.eTab_KeyPad, new Rectangle(216, 58, 36, 58), true, 74));  // J
            m_myKeyCodeShift.Add(75, new Key('K', eKeyboard.eTab_KeyPad, new Rectangle(252, 58, 36, 58), true, 75));  // K
            m_myKeyCodeShift.Add(76, new Key('L', eKeyboard.eTab_KeyPad, new Rectangle(288, 58, 36, 58), true, 76));  // L

            m_myKeyCodeShift.Add(90, new Key('Z', eKeyboard.eTab_KeyPad, new Rectangle(36, 116, 36, 58), true, 90));  // Z
            m_myKeyCodeShift.Add(88, new Key('X', eKeyboard.eTab_KeyPad, new Rectangle(72, 116, 36, 58), true, 88));  // X
            m_myKeyCodeShift.Add(67, new Key('C', eKeyboard.eTab_KeyPad, new Rectangle(108, 116, 36, 58), true, 67)); // C
            m_myKeyCodeShift.Add(86, new Key('V', eKeyboard.eTab_KeyPad, new Rectangle(144, 116, 36, 58), true, 86)); // V
            m_myKeyCodeShift.Add(66, new Key('B', eKeyboard.eTab_KeyPad, new Rectangle(180, 116, 36, 58), true, 66)); // B
            m_myKeyCodeShift.Add(78, new Key('N', eKeyboard.eTab_KeyPad, new Rectangle(216, 116, 36, 58), true, 78)); // N
            m_myKeyCodeShift.Add(77, new Key('M', eKeyboard.eTab_KeyPad, new Rectangle(252, 116, 36, 58), true, 77)); // N



            //m_myKeyCode.Add(91, 0); // LWin
            //m_myKeyCode.Add(93, 0); // Apps
            //m_myKeyCode.Add(92, 0); // RWin
        }