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.2.tar.gz (12.5 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: xkbcommon-0.2.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.10.0 pkginfo/1.2.1 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.5 CPython/3.6.9

File hashes

Hashes for xkbcommon-0.2.tar.gz
Algorithm Hash digest
SHA256 4f5cd8cafd95f8fcece11d82b1dbd5a8736295c876f423de050e3118c1acada7
MD5 87d65348b03d6232186c07697a84e6bf
BLAKE2b-256 8ce6677b027745bdf46e7d2c5bdd046a097977c31607417b1af56ef344c9bb5b

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