Background:

Ultimately, I'm trying to set up a custom one handed keyboard layout similar to this demo(click one-handed typing demo).

XKB is used in many linux distros. Wikipedia has a decent description of xkb.

In human-computer interfaces, the X keyboard extension or XKB is a part of the X Window System that extends the ability to control the keyboard over what is offered by the X Window System core protocol. The main features of this extension are:

Unfortunately to achieve this functionality I must make the space bar a modifier.

The Question:

How would you set up the space key as a modifier in the XKB program?

http://www.charvolant.org/~doug/xkb/html/node3.html

It appears the space is unable to be a modifier by default.

link|improve this question
What in the world is XKB? Questions like this need a lot more context...rather than just a c tag. – Cody Gray Dec 18 '11 at 1:10
@CodyGray added some additional context and background behind xkb – Lime Dec 18 '11 at 1:21
feedback

migrated from stackoverflow.com Dec 24 '11 at 1:33

This question came from our site for professional and enthusiast programmers.

1 Answer

I think you're going to have immense difficulty getting the 'tap to space; hold to shift' behavior.

That said, you can use xkbcomp :0.0 to dump the current keymap from the server to a file server-0_0.xkb, and I think I see an easy way to get the space bar to function as as modifier:

key <LALT> {         [           Alt_L,          Meta_L ] };
key <SPCE> {         [           space ] };
....
modifier_map Mod1 { <LALT> };
modifier_map Lock { <CAPS> };

Try replacing space with Mod5 (or whichever modifier key makes most sense), and then add a new modifier_map line:

key <LALT> {         [           Alt_L,          Meta_L ] };
key <SPCE> {         [           Meta5 ] };
....
modifier_map Mod1 { <LALT> };
modifier_map Lock { <CAPS> };
modifier_map Meta5 { <SPCE> };

This is untested, but it feels right.

I don't know how you'll get a plain old space though. I'd suggest mapping it to another key entirely.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.