xkbcommon: Haskell bindings for libxkbcommon
This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.
Wrapper library for libxkbcommon, which is the new alternative for the X11 XKB.h keyboard input
API. Specifically, it finds keymap files from disk based on Rule/Model/Layout/Variant/Option
specifications, and compiles them into a Keymap
. From this Keymap
, a KeyboardState
can be
constructed which represents the states of various physical buttons such as the shiftaltctrl
keys, and can give the correct key symbol based on keyboard events. E.g., pressing the <h>
key
while <shift>
is pressed produces the H
symbol in the common QWERTY keymaps, but in e.g.
the Dvorak keymap, it produces the D symbol.
After keymap creation, which libxkbcommon can do based on locale preferences and enviroment variables, this is all handled by routing keyboard events through libxkbcommon.
At this stage, these haskell bindings do not make libxkbcommon look much like a haskell library. For example, in principle the entire libxkbcommon library is just a stateful processor, and has nothing to do with the IO monad. However, because I am not yet a very good haskell programmer, and because in most realistic use cases input data comes from the IO monad anyway, the stateful operations are encoded in the IO monad anyway.
Note that these bindings load the keysym constants from the libxkbcommon C header files at compile time using TH, and similarly keycodes from the Linux header files. These should be present for correct compilation.
Properties
Versions | 0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.3 |
---|---|
Change log | None available |
Dependencies | base (<5), bytestring, cpphs, data-flags, filepath, process, storable-record, template-haskell, text, transformers [details] |
License | MIT[multiple license files] |
Author | Auke Booij |
Maintainer | auke@tulcod.com |
Category | Text |
Source repo | head: git clone https://github.com/tulcod/haskell-xkbcommon.git |
Uploaded | by AukeBooij at 2016-10-02T21:31:58Z |
Modules
[Index]
Downloads
- xkbcommon-0.0.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
Package maintainers
For package maintainers and hackage trustees