geany
1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
![]() ![]() |
#include "keybindings.h"
#include "app.h"
#include "build.h"
#include "callbacks.h"
#include "documentprivate.h"
#include "filetypes.h"
#include "geanyobject.h"
#include "keybindingsprivate.h"
#include "main.h"
#include "msgwindow.h"
#include "navqueue.h"
#include "notebook.h"
#include "prefs.h"
#include "sciwrappers.h"
#include "sidebar.h"
#include "support.h"
#include "symbols.h"
#include "toolbar.h"
#include "tools.h"
#include "ui_utils.h"
#include "utils.h"
#include "vte.h"
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | ADD_KB_GROUP(group_id, label, callback) |
#define | GEANY_ADD_POPUP_ACCEL(kb_id, wid) add_menu_accel(group, kb_id, ui_lookup_widget(main_widgets.editor_menu, G_STRINGIFY(wid))) |
Typedefs | |
typedef void(* | KBItemCallback) (GeanyKeyGroup *group, GeanyKeyBinding *kb, gpointer user_data) |
Functions | |
static gboolean | on_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) |
static gboolean | check_current_word (GeanyDocument *doc, gboolean sci_word) |
static gboolean | read_current_word (GeanyDocument *doc, gboolean sci_word) |
static gchar * | get_current_word_or_sel (GeanyDocument *doc, gboolean sci_word) |
static gboolean | cb_func_file_action (guint key_id) |
static gboolean | cb_func_project_action (guint key_id) |
static gboolean | cb_func_editor_action (guint key_id) |
static gboolean | cb_func_select_action (guint key_id) |
static gboolean | cb_func_format_action (guint key_id) |
static gboolean | cb_func_insert_action (guint key_id) |
static gboolean | cb_func_search_action (guint key_id) |
static gboolean | cb_func_goto_action (guint key_id) |
static gboolean | cb_func_switch_action (guint key_id) |
static gboolean | cb_func_clipboard_action (guint key_id) |
static gboolean | cb_func_document_action (guint key_id) |
static gboolean | cb_func_view_action (guint key_id) |
static void | cb_func_menu_help (guint key_id) |
static void | cb_func_menu_preferences (guint key_id) |
static void | cb_func_menu_fullscreen (guint key_id) |
static void | cb_func_menu_messagewindow (guint key_id) |
static void | cb_func_menu_opencolorchooser (guint key_id) |
static void | cb_func_switch_tableft (guint key_id) |
static void | cb_func_switch_tabright (guint key_id) |
static void | cb_func_switch_tablastused (guint key_id) |
static void | cb_func_move_tab (guint key_id) |
static void | add_popup_menu_accels (void) |
GdkModifierType | keybindings_get_modifiers (GdkModifierType mods) |
Gets significant modifiers from a GdkModifierType mask. More... | |
GeanyKeyBinding * | keybindings_get_item (GeanyKeyGroup *group, gsize key_id) |
Looks up a keybinding item. More... | |
GeanyKeyBinding * | keybindings_set_item (GeanyKeyGroup *group, gsize key_id, GeanyKeyCallback callback, guint key, GdkModifierType mod, const gchar *kf_name, const gchar *label, GtkWidget *menu_item) |
Fills a GeanyKeyBinding struct item. More... | |
GeanyKeyBinding * | keybindings_set_item_full (GeanyKeyGroup *group, gsize key_id, guint key, GdkModifierType mod, const gchar *kf_name, const gchar *label, GtkWidget *menu_item, GeanyKeyBindingFunc cb, gpointer pdata, GDestroyNotify destroy_notify) |
Creates a new keybinding using a GeanyKeyBindingFunc and attaches it to a keybinding group. More... | |
static void | free_key_binding (gpointer item) |
static void | add_kb_group (GeanyKeyGroup *group, const gchar *name, const gchar *label, GeanyKeyGroupCallback callback, gboolean plugin) |
GeanyKeyGroup * | keybindings_get_core_group (guint id) |
static void | add_kb (GeanyKeyGroup *group, gsize key_id, GeanyKeyCallback callback, guint key, GdkModifierType mod, const gchar *kf_name, const gchar *label, const gchar *widget_name) |
static void | init_default_kb (void) |
static void | free_key_group (gpointer item) |
void | keybindings_init (void) |
static void | keybindings_foreach (KBItemCallback cb, gpointer user_data) |
static void | load_kb (GeanyKeyGroup *group, GeanyKeyBinding *kb, gpointer user_data) |
static void | load_user_kb (void) |
static void | apply_kb_accel (GeanyKeyGroup *group, GeanyKeyBinding *kb, gpointer user_data) |
void | keybindings_load_keyfile (void) |
Reloads keybinding settings from configuration file. More... | |
static void | add_menu_accel (GeanyKeyGroup *group, guint kb_id, GtkWidget *menuitem) |
static void | set_keyfile_kb (GeanyKeyGroup *group, GeanyKeyBinding *kb, gpointer user_data) |
void | keybindings_write_to_file (void) |
void | keybindings_free (void) |
gchar * | keybindings_get_label (GeanyKeyBinding *kb) |
static void | fill_shortcut_labels_treeview (GtkWidget *tree) |
static GtkWidget * | create_dialog (void) |
static void | key_dialog_show_prefs (void) |
void | keybindings_dialog_show_prefs_scroll (const gchar *name) |
static void | on_dialog_response (GtkWidget *dialog, gint response, gpointer user_data) |
void | keybindings_show_shortcuts (void) |
static gboolean | check_fixed_kb (guint keyval, guint state) |
static gboolean | check_snippet_completion (GeanyDocument *doc) |
static void | trigger_button_event (GtkWidget *widget, guint32 event_time) |
static gboolean | check_menu_key (GeanyDocument *doc, guint keyval, guint state, guint32 event_time) |
static guint | key_kp_translate (guint key_in) |
gboolean | keybindings_check_event (GdkEventKey *ev, GeanyKeyBinding *kb) |
static gboolean | run_kb (GeanyKeyBinding *kb, GeanyKeyGroup *group) |
GeanyKeyBinding * | keybindings_lookup_item (guint group_id, guint key_id) |
void | keybindings_send_command (guint group_id, guint key_id) |
Mimics a (built-in only) keybinding action. More... | |
static void | cb_func_menu_help (G_GNUC_UNUSED guint key_id) |
static void | cb_func_menu_opencolorchooser (G_GNUC_UNUSED guint key_id) |
static void | cb_func_menu_fullscreen (G_GNUC_UNUSED guint key_id) |
static void | cb_func_menu_messagewindow (G_GNUC_UNUSED guint key_id) |
static void | focus_sidebar (void) |
static GtkWidget * | find_focus_widget (GtkWidget *widget) |
static void | focus_msgwindow (void) |
static void | switch_notebook_page (gint direction) |
static void | cb_func_switch_tableft (G_GNUC_UNUSED guint key_id) |
static void | cb_func_switch_tabright (G_GNUC_UNUSED guint key_id) |
static void | cb_func_switch_tablastused (G_GNUC_UNUSED guint key_id) |
static void | goto_matching_brace (GeanyDocument *doc) |
static void | goto_tag (GeanyDocument *doc, gboolean definition) |
static void | duplicate_lines (GeanyEditor *editor) |
static void | delete_lines (GeanyEditor *editor) |
static void | join_lines (GeanyEditor *editor) |
static gint | get_reflow_column (GeanyEditor *editor) |
static gint | split_line (GeanyEditor *editor, gint column) |
static void | reflow_lines (GeanyEditor *editor, gint column) |
static void | sci_deselect_last_newline (ScintillaObject *sci) |
static void | reflow_paragraph (GeanyEditor *editor) |
static void | join_paragraph (GeanyEditor *editor) |
static void | insert_line_after (GeanyEditor *editor) |
static void | insert_line_before (GeanyEditor *editor) |
void | keybindings_update_combo (GeanyKeyBinding *kb, guint key, GdkModifierType mods) |
GeanyKeyGroup * | keybindings_set_group (GeanyKeyGroup *group, const gchar *section_name, const gchar *label, gsize count, GeanyKeyGroupCallback callback) |
void | keybindings_free_group (GeanyKeyGroup *group) |
Variables | |
GPtrArray * | keybinding_groups |
static const gchar | keybindings_keyfile_group_name [] = "Bindings" |
static GeanyKeyBinding | binding_ids [GEANY_KEYS_COUNT] |
static GtkAccelGroup * | kb_accel_group = NULL |
static const gboolean | swap_alt_tab_order = FALSE |
static GtkWidget * | key_dialog = NULL |
#define ADD_KB_GROUP | ( | group_id, | |
label, | |||
callback | |||
) |
Definition at line 300 of file keybindings.c.
#define GEANY_ADD_POPUP_ACCEL | ( | kb_id, | |
wid | |||
) | add_menu_accel(group, kb_id, ui_lookup_widget(main_widgets.editor_menu, G_STRINGIFY(wid))) |
Definition at line 862 of file keybindings.c.
typedef void(* KBItemCallback) (GeanyKeyGroup *group, GeanyKeyBinding *kb, gpointer user_data) |
Definition at line 756 of file keybindings.c.
|
static |
Definition at line 288 of file keybindings.c.
References group, keybindings_set_item(), label, main_widgets, NULL, ui_lookup_widget(), and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 261 of file keybindings.c.
References free_key_binding(), group, keybinding_groups, label, name, StashGroup::name, and NULL.
Referenced by keybindings_set_group().
|
static |
Definition at line 852 of file keybindings.c.
References group, kb_accel_group, GeanyKeyBinding::key, keybindings_get_item(), and GeanyKeyBinding::mods.
|
static |
Definition at line 867 of file keybindings.c.
References GEANY_ADD_POPUP_ACCEL, GEANY_KEY_GROUP_CLIPBOARD, GEANY_KEY_GROUP_EDITOR, GEANY_KEY_GROUP_FILE, GEANY_KEY_GROUP_GOTO, GEANY_KEY_GROUP_INSERT, GEANY_KEY_GROUP_SEARCH, GEANY_KEY_GROUP_SELECT, GEANY_KEYS_CLIPBOARD_COPY, GEANY_KEYS_CLIPBOARD_CUT, GEANY_KEYS_CLIPBOARD_PASTE, GEANY_KEYS_EDITOR_CONTEXTACTION, GEANY_KEYS_EDITOR_REDO, GEANY_KEYS_EDITOR_UNDO, GEANY_KEYS_FILE_OPENSELECTED, GEANY_KEYS_GOTO_TAGDEFINITION, GEANY_KEYS_INSERT_ALTWHITESPACE, GEANY_KEYS_INSERT_DATE, GEANY_KEYS_SEARCH_FINDDOCUMENTUSAGE, GEANY_KEYS_SEARCH_FINDUSAGE, GEANY_KEYS_SELECT_ALL, group, and keybindings_get_core_group().
Referenced by keybindings_load_keyfile().
|
static |
Definition at line 822 of file keybindings.c.
References kb_accel_group, GeanyKeyBinding::key, GeanyKeyBinding::menu_item, and GeanyKeyBinding::mods.
Referenced by keybindings_load_keyfile().
|
static |
Definition at line 1938 of file keybindings.c.
References GEANY_KEYS_CLIPBOARD_COPY, GEANY_KEYS_CLIPBOARD_COPYLINE, GEANY_KEYS_CLIPBOARD_CUT, GEANY_KEYS_CLIPBOARD_CUTLINE, GEANY_KEYS_CLIPBOARD_PASTE, main_widgets, NULL, on_copy1_activate(), on_cut1_activate(), on_paste1_activate(), SCI_LINECOPY, SCI_LINECUT, sci_send_command(), and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 2532 of file keybindings.c.
References document_clone(), document_get_current(), document_update_tags(), GeanyDocument::editor, editor_fold_all(), editor_prefs, editor_strip_trailing_spaces(), editor_toggle_fold(), editor_unfold_all(), GeanyEditorPrefs::folding, GEANY_KEYS_DOCUMENT_CLONE, GEANY_KEYS_DOCUMENT_FOLDALL, GEANY_KEYS_DOCUMENT_LINEBREAK, GEANY_KEYS_DOCUMENT_LINEWRAP, GEANY_KEYS_DOCUMENT_RELOADTAGLIST, GEANY_KEYS_DOCUMENT_REMOVE_ERROR_INDICATORS, GEANY_KEYS_DOCUMENT_REMOVE_MARKERS, GEANY_KEYS_DOCUMENT_REMOVE_MARKERS_INDICATORS, GEANY_KEYS_DOCUMENT_REPLACESPACES, GEANY_KEYS_DOCUMENT_REPLACETABS, GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES, GEANY_KEYS_DOCUMENT_TOGGLEFOLD, GEANY_KEYS_DOCUMENT_UNFOLDALL, line, NULL, on_line_breaking1_activate(), on_line_wrapping1_toggled(), on_menu_remove_indicators1_activate(), on_remove_markers1_activate(), on_replace_spaces_activate(), on_replace_tabs_activate(), GeanyEditor::sci, sci_get_current_line(), and ui_document_show_hide().
Referenced by init_default_kb().
|
static |
Definition at line 2103 of file keybindings.c.
References check_current_word(), check_snippet_completion(), delete_lines(), document_get_current(), duplicate_lines(), GeanyDocument::editor, editor_complete_word_part(), editor_goto_next_snippet_cursor(), GeanyMainWidgets::editor_menu, editor_scroll_to_line(), editor_show_calltip(), editor_start_auto_complete(), GEANY_KEY_GROUP_EDITOR, GEANY_KEYS_EDITOR_AUTOCOMPLETE, GEANY_KEYS_EDITOR_CALLTIP, GEANY_KEYS_EDITOR_COMPLETESNIPPET, GEANY_KEYS_EDITOR_CONTEXTACTION, GEANY_KEYS_EDITOR_DELETELINE, GEANY_KEYS_EDITOR_DELETELINETOBEGINNING, GEANY_KEYS_EDITOR_DELETELINETOEND, GEANY_KEYS_EDITOR_DUPLICATELINE, GEANY_KEYS_EDITOR_MOVELINEDOWN, GEANY_KEYS_EDITOR_MOVELINEUP, GEANY_KEYS_EDITOR_REDO, GEANY_KEYS_EDITOR_SCROLLLINEDOWN, GEANY_KEYS_EDITOR_SCROLLLINEUP, GEANY_KEYS_EDITOR_SCROLLTOLINE, GEANY_KEYS_EDITOR_SNIPPETNEXTCURSOR, GEANY_KEYS_EDITOR_SUPPRESSSNIPPETCOMPLETION, GEANY_KEYS_EDITOR_TRANSPOSELINE, GEANY_KEYS_EDITOR_UNDO, GEANY_KEYS_EDITOR_WORDPARTCOMPLETION, GeanyKeyBinding::key, keybindings_lookup_item(), main_widgets, NULL, on_context_action1_activate(), on_redo1_activate(), on_undo1_activate(), GeanyEditor::sci, sci_add_text(), SCI_DELLINELEFT, SCI_DELLINERIGHT, sci_get_current_position(), SCI_LINESCROLLDOWN, SCI_LINESCROLLUP, SCI_LINETRANSPOSE, sci_move_selected_lines_down(), sci_move_selected_lines_up(), sci_send_command(), SCI_TAB, ui_lookup_widget(), and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 1442 of file keybindings.c.
References document_new_file(), document_open_file(), GEANY_KEYS_FILE_CLOSE, GEANY_KEYS_FILE_CLOSEALL, GEANY_KEYS_FILE_NEW, GEANY_KEYS_FILE_OPEN, GEANY_KEYS_FILE_OPENLASTTAB, GEANY_KEYS_FILE_OPENSELECTED, GEANY_KEYS_FILE_PRINT, GEANY_KEYS_FILE_PROPERTIES, GEANY_KEYS_FILE_QUIT, GEANY_KEYS_FILE_RELOAD, GEANY_KEYS_FILE_RELOAD_ALL, GEANY_KEYS_FILE_SAVE, GEANY_KEYS_FILE_SAVEALL, GEANY_KEYS_FILE_SAVEAS, main_quit(), NULL, on_close1_activate(), on_close_all1_activate(), on_file_properties_activate(), on_menu_open_selected_file1_activate(), on_open1_activate(), on_print1_activate(), on_reload_all(), on_save1_activate(), on_save_all1_activate(), on_save_as1_activate(), on_toolbutton_reload_clicked(), ui_prefs, and utils_get_locale_from_utf8().
Referenced by init_default_kb().
|
static |
Definition at line 2408 of file keybindings.c.
References document_get_current(), GeanyDocument::editor, editor_indentation_by_one_space(), editor_smart_line_indentation(), GEANY_KEYS_FORMAT_AUTOINDENT, GEANY_KEYS_FORMAT_COMMENTLINE, GEANY_KEYS_FORMAT_COMMENTLINETOGGLE, GEANY_KEYS_FORMAT_DECREASEINDENT, GEANY_KEYS_FORMAT_DECREASEINDENTBYSPACE, GEANY_KEYS_FORMAT_INCREASEINDENT, GEANY_KEYS_FORMAT_INCREASEINDENTBYSPACE, GEANY_KEYS_FORMAT_JOINLINES, GEANY_KEYS_FORMAT_REFLOWPARAGRAPH, GEANY_KEYS_FORMAT_SENDTOCMD1, GEANY_KEYS_FORMAT_SENDTOCMD2, GEANY_KEYS_FORMAT_SENDTOCMD3, GEANY_KEYS_FORMAT_SENDTOCMD4, GEANY_KEYS_FORMAT_SENDTOCMD5, GEANY_KEYS_FORMAT_SENDTOCMD6, GEANY_KEYS_FORMAT_SENDTOCMD7, GEANY_KEYS_FORMAT_SENDTOCMD8, GEANY_KEYS_FORMAT_SENDTOCMD9, GEANY_KEYS_FORMAT_SENDTOVTE, GEANY_KEYS_FORMAT_TOGGLECASE, GEANY_KEYS_FORMAT_UNCOMMENTLINE, join_paragraph(), main_widgets, NULL, on_menu_comment_line1_activate(), on_menu_decrease_indent1_activate(), on_menu_increase_indent1_activate(), on_menu_toggle_line_commentation1_activate(), on_menu_uncomment_line1_activate(), on_send_selection_to_vte1_activate(), on_toggle_case1_activate(), reflow_paragraph(), GeanyEditor::sci, tools_execute_custom_command(), ui_prefs, and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 1980 of file keybindings.c.
References document_get_current(), GeanyDocument::editor, editor_display_current_line(), editor_prefs, GEANY_KEYS_GOTO_BACK, GEANY_KEYS_GOTO_FORWARD, GEANY_KEYS_GOTO_LINE, GEANY_KEYS_GOTO_LINEEND, GEANY_KEYS_GOTO_LINEENDVISUAL, GEANY_KEYS_GOTO_LINESTART, GEANY_KEYS_GOTO_LINESTARTVISUAL, GEANY_KEYS_GOTO_MATCHINGBRACE, GEANY_KEYS_GOTO_NEXTMARKER, GEANY_KEYS_GOTO_NEXTWORDPART, GEANY_KEYS_GOTO_PREVIOUSMARKER, GEANY_KEYS_GOTO_PREVWORDPART, GEANY_KEYS_GOTO_TAGDECLARATION, GEANY_KEYS_GOTO_TAGDEFINITION, GEANY_KEYS_GOTO_TOGGLEMARKER, goto_matching_brace(), goto_tag(), main_widgets, navqueue_go_back(), navqueue_go_forward(), NULL, on_go_to_line_activate(), GeanyEditor::sci, sci_get_current_line(), SCI_HOME, SCI_HOMEDISPLAY, SCI_LINEEND, SCI_LINEENDDISPLAY, sci_marker_next(), sci_marker_previous(), sci_send_command(), sci_set_current_line(), sci_toggle_marker_at_line(), SCI_VCHOME, SCI_VCHOMEDISPLAY, SCI_WORDPARTLEFT, SCI_WORDPARTRIGHT, GeanyEditorPrefs::smart_home_key, toolbar_get_widget_child_by_name(), toolbar_prefs, GeanyToolbarPrefs::visible, and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 2614 of file keybindings.c.
References document_get_current(), GeanyDocument::editor, editor_insert_alternative_whitespace(), GEANY_KEYS_INSERT_ALTWHITESPACE, GEANY_KEYS_INSERT_DATE, GEANY_KEYS_INSERT_LINEAFTER, GEANY_KEYS_INSERT_LINEBEFORE, insert_line_after(), insert_line_before(), main_widgets, NULL, GeanyEditor::sci, ui_lookup_widget(), and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 1641 of file keybindings.c.
References main_widgets, ui_lookup_widget(), and GeanyMainWidgets::window.
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1535 of file keybindings.c.
References NULL, and on_help1_activate().
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1650 of file keybindings.c.
References main_widgets, ui_lookup_widget(), and GeanyMainWidgets::window.
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1609 of file keybindings.c.
References NULL, and on_show_color_chooser1_activate().
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1521 of file keybindings.c.
References GEANY_KEYS_SETTINGS_PLUGINPREFERENCES, GEANY_KEYS_SETTINGS_PREFERENCES, NULL, on_plugin_preferences1_activate(), and on_preferences1_activate().
Referenced by init_default_kb().
|
static |
Definition at line 1882 of file keybindings.c.
References file_prefs, GEANY_KEYS_NOTEBOOK_MOVETABFIRST, GEANY_KEYS_NOTEBOOK_MOVETABLAST, GEANY_KEYS_NOTEBOOK_MOVETABLEFT, GEANY_KEYS_NOTEBOOK_MOVETABRIGHT, main_widgets, GeanyMainWidgets::notebook, and GeanyFilePrefs::tab_order_ltr.
Referenced by init_default_kb().
|
static |
Definition at line 1498 of file keybindings.c.
References app, GEANY_KEYS_PROJECT_CLOSE, GEANY_KEYS_PROJECT_NEW, GEANY_KEYS_PROJECT_OPEN, GEANY_KEYS_PROJECT_PROPERTIES, NULL, on_project_close1_activate(), on_project_new1_activate(), on_project_open1_activate(), on_project_properties1_activate(), and GeanyApp::project.
Referenced by init_default_kb().
|
static |
Definition at line 1541 of file keybindings.c.
References document_get_current(), GeanyDocument::editor, GEANY_FIND_MATCHCASE, GEANY_FIND_WHOLEWORD, GEANY_INDICATOR_SEARCH, GEANY_KEYS_SEARCH_FIND, GEANY_KEYS_SEARCH_FINDDOCUMENTUSAGE, GEANY_KEYS_SEARCH_FINDINFILES, GEANY_KEYS_SEARCH_FINDNEXT, GEANY_KEYS_SEARCH_FINDNEXTSEL, GEANY_KEYS_SEARCH_FINDPREVIOUS, GEANY_KEYS_SEARCH_FINDPREVSEL, GEANY_KEYS_SEARCH_FINDUSAGE, GEANY_KEYS_SEARCH_MARKALL, GEANY_KEYS_SEARCH_NEXTMESSAGE, GEANY_KEYS_SEARCH_PREVIOUSMESSAGE, GEANY_KEYS_SEARCH_REPLACE, get_current_word_or_sel(), MAX, NULL, on_find1_activate(), on_find_document_usage1_activate(), on_find_in_files1_activate(), on_find_next1_activate(), on_find_nextsel1_activate(), on_find_previous1_activate(), on_find_prevsel1_activate(), on_find_usage1_activate(), on_next_message1_activate(), on_previous_message1_activate(), on_replace1_activate(), pos, sci, GeanyEditor::sci, sci_get_current_position(), sci_has_selection(), SCI_INDICATORVALUEAT, search_mark_all(), and text.
Referenced by init_default_kb().
|
static |
Definition at line 2497 of file keybindings.c.
References document_get_current(), GeanyDocument::editor, editor_select_lines(), editor_select_paragraph(), editor_select_word(), GEANY_KEYS_SELECT_ALL, GEANY_KEYS_SELECT_LINE, GEANY_KEYS_SELECT_PARAGRAPH, GEANY_KEYS_SELECT_WORD, GEANY_KEYS_SELECT_WORDPARTLEFT, GEANY_KEYS_SELECT_WORDPARTRIGHT, main_widgets, NULL, on_menu_select_all1_activate(), sci_send_command(), SCI_WORDPARTLEFTEXTEND, SCI_WORDPARTRIGHTEXTEND, and GeanyMainWidgets::window.
Referenced by init_default_kb().
|
static |
Definition at line 1754 of file keybindings.c.
References document_get_current(), GeanyDocument::editor, focus_msgwindow(), focus_sidebar(), GEANY_KEYS_FOCUS_COMPILER, GEANY_KEYS_FOCUS_EDITOR, GEANY_KEYS_FOCUS_MESSAGE_WINDOW, GEANY_KEYS_FOCUS_MESSAGES, GEANY_KEYS_FOCUS_SCRIBBLE, GEANY_KEYS_FOCUS_SEARCHBAR, GEANY_KEYS_FOCUS_SIDEBAR, GEANY_KEYS_FOCUS_SIDEBAR_DOCUMENT_LIST, GEANY_KEYS_FOCUS_SIDEBAR_SYMBOL_LIST, GEANY_KEYS_FOCUS_VTE, MSG_COMPILER, MSG_MESSAGE, MSG_SCRATCH, MSG_VTE, msgwin_switch_tab(), NULL, sci, GeanyEditor::sci, sidebar_focus_openfiles_tab(), sidebar_focus_symbols_tab(), toolbar_get_widget_child_by_name(), toolbar_prefs, ui_update_statusbar(), and GeanyToolbarPrefs::visible.
Referenced by init_default_kb().
|
static |
Definition at line 1875 of file keybindings.c.
References notebook_switch_tablastused().
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1863 of file keybindings.c.
References switch_notebook_page().
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1869 of file keybindings.c.
References switch_notebook_page().
|
static |
Referenced by init_default_kb().
|
static |
Definition at line 1615 of file keybindings.c.
References GEANY_KEYS_VIEW_SIDEBAR, GEANY_KEYS_VIEW_TOGGLEALL, GEANY_KEYS_VIEW_ZOOMIN, GEANY_KEYS_VIEW_ZOOMOUT, GEANY_KEYS_VIEW_ZOOMRESET, NULL, on_menu_show_sidebar1_toggled(), on_menu_toggle_all_additional_widgets1_activate(), on_normal_size1_activate(), on_zoom_in1_activate(), and on_zoom_out1_activate().
Referenced by init_default_kb().
|
static |
Definition at line 1678 of file keybindings.c.
References read_current_word(), and utils_beep().
Referenced by cb_func_editor_action().
|
static |
Definition at line 1091 of file keybindings.c.
References file_prefs, GEANY_PRIMARY_MOD_MASK, main_widgets, GeanyMainWidgets::notebook, swap_alt_tab_order, and GeanyFilePrefs::tab_order_ltr.
Referenced by on_key_press_event().
|
static |
Definition at line 1173 of file keybindings.c.
References GeanyDocument::editor, GeanyDocument::is_valid, main_widgets, msgwindow, GeanyMainWidgets::notebook, NULL, GeanyDocument::priv, GeanyEditor::sci, GeanyDocumentPrivate::tag_tree, SidebarTreeviews::tree_openfiles, trigger_button_event(), tv, and GeanyMainWidgets::window.
Referenced by on_key_press_event().
|
static |
Definition at line 1126 of file keybindings.c.
References GeanyEditorPrefs::complete_snippets, GeanyDocument::editor, editor_complete_snippet(), editor_prefs, main_widgets, pos, sci, GeanyEditor::sci, sci_get_current_position(), and GeanyMainWidgets::window.
Referenced by cb_func_editor_action().
|
static |
Definition at line 991 of file keybindings.c.
References _, dialog, fill_shortcut_labels_treeview(), GEANY_DEFAULT_DIALOG_HEIGHT, gtk_container_add(), label, main_widgets, NULL, ui_dialog_vbox_new(), and GeanyMainWidgets::window.
Referenced by keybindings_show_shortcuts().
|
static |
Definition at line 2095 of file keybindings.c.
References editor_select_lines(), GeanyEditor::sci, and sci_clear().
Referenced by cb_func_editor_action().
|
static |
Definition at line 2081 of file keybindings.c.
References editor_select_lines(), GeanyEditor::sci, sci_get_lines_selected(), sci_has_selection(), sci_line_duplicate(), and sci_selection_duplicate().
Referenced by cb_func_editor_action().
|
static |
Definition at line 952 of file keybindings.c.
References foreach_ptr_array, group, GeanyKeyBinding::key, keybinding_groups, keybindings_get_label(), label, and GeanyKeyBinding::mods.
Referenced by create_dialog().
|
static |
Definition at line 1713 of file keybindings.c.
References find_focus_widget(), and NULL.
Referenced by find_focus_widget(), and focus_msgwindow().
|
static |
Definition at line 1738 of file keybindings.c.
References find_focus_widget(), msgwindow, ui_prefs, and utils_beep().
Referenced by cb_func_switch_action().
|
static |
Definition at line 1700 of file keybindings.c.
References main_widgets, GeanyMainWidgets::sidebar_notebook, and ui_prefs.
Referenced by cb_func_switch_action().
|
static |
Definition at line 249 of file keybindings.c.
References GeanyKeyBinding::cb_data, GeanyKeyBinding::cb_data_destroy, GeanyKeyBinding::label, and GeanyKeyBinding::name.
Referenced by add_kb_group().
|
static |
Definition at line 723 of file keybindings.c.
References group, and StashGroup::name.
Referenced by keybindings_init().
|
static |
Definition at line 1689 of file keybindings.c.
References GeanyDocument::editor, editor_info, NULL, read_current_word(), sci, GeanyEditor::sci, sci_get_selection_contents(), and sci_has_selection().
Referenced by cb_func_search_action(), and goto_tag().
|
static |
Definition at line 2218 of file keybindings.c.
References editor_get_prefs(), GeanyEditorPrefs::line_break_column, GeanyEditor::line_breaking, GeanyEditorPrefs::long_line_column, and GeanyEditorPrefs::long_line_type.
Referenced by join_paragraph(), and reflow_paragraph().
|
static |
Definition at line 1918 of file keybindings.c.
References DOC_VALID, GeanyDocument::editor, editor_display_current_line(), pos, GeanyEditor::sci, sci_find_matching_brace(), sci_get_char_at(), sci_get_current_position(), sci_set_current_position(), and utils_isbrace().
Referenced by cb_func_goto_action().
|
static |
Definition at line 1966 of file keybindings.c.
References get_current_word_or_sel(), symbols_goto_tag(), text, and utils_beep().
Referenced by cb_func_goto_action().
|
static |
Definition at line 304 of file keybindings.c.
References _, add_kb(), ADD_KB_GROUP, build_keybinding(), cb_func_clipboard_action(), cb_func_document_action(), cb_func_editor_action(), cb_func_file_action(), cb_func_format_action(), cb_func_goto_action(), cb_func_insert_action(), cb_func_menu_fullscreen(), cb_func_menu_help(), cb_func_menu_messagewindow(), cb_func_menu_opencolorchooser(), cb_func_menu_preferences(), cb_func_move_tab(), cb_func_project_action(), cb_func_search_action(), cb_func_select_action(), cb_func_switch_action(), cb_func_switch_tablastused(), cb_func_switch_tableft(), cb_func_switch_tabright(), cb_func_view_action(), GEANY_KEY_GROUP_BUILD, GEANY_KEY_GROUP_CLIPBOARD, GEANY_KEY_GROUP_DOCUMENT, GEANY_KEY_GROUP_EDITOR, GEANY_KEY_GROUP_FILE, GEANY_KEY_GROUP_FOCUS, GEANY_KEY_GROUP_FORMAT, GEANY_KEY_GROUP_GOTO, GEANY_KEY_GROUP_HELP, GEANY_KEY_GROUP_INSERT, GEANY_KEY_GROUP_NOTEBOOK, GEANY_KEY_GROUP_PROJECT, GEANY_KEY_GROUP_SEARCH, GEANY_KEY_GROUP_SELECT, GEANY_KEY_GROUP_SETTINGS, GEANY_KEY_GROUP_TOOLS, GEANY_KEY_GROUP_VIEW, GEANY_KEYS_BUILD_COMPILE, GEANY_KEYS_BUILD_LINK, GEANY_KEYS_BUILD_MAKE, GEANY_KEYS_BUILD_MAKEOBJECT, GEANY_KEYS_BUILD_MAKEOWNTARGET, GEANY_KEYS_BUILD_NEXTERROR, GEANY_KEYS_BUILD_OPTIONS, GEANY_KEYS_BUILD_PREVIOUSERROR, GEANY_KEYS_BUILD_RUN, GEANY_KEYS_CLIPBOARD_COPY, GEANY_KEYS_CLIPBOARD_COPYLINE, GEANY_KEYS_CLIPBOARD_CUT, GEANY_KEYS_CLIPBOARD_CUTLINE, GEANY_KEYS_CLIPBOARD_PASTE, GEANY_KEYS_DOCUMENT_CLONE, GEANY_KEYS_DOCUMENT_FOLDALL, GEANY_KEYS_DOCUMENT_LINEBREAK, GEANY_KEYS_DOCUMENT_LINEWRAP, GEANY_KEYS_DOCUMENT_RELOADTAGLIST, GEANY_KEYS_DOCUMENT_REMOVE_ERROR_INDICATORS, GEANY_KEYS_DOCUMENT_REMOVE_MARKERS, GEANY_KEYS_DOCUMENT_REMOVE_MARKERS_INDICATORS, GEANY_KEYS_DOCUMENT_REPLACESPACES, GEANY_KEYS_DOCUMENT_REPLACETABS, GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES, GEANY_KEYS_DOCUMENT_TOGGLEFOLD, GEANY_KEYS_DOCUMENT_UNFOLDALL, GEANY_KEYS_EDITOR_AUTOCOMPLETE, GEANY_KEYS_EDITOR_CALLTIP, GEANY_KEYS_EDITOR_COMPLETESNIPPET, GEANY_KEYS_EDITOR_CONTEXTACTION, GEANY_KEYS_EDITOR_DELETELINE, GEANY_KEYS_EDITOR_DELETELINETOBEGINNING, GEANY_KEYS_EDITOR_DELETELINETOEND, GEANY_KEYS_EDITOR_DUPLICATELINE, GEANY_KEYS_EDITOR_MOVELINEDOWN, GEANY_KEYS_EDITOR_MOVELINEUP, GEANY_KEYS_EDITOR_REDO, GEANY_KEYS_EDITOR_SCROLLLINEDOWN, GEANY_KEYS_EDITOR_SCROLLLINEUP, GEANY_KEYS_EDITOR_SCROLLTOLINE, GEANY_KEYS_EDITOR_SNIPPETNEXTCURSOR, GEANY_KEYS_EDITOR_SUPPRESSSNIPPETCOMPLETION, GEANY_KEYS_EDITOR_TRANSPOSELINE, GEANY_KEYS_EDITOR_UNDO, GEANY_KEYS_EDITOR_WORDPARTCOMPLETION, GEANY_KEYS_FILE_CLOSE, GEANY_KEYS_FILE_CLOSEALL, GEANY_KEYS_FILE_NEW, GEANY_KEYS_FILE_OPEN, GEANY_KEYS_FILE_OPENLASTTAB, GEANY_KEYS_FILE_OPENSELECTED, GEANY_KEYS_FILE_PRINT, GEANY_KEYS_FILE_PROPERTIES, GEANY_KEYS_FILE_QUIT, GEANY_KEYS_FILE_RELOAD, GEANY_KEYS_FILE_RELOAD_ALL, GEANY_KEYS_FILE_SAVE, GEANY_KEYS_FILE_SAVEALL, GEANY_KEYS_FILE_SAVEAS, GEANY_KEYS_FOCUS_COMPILER, GEANY_KEYS_FOCUS_EDITOR, GEANY_KEYS_FOCUS_MESSAGE_WINDOW, GEANY_KEYS_FOCUS_MESSAGES, GEANY_KEYS_FOCUS_SCRIBBLE, GEANY_KEYS_FOCUS_SEARCHBAR, GEANY_KEYS_FOCUS_SIDEBAR, GEANY_KEYS_FOCUS_SIDEBAR_DOCUMENT_LIST, GEANY_KEYS_FOCUS_SIDEBAR_SYMBOL_LIST, GEANY_KEYS_FOCUS_VTE, GEANY_KEYS_FORMAT_AUTOINDENT, GEANY_KEYS_FORMAT_COMMENTLINE, GEANY_KEYS_FORMAT_COMMENTLINETOGGLE, GEANY_KEYS_FORMAT_DECREASEINDENT, GEANY_KEYS_FORMAT_DECREASEINDENTBYSPACE, GEANY_KEYS_FORMAT_INCREASEINDENT, GEANY_KEYS_FORMAT_INCREASEINDENTBYSPACE, GEANY_KEYS_FORMAT_JOINLINES, GEANY_KEYS_FORMAT_REFLOWPARAGRAPH, GEANY_KEYS_FORMAT_SENDTOCMD1, GEANY_KEYS_FORMAT_SENDTOCMD2, GEANY_KEYS_FORMAT_SENDTOCMD3, GEANY_KEYS_FORMAT_SENDTOCMD4, GEANY_KEYS_FORMAT_SENDTOCMD5, GEANY_KEYS_FORMAT_SENDTOCMD6, GEANY_KEYS_FORMAT_SENDTOCMD7, GEANY_KEYS_FORMAT_SENDTOCMD8, GEANY_KEYS_FORMAT_SENDTOCMD9, GEANY_KEYS_FORMAT_SENDTOVTE, GEANY_KEYS_FORMAT_TOGGLECASE, GEANY_KEYS_FORMAT_UNCOMMENTLINE, GEANY_KEYS_GOTO_BACK, GEANY_KEYS_GOTO_FORWARD, GEANY_KEYS_GOTO_LINE, GEANY_KEYS_GOTO_LINEEND, GEANY_KEYS_GOTO_LINEENDVISUAL, GEANY_KEYS_GOTO_LINESTART, GEANY_KEYS_GOTO_LINESTARTVISUAL, GEANY_KEYS_GOTO_MATCHINGBRACE, GEANY_KEYS_GOTO_NEXTMARKER, GEANY_KEYS_GOTO_NEXTWORDPART, GEANY_KEYS_GOTO_PREVIOUSMARKER, GEANY_KEYS_GOTO_PREVWORDPART, GEANY_KEYS_GOTO_TAGDECLARATION, GEANY_KEYS_GOTO_TAGDEFINITION, GEANY_KEYS_GOTO_TOGGLEMARKER, GEANY_KEYS_HELP_HELP, GEANY_KEYS_INSERT_ALTWHITESPACE, GEANY_KEYS_INSERT_DATE, GEANY_KEYS_INSERT_LINEAFTER, GEANY_KEYS_INSERT_LINEBEFORE, GEANY_KEYS_NOTEBOOK_MOVETABFIRST, GEANY_KEYS_NOTEBOOK_MOVETABLAST, GEANY_KEYS_NOTEBOOK_MOVETABLEFT, GEANY_KEYS_NOTEBOOK_MOVETABRIGHT, GEANY_KEYS_NOTEBOOK_SWITCHTABLASTUSED, GEANY_KEYS_NOTEBOOK_SWITCHTABLEFT, GEANY_KEYS_NOTEBOOK_SWITCHTABRIGHT, GEANY_KEYS_PROJECT_CLOSE, GEANY_KEYS_PROJECT_NEW, GEANY_KEYS_PROJECT_OPEN, GEANY_KEYS_PROJECT_PROPERTIES, GEANY_KEYS_SEARCH_FIND, GEANY_KEYS_SEARCH_FINDDOCUMENTUSAGE, GEANY_KEYS_SEARCH_FINDINFILES, GEANY_KEYS_SEARCH_FINDNEXT, GEANY_KEYS_SEARCH_FINDNEXTSEL, GEANY_KEYS_SEARCH_FINDPREVIOUS, GEANY_KEYS_SEARCH_FINDPREVSEL, GEANY_KEYS_SEARCH_FINDUSAGE, GEANY_KEYS_SEARCH_MARKALL, GEANY_KEYS_SEARCH_NEXTMESSAGE, GEANY_KEYS_SEARCH_PREVIOUSMESSAGE, GEANY_KEYS_SEARCH_REPLACE, GEANY_KEYS_SELECT_ALL, GEANY_KEYS_SELECT_LINE, GEANY_KEYS_SELECT_PARAGRAPH, GEANY_KEYS_SELECT_WORD, GEANY_KEYS_SELECT_WORDPARTLEFT, GEANY_KEYS_SELECT_WORDPARTRIGHT, GEANY_KEYS_SETTINGS_PLUGINPREFERENCES, GEANY_KEYS_SETTINGS_PREFERENCES, GEANY_KEYS_TOOLS_OPENCOLORCHOOSER, GEANY_KEYS_VIEW_FULLSCREEN, GEANY_KEYS_VIEW_MESSAGEWINDOW, GEANY_KEYS_VIEW_SIDEBAR, GEANY_KEYS_VIEW_TOGGLEALL, GEANY_KEYS_VIEW_ZOOMIN, GEANY_KEYS_VIEW_ZOOMOUT, GEANY_KEYS_VIEW_ZOOMRESET, GEANY_PRIMARY_MOD_MASK, group, keybindings_get_core_group(), keybindings_set_item(), NULL, and ui_lookup_stock_label().
Referenced by keybindings_init().
|
static |
Definition at line 2592 of file keybindings.c.
References sci, GeanyEditor::sci, SCI_LINEEND, SCI_NEWLINE, and sci_send_command().
Referenced by cb_func_insert_action().
|
static |
Definition at line 2601 of file keybindings.c.
References line, sci, GeanyEditor::sci, sci_get_current_line(), sci_get_line_indent_position(), SCI_LINEUP, SCI_NEWLINE, sci_send_command(), and sci_set_current_position().
Referenced by cb_func_insert_action().
|
static |
Definition at line 2194 of file keybindings.c.
References editor_strip_line_trailing_spaces(), GeanyEditor::sci, sci_get_line_from_position(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), sci_lines_join(), sci_set_line_indentation(), sci_set_target_end(), and sci_set_target_start().
Referenced by join_paragraph(), and reflow_lines().
|
static |
Definition at line 2381 of file keybindings.c.
References editor_select_indent_block(), get_reflow_column(), join_lines(), sci, GeanyEditor::sci, sci_deselect_last_newline(), sci_end_undo_action(), sci_has_selection(), sci_set_anchor(), sci_start_undo_action(), and utils_beep().
Referenced by cb_func_format_action().
|
static |
Definition at line 1041 of file keybindings.c.
References NULL, prefs_show_dialog(), ui_lookup_widget(), and ui_widgets.
Referenced by keybindings_dialog_show_prefs_scroll(), and on_dialog_response().
|
static |
Definition at line 1271 of file keybindings.c.
Referenced by keybindings_check_event(), and on_key_press_event().
gboolean keybindings_check_event | ( | GdkEventKey * | ev, |
GeanyKeyBinding * | kb | ||
) |
Definition at line 1302 of file keybindings.c.
References GeanyKeyBinding::key, key_kp_translate(), keybindings_get_modifiers(), and GeanyKeyBinding::mods.
Referenced by prefs_dialog_key_press_response_cb().
void keybindings_dialog_show_prefs_scroll | ( | const gchar * | name | ) |
Definition at line 1059 of file keybindings.c.
References key_dialog_show_prefs(), name, and prefs_kb_search_name().
Referenced by pm_on_plugin_button_clicked().
|
static |
Definition at line 758 of file keybindings.c.
References foreach_ptr_array, group, and keybinding_groups.
Referenced by keybindings_load_keyfile(), keybindings_write_to_file(), and load_user_kb().
void keybindings_free | ( | void | ) |
Definition at line 934 of file keybindings.c.
References foreach_ptr_array, group, keybinding_groups, and keybindings_free_group().
Referenced by do_main_quit().
void keybindings_free_group | ( | GeanyKeyGroup * | group | ) |
Definition at line 2685 of file keybindings.c.
References group, and keybinding_groups.
Referenced by keybindings_free(), and plugin_cleanup().
GeanyKeyGroup * keybindings_get_core_group | ( | guint | id | ) |
Definition at line 278 of file keybindings.c.
References GEANY_KEY_GROUP_COUNT, groups, and NULL.
Referenced by add_popup_menu_accels(), create_build_menu(), init_default_kb(), keybindings_lookup_item(), and keybindings_send_command().
GeanyKeyBinding * keybindings_get_item | ( | GeanyKeyGroup * | group, |
gsize | key_id | ||
) |
Looks up a keybinding item.
group | Group. |
key_id | Keybinding index for the group. |
Definition at line 140 of file keybindings.c.
References binding_ids, GEANY_KEYS_COUNT, and group.
Referenced by add_menu_accel(), kb_index(), keybindings_lookup_item(), and keybindings_set_item().
gchar * keybindings_get_label | ( | GeanyKeyBinding * | kb | ) |
Definition at line 946 of file keybindings.c.
References GeanyKeyBinding::label, and utils_str_remove_chars().
Referenced by fill_shortcut_labels_treeview(), and kb_init().
GdkModifierType keybindings_get_modifiers | ( | GdkModifierType | mods | ) |
Gets significant modifiers from a GdkModifierType mask.
The set of significant modifiers corresponds to the default modifier mask as returned by gtk_accelerator_get_default_mod_mask()
. In addition, it improves the Command key handling on OS X by adding GEANY_PRIMARY_MOD_MASK
when needed. For this reason it is preferred to use this function instead of gtk_accelerator_set_default_mod_mask()
.
mods | GdkModifierType mask. |
Definition at line 121 of file keybindings.c.
References GEANY_PRIMARY_MOD_MASK.
Referenced by kb_grab_key_dialog_key_press_cb(), keybindings_check_event(), notebook_tab_click(), on_editor_button_press_event(), on_escape_key_press_event(), on_key_press_event(), and taglist_go_to_selection().
void keybindings_init | ( | void | ) |
Definition at line 742 of file keybindings.c.
References binding_ids, free_key_group(), GEANY_KEY_GROUP_COUNT, init_default_kb(), kb_accel_group, keybinding_groups, main_widgets, NULL, on_key_press_event(), and GeanyMainWidgets::window.
Referenced by main_lib().
void keybindings_load_keyfile | ( | void | ) |
Reloads keybinding settings from configuration file.
Normally plugins do not need to call this function as it is called automatically when a the plugin is activated. However, plugins which need to create keybindings dynamically and reload them when needed should call this function after all keybindings have been updated with plugin_set_key_group() and keybindings_set_item() calls - this makes sure that the corresponding user keybinding shortcuts are applied.
Definition at line 842 of file keybindings.c.
References add_popup_menu_accels(), apply_kb_accel(), keybindings_foreach(), load_user_kb(), and NULL.
Referenced by main_lib(), and pm_plugin_toggled().
GeanyKeyBinding * keybindings_lookup_item | ( | guint | group_id, |
guint | key_id | ||
) |
Definition at line 1408 of file keybindings.c.
References GEANY_KEY_GROUP_COUNT, group, keybindings_get_core_group(), keybindings_get_item(), and NULL.
Referenced by cb_func_editor_action(), cc_insert_custom_command_items(), editor_complete_snippet(), keybindings_send_command(), and prefs_dialog_key_press_response_cb().
void keybindings_send_command | ( | guint | group_id, |
guint | key_id | ||
) |
Mimics a (built-in only) keybinding action.
Example:
group_id | GeanyKeyGroupID keybinding group index that contains the key_id keybinding. |
key_id | GeanyKeyBindingID keybinding index. |
Definition at line 1426 of file keybindings.c.
References group, keybindings_get_core_group(), keybindings_lookup_item(), and run_kb().
Referenced by goto_tag(), msgwin_show_hide(), notebook_tab_click(), on_config_file_clicked(), on_copy_current_lines1_activate(), on_cut_current_lines1_activate(), on_delete_current_lines1_activate(), on_duplicate_line_or_selection1_activate(), on_editor_button_press_event(), on_escape_key_press_event(), on_go_to_next_marker1_activate(), on_go_to_previous_marker1_activate(), on_hide_sidebar(), on_insert_alternative_white_space1_activate(), on_mark_all1_activate(), on_menu_show_sidebar1_toggled(), on_move_lines_down1_activate(), on_move_lines_up1_activate(), on_reflow_lines_block1_activate(), on_select_current_lines1_activate(), on_select_current_paragraph1_activate(), on_smart_line_indent1_activate(), on_toggle_case1_activate(), on_toolbutton_compile_clicked(), on_toolbutton_goto_entry_activate(), on_toolbutton_run_clicked(), and open_selected_files().
GeanyKeyGroup * keybindings_set_group | ( | GeanyKeyGroup * | group, |
const gchar * | section_name, | ||
const gchar * | label, | ||
gsize | count, | ||
GeanyKeyGroupCallback | callback | ||
) |
Definition at line 2661 of file keybindings.c.
References add_kb_group(), count, group, keybindings_keyfile_group_name, label, and NULL.
Referenced by plugin_set_key_group().
GeanyKeyBinding * keybindings_set_item | ( | GeanyKeyGroup * | group, |
gsize | key_id, | ||
GeanyKeyCallback | callback, | ||
guint | key, | ||
GdkModifierType | mod, | ||
const gchar * | kf_name, | ||
const gchar * | label, | ||
GtkWidget * | menu_item | ||
) |
Fills a GeanyKeyBinding struct item.
group | Group. |
key_id | Keybinding index for the group. |
callback | Function to call when activated, or NULL to use the group callback. Usually it's better to use the group callback instead - see plugin_set_key_group(). |
key | Default key, e.g. GDK_KEY_j (must be lower case), but usually 0 for unset. |
mod | Default modifier, e.g. GDK_CONTROL_MASK , but usually 0 for unset. |
kf_name | Key name used for this item in the keybindings configuration file, i.e. "menu_new" . |
label | Label used in the preferences dialog keybindings tab. May contain underscores - these won't be displayed. |
menu_item | Optional widget to set an accelerator for, or NULL . |
Definition at line 171 of file keybindings.c.
References GeanyKeyBinding::callback, GeanyKeyBinding::cb_data, GeanyKeyBinding::cb_func, GeanyKeyBinding::default_key, GeanyKeyBinding::default_mods, group, GeanyKeyBinding::id, GeanyKeyBinding::key, keybindings_get_item(), label, GeanyKeyBinding::label, GeanyKeyBinding::menu_item, GeanyKeyBinding::mods, GeanyKeyBinding::name, StashGroup::name, NULL, and SETPTR.
Referenced by add_kb(), init_default_kb(), keybindings_set_item_full(), and plugin_init().
GeanyKeyBinding * keybindings_set_item_full | ( | GeanyKeyGroup * | group, |
gsize | key_id, | ||
guint | key, | ||
GdkModifierType | mod, | ||
const gchar * | kf_name, | ||
const gchar * | label, | ||
GtkWidget * | menu_item, | ||
GeanyKeyBindingFunc | cb, | ||
gpointer | pdata, | ||
GDestroyNotify | destroy_notify | ||
) |
Creates a new keybinding using a GeanyKeyBindingFunc and attaches it to a keybinding group.
If given the callback should return TRUE
if the keybinding was handled, otherwise FALSE
to allow other callbacks to be run. This allows for multiplexing keybindings on the same keys, depending on the focused widget (or context). If the callback is NULL the group's callback will be invoked, but the same rule applies.
group | Group. |
key_id | Keybinding index for the group. |
key | Default key, e.g. GDK_KEY_j (must be lower case), but usually 0 for unset. |
mod | Default modifier, e.g. GDK_CONTROL_MASK , but usually 0 for unset. |
kf_name | Key name used for this item in the keybindings configuration file, i.e. "menu_new" . |
label | Label used in the preferences dialog keybindings tab. May contain underscores - these won't be displayed. |
menu_item | Optional widget to set an accelerator for, or NULL . |
cb | New-style callback to be called when activated, or NULL to use the group callback. |
pdata | Plugin-specific data passed back to the callback cb. |
destroy_notify | Function that is invoked to free the plugin data when not needed anymore. |
Definition at line 231 of file keybindings.c.
References GeanyKeyBinding::cb_data, GeanyKeyBinding::cb_data_destroy, GeanyKeyBinding::cb_func, group, keybindings_set_item(), label, and NULL.
void keybindings_show_shortcuts | ( | void | ) |
Definition at line 1080 of file keybindings.c.
References create_dialog(), gtk_widget_show_all(), key_dialog, NULL, and on_dialog_response().
Referenced by on_help_shortcuts1_activate().
void keybindings_update_combo | ( | GeanyKeyBinding * | kb, |
guint | key, | ||
GdkModifierType | mods | ||
) |
Definition at line 2644 of file keybindings.c.
References kb_accel_group, GeanyKeyBinding::key, GeanyKeyBinding::menu_item, and GeanyKeyBinding::mods.
Referenced by kb_update().
void keybindings_write_to_file | ( | void | ) |
Definition at line 915 of file keybindings.c.
References app, GeanyApp::configdir, keybindings_foreach(), NULL, set_keyfile_kb(), and utils_write_file().
Referenced by on_prefs_dialog_response(), and pm_plugin_toggled().
|
static |
Definition at line 772 of file keybindings.c.
References group, GeanyKeyBinding::key, GeanyKeyBinding::mods, GeanyKeyBinding::name, StashGroup::name, and NULL.
Referenced by load_user_kb().
|
static |
Definition at line 790 of file keybindings.c.
References app, GeanyApp::configdir, keybindings_foreach(), load_kb(), NULL, and utils_write_file().
Referenced by keybindings_load_keyfile().
|
static |
Definition at line 1069 of file keybindings.c.
References dialog, key_dialog, key_dialog_show_prefs(), and NULL.
Referenced by keybindings_show_shortcuts().
|
static |
Definition at line 1348 of file keybindings.c.
References check_fixed_kb(), check_menu_key(), document_check_disk_status(), document_get_current(), foreach_ptr_array, geany_object, group, GeanyKeyBinding::key, key_kp_translate(), keybinding_groups, keybindings_get_modifiers(), GeanyKeyBinding::mods, and run_kb().
Referenced by keybindings_init().
|
static |
Definition at line 1659 of file keybindings.c.
References DOC_VALID, GeanyDocument::editor, editor_find_current_word(), editor_find_current_word_sciwc(), editor_info, GEANY_MAX_WORD_LENGTH, and NULL.
Referenced by check_current_word(), and get_current_word_or_sel().
|
static |
Definition at line 2290 of file keybindings.c.
References editor_prefs, editor_strip_line_trailing_spaces(), file_prefs, indent, join_lines(), GeanyEditorPrefs::newline_strip, GeanyEditor::sci, sci_get_line_end_position(), sci_get_line_from_position(), sci_get_line_indentation(), sci_get_lines_selected(), sci_get_position_from_line(), sci_get_selection_start(), sci_set_line_indentation(), split_line(), and GeanyFilePrefs::strip_trailing_spaces.
Referenced by reflow_paragraph().
|
static |
Definition at line 2354 of file keybindings.c.
References editor_select_indent_block(), get_reflow_column(), reflow_lines(), sci, GeanyEditor::sci, sci_deselect_last_newline(), sci_end_undo_action(), sci_get_current_line(), sci_get_line_end_position(), sci_goto_pos(), sci_has_selection(), sci_set_anchor(), sci_start_undo_action(), and utils_beep().
Referenced by cb_func_format_action().
|
static |
Definition at line 1323 of file keybindings.c.
References GeanyKeyBinding::callback, GeanyKeyBinding::cb_data, GeanyKeyBinding::cb_func, group, GeanyKeyBinding::id, GeanyKeyBinding::name, and StashGroup::name.
Referenced by keybindings_send_command(), and on_key_press_event().
|
static |
Definition at line 2340 of file keybindings.c.
References sci, sci_get_col_from_position(), sci_get_line_end_position(), sci_get_line_from_position(), sci_get_selection_end(), sci_get_selection_start(), and sci_set_selection().
Referenced by join_paragraph(), and reflow_paragraph().
|
static |
Definition at line 903 of file keybindings.c.
References group, GeanyKeyBinding::key, GeanyKeyBinding::mods, GeanyKeyBinding::name, and StashGroup::name.
Referenced by keybindings_write_to_file().
|
static |
Definition at line 2233 of file keybindings.c.
References editor_get_eol_char(), line, pos, sci, GeanyEditor::sci, sci_get_char_at(), sci_get_col_from_position(), sci_get_current_line(), sci_get_line_end_position(), sci_get_position_from_col(), sci_get_position_from_line(), and sci_insert_text().
Referenced by reflow_lines().
|
static |
Definition at line 1808 of file keybindings.c.
References main_widgets, GeanyMainWidgets::notebook, NULL, and GeanyMainWidgets::window.
Referenced by cb_func_switch_tableft(), and cb_func_switch_tabright().
|
static |
Definition at line 1146 of file keybindings.c.
Referenced by check_menu_key().
|
static |
Definition at line 68 of file keybindings.c.
Referenced by keybindings_get_item(), and keybindings_init().
|
static |
Definition at line 70 of file keybindings.c.
Referenced by add_menu_accel(), apply_kb_accel(), keybindings_init(), and keybindings_update_combo().
|
static |
Definition at line 1067 of file keybindings.c.
Referenced by keybindings_show_shortcuts(), and on_dialog_response().
GPtrArray* keybinding_groups |
Definition at line 62 of file keybindings.c.
Referenced by add_kb_group(), fill_shortcut_labels_treeview(), kb_index(), kb_init(), keybindings_foreach(), keybindings_free(), keybindings_free_group(), keybindings_init(), and on_key_press_event().
|
static |
Definition at line 65 of file keybindings.c.
Referenced by keybindings_set_group().
|
static |
Definition at line 71 of file keybindings.c.
Referenced by check_fixed_kb().