diff --git a/doc/geany.txt b/doc/geany.txt index b672c279..74c8031f 100644 --- a/doc/geany.txt +++ b/doc/geany.txt @@ -3626,6 +3626,16 @@ Remove Markers and Error Indicators Combines ``Remove Mark ==================================== ==================== ================================================== +Project keybindings +``````````````````` +=============================== ========================= ================================================== +Action Default shortcut Description +=============================== ========================= ================================================== +Open Opens a project file. +Properties Shows the `Project properties`_. +=============================== ========================= ================================================== + + Build keybindings ````````````````` =============================== ========================= ================================================== diff --git a/src/keybindings.c b/src/keybindings.c index 6a0133e3..aa30dc2c 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -262,6 +262,8 @@ static void init_default_kb(void) group = keybindings_get_core_group(GEANY_KEY_GROUP_PROJECT); + keybindings_set_item(group, GEANY_KEYS_PROJECT_OPEN, NULL, + 0, 0, "project_open", _("Open"), LW(project_open1)); keybindings_set_item(group, GEANY_KEYS_PROJECT_PROPERTIES, NULL, 0, 0, "project_properties", _("Project properties"), LW(project_properties1)); @@ -1301,6 +1303,9 @@ static gboolean cb_func_project_action(guint key_id) { switch (key_id) { + case GEANY_KEYS_PROJECT_OPEN: + on_project_open1_activate(NULL, NULL); + break; case GEANY_KEYS_PROJECT_PROPERTIES: if (app->project) on_project_properties1_activate(NULL, NULL); diff --git a/src/keybindings.h b/src/keybindings.h index 0763eec9..d8e64d7d 100644 --- a/src/keybindings.h +++ b/src/keybindings.h @@ -237,6 +237,7 @@ enum GeanyKeyBindingID GEANY_KEYS_INSERT_LINEAFTER, /**< Keybinding. */ GEANY_KEYS_INSERT_LINEBEFORE, /**< Keybinding. */ GEANY_KEYS_DOCUMENT_REMOVE_MARKERS_INDICATORS, /**< Keybinding. */ + GEANY_KEYS_PROJECT_OPEN, /**< Keybinding. */ GEANY_KEYS_COUNT /* must not be used by plugins */ };