Geany dev
Data Structures | Macros | Typedefs | Enumerations | Functions
keybindings.h File Reference

Configurable keyboard shortcuts. More...

Data Structures

struct  GeanyKeyBinding
 Represents a single keybinding action. More...
 

Macros

#define GEANY_PRIMARY_MOD_MASK   GDK_CONTROL_MASK
 Defines the primary modifier mask which is the Ctrl key mask on UNIX/Windows and Command key mask on OS X. More...
 

Typedefs

typedef gboolean(* GeanyKeyBindingFunc) (GeanyKeyBinding *key, guint key_id, gpointer user_data)
 Function pointer type used for keybinding callbacks, with userdata for passing context. More...
 
typedef void(* GeanyKeyCallback) (guint key_id)
 Function pointer type used for keybinding callbacks.
 
typedef struct GeanyKeyGroup GeanyKeyGroup
 A collection of keybindings grouped together.
 
typedef gboolean(* GeanyKeyGroupCallback) (guint key_id)
 Function pointer type used for keybinding group callbacks. More...
 
typedef gboolean(* GeanyKeyGroupFunc) (GeanyKeyGroup *group, guint key_id, gpointer user_data)
 Function pointer type used for keybinding group callbacks, with userdata for passing context. More...
 

Enumerations

enum  GeanyKeyBindingID {
  GEANY_KEYS_EDITOR_TRANSPOSELINE , GEANY_KEYS_DOCUMENT_REMOVE_ERROR_INDICATORS , GEANY_KEYS_FOCUS_SEARCHBAR , GEANY_KEYS_SEARCH_FIND ,
  GEANY_KEYS_FILE_SAVEALL , GEANY_KEYS_GOTO_NEXTMARKER , GEANY_KEYS_NOTEBOOK_SWITCHTABLEFT , GEANY_KEYS_VIEW_ZOOMOUT ,
  GEANY_KEYS_GOTO_LINE , GEANY_KEYS_DOCUMENT_TOGGLEFOLD , GEANY_KEYS_BUILD_COMPILE , GEANY_KEYS_EDITOR_SCROLLTOLINE ,
  GEANY_KEYS_DOCUMENT_UNFOLDALL , GEANY_KEYS_GOTO_MATCHINGBRACE , GEANY_KEYS_SEARCH_FINDDOCUMENTUSAGE , GEANY_KEYS_CLIPBOARD_PASTE ,
  GEANY_KEYS_BUILD_MAKE , GEANY_KEYS_INSERT_ALTWHITESPACE , GEANY_KEYS_EDITOR_SCROLLLINEDOWN , GEANY_KEYS_VIEW_TOGGLEALL ,
  GEANY_KEYS_VIEW_FULLSCREEN , GEANY_KEYS_GOTO_LINEEND , GEANY_KEYS_EDITOR_CALLTIP , GEANY_KEYS_FILE_PRINT ,
  GEANY_KEYS_EDITOR_DUPLICATELINE , GEANY_KEYS_FOCUS_SCRIBBLE , GEANY_KEYS_TOOLS_OPENCOLORCHOOSER , GEANY_KEYS_SEARCH_PREVIOUSMESSAGE ,
  GEANY_KEYS_FILE_CLOSE , GEANY_KEYS_DOCUMENT_REPLACETABS , GEANY_KEYS_FILE_RELOAD , GEANY_KEYS_SEARCH_FINDNEXTSEL ,
  GEANY_KEYS_FOCUS_MESSAGES , GEANY_KEYS_BUILD_RUN , GEANY_KEYS_HELP_HELP , GEANY_KEYS_SETTINGS_PLUGINPREFERENCES ,
  GEANY_KEYS_VIEW_ZOOMRESET , GEANY_KEYS_SELECT_WORD , GEANY_KEYS_FORMAT_INCREASEINDENT , GEANY_KEYS_SETTINGS_PREFERENCES ,
  GEANY_KEYS_FORMAT_SENDTOCMD3 , GEANY_KEYS_DOCUMENT_FOLDALL , GEANY_KEYS_FORMAT_SENDTOVTE , GEANY_KEYS_PROJECT_PROPERTIES ,
  GEANY_KEYS_DOCUMENT_LINEWRAP , GEANY_KEYS_EDITOR_MACROLIST , GEANY_KEYS_EDITOR_SUPPRESSSNIPPETCOMPLETION , GEANY_KEYS_FOCUS_SIDEBAR_SYMBOL_LIST ,
  GEANY_KEYS_GOTO_LINESTART , GEANY_KEYS_SEARCH_FINDUSAGE , GEANY_KEYS_FILE_NEW , GEANY_KEYS_EDITOR_SNIPPETNEXTCURSOR ,
  GEANY_KEYS_NOTEBOOK_SWITCHTABRIGHT , GEANY_KEYS_FILE_SAVE , GEANY_KEYS_FORMAT_INCREASEINDENTBYSPACE , GEANY_KEYS_SEARCH_FINDNEXT ,
  GEANY_KEYS_GOTO_TOGGLEMARKER , GEANY_KEYS_GOTO_TAGDEFINITION , GEANY_KEYS_SEARCH_NEXTMESSAGE , GEANY_KEYS_EDITOR_DELETELINETOEND ,
  GEANY_KEYS_FORMAT_AUTOINDENT , GEANY_KEYS_FILE_OPENSELECTED , GEANY_KEYS_GOTO_BACK , GEANY_KEYS_INSERT_DATE ,
  GEANY_KEYS_BUILD_PREVIOUSERROR , GEANY_KEYS_GOTO_LINEENDVISUAL , GEANY_KEYS_DOCUMENT_REPLACESPACES , GEANY_KEYS_FOCUS_EDITOR ,
  GEANY_KEYS_SELECT_WORDPARTRIGHT , GEANY_KEYS_VIEW_MESSAGEWINDOW , GEANY_KEYS_FOCUS_SIDEBAR_DOCUMENT_LIST , GEANY_KEYS_FORMAT_REFLOWPARAGRAPH ,
  GEANY_KEYS_EDITOR_MOVELINEUP , GEANY_KEYS_NOTEBOOK_MOVETABLEFT , GEANY_KEYS_SELECT_LINE , GEANY_KEYS_EDITOR_UNDO ,
  GEANY_KEYS_EDITOR_MOVELINEDOWN , GEANY_KEYS_CLIPBOARD_COPYLINE , GEANY_KEYS_BUILD_MAKEOWNTARGET , GEANY_KEYS_FORMAT_SENDTOCMD2 ,
  GEANY_KEYS_SEARCH_MARKALL , GEANY_KEYS_BUILD_LINK , GEANY_KEYS_FILE_CLOSEALL , GEANY_KEYS_GOTO_FORWARD ,
  GEANY_KEYS_CLIPBOARD_CUT , GEANY_KEYS_NOTEBOOK_SWITCHTABLASTUSED , GEANY_KEYS_NOTEBOOK_MOVETABRIGHT , GEANY_KEYS_BUILD_OPTIONS ,
  GEANY_KEYS_GOTO_TAGDECLARATION , GEANY_KEYS_FILE_OPEN , GEANY_KEYS_EDITOR_COMPLETESNIPPET , GEANY_KEYS_FORMAT_UNCOMMENTLINE ,
  GEANY_KEYS_FOCUS_VTE , GEANY_KEYS_FORMAT_SENDTOCMD1 , GEANY_KEYS_SELECT_WORDPARTLEFT , GEANY_KEYS_VIEW_ZOOMIN ,
  GEANY_KEYS_DOCUMENT_LINEBREAK , GEANY_KEYS_EDITOR_REDO , GEANY_KEYS_EDITOR_CONTEXTACTION , GEANY_KEYS_SEARCH_FINDPREVSEL ,
  GEANY_KEYS_FORMAT_DECREASEINDENTBYSPACE , GEANY_KEYS_FORMAT_COMMENTLINETOGGLE , GEANY_KEYS_SELECT_ALL , GEANY_KEYS_DOCUMENT_RELOADTAGLIST ,
  GEANY_KEYS_BUILD_NEXTERROR , GEANY_KEYS_NOTEBOOK_MOVETABLAST , GEANY_KEYS_SELECT_PARAGRAPH , GEANY_KEYS_EDITOR_DELETELINE ,
  GEANY_KEYS_CLIPBOARD_COPY , GEANY_KEYS_VIEW_SIDEBAR , GEANY_KEYS_FILE_SAVEAS , GEANY_KEYS_FORMAT_COMMENTLINE ,
  GEANY_KEYS_GOTO_PREVWORDPART , GEANY_KEYS_SEARCH_FINDPREVIOUS , GEANY_KEYS_SEARCH_REPLACE , GEANY_KEYS_EDITOR_WORDPARTCOMPLETION ,
  GEANY_KEYS_EDITOR_AUTOCOMPLETE , GEANY_KEYS_FOCUS_SIDEBAR , GEANY_KEYS_FOCUS_MESSAGE_WINDOW , GEANY_KEYS_NOTEBOOK_MOVETABFIRST ,
  GEANY_KEYS_GOTO_PREVIOUSMARKER , GEANY_KEYS_EDITOR_SCROLLLINEUP , GEANY_KEYS_FOCUS_COMPILER , GEANY_KEYS_FORMAT_TOGGLECASE ,
  GEANY_KEYS_CLIPBOARD_CUTLINE , GEANY_KEYS_DOCUMENT_REMOVE_MARKERS , GEANY_KEYS_BUILD_MAKEOBJECT , GEANY_KEYS_FORMAT_DECREASEINDENT ,
  GEANY_KEYS_FILE_OPENLASTTAB , GEANY_KEYS_SEARCH_FINDINFILES , GEANY_KEYS_GOTO_NEXTWORDPART , GEANY_KEYS_INSERT_LINEAFTER ,
  GEANY_KEYS_INSERT_LINEBEFORE , GEANY_KEYS_DOCUMENT_REMOVE_MARKERS_INDICATORS , GEANY_KEYS_PROJECT_OPEN , GEANY_KEYS_PROJECT_NEW ,
  GEANY_KEYS_PROJECT_CLOSE , GEANY_KEYS_FORMAT_JOINLINES , GEANY_KEYS_GOTO_LINESTARTVISUAL , GEANY_KEYS_DOCUMENT_CLONE ,
  GEANY_KEYS_FILE_QUIT , GEANY_KEYS_FILE_PROPERTIES , 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_EDITOR_DELETELINETOBEGINNING , GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES , GEANY_KEYS_FILE_RELOAD_ALL , GEANY_KEYS_PROJECT_NEW_FROM_FOLDER ,
  GEANY_KEYS_COUNT
}
 Keybinding command IDs for use with keybindings_send_command(). More...
 
enum  GeanyKeyGroupID {
  GEANY_KEY_GROUP_FILE , GEANY_KEY_GROUP_PROJECT , GEANY_KEY_GROUP_EDITOR , GEANY_KEY_GROUP_CLIPBOARD ,
  GEANY_KEY_GROUP_SELECT , GEANY_KEY_GROUP_FORMAT , GEANY_KEY_GROUP_INSERT , GEANY_KEY_GROUP_SETTINGS ,
  GEANY_KEY_GROUP_SEARCH , GEANY_KEY_GROUP_GOTO , GEANY_KEY_GROUP_VIEW , GEANY_KEY_GROUP_FOCUS ,
  GEANY_KEY_GROUP_NOTEBOOK , GEANY_KEY_GROUP_DOCUMENT , GEANY_KEY_GROUP_BUILD , GEANY_KEY_GROUP_TOOLS ,
  GEANY_KEY_GROUP_HELP , GEANY_KEY_GROUP_COUNT
}
 Keybinding group IDs for use with keybindings_send_command(). More...
 

Functions

GeanyKeyBindingkeybindings_get_item (GeanyKeyGroup *group, gsize key_id)
 Looks up a keybinding item. More...
 
GdkModifierType keybindings_get_modifiers (GdkModifierType mods)
 Gets significant modifiers from a GdkModifierType mask. More...
 
void keybindings_load_keyfile (void)
 Reloads keybinding settings from configuration file. More...
 
void keybindings_send_command (guint group_id, guint key_id)
 Mimics a (built-in only) keybinding action. More...
 
GeanyKeyBindingkeybindings_set_item (GeanyKeyGroup *group, gsize key_id, GeanyKeyCallback callback, guint key, GdkModifierType mod, const gchar *name, const gchar *label, GtkWidget *menu_item)
  Fills a GeanyKeyBinding struct item. More...
 
GeanyKeyBindingkeybindings_set_item_full (GeanyKeyGroup *group, gsize key_id, guint key, GdkModifierType mod, const gchar *kf_name, const gchar *label, GtkWidget *menu_item, GeanyKeyBindingFunc func, gpointer pdata, GDestroyNotify destroy_notify)
 Creates a new keybinding using a GeanyKeyBindingFunc and attaches it to a keybinding group. More...
 

Detailed Description

Configurable keyboard shortcuts.

Macro Definition Documentation

◆ GEANY_PRIMARY_MOD_MASK

#define GEANY_PRIMARY_MOD_MASK   GDK_CONTROL_MASK

Defines the primary modifier mask which is the Ctrl key mask on UNIX/Windows and Command key mask on OS X.

When testing for the mask presence, use together with keybindings_get_modifiers() which adds GEANY_PRIMARY_MOD_MASK when needed.

Since
1.25.

Typedef Documentation

◆ GeanyKeyBindingFunc

typedef gboolean(* GeanyKeyBindingFunc) (GeanyKeyBinding *key, guint key_id, gpointer user_data)

Function pointer type used for keybinding callbacks, with userdata for passing context.

You should return TRUE to indicate handling the callback. (Occasionally, if the keybinding cannot apply in the current situation, it is useful to return FALSE to allow a later keybinding with the same key combination to handle it).

Since
1.26 (API 226)

◆ GeanyKeyGroupCallback

typedef gboolean(* GeanyKeyGroupCallback) (guint key_id)

Function pointer type used for keybinding group callbacks.

You should return TRUE to indicate handling the callback. (Occasionally, if the keybinding cannot apply in the current situation, it is useful to return FALSE to allow a later keybinding with the same key combination to handle it).

◆ GeanyKeyGroupFunc

typedef gboolean(* GeanyKeyGroupFunc) (GeanyKeyGroup *group, guint key_id, gpointer user_data)

Function pointer type used for keybinding group callbacks, with userdata for passing context.

You should return TRUE to indicate handling the callback. (Occasionally, if the keybinding cannot apply in the current situation, it is useful to return FALSE to allow a later keybinding with the same key combination to handle it).

Since
1.26 (API 226)

Enumeration Type Documentation

◆ GeanyKeyBindingID

Keybinding command IDs for use with keybindings_send_command().

Enumerator
GEANY_KEYS_EDITOR_TRANSPOSELINE 

Keybinding.

GEANY_KEYS_DOCUMENT_REMOVE_ERROR_INDICATORS 

Keybinding.

GEANY_KEYS_FOCUS_SEARCHBAR 

Keybinding.

GEANY_KEYS_SEARCH_FIND 

Keybinding.

GEANY_KEYS_FILE_SAVEALL 

Keybinding.

GEANY_KEYS_GOTO_NEXTMARKER 

Keybinding.

GEANY_KEYS_NOTEBOOK_SWITCHTABLEFT 

Keybinding.

GEANY_KEYS_VIEW_ZOOMOUT 

Keybinding.

GEANY_KEYS_GOTO_LINE 

Keybinding.

GEANY_KEYS_DOCUMENT_TOGGLEFOLD 

Keybinding.

GEANY_KEYS_BUILD_COMPILE 

Keybinding.

GEANY_KEYS_EDITOR_SCROLLTOLINE 

Keybinding.

GEANY_KEYS_DOCUMENT_UNFOLDALL 

Keybinding.

GEANY_KEYS_GOTO_MATCHINGBRACE 

Keybinding.

GEANY_KEYS_SEARCH_FINDDOCUMENTUSAGE 

Keybinding.

GEANY_KEYS_CLIPBOARD_PASTE 

Keybinding.

GEANY_KEYS_BUILD_MAKE 

Keybinding.

GEANY_KEYS_INSERT_ALTWHITESPACE 

Keybinding.

GEANY_KEYS_EDITOR_SCROLLLINEDOWN 

Keybinding.

GEANY_KEYS_VIEW_TOGGLEALL 

Keybinding.

GEANY_KEYS_VIEW_FULLSCREEN 

Keybinding.

GEANY_KEYS_GOTO_LINEEND 

Keybinding.

GEANY_KEYS_EDITOR_CALLTIP 

Keybinding.

GEANY_KEYS_FILE_PRINT 

Keybinding.

GEANY_KEYS_EDITOR_DUPLICATELINE 

Keybinding.

GEANY_KEYS_FOCUS_SCRIBBLE 

Keybinding.

GEANY_KEYS_TOOLS_OPENCOLORCHOOSER 

Keybinding.

GEANY_KEYS_SEARCH_PREVIOUSMESSAGE 

Keybinding.

GEANY_KEYS_FILE_CLOSE 

Keybinding.

GEANY_KEYS_DOCUMENT_REPLACETABS 

Keybinding.

GEANY_KEYS_FILE_RELOAD 

Keybinding.

GEANY_KEYS_SEARCH_FINDNEXTSEL 

Keybinding.

GEANY_KEYS_FOCUS_MESSAGES 

Keybinding.

GEANY_KEYS_BUILD_RUN 

Keybinding.

GEANY_KEYS_HELP_HELP 

Keybinding.

GEANY_KEYS_SETTINGS_PLUGINPREFERENCES 

Keybinding.

GEANY_KEYS_VIEW_ZOOMRESET 

Keybinding.

GEANY_KEYS_SELECT_WORD 

Keybinding.

GEANY_KEYS_FORMAT_INCREASEINDENT 

Keybinding.

GEANY_KEYS_SETTINGS_PREFERENCES 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD3 

Keybinding.

GEANY_KEYS_DOCUMENT_FOLDALL 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOVTE 

Keybinding.

GEANY_KEYS_PROJECT_PROPERTIES 

Keybinding.

GEANY_KEYS_DOCUMENT_LINEWRAP 

Keybinding.

GEANY_KEYS_EDITOR_MACROLIST 

Keybinding.

Deprecated:
1.25, it doesn't do anything anymore
GEANY_KEYS_EDITOR_SUPPRESSSNIPPETCOMPLETION 

Keybinding.

GEANY_KEYS_FOCUS_SIDEBAR_SYMBOL_LIST 

Keybinding.

GEANY_KEYS_GOTO_LINESTART 

Keybinding.

GEANY_KEYS_SEARCH_FINDUSAGE 

Keybinding.

GEANY_KEYS_FILE_NEW 

Keybinding.

GEANY_KEYS_EDITOR_SNIPPETNEXTCURSOR 

Keybinding.

GEANY_KEYS_NOTEBOOK_SWITCHTABRIGHT 

Keybinding.

GEANY_KEYS_FILE_SAVE 

Keybinding.

GEANY_KEYS_FORMAT_INCREASEINDENTBYSPACE 

Keybinding.

GEANY_KEYS_SEARCH_FINDNEXT 

Keybinding.

GEANY_KEYS_GOTO_TOGGLEMARKER 

Keybinding.

GEANY_KEYS_GOTO_TAGDEFINITION 

Keybinding.

GEANY_KEYS_SEARCH_NEXTMESSAGE 

Keybinding.

GEANY_KEYS_EDITOR_DELETELINETOEND 

Keybinding.

GEANY_KEYS_FORMAT_AUTOINDENT 

Keybinding.

GEANY_KEYS_FILE_OPENSELECTED 

Keybinding.

GEANY_KEYS_GOTO_BACK 

Keybinding.

GEANY_KEYS_INSERT_DATE 

Keybinding.

GEANY_KEYS_BUILD_PREVIOUSERROR 

Keybinding.

GEANY_KEYS_GOTO_LINEENDVISUAL 

Keybinding.

GEANY_KEYS_DOCUMENT_REPLACESPACES 

Keybinding.

GEANY_KEYS_FOCUS_EDITOR 

Keybinding.

GEANY_KEYS_SELECT_WORDPARTRIGHT 

Keybinding.

GEANY_KEYS_VIEW_MESSAGEWINDOW 

Keybinding.

GEANY_KEYS_FOCUS_SIDEBAR_DOCUMENT_LIST 

Keybinding.

GEANY_KEYS_FORMAT_REFLOWPARAGRAPH 

Keybinding.

GEANY_KEYS_EDITOR_MOVELINEUP 

Keybinding.

GEANY_KEYS_NOTEBOOK_MOVETABLEFT 

Keybinding.

GEANY_KEYS_SELECT_LINE 

Keybinding.

GEANY_KEYS_EDITOR_UNDO 

Keybinding.

GEANY_KEYS_EDITOR_MOVELINEDOWN 

Keybinding.

GEANY_KEYS_CLIPBOARD_COPYLINE 

Keybinding.

GEANY_KEYS_BUILD_MAKEOWNTARGET 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD2 

Keybinding.

GEANY_KEYS_SEARCH_MARKALL 

Keybinding.

GEANY_KEYS_BUILD_LINK 

Keybinding.

GEANY_KEYS_FILE_CLOSEALL 

Keybinding.

GEANY_KEYS_GOTO_FORWARD 

Keybinding.

GEANY_KEYS_CLIPBOARD_CUT 

Keybinding.

GEANY_KEYS_NOTEBOOK_SWITCHTABLASTUSED 

Keybinding.

GEANY_KEYS_NOTEBOOK_MOVETABRIGHT 

Keybinding.

GEANY_KEYS_BUILD_OPTIONS 

Keybinding.

GEANY_KEYS_GOTO_TAGDECLARATION 

Keybinding.

GEANY_KEYS_FILE_OPEN 

Keybinding.

GEANY_KEYS_EDITOR_COMPLETESNIPPET 

Keybinding.

GEANY_KEYS_FORMAT_UNCOMMENTLINE 

Keybinding.

GEANY_KEYS_FOCUS_VTE 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD1 

Keybinding.

GEANY_KEYS_SELECT_WORDPARTLEFT 

Keybinding.

GEANY_KEYS_VIEW_ZOOMIN 

Keybinding.

GEANY_KEYS_DOCUMENT_LINEBREAK 

Keybinding.

GEANY_KEYS_EDITOR_REDO 

Keybinding.

GEANY_KEYS_EDITOR_CONTEXTACTION 

Keybinding.

GEANY_KEYS_SEARCH_FINDPREVSEL 

Keybinding.

GEANY_KEYS_FORMAT_DECREASEINDENTBYSPACE 

Keybinding.

GEANY_KEYS_FORMAT_COMMENTLINETOGGLE 

Keybinding.

GEANY_KEYS_SELECT_ALL 

Keybinding.

GEANY_KEYS_DOCUMENT_RELOADTAGLIST 

Keybinding.

GEANY_KEYS_BUILD_NEXTERROR 

Keybinding.

GEANY_KEYS_NOTEBOOK_MOVETABLAST 

Keybinding.

GEANY_KEYS_SELECT_PARAGRAPH 

Keybinding.

GEANY_KEYS_EDITOR_DELETELINE 

Keybinding.

GEANY_KEYS_CLIPBOARD_COPY 

Keybinding.

GEANY_KEYS_VIEW_SIDEBAR 

Keybinding.

GEANY_KEYS_FILE_SAVEAS 

Keybinding.

GEANY_KEYS_FORMAT_COMMENTLINE 

Keybinding.

GEANY_KEYS_GOTO_PREVWORDPART 

Keybinding.

GEANY_KEYS_SEARCH_FINDPREVIOUS 

Keybinding.

GEANY_KEYS_SEARCH_REPLACE 

Keybinding.

GEANY_KEYS_EDITOR_WORDPARTCOMPLETION 

Keybinding.

GEANY_KEYS_EDITOR_AUTOCOMPLETE 

Keybinding.

GEANY_KEYS_FOCUS_SIDEBAR 

Keybinding.

GEANY_KEYS_FOCUS_MESSAGE_WINDOW 

Keybinding.

GEANY_KEYS_NOTEBOOK_MOVETABFIRST 

Keybinding.

GEANY_KEYS_GOTO_PREVIOUSMARKER 

Keybinding.

GEANY_KEYS_EDITOR_SCROLLLINEUP 

Keybinding.

GEANY_KEYS_FOCUS_COMPILER 

Keybinding.

GEANY_KEYS_FORMAT_TOGGLECASE 

Keybinding.

GEANY_KEYS_CLIPBOARD_CUTLINE 

Keybinding.

GEANY_KEYS_DOCUMENT_REMOVE_MARKERS 

Keybinding.

GEANY_KEYS_BUILD_MAKEOBJECT 

Keybinding.

GEANY_KEYS_FORMAT_DECREASEINDENT 

Keybinding.

GEANY_KEYS_FILE_OPENLASTTAB 

Keybinding.

GEANY_KEYS_SEARCH_FINDINFILES 

Keybinding.

GEANY_KEYS_GOTO_NEXTWORDPART 

Keybinding.

GEANY_KEYS_INSERT_LINEAFTER 

Keybinding.

GEANY_KEYS_INSERT_LINEBEFORE 

Keybinding.

GEANY_KEYS_DOCUMENT_REMOVE_MARKERS_INDICATORS 

Keybinding.

GEANY_KEYS_PROJECT_OPEN 

Keybinding.

GEANY_KEYS_PROJECT_NEW 

Keybinding.

GEANY_KEYS_PROJECT_CLOSE 

Keybinding.

GEANY_KEYS_FORMAT_JOINLINES 

Keybinding.

GEANY_KEYS_GOTO_LINESTARTVISUAL 

Keybinding.

GEANY_KEYS_DOCUMENT_CLONE 

Keybinding.

GEANY_KEYS_FILE_QUIT 

Keybinding.

GEANY_KEYS_FILE_PROPERTIES 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD4 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD5 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD6 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD7 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD8 

Keybinding.

GEANY_KEYS_FORMAT_SENDTOCMD9 

Keybinding.

GEANY_KEYS_EDITOR_DELETELINETOBEGINNING 

Keybinding.

GEANY_KEYS_DOCUMENT_STRIPTRAILINGSPACES 

Keybinding.

Since
1.34 (API 238)
GEANY_KEYS_FILE_RELOAD_ALL 

Keybinding.

Since
1.38 (API 240)
GEANY_KEYS_PROJECT_NEW_FROM_FOLDER 

Keybinding.

Since
2.0 (API 243)

◆ GeanyKeyGroupID

Keybinding group IDs for use with keybindings_send_command().

Enumerator
GEANY_KEY_GROUP_FILE 

Group.

GEANY_KEY_GROUP_PROJECT 

Group.

GEANY_KEY_GROUP_EDITOR 

Group.

GEANY_KEY_GROUP_CLIPBOARD 

Group.

GEANY_KEY_GROUP_SELECT 

Group.

GEANY_KEY_GROUP_FORMAT 

Group.

GEANY_KEY_GROUP_INSERT 

Group.

GEANY_KEY_GROUP_SETTINGS 

Group.

GEANY_KEY_GROUP_SEARCH 

Group.

GEANY_KEY_GROUP_GOTO 

Group.

GEANY_KEY_GROUP_VIEW 

Group.

GEANY_KEY_GROUP_FOCUS 

Group.

GEANY_KEY_GROUP_NOTEBOOK 

Group.

GEANY_KEY_GROUP_DOCUMENT 

Group.

GEANY_KEY_GROUP_BUILD 

Group.

GEANY_KEY_GROUP_TOOLS 

Group.

GEANY_KEY_GROUP_HELP 

Group.

Function Documentation

◆ keybindings_get_item()

GeanyKeyBinding * keybindings_get_item ( GeanyKeyGroup group,
gsize  key_id 
)

Looks up a keybinding item.

Parameters
groupGroup.
key_idKeybinding index for the group.
Returns
(transfer: none) The keybinding.
Since
0.19.

◆ keybindings_get_modifiers()

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().

Parameters
modsGdkModifierType mask.
Returns
Significant modifiers from the mask.
Since
1.25.

◆ keybindings_load_keyfile()

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.

Since
1.32 (API 233)

◆ keybindings_send_command()

void keybindings_send_command ( guint  group_id,
guint  key_id 
)

Mimics a (built-in only) keybinding action.

Example:

@ GEANY_KEY_GROUP_FILE
Group.
Definition: keybindings.h:102
void keybindings_send_command(guint group_id, guint key_id)
Mimics a (built-in only) keybinding action.
Definition: keybindings.c:1429
@ GEANY_KEYS_FILE_OPEN
Keybinding.
Definition: keybindings.h:216
Parameters
group_idGeanyKeyGroupID keybinding group index that contains the key_id keybinding.
key_idGeanyKeyBindingID keybinding index.

◆ keybindings_set_item()

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.

Note
Always set key and mod to 0, otherwise you will likely cause conflicts with the user's custom, other plugin's keybindings or future default keybindings.
Parameters
groupGroup.
key_idKeybinding 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().
keyDefault key, e.g. GDK_KEY_j (must be lower case), but usually 0 for unset.
modDefault modifier, e.g. GDK_CONTROL_MASK, but usually 0 for unset.
kf_nameKey name used for this item in the keybindings configuration file, i.e. "menu_new".
labelLabel 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.
Returns
The keybinding - normally this is ignored.

◆ keybindings_set_item_full()

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.

Parameters
groupGroup.
key_idKeybinding index for the group.
keyDefault key, e.g. GDK_KEY_j (must be lower case), but usually 0 for unset.
modDefault modifier, e.g. GDK_CONTROL_MASK, but usually 0 for unset.
kf_nameKey name used for this item in the keybindings configuration file, i.e. "menu_new".
labelLabel 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.
pdataPlugin-specific data passed back to the callback cb.
destroy_notifyFunction that is invoked to free the plugin data when not needed anymore.
Returns
(transfer: none) The keybinding - normally this is ignored.
Since
1.26 (API 226)
See also
See plugin_set_key_group_full