Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting up keyboard state from X11 #14

Open
pfps opened this issue Feb 22, 2022 · 1 comment
Open

setting up keyboard state from X11 #14

pfps opened this issue Feb 22, 2022 · 1 comment

Comments

@pfps
Copy link

pfps commented Feb 22, 2022

How can I use this library to set up the keyboard state under X11. The X11 interface methods do not appear to be implemented.

The regular documentation for libxkbcommon says:

#include <xkbcommon/xkbcommon-x11.h>
 
xcb_connection_t *conn = <...>;
int32_t device_id;
 
device_id = xkb_x11_get_core_keyboard_device_id(conn);
if (device_id == -1) <error>
 
keymap = xkb_x11_keymap_new_from_device(ctx, conn, device_id,
                                        XKB_KEYMAP_COMPILE_NO_FLAGS);
if (!keymap) <error>

but the xkb_x11 methods are not in this library as far as I can tell.

@sde1000
Copy link
Owner

sde1000 commented Feb 22, 2022

The libxkbcommon-x11 library is separate from the main libxkbcommon library. (In some distributions, like all the Debian derivatives, it's actually a separately installable package.) I don't want to depend on it from python-xkbcommon because then python-xkbcommon wouldn't be usable without the extra library being installed.

The right way to do this is to create another package (eg. "python-xkbcommon-x11") that has bindings to libxkbcommon-x11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants