-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathxkbcommon.cabal
More file actions
195 lines (183 loc) · 5.58 KB
/
xkbcommon.cabal
File metadata and controls
195 lines (183 loc) · 5.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
-- Initial xkbcommon.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
name: xkbcommon
version: 0.0.3
synopsis: Haskell bindings for libxkbcommon
description:
Wrapper library for libxkbcommon, which is an 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 @\<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 key press translation is handled by routing keyboard events through libxkbcommon.
.
There is an opportunity to make libxkbcommon look more like a haskell library:
in principle, libxkbcommon is just a state processor, and has
nothing to do with the IO monad.
However, because of the way that haskell bindings work, and because
in most realistic use cases input data comes from the IO monad anyway, the stateful operations
are encoded in the IO monad.
.
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 header files should be present for correct compilation.
license: MIT
license-files: LICENSE LICENSE.gl
author: Auke Booij
maintainer: auke@tulcod.com
category: Text
build-type: Custom
cabal-version: >=1.8
extra-source-files:
-- Used by Setup.hs
Module.hs
Utils.hs
-- test artifacts
data/compat/accessx
data/compat/basic
data/compat/caps
data/compat/complete
data/compat/iso9995
data/compat/ledcaps
data/compat/lednum
data/compat/ledscroll
data/compat/level5
data/compat/misc
data/compat/mousekeys
data/compat/pc
data/compat/xfree86
data/keycodes/aliases
data/keycodes/aliases-xkbcommon
data/keycodes/empty
data/keycodes/evdev
data/keycodes/evdev-xkbcommon
data/keycodes/xfree86
data/keymaps/bad.xkb
data/keymaps/basic.xkb
data/keymaps/comprehensive-plus-geom.xkb
data/keymaps/divide-by-zero.xkb
data/keymaps/no-types.xkb
data/keymaps/quartz.xkb
data/keymaps/stringcomp.data
data/keymaps/unbound-vmod.xkb
data/rules/base
data/rules/evdev
data/rules/evdev-xkbcommon
data/rules/groups
data/rules/index
data/rules/multiple-options
data/rules/simple
data/symbols/altwin
data/symbols/ca
data/symbols/capslock
data/symbols/ch
data/symbols/compose
data/symbols/ctrl
data/symbols/cz
data/symbols/de
data/symbols/empty
data/symbols/eurosign
data/symbols/group
data/symbols/il
data/symbols/in
data/symbols/inet
data/symbols/keypad
data/symbols/kpdl
data/symbols/latin
data/symbols/level3
data/symbols/level5
data/symbols/nbsp
data/symbols/pc
data/symbols/ru
data/symbols/rupeesign
data/symbols/shift
data/symbols/srvr_ctrl
data/symbols/terminate
data/symbols/us
data/sync.sh
data/types/basic
data/types/complete
data/types/extra
data/types/iso9995
data/types/level5
data/types/mousekeys
data/types/numpad
data/types/pc
source-repository head
type: git
location: https://github.com/abooij/haskell-xkbcommon.git
library
exposed-modules:
Text.XkbCommon,
Text.XkbCommon.KeysymList,
Text.XkbCommon.KeysymPatterns,
Text.XkbCommon.KeycodeList,
Text.XkbCommon.ModList,
Text.XkbCommon.Constants,
Text.XkbCommon.Types,
Text.XkbCommon.InternalTypes,
Text.XkbCommon.Context,
Text.XkbCommon.Keymap,
Text.XkbCommon.KeyboardState,
Text.XkbCommon.Keysym
other-modules:
Text.XkbCommon.ParseDefines
-- other-modules:
build-depends: base <5, transformers, storable-record, process, cpphs, template-haskell, text, bytestring, data-flags, filepath
-- build-tools: c2hs
extra-libraries: xkbcommon
-- 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
Test-Suite context
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules: Common
main-is: context.hs
build-depends : base, xkbcommon
Test-Suite filecomp
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules: Common
main-is: filecomp.hs
build-depends : base, xkbcommon
Test-Suite keyseq
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules: Common
main-is: keyseq.hs
build-depends : base, xkbcommon
Test-Suite keysym
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules: Common
main-is: keysym.hs
build-depends : base, 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
Test-Suite state
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules: Common
main-is: state.hs
build-depends : base, xkbcommon
Test-Suite stringcomp
type: exitcode-stdio-1.0
hs-source-dirs: tests
other-modules: Common
main-is: stringcomp.hs
build-depends : base, xkbcommon
custom-setup
setup-depends: base, Cabal, cpphs, directory, filepath, process, template-haskell, text