int uterm_input_new(struct uterm_input **out,
struct ev_eloop *eloop,
+ const char *model,
const char *layout,
const char *variant,
const char *options,
if (ret)
goto err_free;
- ret = uxkb_desc_init(input, layout, variant, options);
+ ret = uxkb_desc_init(input, model, layout, variant, options);
if (ret)
goto err_hook;
#define LOG_SUBSYSTEM "input_uxkb"
int uxkb_desc_init(struct uterm_input *input,
+ const char *model,
const char *layout,
const char *variant,
const char *options)
int ret;
struct xkb_rule_names rmlvo = {
.rules = "evdev",
- .model = "",
+ .model = model,
.layout = layout,
.variant = variant,
.options = options,
input->keymap = xkb_keymap_new_from_names(input->ctx, &rmlvo, 0);
if (!input->keymap) {
- log_warn("failed to create keymap (%s, %s, %s), "
+ log_warn("failed to create keymap (%s, %s, %s, %s), "
"reverting to default system keymap",
- layout, variant, options);
+ model, layout, variant, options);
+ rmlvo.model = "";
rmlvo.layout = "";
rmlvo.variant = "";
rmlvo.options = "";
}
}
- log_debug("new keyboard description (%s, %s, %s)",
- layout, variant, options);
+ log_debug("new keyboard description (%s, %s, %s, %s)",
+ model, layout, variant, options);
return 0;
err_ctx: