EventControllerKey.connectKeyPressed

Connect to KeyPressed signal.

Emitted whenever a key is pressed.

class EventControllerKey
ulong
connectKeyPressed
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == bool)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == uint)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] == uint)
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
is(Parameters!T[2] == gdk.types.ModifierType)
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

bool callback(uint keyval, uint keycode, gdk.types.ModifierType state, gtk.event_controller_key.EventControllerKey eventControllerKey)

keyval the pressed key. (optional)

keycode the raw code of the pressed key. (optional)

state the bitmask, representing the state of modifier keys and pointer buttons. (optional)

eventControllerKey the instance the signal is connected to (optional)

Returns true if the key press was handled, false otherwise.

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID