2015-07-27 08:17:12 +00:00
|
|
|
#ifndef ROFI_KEYB_H
|
|
|
|
#define ROFI_KEYB_H
|
2015-04-30 19:47:32 +00:00
|
|
|
|
2016-01-07 07:54:24 +00:00
|
|
|
/**
|
|
|
|
* @defgroup KEYB KeyboardBindings
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
2016-10-14 06:47:21 +00:00
|
|
|
/**
|
|
|
|
* List of all possible actions that can be triggered by a keybinding.
|
|
|
|
*/
|
2016-03-24 21:13:19 +00:00
|
|
|
typedef enum
|
2015-04-30 19:47:32 +00:00
|
|
|
{
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Paste from primary clipboard */
|
2015-04-30 19:47:32 +00:00
|
|
|
PASTE_PRIMARY = 0,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Paste from secondary clipboard */
|
2015-04-30 19:47:32 +00:00
|
|
|
PASTE_SECONDARY,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Clear the entry box. */
|
2015-04-30 19:47:32 +00:00
|
|
|
CLEAR_LINE,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Move to front of text */
|
2015-04-30 19:47:32 +00:00
|
|
|
MOVE_FRONT,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Move to end of text */
|
2015-04-30 19:47:32 +00:00
|
|
|
MOVE_END,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Move on word back */
|
2015-04-30 20:46:51 +00:00
|
|
|
MOVE_WORD_BACK,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Move on word forward */
|
2015-04-30 20:46:51 +00:00
|
|
|
MOVE_WORD_FORWARD,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Move character back */
|
2015-05-02 09:53:27 +00:00
|
|
|
MOVE_CHAR_BACK,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Move character forward */
|
2015-05-02 09:53:27 +00:00
|
|
|
MOVE_CHAR_FORWARD,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Remove previous word */
|
2015-04-30 19:47:32 +00:00
|
|
|
REMOVE_WORD_BACK,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Remove next work */
|
2015-04-30 19:47:32 +00:00
|
|
|
REMOVE_WORD_FORWARD,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Remove next character */
|
2015-04-30 19:47:32 +00:00
|
|
|
REMOVE_CHAR_FORWARD,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Remove previous character */
|
2015-04-30 20:42:04 +00:00
|
|
|
REMOVE_CHAR_BACK,
|
2016-07-25 09:32:30 +00:00
|
|
|
/** Remove till EOL */
|
|
|
|
REMOVE_TO_EOL,
|
2016-07-27 06:10:55 +00:00
|
|
|
/** Remove till SOL */
|
|
|
|
REMOVE_TO_SOL,
|
2016-01-07 15:01:56 +00:00
|
|
|
/** Accept the current selected entry */
|
2015-05-01 06:16:52 +00:00
|
|
|
ACCEPT_ENTRY,
|
2016-06-19 16:02:49 +00:00
|
|
|
ACCEPT_ALT,
|
2015-05-01 06:16:52 +00:00
|
|
|
ACCEPT_CUSTOM,
|
2015-05-02 09:53:27 +00:00
|
|
|
MODE_NEXT,
|
|
|
|
MODE_PREVIOUS,
|
|
|
|
TOGGLE_CASE_SENSITIVITY,
|
|
|
|
DELETE_ENTRY,
|
2015-09-02 10:29:28 +00:00
|
|
|
ROW_LEFT,
|
|
|
|
ROW_RIGHT,
|
|
|
|
ROW_UP,
|
|
|
|
ROW_DOWN,
|
|
|
|
ROW_TAB,
|
|
|
|
PAGE_PREV,
|
|
|
|
PAGE_NEXT,
|
|
|
|
ROW_FIRST,
|
|
|
|
ROW_LAST,
|
|
|
|
ROW_SELECT,
|
|
|
|
CANCEL,
|
2015-05-05 17:30:43 +00:00
|
|
|
CUSTOM_1,
|
|
|
|
CUSTOM_2,
|
|
|
|
CUSTOM_3,
|
|
|
|
CUSTOM_4,
|
|
|
|
CUSTOM_5,
|
|
|
|
CUSTOM_6,
|
|
|
|
CUSTOM_7,
|
|
|
|
CUSTOM_8,
|
|
|
|
CUSTOM_9,
|
2015-09-02 08:05:02 +00:00
|
|
|
CUSTOM_10,
|
|
|
|
CUSTOM_11,
|
|
|
|
CUSTOM_12,
|
|
|
|
CUSTOM_13,
|
|
|
|
CUSTOM_14,
|
|
|
|
CUSTOM_15,
|
|
|
|
CUSTOM_16,
|
|
|
|
CUSTOM_17,
|
|
|
|
CUSTOM_18,
|
|
|
|
CUSTOM_19,
|
2015-12-09 07:29:18 +00:00
|
|
|
SCREENSHOT,
|
2015-12-13 10:50:59 +00:00
|
|
|
TOGGLE_SORT,
|
2015-04-30 19:47:32 +00:00
|
|
|
NUM_ABE
|
|
|
|
} KeyBindingAction;
|
|
|
|
|
2015-05-02 10:21:54 +00:00
|
|
|
/**
|
|
|
|
* Parse the keybindings.
|
|
|
|
* This should be called after the setting system is initialized.
|
|
|
|
*/
|
2016-03-05 10:08:32 +00:00
|
|
|
gboolean parse_keys_abe ( void );
|
2015-05-02 10:21:54 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setup the keybindings
|
|
|
|
* This adds all the entries to the settings system.
|
|
|
|
*/
|
2015-04-30 19:47:32 +00:00
|
|
|
void setup_abe ( void );
|
|
|
|
|
2015-05-02 10:21:54 +00:00
|
|
|
/**
|
|
|
|
* Cleanup.
|
|
|
|
*/
|
2015-04-30 20:42:04 +00:00
|
|
|
void cleanup_abe ( void );
|
|
|
|
|
2015-05-02 10:21:54 +00:00
|
|
|
/**
|
2016-04-07 13:32:22 +00:00
|
|
|
* Find if a binding has been triggered.
|
|
|
|
* @returns NUM_ABE if no key combo matches, a valid action otherwise.
|
2015-05-02 10:21:54 +00:00
|
|
|
*/
|
2016-04-07 13:32:22 +00:00
|
|
|
KeyBindingAction abe_find_action ( unsigned int mask, xkb_keysym_t key );
|
2016-01-07 07:54:24 +00:00
|
|
|
|
2016-10-14 06:47:21 +00:00
|
|
|
/**
|
|
|
|
* Trigger keybinding on key release.
|
|
|
|
*/
|
2016-04-07 18:28:40 +00:00
|
|
|
void abe_trigger_release ( void );
|
|
|
|
|
2016-01-07 07:54:24 +00:00
|
|
|
/*@}*/
|
2015-07-27 08:17:12 +00:00
|
|
|
#endif // ROFI_KEYB_H
|