Indenter.isTrigger

bool isTrigger(gtksource.view.View view, gtk.text_iter.TextIter location, gdk.types.ModifierType state, uint keyval)

This function is used to determine if a key pressed should cause the indenter to automatically indent.

The default implementation of this virtual method will check to see if keyval is [gdk.types.KEY_Return] or [gdk.types.KEY_KP_Enter] and state does not have [gdk.types.ModifierType.ShiftMask] set. This is to allow the user to avoid indentation when Shift+Return is pressed. Other indenters may want to copy this behavior to provide a consistent experience to users.

Parameters

viewa #GtkSourceView
locationthe location where ch is to be inserted
statemodifier state for the insertion
keyvalthe keyval pressed such as [gdk.types.KEY_Return]

Returns

true if indentation should be automatically triggered;

otherwise false and no indentation will be performed.