Bug 98194 - [wishlist] API to use keyboard-specific XkbOptions
Summary: [wishlist] API to use keyboard-specific XkbOptions
Status: RESOLVED WONTFIX
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: 1.5.0
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-10 14:50 UTC by Vasilij Schneidermann
Modified: 2016-10-11 08:50 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vasilij Schneidermann 2016-10-10 14:50:20 UTC
I am using a laptop with its internal keyboard and an external keyboard when not on the go.  Both keyboards have different layouts, therefore I've figured out two different sets of XkbOptions to make the most of this situation with Xorg [1].

However there doesn't seem to be a way to make this kind of setup work with wayland compositors based on libinput.  I've spoken to the respective authors and it appears that the only way of changing keyboard configuration is by setting environment variables like `XKBOPTIONS`.  The libinput API doesn't seem to cover programmatic access and modification of keyboards either, only pointer devices.  Please let me know if I'm wrong about this, otherwise consider this an enhancement request.

[1]: https://github.com/wasamasa/dotfiles/blob/master/etc/X11/xorg.conf.d/20-keyboards.conf
Comment 1 Pekka Paalanen 2016-10-10 16:16:14 UTC
Hi,

the library you are looking for to programmatically configure is xkbcommon, http://xkbcommon.org/ .

Each compositor has it's own way of configuring things. If you really need two completely separate keyboard configurations, it might be necessary to assign the keyboard devices to two different 'wl_seat' objects. That way they become independent.
Comment 2 Peter Hutterer 2016-10-11 08:50:19 UTC
see Pekka's answer, libinput sits below xkb and merely forwards the keycodes, independent of any layout that may be applied later. The layout configuration is the task of the compositor, not something we do/can/want to control from within libinput


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.