- All Implemented Interfaces:
QtObjectInterface
Describes a key event
Java wrapper for Qt class QKeyEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class io.qt.core.QEvent
QEvent.Type
-
Field Summary
Fields inherited from class io.qt.core.QEvent
staticMetaObject
-
Constructor Summary
ModifierConstructorDescriptionQKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers) Overloaded constructor forQKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)
QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers) QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text) QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text, boolean autorep) QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text, boolean autorep, short count) Overloaded constructor forQKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short, io.qt.gui.QInputDevice)
withdevice = io.qt.gui.QInputDevice.primaryKeyboard()
.QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text, boolean autorep, short count, QInputDevice device) QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, String text) Overloaded constructor forQKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)
QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, String text, boolean autorep) Overloaded constructor forQKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)
withcount = 1
.QKeyEvent
(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, String text, boolean autorep, short count) protected
SeeQKeyEvent::
QKeyEvent(QKeyEvent) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
SeeQKeyEvent::
operator=(QKeyEvent) clone()
final int
count()
final boolean
final int
key()
final QKeyCombination
final boolean
final Qt.KeyboardModifiers
final int
final int
final int
protected final int
scanCode()
SeeQKeyEvent::
m_scanCode protected final void
Deprecated.protected final void
setAutoRepeat
(boolean autoRepeat) SeeQKeyEvent::
m_autoRepeat protected final void
setCount
(short count) SeeQKeyEvent::
m_count protected final void
setScanCode
(int scanCode) SeeQKeyEvent::
m_scanCode protected final void
setVirtualKey
(int virtualKey) SeeQKeyEvent::
m_virtualKey final String
text()
protected final int
SeeQKeyEvent::
m_virtualKey Methods inherited from class io.qt.gui.QInputEvent
assign, device, deviceType, set, setDevice, setModifiers, setModifiers, setTimestamp, timestamp
Methods inherited from class io.qt.core.QEvent
accept, assign, ignore, isAccepted, isInputEvent, isPointerEvent, isSinglePointEvent, registerEventType, registerEventType, set, setAccepted, spontaneous, toString, type
Methods inherited from class io.qt.QtObject
dispose, equals, isDisposed
-
Constructor Details
-
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, String text, boolean autorep, short count) - Parameters:
type
-key
-modifiers
-text
-autorep
-count
-
-
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text, boolean autorep, short count, QInputDevice device) - Parameters:
type
-key
-modifiers
-nativeScanCode
-nativeVirtualKey
-nativeModifiers
-text
-autorep
-count
-device
-
-
QKeyEvent
See
QKeyEvent::
QKeyEvent(QKeyEvent) - Parameters:
arg__1
-
-
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, String text, boolean autorep) Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)
withcount = 1
. -
QKeyEvent
Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)
with:
autorep = false
count = 1
-
QKeyEvent
Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, java.lang.String, boolean, short)
with:
text = (String)null
autorep = false
count = 1
-
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text, boolean autorep, short count) Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short, io.qt.gui.QInputDevice)
withdevice = io.qt.gui.QInputDevice.primaryKeyboard()
. -
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text, boolean autorep) Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short, io.qt.gui.QInputDevice)
with:
count = 1
device = io.qt.gui.QInputDevice.primaryKeyboard()
-
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers, String text) Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short, io.qt.gui.QInputDevice)
with:
autorep = false
count = 1
device = io.qt.gui.QInputDevice.primaryKeyboard()
-
QKeyEvent
public QKeyEvent(QEvent.Type type, int key, Qt.KeyboardModifiers modifiers, int nativeScanCode, int nativeVirtualKey, int nativeModifiers) Overloaded constructor for
QKeyEvent(io.qt.core.QEvent.Type, int, io.qt.core.Qt.KeyboardModifiers, int, int, int, java.lang.String, boolean, short, io.qt.gui.QInputDevice)
with:
text = (String)null
autorep = false
count = 1
device = io.qt.gui.QInputDevice.primaryKeyboard()
-
-
Method Details
-
count
- Returns:
-
isAutoRepeat
- Returns:
-
key
- Returns:
-
keyCombination
- Returns:
- Since:
- This function was introduced in Qt 6.0.
-
matches
- Parameters:
key
-- Returns:
-
modifiers
- Overrides:
modifiers
in classQInputEvent
- Returns:
-
nativeModifiers
- Returns:
-
nativeScanCode
- Returns:
-
nativeVirtualKey
- Returns:
-
assign
See
QKeyEvent::
operator=(QKeyEvent) - Parameters:
other
-
-
text
- Returns:
-
clone
- Overrides:
clone
in classQInputEvent
- Returns:
- Since:
- This function was introduced in Qt 6.0.
-
setAutoRepeat
See
QKeyEvent::
m_autoRepeat - Parameters:
autoRepeat
-
-
setCount
See
QKeyEvent::
m_count - Parameters:
count
-
-
setScanCode
See
QKeyEvent::
m_scanCode - Parameters:
scanCode
-
-
scanCode
See
QKeyEvent::
m_scanCode - Returns:
-
setVirtualKey
See
QKeyEvent::
m_virtualKey - Parameters:
virtualKey
-
-
virtualKey
See
QKeyEvent::
m_virtualKey - Returns:
-
set
Deprecated.Useassign(io.qt.gui.QKeyEvent)
instead.
-
assign(io.qt.gui.QKeyEvent)
instead.