+}
+
+static void dump_binding(yajl_gen gen, Binding *bind) {
+ y(map_open);
+ ystr("input_code");
+ y(integer, bind->keycode);
+
+ ystr("input_type");
+ ystr((const char *)(bind->input_type == B_KEYBOARD ? "keyboard" : "mouse"));
+
+ ystr("symbol");
+ if (bind->symbol == NULL)
+ y(null);
+ else
+ ystr(bind->symbol);
+
+ ystr("command");
+ ystr(bind->command);
+
+ // This key is only provided for compatibility, new programs should use
+ // event_state_mask instead.
+ ystr("mods");
+ dump_event_state_mask(gen, bind);
+
+ ystr("event_state_mask");
+ dump_event_state_mask(gen, bind);