Skip to main content

Bindings for libxkbcommon using cffi

Project description

Python bindings for libxkbcommon using cffi.

Example usage:

>>> from xkbcommon import xkb
>>> ctx = xkb.Context()
>>> keymap = ctx.keymap_new_from_names()
>>> state = keymap.state_new()
>>> state.led_name_is_active("Caps Lock")
False
>>> capslock = 66
>>> str(state.update_key(capslock, xkb.XKB_KEY_DOWN))
'XKB_STATE_MODS_DEPRESSED|XKB_STATE_MODS_LOCKED|XKB_STATE_MODS_EFFECTIVE|XKB_STATE_LEDS'
>>> str(state.update_key(capslock, xkb.XKB_KEY_UP))
'XKB_STATE_MODS_DEPRESSED'
>>> state.led_name_is_active("Caps Lock")
True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xkbcommon-0.4.tar.gz (26.3 kB view details)

Uploaded Source

File details

Details for the file xkbcommon-0.4.tar.gz.

File metadata

  • Download URL: xkbcommon-0.4.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for xkbcommon-0.4.tar.gz
Algorithm Hash digest
SHA256 5792cc697e533e193dc78640e0c185cc3854882e8d28fa38b936d6e90ee6755c
MD5 784975f6e7b06d3f7f76d107842ff417
BLAKE2b-256 2a0974cb4e5fa35f5554253e27cea8e8c0a78f3ffe754713812e8cec74e0d885

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page