Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

If it doesn't relate to Debian, but you still want to share it, please do it here

Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2011-06-25 06:19

Hi. This hack provides for example "space/shift dual role key". When you press the space key alone, it's a space; but when you press it with another key, it's a shift. Any pairs of keys are possible. This means your hands stay almost always at their home postion. Now I can't type comfortably without it.

It's a fork of Xorg "evdev" driver (= xf86-input-evdev, or in debian xserver-xorg-input-evdev).

* Readme tells the detail.
* homepage. You can get the source tarball and git access instruction.

FAQ
Q: Can I input Shift+Space if my Space is Space/Shift dual-role key?
A: Turn both of your Space and Shift into Space/Shift keys.

News for 2.8.0 (Jun 2013)
Merges the upstream 2.8.0, and has no changes in ahm itself since 2.7.3. For full changes, read README, "News" section:

Installation
I'm not a debian user, and I don't provied 2.8.0 support. The following instruction for 2.6.4 may help. Or, read the post below by Yuri Khan.

This instruction is rudimentary, so help yourself. It was for squeeze, xserver-xorg-input-evdev 1:2.3.2-6.

The strategy is: Rip the source package debian/ directory from the squeeze version, fix it, and apply to my source.

1. Download the ahm-2.8.0 source tarball. Download also the patch for debian/{rules,changelog}, written for ahm-2.6.4 (I think the patch will work, but not tested yet.) All versions are here.

There's also the patch against the Xorg's original 2.8.0 code to generate the source of my fork. (To protect your PC, patches are easier to read, and thus recommendable.)

2. Do some apt-get:
$ cd somewhere-to-run-debuild
$ apt-get build-dep xserver-xorg-input-evdev
$ apt-get apt-get source xserver-xorg-input-evdev

3. Extract files, apply the patch, and build
$ tar -xf ahm-2.x.y.tar.gz
$ cd at-home-modifier
$ cp -r ../xserver-xorg-input-evdev-<x.y.z>/debian ./
$ patch -p1 < squeeze2ahm-2.6.4.patch
$ debuild
$ dpkg -i <generated deb file>

Alternate installation: Ubuntu PPA
There's Ubuntu PPA for this hack by Yuri Khan. (Thanks!) I don't give general instruction and caution on PPA here. Use it at your own risk, but the source package may be nice.

Notice
When you upgrade the xorg-server, you have to rebuild this hack, too, or your keyboards and mice won't work! More precisely, for xorg-server-x.y.z, a change in z doesn't affect, but x or y does. (In debian, it seems to be called xserver-xorg-core-2:x.y.z-rel.)

Bug of the current debian patch:
* README.orig is not installed

If you know how it can be automated with git-buildpackage, please tell me.

Alternatives softwares
* xcape. See the homepage for how to compile. It's a userland software, so you don't have to catch up the upgrades of xf86-input-evdev.
* Obsolete alternatives are Space2Ctrl in C++ and keydouble in C, which is a fork of Space2Ctrl.

Notice
Probably I don't develop any more this hack as a fork of xf86-input-evdev. It's better to do all in user space, rather than as an X driver.

If you want some progress, improve xcape. I'm also interested in a rewrite in Python, which will be easier to allow flexible configuration. It'd be great if it'd be integrated into AutoKey, but its development seems to have stopped.

With best regards.
Last edited by teika on 2013-06-27 12:59, edited 11 times in total.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

at-home-modifier-2.6.3 is released.

Postby teika » 2011-11-12 07:22

Hi. at-home-modifier-2.6.3 is released. Changes since the last post (2.6.0) are:

* Fast type fix
Users of this hack often have “tongue-twister of finger”: Suppose you want “ x”. If you press space/shift, press x, and release space/shift (before releasing x), you’ll get an upper-case X instead.
Fixes of this kind are attempted with new “AhmDelay” and “AhmFreezeTT” options.

* Cancellation by timeout
Suppose you were about to input shift + A and pressed space/shift, but you changed your mind. If you release the space/shift key, you’ll receive one space, but it’s not what you want!
This can be fixed by long enough press now.

* Reset
When something is wrong, leave the keyboard untouched for 10 secs. Then all are reset to the initial state.

* Gtk widget double press issue.
To push a gtk button, sometimes you had to press space/shift key twice, but this is fixed. If it doesn’t work out-of-box, set “AhmPaddingInterval” option. (This “bug” is not the author’s fault, but what’s bad for users are bugs.=)

For full changes, read README, "News" section:
http://gitorious.org/at-home-modifier/a ... ter/README

With best regards.

Homepage: http://gitorious.org/at-home-modifier/pages/Home
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2011-11-28 11:12

Hi there. I've added installation instruction for squeeze. See the first post.
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2011-12-05 09:29

You could help yourself:
teika wrote:* Reset
[...]all are reset to the initial state.
More is already available:
teika wrote:For full changes, read README[...]
From README:
*** Reset ***
Sometimes transmods get frozen (See "Switching VT" section below)
[...] Reset is implemented by sending release events to all translated
modifiers
[...]
* Switching VT: If your Ctrl is a transmod key, when you switch from X
to virtual console with Ctrl + Alt + F1, and switch back to X with Alt
+ F1, Ctrl get frozen. This is mitigated with "reset" feature.

It happens because Ctrl is pressed at the first switching, but the
release is only sent to the VT, not to X, in particular to this driver.

Now I reveal you a secret: when a developer introduces a new feature, there's a reason to do so, and when they release, they are satisfied, at least fairly.

In fact, I improved README a bit after your question. =)

Thank you for your interest. Cheers.

# BTW I've noticed that you can buy Japanese keyboards from say amazon.com. This hack works better with Japanese keyboards (read README), so when you need a new keyboard, consider buying one.
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2011-12-28 08:52

Hi. at-home-modifier-2.6.4 is released. It has one minor fix, "mouse support":
When you press space/shift and a mouse button, the result used to be shift + click, ok, but also followed by an extra, unwanted space, as if the click hadn't happened. It's because each device ignored others. Now it's fixed, as long as the mouse is also handled by evdev driver. (Notebook touchpads are dealt by synaptics driver, so it's not fixed, and won't be fixed. Use AhmTimeout option as a workaround.)

For building, read the first message in the thread.

If you find the news or README difficult to understand, then feel free to ask.
<quote>"What's inconvenient is a bug." - Teika kazura</unquote>
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2011-12-30 08:22

I forgot to tell you that when you upgrade the xorg-server, you have to rebuild this hack, too, or your keyboards and mice won't work! More precisely, for xorg-server-x.y.z, a change in z doesn't affect, but x or y does. (In debian, it seems to be called xserver-xorg-core-2:x.y.z-rel.)
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2012-01-14 05:53

Hi. Ubuntu PPA for this hack is contributed by Yuri Khan. (Thanks!) I don't give general instruction and caution on PPA here. Use it at your own risk, but the source package may be nice; at least looking into debian/ directory will help.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby Yuri Khan » 2012-01-14 17:11

Oh, I don’t think my package will be of use for Debian users, ‘cause I started with an Ubuntu package that takes the original evdev tarball and applies Ubuntu-specific patches over it. But I can detail here what I did in case someone wants to do the same for Debian (does Debian have an equivalent of Ubuntu PPA?):

  • $ apt-get source xserver-xorg-input-evdev
  • $ cd xserver-xorg-input-evdev-2.6.0
  • $ debian/rules patch
  • $ quilt new 201-at_home_modifier.patch
  • $ quilt add README README.orig src/evdev.c src/evdev.h
  • manually apply the patch from http://gitorious.org/at-home-modifier/d ... ster/patch (because, with an Ubuntu-specific 100-xi2.1.patch applied, ahm’s patch applies incorrectly; on Debian, your mileage may vary)
  • $ quilt refresh
  • $ debian/rules unpatch
  • $ dch -i
  • update and save the changelog
  • $ debuild -S -sd
  • upload the newly built source package to PPA
Yuri Khan
 
Posts: 1
Joined: 2012-01-14 16:46

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2012-01-31 02:02

I've found an alternative, Space2Ctrl, by Victor Moreira.

* s2c works in the user space, while ahm (=at-home-modifier) is the fork of an X input driver.
* s2c uses "X Record Extension" to detect events. I haven't given a try yet, but it probably stands between the X server and clients (or Xlib).
*** This (probably) means it can't coexist with other softwares which use Record Extension, e.g. AutoKey or xnee.
* s2c doesn't require much updates; ahm has to keep up with the upstream (= X).
* s2c is written in C++. (I don't understand C++. :P)
* The s2c code is slim; it's easier for users to hack.
*** Ahm is a fork, so the distinction of the genuine ahm part and the original X code is not clear.
* s2c is rudimentary. The sole keycode pair is hard-coded, and has no option. According to the author (in private correspondence), "more of a personal hack, very poorly tested and documented."

Read the git commit log to know the author's email address. He said he'd like more users, so sending patches may be welcome.

News: Ahm development hasn't seen any progress after the 2.6.4 release.

Thank you very much, Yuri Khan for the detailed explanation.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2012-02-16 07:47

An implementation in C, "keydouble" is developed by "baskerville" aka "bloom" in the ArchLinux forum. See the web site hosted at github. You may find the news at the Arch forum thread.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2012-04-22 12:35

Hi, folks. Not a news of ahm update, but of a good keyboard.

keyboard glossary:
https://en.wikipedia.org/wiki/Keyboard_technology
http://www.overclock.net/t/491752/mecha ... oard-guide

I recommend Japanese keyboards for at-home-modifier, because you can press many keys with thumbs. Image here:
https://en.wikipedia.org/wiki/File:KB_Japanese.svg

The bottom row of my keyboard is:
Esc-BS-Spc-Ret-Tab and
Alt-Shift-Ctrl-Shift-Alt
(The middle one is the space bar.) as described in the README of ahm. Japanese keyboards enable such stunt which is really comfy.

I use a membrane keyboard, whose touch is bad for your finger. There hasn't been good keyboards with enough many thumb keys.

Recently a new keyboard with "cherry mx brown switch", OWL-KB109BM(B)IIB, came out:
http://www.owltech.co.jp/products/keybo ... _B_II.html (Japanese)
You can buy one from amozon.co.jp, at 8000 yen or so (roughly equal to $100; these days yen is high.). They offer an English interface, too. I dislike google/apple/amazon monopoly, though. (Who likes?)
There's also "cherry mx blue" one, OWL-KB109BM(B)II, too. They say blue is noisy.

There's already many other cherry switch or capacitive switch Japanese keyboards, but they have a long space bar, which doesn't suit my purpose.

I haven't bought yet. Not cheap, but interesting. Night night.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

ahm-2.7.1 released.

Postby teika » 2012-06-06 08:35

At-home-modifier-2.7.1 is released. (Called whimsically 2.7.1, not 2.7.0.) It merges the upstream 2.7.0, but has no changes in ahm since 2.6.4.

The Xorg's 2.7.0 has mulitouch support. If you want it, you need Xorg server >= 1.11.99.901 and "mtdev" library.

Modifications from the upstream 2.7.0 are:
* An upstream bugfix of horizontal scroll, X.Org Bug 46205, is included. (The fix is published after the 2.7.0 release.)
* Added an option to configure script "--without-mtdev". The upstream code always checks mtdev, and enables it when found. If you don't pass the above option, it falls back to the original behavior.

Read README for the details.

* Source tarball
* Patch against Xorg's original 2.7.0

I don't write Debian support for 2.7.1.

Notice
Probably I don't develop any more this hack as a fork of xf86-input-evdev. It's better to do all in user space, not as an X driver. (And personally I'm terribly weakened.)

If you want some progress, improve "Keydouble" or so. I'm also interested in a rewrite in Python, which will be easier to allow flexible configuration. (In reality I don't think I'll ever write one.) It'll be great if it's integrated to AutoKey, but the AutoKey developer is not interested.

To make these hacks more popular, you can upvote my answer here to a question on Emacs Pinky in StackOverflow.

Regards.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: ahm-2.7.1 released.

Postby debil » 2012-06-06 12:25

teika wrote:Notice
Probably I don't develop any more this hack as a fork of xf86-input-evdev. It's better to do all in user space, not as an X driver. (And personally I'm terribly weakened.)

I agree, if this (ahm) was a user space app, I would've tested it (haven't been in the mood for compiling X). Anyway, cheers for the contribution, us heavy keyboard users appreciate greatly.
Q: Why is the Eunux kernel so bloated?
A: It was made in the image of its founder.
User avatar
debil
 
Posts: 1337
Joined: 2008-05-11 08:55
Location: Mazes of Menace, surrounded by brown puddings

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2012-11-20 06:44

Hi. At-home-modifier-2.7.3 is released. It merges the upstream 2.7.3, but has no changes in ahm itself since the last release, 2.7.1.

Sources:
* The full source tarball
* The patch against Xorg's original 2.7.3

I don't write Debian support for 2.7.3. Please share yours.

Regards.
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Re: Easy shift / ctrl / AltGr ... hack on xf86-input-evdev

Postby teika » 2013-06-08 09:12

There's another alternative, xcape by Albin Olsson. It replaces keydouble and space2ctrl.

It's not in Debian/Ubuntu. See the homepage for how to compile.
Easy Shift / Ctrl / AltGr ... hack; save your pinkies, type without drudge
teika
 
Posts: 23
Joined: 2011-06-25 06:15

Next

Return to Offtopic

Who is online

Users browsing this forum: No registered users and 0 guests

fashionable