-- Initial xkbcommon.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ name: xkbcommon version: 0.0.0 synopsis: Haskell bindings for libxkbcommon description: 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 shift/alt/ctrl keys, and can give the correct key symbol based on keyboard events. E.g., pressing the @\@ key while @\@ 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. license: MIT license-file: LICENSE author: Auke Booij maintainer: auke@tulcod.com category: Text build-type: Simple cabal-version: >=1.8 source-repository head type: git location: https://github.com/tulcod/haskell-xkbcommon.git library exposed-modules: Text.XkbCommon, Text.XkbCommon.KeysymList, Text.XkbCommon.KeycodeList, Text.XkbCommon.ModList, Text.XkbCommon.Constants, Text.XkbCommon.Types, Text.XkbCommon.Context, Text.XkbCommon.Keymap, Text.XkbCommon.KeyboardState, Text.XkbCommon.Keysym other-modules: Text.XkbCommon.ParseDefines, Text.XkbCommon.InternalTypes -- other-modules: build-depends: base ==4.6.*, transformers, storable-record, process, cpphs, template-haskell, text, bytestring, data-flags, filepath -- build-tools: c2hs -- this is actually not a test but a benchmark Benchmark bench-key-proc type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: bench-key-proc.hs build-depends : base, xkbcommon, random, vector, time extra-libraries: xkbcommon Test-Suite context type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: context.hs build-depends : base, xkbcommon extra-libraries: xkbcommon Test-Suite filecomp type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: filecomp.hs build-depends : base, xkbcommon extra-libraries: xkbcommon Test-Suite keyseq type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: keyseq.hs build-depends : base, xkbcommon extra-libraries: xkbcommon Test-Suite keysym type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: keysym.hs build-depends : base, xkbcommon extra-libraries: xkbcommon Test-Suite rulescomp type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: rulescomp.hs build-depends : base, xkbcommon, unix extra-libraries: xkbcommon Test-Suite state type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: state.hs build-depends : base, xkbcommon extra-libraries: xkbcommon Test-Suite stringcomp type: exitcode-stdio-1.0 hs-source-dirs: tests other-modules: Common main-is: stringcomp.hs build-depends : base, xkbcommon extra-libraries: xkbcommon