Commit graph

7 commits

Author SHA1 Message Date
Noa 6ec00c1e33
Normalize some whitespace 2021-12-01 13:57:59 -06:00
Noa 0d88ebe5b9
Upgrade to bitvec 0.22 with const generics 2021-12-01 13:05:59 -06:00
Sean Young ed4245c380
Support autorepeats and getting keymap entries (#46)
* Support getting and setting auto repeat settings

Signed-off-by: Sean Young <sean@mess.org>

* Retrieving and updating keymap entries

Signed-off-by: Sean Young <sean@mess.org>

* Add missing keycodes and missing aliases

The aliases are #defines in input-event-codes.h.

Signed-off-by: Sean Young <sean@mess.org>
2021-07-20 10:40:49 -06:00
Sean Young d694443d53 Convert string to key code
rc keymaps list keycodes as strings. These need to be converted to
numeric keycodes before the keymap can be loaded. So, add a function
to convert a string to keycode.

Signed-off-by: Sean Young <sean@mess.org>
2021-06-29 09:26:51 -06:00
Noah 3581aa25e0
Syncing impl (#36)
* WIP syncing impl

* Finish up syncing impl

* Reorganize synchronization code + add more docs

* Wrap libc::input_id

* Remove thread::sleep used for testing

* Make EventStream::Item io::Result<InputEvent>

* Add RawDevice::empty_state()

* Update Device rustdoc

* Make raw/sync_stream naming consistent

* Update crate docs

* Fix missing first event of block

* Owned AttributeSet, borrowed AttributeSetRef

* Add some basic syncing tests

* Add some more syncing tests
2021-03-16 20:38:42 -06:00
Jeff Hiner 6b13fd3d45 Add more rustdoc; reorder pub fns for clarity 2021-03-01 14:40:17 -07:00
Noah 3f32c41fc0
Rework the types in constants (#34)
* Replace bitflags with newtypes

* Don't reexport from libc

* Add a wrapper for event_info

* Hide EvdevEnum

* Make the AttributeSet API more setlike

* Move AttributeSet to its own module

* Add some doc, tidy APIs
2021-02-24 18:09:44 -07:00