i3
Public Member Functions | 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/cfgparse.y) More...

#include <data.h>

Public Member Functions

 TAILQ_ENTRY (Binding) bindings
 

Data Fields

char * symbol
 Symbol the user specified in configfile, if any. More...
 
xcb_keycode_t * translated_to
 Only in use if symbol != NULL. More...
 
uint32_t number_keycodes
 
uint32_t keycode
 Keycode to bind. More...
 
uint32_t mods
 Bitmask consisting of BIND_MOD_1, BIND_MODE_SWITCH, … More...
 
char * command
 Command, like in command mode. More...
 

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/cfgparse.y)

Definition at line 191 of file data.h.

Member Function Documentation

Binding::TAILQ_ENTRY ( Binding  )

Field Documentation

char* Binding::command

Command, like in command mode.

Definition at line 213 of file data.h.

Referenced by check_for_duplicate_bindings(), create_workspace_on_output(), handle_key_press(), load_configuration(), and yyparse().

uint32_t Binding::keycode

Keycode to bind.

Definition at line 207 of file data.h.

Referenced by check_for_duplicate_bindings(), get_binding(), grab_all_keys(), translate_keysyms(), and yyparse().

uint32_t Binding::mods

Bitmask consisting of BIND_MOD_1, BIND_MODE_SWITCH, …

Definition at line 210 of file data.h.

Referenced by check_for_duplicate_bindings(), get_binding(), grab_all_keys(), grab_keycode_for_binding(), translate_keysyms(), and yyparse().

uint32_t Binding::number_keycodes

Definition at line 204 of file data.h.

Referenced by get_binding(), grab_all_keys(), and translate_keysyms().

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 195 of file data.h.

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

xcb_keycode_t* Binding::translated_to

Only in use if symbol != NULL.

Gets set to the value to which the symbol got translated when binding. Useful for unbinding and checking which binding was used when a key press event comes in.

This is an array of number_keycodes size.

Definition at line 202 of file data.h.

Referenced by get_binding(), grab_all_keys(), load_configuration(), and translate_keysyms().


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