Differences between revisions 1 and 10 (spanning 9 versions)
Revision 1 as of 2005-10-14 00:51:39
Size: 2187
Editor: MartinWilck
Comment:
Revision 10 as of 2009-03-16 03:32:39
Size: 4945
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Keyboard and touchpad =

== Special keys ==

|| Key || X11 keycode || kernel keycode || raw scancode||
|| Mute (Fn-F6) || 160 || 113 || 0xe020||
|| Volume Down (Fn-leftarrow) || 174 || 114 || 0xe02e||
|| Volume Up (Fn-leftarrow) || 176 || 115 || 0xe030||
|| Mail || 128 (236*) || 90 (155*) || 0x78||
|| Internet || 178* || 150* || 0x75 ||
|| User-defined ("Ok") || 159* || 148* || 0x74 ||
|| Etiquette On/Off (Fn-F10) || 182*/183* || 183*/184* || 0xe074/0xe075||

I set the (*) keycodes with the following command at boot time:
{{{
setkeycodes 74 148 75 150 78 155 e074 183 e075 184
}}}
This automatically generates the X11 and kernel keycodes shown in the table.
The "Mail" keycode doesn't have to be set, but the original keycode (128/90) is very unusual so I changed it to the normal value (236/155).

I am using [[http://lineak.sourceforge.net|lineakd]] for mapping the special keys.
<!> Since 0.8.4, lineakd has the X50 keyboard built-in (keyboard id SSX50).
The setkeycodes command above is no more necessary with 0.8.4, the RAWCOMMAND
section in the keyboard definition file (see below) can be used instead.

/!\ On Debian "etch", the RAWCOMMAND requires installing "setkeycodes" __setuid root__, like this:
{{{
dpkg-statoverride --update --add root video 4750 /usr/bin/setkeycodes
}}}
Alternatively, "setkeycodes" can be run as above, e.g. from a system rc script.

The X50 section of {{{/etc/lineakkb.def}}} looks as follows:
{{{
[SSX50]
  brandname = "Samsung"
  modelname = "Samsung X50"
  RAWCOMMAND[SETKEYCODES] = "74 148 75 150 78 155 e074 183 e075 184"
  [KEYS]
    Internet = 178
    Mail = 236
    Mute = 160
    VolumeDown = 174
    VolumeUp = 176
    UserDefined1 = 159
    UserDefined2 = 182 # "etiquette mode on"
    UserDefined3 = 183 # "etiquette mode off"
  [END KEYS]
[END SSX50]
}}}

Here is my {{{$HOME/.lineak/lineakd.conf}}} (keys section):
{{{
Internet = "firefox"
Mail = "mozilla-thunderbird"
Mute = "KMIX_MUTE"
UserDefined1 = "konsole"
# This requires "cpufrequtils" and proper permissions on cpufreq-set
[etiquette mode on] UserDefined2 = /usr/bin/cpufreq-set -g powersave
[etiquette mode off] UserDefined3 = /usr/bin/cpufreq-set -g ondemand
VolumeDown = "KMIX_VOLDOWN"
VolumeUp = "KMIX_VOLUP"
}}}

Lineakd is much less useful with GNOME than with KDE. Under Ubuntu 5.10 "Breezy", I found that most special keys worked out-of-the box with GNOME (the setkeycodes command needs to be executed though, to map the special keys to their standard X keycodes).
Line 22: Line 87:
          # Useful with X mouse acceleration=1.0
        Option "MinSpeed" "0.09"
        Option "MaxSpeed" "0.5"
        Option "AccelFactor" "0.005"

Keyboard and touchpad

Special keys

Key

X11 keycode

kernel keycode

raw scancode

Mute (Fn-F6)

160

113

0xe020

Volume Down (Fn-leftarrow)

174

114

0xe02e

Volume Up (Fn-leftarrow)

176

115

0xe030

Mail

128 (236*)

90 (155*)

0x78

Internet

178*

150*

0x75

User-defined ("Ok")

159*

148*

0x74

Etiquette On/Off (Fn-F10)

182*/183*

183*/184*

0xe074/0xe075

I set the (*) keycodes with the following command at boot time:

setkeycodes 74 148 75 150 78 155 e074 183 e075 184 

This automatically generates the X11 and kernel keycodes shown in the table. The "Mail" keycode doesn't have to be set, but the original keycode (128/90) is very unusual so I changed it to the normal value (236/155).

I am using lineakd for mapping the special keys. <!> Since 0.8.4, lineakd has the X50 keyboard built-in (keyboard id SSX50). The setkeycodes command above is no more necessary with 0.8.4, the RAWCOMMAND section in the keyboard definition file (see below) can be used instead.

/!\ On Debian "etch", the RAWCOMMAND requires installing "setkeycodes" setuid root, like this:

dpkg-statoverride --update --add root video 4750 /usr/bin/setkeycodes

Alternatively, "setkeycodes" can be run as above, e.g. from a system rc script.

The X50 section of /etc/lineakkb.def looks as follows:

[SSX50]
  brandname = "Samsung"
  modelname = "Samsung X50"
  RAWCOMMAND[SETKEYCODES] = "74 148 75 150 78 155 e074 183 e075 184"
  [KEYS]
    Internet     = 178
    Mail         = 236
    Mute         = 160
    VolumeDown   = 174
    VolumeUp     = 176
    UserDefined1 = 159
    UserDefined2 = 182 # "etiquette mode on"
    UserDefined3 = 183 # "etiquette mode off"
  [END KEYS]
[END SSX50]

Here is my $HOME/.lineak/lineakd.conf (keys section):

Internet =  "firefox"
Mail = "mozilla-thunderbird"
Mute = "KMIX_MUTE"
UserDefined1 = "konsole"
# This requires "cpufrequtils" and proper permissions on cpufreq-set
[etiquette mode on] UserDefined2 = /usr/bin/cpufreq-set -g powersave
[etiquette mode off] UserDefined3 = /usr/bin/cpufreq-set -g ondemand
VolumeDown = "KMIX_VOLDOWN"
VolumeUp = "KMIX_VOLUP"

Lineakd is much less useful with GNOME than with KDE. Under Ubuntu 5.10 "Breezy", I found that most special keys worked out-of-the box with GNOME (the setkeycodes command needs to be executed though, to map the special keys to their standard X keycodes).

The touchpad

(Etch) The synaptic touchpad was auto-detected but not configured as primary mouse. The driver is in th xfree86-driver-synaptics package. I took some tim eto figure out the ideal driver parameters for my laptop and my fingers with the "synclient" tool. Here is the relevant part from xorg.conf:

Section "InputDevice"
        Identifier      "Synaptics Touchpad"
        Driver          "synaptics"
        Option          "CorePointer"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "auto-dev"

        # Values I found handy on the X50

        Option  "LeftEdge"      "1500"   # I prefer narrow edges
        Option  "RightEdge"     "5000"   # right edge is larger (scroll area)
        Option  "TopEdge"       "1200"
        Option  "BottomEdge"    "4800"

        Option  "FingerLow"     "30"     # Z values range from 40 for slight tap
        Option  "FingerHigh"    "40"     # to 120 for full palm weight
 
        # Useful with X mouse acceleration=1.0
        Option  "MinSpeed"      "0.09"
        Option  "MaxSpeed"      "0.5"
        Option  "AccelFactor"   "0.005"

        Option  "MaxTapTime"    "180"
        Option  "MaxTapMove"    "220"
        Option  "MaxDoubleTapTime" "160" # Doubleclick is too hard otherwise

        # Buttons
        Option  "EmulateMidButtonTime" "0" # unnecessary
        Option  "TapButton2" "2"         # 2 fingers-middle button
        Option  "TapButton3" "3"         # 3 fingers right button
        Option  "RTCornerButton" "4"     # scrolling with the scroll arrows
        Option  "RBCornerButton" "5"
        Option  "HorizScrollDelta" "100" # button 6/7 at lower edge
        Option  "VertScrollDelta" "100"  # button 4/5 at right edge

        Option  "EdgeMotionMinZ" "60"    # require some pressure for edge motion
        Option  "EdgeMotionMaxZ" "80"
        Option  "EdgeMotionMinSpeed"  "0" # motion must STOP at MinZ
        Option  "EdgeMotionMaxSpeed"  "1000"
        Option  "EdgeMotionUseAlways" "1" # use it for pointer movement

        Option  "PalmDetect" "1"          # Z = 100-120 is typical for palm
        Option  "PalmMinWidth" "10"
        Option  "PalmMinZ"     "100"

        Option  "SHMConfig"     "on"
EndSection