smileyninja / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

Enhancement request; "space/shift dual role key" #200

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello, AutoKey world. I'm the author of "at-home-modifier"[1], a fork of 
xf86-input-evdev, or xserver-xorg-input-evdev in debian. I wonder if AutoKey 
could implement what at-home-modifier offers. It seems it's supported by 
AutoHotKey.

[1] https://gitorious.org/at-home-modifier/pages/Home

My hack enables for example "space/shift dual role key"; if you press the space 
key alone, it's a space. But you can use it as shift, too. Simply press space + 
x, and it's shift + x.

In fact, there's already softwares, "Space2ctrl" and "Keydouble"[2], with a 
similar objective which use X Record extension. I don't know X Record, but if 
it's integrated to AutoKey, I guess it'd be better.

[2] https://github.com/r0adrunner/Space2Ctrl and
https://github.com/baskerville/keydouble

Space2ctrl and Keydouble are NOT configurable and things are hardcoded. OTOH my 
hack provides some range of options, which are vital to provide satisfaction to 
each user. My hack is configured via xorg.conf, but AutoKey may be more 
flexible.

What do you think? I don't know much about python, (and I've never used 
python2.) but if you're interested, I'd be glad to tell what my code does.

Regards.

Original issue reported on code.google.com by te...@lavabit.com on 11 May 2012 at 4:04

GoogleCodeExporter commented 8 years ago
Hmm... I don't think this would work. The only way would be is if there were 
Xlib APIs that you can use to achieve this.

Original comment by cdekter on 15 May 2012 at 2:26

GoogleCodeExporter commented 8 years ago
Hi. I'm not sure exactly on which aspect you're talking, but the way the above 
hacks work is simple. When the Space is pressed, dispatch a Shift press event 
instead. When the Space is released, send a Shift release, and if the last 
event was the Space press, then add a press and a release of the Space, and 
you're done.

I've heard that XTest extension is used to synthesize events in Space2ctrl and 
Keydouble. My hack modifies the X input driver itself, so there's no synthesis 
of events.

Thanks for your reply. Regards.

Original comment by te...@lavabit.com on 15 May 2012 at 12:37