protected override void KeyPressEvent(QKeyEvent arg1) { interceptor.Invoke("keyPressEvent#", "keyPressEvent(QKeyEvent*)", typeof(void), typeof(QKeyEvent), arg1); }
protected virtual void KeyReleaseEvent(QKeyEvent arg1) { interceptor.Invoke("keyReleaseEvent#", "keyReleaseEvent(QKeyEvent*)", typeof(void), typeof(QKeyEvent), arg1); }
protected override void KeyReleaseEvent(QKeyEvent e) { interceptor.Invoke("keyReleaseEvent#", "keyReleaseEvent(QKeyEvent*)", typeof(void), typeof(QKeyEvent), e); }
protected virtual void KeyReleaseEvent(QKeyEvent arg1) { }
protected virtual void KeyPressEvent(QKeyEvent arg1) { }
protected override void KeyReleaseEvent(QKeyEvent arg1) { base.KeyReleaseEvent(arg1); Viewport.OnKeyRelease(ConvertEvent(arg1)); Update(); }
protected override void KeyPressEvent(QKeyEvent arg1) { base.KeyPressEvent(arg1); var evt = ConvertEvent(arg1); Console.WriteLine("key press {0}", evt); Viewport.OnKeyPress(evt); Update(); }
/// <summary> /// Converts a QKeyEvent to a KeyEvent. /// </summary> private KeyEvent ConvertEvent(QKeyEvent qevt) { var keyVal = qevt.Key(); var mod = GetModifier(qevt); if (keyVal >= 65 && keyVal <= 90 && // letter (mod & InteractionModifier.Shift) != InteractionModifier.Shift) keyVal += 32; if (keyVal == (int)Key.Key_Left) keyVal = (int)SpecialKey.Left; if (keyVal == (int)Key.Key_Right) keyVal = (int)SpecialKey.Right; if (keyVal == (int)Key.Key_Up) keyVal = (int)SpecialKey.Up; if (keyVal == (int)Key.Key_Down) keyVal = (int)SpecialKey.Down; if (keyVal == (int)Key.Key_Backspace) keyVal = (int)SpecialKey.Backspace; if (keyVal == (int)Key.Key_Enter) keyVal = (int)SpecialKey.Enter; if (keyVal == (int)Key.Key_Home) keyVal = (int)SpecialKey.Home; if (keyVal == (int)Key.Key_End) keyVal = (int)SpecialKey.End; if (keyVal == (int)Key.Key_Delete) keyVal = (int)SpecialKey.Delete; var evt = new KeyEvent(Viewport.RootScene, keyVal, mod); return evt; }
bool HandleKeyEvent(QKeyEvent kevent) { if (kevent.Key() == (int)Qt.Key.Key_Return || kevent.Key() == (int)Qt.Key.Key_Enter) { if ((kevent.Modifiers() & (uint)Qt.KeyboardModifier.ControlModifier) == 0) { string html = textEdit.ToHtml(); if (m_Handler is ChatHandler) { string resource = m_ToComboBox.ItemData(m_ToComboBox.CurrentIndex); ((ChatHandler)m_Handler).Resource = (resource == "auto") ? null : resource; } m_Handler.Send(html); textEdit.Clear(); } else { textEdit.TextCursor().InsertText("\n"); } return true; } else { return false; } }
protected override void KeyPressEvent(Qyoto.QKeyEvent arg1) { arg1.Ignore(); }