Mobility

Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2006-03-16 10:43:22
Size: 552
Editor: pD9ED2A7F
Comment:
Revision 4 as of 2006-03-16 11:45:48
Size: 6334
Editor: pD9ED2A7F
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:

== stickykey on the console ==
To enable stickykeys on the console, you need {{{loadkeys}}}. It is a program to manipulate key mappings and should be available on each base system.

'''1. Step:''' Create a file eg. {{{~/.loadkeys}}} with the following content (maybe, you have to adjust 'keymaps'!!):
{{{
keymaps 0-15
keycode 54 = SShift
keycode 97 = SCtrl
keycode 100 = SAlt
}}}
'''2. Step:''' Call {{{loadkeys /home/thilo/.loadkeys}}}.

Now, the modifier keys on the right site of the keyboard work with stickykeys.

In the 'Configuration example' below you see a setup for daily usage.

For further information refer to:
http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-15.html


=== Comments ===

Good point. I thought I remembered there being some utility that did this in the very old days? Perhaps I'm thinking of 1-finger for DOS? In any case it would be very useful to get this formalised in a general script that will work on all systems (whatever the keyboard layout is, etc.) so we can get it packaged for Ubuntu. When your X breaks (on your latest-crack unstable system) and you have to work from the command prompt it would be useful to be able to simply type 'stickykeys' from any standard Ubuntu install and have this 'Just Work'. If you dont have a way of looking up all the settings described above it's a pain. So, who can write such a script? :) -- HenrikOmma


== stickykey on the X server ==
Because of the missing tool 'xorgcfg' or 'xf86cfg' [https://launchpad.net/distros/ubuntu/+ticket/506] in the ubuntu repository, you have to use the commandline tool 'xkbset'. Which isn't very user-friendly.
You have to call 'xkbset' twice. By the first call, you set the expire of the accessx settings. This is necessary, because there is a default timeout. By the second call, you can adjust the accessx settings themself. I don't know why, but in my settings, this was the required order!

With {{{xkbset -h}}} you will get a help message.

An example for setting the expiry of the accessx settings:
{{{ xkbset exp -bell -sticky -twokey -latchlock -accessx -feedback -stickybeep -led}}}

You have to disable the expiry of all accessx settings you need. Because, if you set an explicit timeout with '0', you will cause a xorg runtime error.

An example for adjust the accessx settings:
{{{ xkbset bell sticky -twokey latchlock feedback led stickybeep}}}


For further information refer to:
http://www.xfree86.org/current/xset.1.html

In the 'Configuration example' below you see a setup for daily usage.


== Configuration of a mouse/trackball on the X server ==
The first tricky bit for me was to find out the correct settings for the 'Input''''''Device' section of the {{{/etc/X11/xorg.conf}}}. I had to google a lot and had to try some protocols to find out which one supports all the buttons of my kensington usb trackball. Lets have a look at the 'InputDevice' section of my {{{xorg.conf}}}:
{{{
Section "InputDevice"
 Identifier "Configured Mouse"
 Driver "mouse"
 Option "Device" "/dev/input/mice"
 Option "Protocol" "ExplorerPS/2"
 Option "Buttons" "6"
 Option "ZAxisMapping" "5 6"
 Option "Emulate3Buttons" "no"
 Option "DragLockButtons" "1 4"
EndSection
}}}
Some hints:
 * 'Buttons': The correct number is the number of your mouse buttons plus two, if you have a wheel.
 * 'Z''''''Axis''''''Mapping': The buttons used for scrolling. (The movement of the wheel is mapped to buttons.)
 * 'Drag''''''Lock''''''Buttons': This is the setting for 'Drag and Drop'. In this example, button 4 is used to lock button 1. If you press button 4, button 1 is locked. If you press button 4 again, button 1 is released.

For further information refer to:
http://www.xfree86.org/current/mouse5.html

The second tricky bit was to find out how to change the default button layout of my trackball, which wasn't very usefull to me. With the commandline tool xmodmap, you can change the layout of the buttons. For example, if you would have a mouse with 3 buttons, the following command would swap the left button with the right one.

{{{ xmodmap -e "pointer = 3 2 1"}}}

For further information refere to:
http://www.xfree86.org/current/xmodmap.1.html

To justify the acceleration and threshold, use the commandline tool 'xset'. For example:

{{{ xset m 7/10 2}}}
This reduces the mouse acceleration to 0.7 and sets a threshold to 2

For further information refere to:
http://www.xfree86.org/current/xset.1.html

As you can see, the configuration of a mouse/trackball with many buttons isn't very easy. A tool that displays the keycodes of the mouse and the keyboard is 'xev'. You can use it to check the layout of the buttons.

It is not easy to find the required mouse/trackball settings, especially if you need another button layout than the default one.


In the 'Configuration example' below you see a setup for daily usage.


== Configuration example ==
Ok, now lets see how to setup the things above, so that they are called on each start of the X server.
I've written a shell script, which contains all necessary tool calls. For example:
{{{
#!/bin/sh

# setting the expiry of the accessx settings
/usr/bin/xkbset exp -bell -sticky -twokey -latchlock -accessx -feedback -stickybeep -led

# stickykey settings
/usr/bin/xkbset bell sticky -twokey latchlock feedback led stickybeep

# layout of the mouse buttons
/usr/bin/xmodmap -e "pointer = 2 3 6 1 4 5"

# mouse acceleration and threshold
/usr/bin/xset m 7/10 2
}}}

Now create a link from this stript to {{{/etc/X11/Xsession.d}}}, for example {{{/etc/X11/Xsession.d/91xinit}}}. The script starts now before the X server. Beware: The link shouldn't have any extention.

Window Manager Independent Acessibility for Mobility Impaired Disabilities

Introduction

About me, the author: My profession is software developer and I am a person with mobility impaired disability. About 1,5 years ago, I changed from Windows to Linux. As a result of my disability, I needed special settings for my keyboard and mouse/trackball. Without the linux experience of a friend, it would have been hardly possible to configure these settings.

The following article is just a hint for advanced users, having the same problem.

stickykey on the console

To enable stickykeys on the console, you need loadkeys. It is a program to manipulate key mappings and should be available on each base system.

1. Step: Create a file eg. ~/.loadkeys with the following content (maybe, you have to adjust 'keymaps'!!):

keymaps 0-15
keycode 54 = SShift
keycode 97 = SCtrl
keycode 100 = SAlt 

2. Step: Call loadkeys /home/thilo/.loadkeys.

Now, the modifier keys on the right site of the keyboard work with stickykeys.

In the 'Configuration example' below you see a setup for daily usage.

For further information refer to: http://www.tldp.org/HOWTO/Keyboard-and-Console-HOWTO-15.html

Comments

Good point. I thought I remembered there being some utility that did this in the very old days? Perhaps I'm thinking of 1-finger for DOS? In any case it would be very useful to get this formalised in a general script that will work on all systems (whatever the keyboard layout is, etc.) so we can get it packaged for Ubuntu. When your X breaks (on your latest-crack unstable system) and you have to work from the command prompt it would be useful to be able to simply type 'stickykeys' from any standard Ubuntu install and have this 'Just Work'. If you dont have a way of looking up all the settings described above it's a pain. So, who can write such a script? Smile :) -- HenrikOmma

stickykey on the X server

Because of the missing tool 'xorgcfg' or 'xf86cfg' [https://launchpad.net/distros/ubuntu/+ticket/506] in the ubuntu repository, you have to use the commandline tool 'xkbset'. Which isn't very user-friendly. You have to call 'xkbset' twice. By the first call, you set the expire of the accessx settings. This is necessary, because there is a default timeout. By the second call, you can adjust the accessx settings themself. I don't know why, but in my settings, this was the required order!

With xkbset -h you will get a help message.

An example for setting the expiry of the accessx settings:      xkbset exp -bell -sticky -twokey -latchlock -accessx -feedback -stickybeep -led

You have to disable the expiry of all accessx settings you need. Because, if you set an explicit timeout with '0', you will cause a xorg runtime error.

An example for adjust the accessx settings:      xkbset bell sticky -twokey latchlock feedback led stickybeep

For further information refer to: http://www.xfree86.org/current/xset.1.html

In the 'Configuration example' below you see a setup for daily usage.

Configuration of a mouse/trackball on the X server

The first tricky bit for me was to find out the correct settings for the 'InputDevice' section of the /etc/X11/xorg.conf. I had to google a lot and had to try some protocols to find out which one supports all the buttons of my kensington usb trackball. Lets have a look at the 'InputDevice' section of my xorg.conf:

Section "InputDevice"
 Identifier  "Configured Mouse"
 Driver      "mouse"
 Option     "Device" "/dev/input/mice"
 Option     "Protocol" "ExplorerPS/2"
 Option     "Buttons" "6"
 Option     "ZAxisMapping" "5 6"
 Option     "Emulate3Buttons" "no"
 Option     "DragLockButtons" "1 4"
EndSection

Some hints:

  • 'Buttons': The correct number is the number of your mouse buttons plus two, if you have a wheel.
  • 'ZAxisMapping': The buttons used for scrolling. (The movement of the wheel is mapped to buttons.)

  • 'DragLockButtons': This is the setting for 'Drag and Drop'. In this example, button 4 is used to lock button 1. If you press button 4, button 1 is locked. If you press button 4 again, button 1 is released.

For further information refer to: http://www.xfree86.org/current/mouse5.html

The second tricky bit was to find out how to change the default button layout of my trackball, which wasn't very usefull to me. With the commandline tool xmodmap, you can change the layout of the buttons. For example, if you would have a mouse with 3 buttons, the following command would swap the left button with the right one.

     xmodmap -e "pointer = 3 2 1"

For further information refere to: http://www.xfree86.org/current/xmodmap.1.html

To justify the acceleration and threshold, use the commandline tool 'xset'. For example:

     xset m 7/10 2 This reduces the mouse acceleration to 0.7 and sets a threshold to 2

For further information refere to: http://www.xfree86.org/current/xset.1.html

As you can see, the configuration of a mouse/trackball with many buttons isn't very easy. A tool that displays the keycodes of the mouse and the keyboard is 'xev'. You can use it to check the layout of the buttons.

It is not easy to find the required mouse/trackball settings, especially if you need another button layout than the default one.

In the 'Configuration example' below you see a setup for daily usage.

Configuration example

Ok, now lets see how to setup the things above, so that they are called on each start of the X server. I've written a shell script, which contains all necessary tool calls. For example:

# setting the expiry of the accessx settings
/usr/bin/xkbset exp -bell -sticky -twokey -latchlock -accessx -feedback -stickybeep -led

# stickykey settings
/usr/bin/xkbset bell sticky -twokey latchlock feedback led stickybeep 

# layout of the mouse buttons
/usr/bin/xmodmap -e "pointer = 2 3 6 1 4 5"

# mouse acceleration and threshold
/usr/bin/xset m 7/10 2

Now create a link from this stript to /etc/X11/Xsession.d, for example /etc/X11/Xsession.d/91xinit. The script starts now before the X server. Beware: The link shouldn't have any extention.

Accessibility/doc/Guide/Mobility (last edited 2008-08-06 17:00:48 by localhost)