if (processSpace (keyval))
return TRUE;
+ if (processEnter (keyval))
+ return TRUE;
+
m_cursor = std::min (m_cursor, (guint)m_text.length ());
/* Remember the input string. */
return TRUE;
}
+gboolean
+ExtEditor::processEnter(guint keyval)
+{
+ if ( !(keyval == IBUS_KP_Enter ) )
+ return FALSE;
+
+ if ( m_text.length() == 0 )
+ return FALSE;
+
+ Text text(m_text);
+ commitText(text);
+ reset();
+ return TRUE;
+}
+
void
ExtEditor::pageUp (void)
{
gboolean processLabelKey (guint keyval);
gboolean processSpace (guint keyval);
+ gboolean processEnter (guint keyval);
gboolean removeCharBefore (void);
gboolean removeCharAfter (void);