i3
Public Types | Data Fields
Binding Struct Reference

Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed as soon as the key is pressed (see src/config_parser.c) More...

#include <data.h>

Public Types

enum  { B_UPON_KEYPRESS = 0, B_UPON_KEYRELEASE = 1, B_UPON_KEYRELEASE_IGNORE_MODS = 2 }
 If true, the binding should be executed upon a KeyRelease event, not a KeyPress (the default). More...
 

Data Fields

input_type_t input_type
 
enum Binding:: { ... }  release
 If true, the binding should be executed upon a KeyRelease event, not a KeyPress (the default). More...
 
bool border
 If this is true for a mouse binding, the binding should be executed when the button is pressed over the window border. More...
 
bool whole_window
 If this is true for a mouse binding, the binding should be executed when the button is pressed over any part of the window, not just the title bar (default). More...
 
bool exclude_titlebar
 If this is true for a mouse binding, the binding should only be executed if the button press was not on the titlebar. More...
 
uint32_t keycode
 Keycode to bind. More...
 
i3_event_state_mask_t event_state_mask
 Bitmask which is applied against event->state for KeyPress and KeyRelease events to determine whether this binding applies to the current state. More...
 
char * symbol
 Symbol the user specified in configfile, if any. More...
 
 keycodes_head
 Only in use if symbol != NULL. More...
 
char * command
 Command, like in command mode. More...
 
 bindings
 

Detailed Description

Holds a keybinding, consisting of a keycode combined with modifiers and the command which is executed as soon as the key is pressed (see src/config_parser.c)

Definition at line 273 of file data.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

If true, the binding should be executed upon a KeyRelease event, not a KeyPress (the default).

Enumerator
B_UPON_KEYPRESS 
B_UPON_KEYRELEASE 
B_UPON_KEYRELEASE_IGNORE_MODS 

Definition at line 280 of file data.h.

Field Documentation

◆ bindings

Binding::bindings

Definition at line 328 of file data.h.

◆ border

bool Binding::border

If this is true for a mouse binding, the binding should be executed when the button is pressed over the window border.

Definition at line 294 of file data.h.

Referenced by configure_binding(), and route_click().

◆ command

char* Binding::command

◆ event_state_mask

i3_event_state_mask_t Binding::event_state_mask

Bitmask which is applied against event->state for KeyPress and KeyRelease events to determine whether this binding applies to the current state.

Definition at line 311 of file data.h.

Referenced by add_keycode_if_matches(), binding_in_current_group(), check_for_duplicate_bindings(), configure_binding(), dump_event_state_mask(), get_binding(), grab_keycode_for_binding(), reorder_binding_cmp(), and translate_keysyms().

◆ exclude_titlebar

bool Binding::exclude_titlebar

If this is true for a mouse binding, the binding should only be executed if the button press was not on the titlebar.

Definition at line 303 of file data.h.

Referenced by configure_binding(), and route_click().

◆ input_type

input_type_t Binding::input_type

◆ keycode

uint32_t Binding::keycode

◆ keycodes_head

Binding::keycodes_head

Only in use if symbol != NULL.

Contains keycodes which generate the specified symbol. Useful for unbinding and checking which binding was used when a key press event comes in.

Definition at line 322 of file data.h.

Referenced by binding_copy(), binding_free(), configure_binding(), get_binding(), grab_all_keys(), and translate_keysyms().

◆ release

enum { ... } Binding::release

If true, the binding should be executed upon a KeyRelease event, not a KeyPress (the default).

Referenced by check_for_duplicate_bindings(), configure_binding(), get_binding(), and translate_keysyms().

◆ symbol

char* Binding::symbol

Symbol the user specified in configfile, if any.

This needs to be stored with the binding to be able to re-convert it into a keycode if the keyboard mapping changes (using Xmodmap for example)

Definition at line 316 of file data.h.

Referenced by binding_copy(), binding_free(), bindings_get_buttons_to_grab(), check_for_duplicate_bindings(), configure_binding(), dump_binding(), get_binding(), ipc_send_binding_event(), and translate_keysyms().

◆ whole_window

bool Binding::whole_window

If this is true for a mouse binding, the binding should be executed when the button is pressed over any part of the window, not just the title bar (default).

Definition at line 299 of file data.h.

Referenced by bindings_get_buttons_to_grab(), configure_binding(), handle_button_press(), and route_click().


The documentation for this struct was generated from the following file: