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))
'StateComponent.XKB_STATE_MODS_DEPRESSED|XKB_STATE_MODS_LOCKED|XKB_STATE_MODS_EFFECTIVE|XKB_STATE_LEDS'
>>> str(state.update_key(capslock, xkb.XKB_KEY_UP))
'StateComponent.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.5.tar.gz (26.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: xkbcommon-0.5.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.6

File hashes

Hashes for xkbcommon-0.5.tar.gz
Algorithm Hash digest
SHA256 ff7b7a0fff5d9506a785285f84860c567e9a4b58f60cd0aba341a65e17e41384
MD5 9c793e067f608775af4db46298345639
BLAKE2b-256 d5be49cc8df98466914cf7b504ebc76ea30f116004288a1d968a2117c41d6c7d

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