Implement the ipc 'binding' event

The binding event will be triggered when a binding is run as a result of
some a user action. The binding event has the following properties:

change: (str) Currently this will only be "run" but may be expanded in
the future. Included for consistency with other events.

binding: (map) the serialized binding

The "binding" member will have these properties:

input_type: (str) either "keyboard" or "mouse"

input_code: (int) the xcb keycode of the keyboard binding if it was
provided or the mouse button if it is a mouse binding.

symbol: (str) the string representation of the input code

command: (str) the bound command

mods: (list of str) a list of the modifiers that were pressed as string
symbols

fixes #1210
This commit is contained in:
Tony Crisci
2014-10-02 19:04:53 -04:00
committed by Michael Stapelberg
parent 3cf413492f
commit fbaf084426
6 changed files with 221 additions and 2 deletions

View File

@ -423,7 +423,7 @@ CommandResult *run_binding(Binding *bind, Con *con) {
free(pageraction);
}
/* TODO: emit event for running a binding */
ipc_send_binding_event("run", bind);
return result;
}