Commit cc477fc2 authored by Matthew hague's avatar Matthew hague Committed by Sebastian Ramacher

made ctrl-j act as activate in inputbar

parent ee12a727
......@@ -246,6 +246,7 @@ girara_config_load_default(girara_session_t* session)
girara_shortcut_add(session, 0, 0, "gT", girara_sc_tab_navigate, normal_mode, GIRARA_PREVIOUS, NULL);
/* inputbar shortcuts */
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_j, girara_isc_activate, 0, NULL);
girara_inputbar_shortcut_add(session, 0, GDK_KEY_Escape, girara_isc_abort, 0, NULL);
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_bracketleft, girara_isc_abort, 0, NULL);
girara_inputbar_shortcut_add(session, GDK_CONTROL_MASK, GDK_KEY_c, girara_isc_abort, 0, NULL);
......
......@@ -148,6 +148,13 @@ girara_inputbar_shortcut_free(girara_inputbar_shortcut_t* inputbar_shortcut)
g_slice_free(girara_inputbar_shortcut_t, inputbar_shortcut);
}
bool
girara_isc_activate(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{
girara_callback_inputbar_activate(session->gtk.inputbar_entry, session);
}
bool
girara_isc_abort(girara_session_t* session, girara_argument_t* UNUSED(argument), girara_event_t* UNUSED(event), unsigned int UNUSED(t))
{
......
......@@ -211,6 +211,19 @@ bool girara_sc_toggle_tabbar(girara_session_t* session, girara_argument_t*
bool girara_sc_set(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
/**
* Default shortcut function to activate
*
* @param session The used girara session
* @param argument The argument
* @param event Girara event
* @param t Number of executions
* @return true No error occured
* @return false An error occured (abort execution)
*/
bool girara_isc_activate(girara_session_t* session, girara_argument_t* argument,
girara_event_t* event, unsigned int t);
/**
* Default inputbar shortcut to abort
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment