struct xkb_desc *create_xkb(void) { struct xkb_rule_names names; names.rules = "evdev"; names.model = "pc105"; names.layout = "us"; names.variant = ""; names.options = ""; return xkb_compile_keymap_from_rules(&names); }
static void init_xkb(struct display *d) { struct xkb_rule_names names; names.rules = "evdev"; names.model = "pc105"; names.layout = option_xkb_layout; names.variant = option_xkb_variant; names.options = option_xkb_options; d->xkb = xkb_compile_keymap_from_rules(&names); if (!d->xkb) { fprintf(stderr, "Failed to compile keymap\n"); exit(1); } }
QWaylandInputDevice::QWaylandInputDevice(struct wl_display *display, uint32_t id) : mDisplay(display) , mInputDevice(wl_input_device_create(display, id, 1)) , mPointerFocus(NULL) , mKeyboardFocus(NULL) , mButtons(0) { wl_input_device_add_listener(mInputDevice, &inputDeviceListener, this); wl_input_device_set_user_data(mInputDevice, this); #ifndef QT_NO_WAYLAND_XKB struct xkb_rule_names names; names.rules = "evdev"; names.model = "pc105"; names.layout = "us"; names.variant = ""; names.options = ""; mXkb = xkb_compile_keymap_from_rules(&names); #endif }