Libinput: Halfkey/Mirrorboard implementation
Kieran Bingham
kieranbingham at gmail.com
Fri Jul 24 14:28:04 PDT 2015
Hi Guys,
I've been working on a personal project to implement one-handed touch
typing as an accessibility feature.
There are software solutions for this available for Win/MacOS
http://www.onehandkeyboard.org, and an (expensive)
hardware solution available. There is also a solution which uses xkb
mappings to utilise the caps-lock as a modifier,
but this didn't meet my needs; along with a couple of outdated other linux
alternatives mentioned at
http://www.onehandkeyboard.org/linux-one-handed-keyboards/
I had originally started this using XLib hooks to capture all keyboard
input and re-introduce keys through XTest.
This wasn't the best solution however, and while reading up on wayland, I
discovered libinput provides a good
location for this work. And using the xf86-input-libinput wrapper for X I'm
now using it on my laptop.
Anyway, I thought I had got to a stage where I could share some code
(although this is still a work in progress)
I'd love to hear your feedback as to whether this is something that you
would like to integrate, or for me to continue working on.
(I'll continue to use it for personal use, but if its desired, I can work
on improvements to upstream it)
My current work is on github, and includes updates to the
xf86-input-libinput wrapper to enable the feature from xorg.conf.d
Rebased today in the forks at :
https://github.com/kbingham/libinput.git : branch halfkey
https://github.com/kbingham/xf86-input-libinput.git : branch halfkey
Currently implemented:
* Functioning halfkey support using the space bar as a modifier
* Test cases in test/keyboard-halfkey.c
* Property to enable support with : Option "Halfkey" "on"
Todo List:
* Customisable Modifier (use caps-lock/tab etc instead)
* Customisable or device specific mirror mappings
* Testing on non-qwerty / UK keyboards and layouts (I have used only my
keyboard so far)
* Add a "RELEASE" state to track pressed keys after modifier released
(Current work in progress)
* Introduce halfkey pressed keys on a different seat as if it was a
separate keyboard
(due to failing test case .. halfkey_test_corner_cases )
* Probably some updates to the debug tooling in tools/
* Some more documentation and state diagrams?
* Add timeout on space down to insert (repeating) spaces.
* Tidy up the patches :)
Warning: If you run this live, and press a key down followed by its mirror
equivalent down at the same time, libinput will fire an assertion and your
X-session will restart !
( This is the bug failing in halfkey_test_corner_cases )
Look forward to hearing from you.
Regards
Kieran Bingham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150724/8f03891a/attachment.html>
More information about the wayland-devel
mailing list