Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Svenskt tangentbord med HAL och Xorg 1.5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Scandinavian
View previous topic :: View next topic  
Author Message
Nimo
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2003
Posts: 108

PostPosted: Tue May 12, 2009 4:09 pm    Post subject: Svenskt tangentbord med HAL och Xorg 1.5 Reply with quote

Swedish keyboard layout with HAL autodetection and Xorg 1.5

Hade en hel del strul innan jag fick igång svensk tangentbordslayout tillsammans med nya Xorg 1.5 och autodetektering via HAL. Datorn är en HP laptop i Pavillion dv2000-serien med bl.a. Synaptic-touchpad. Postar alla relevanta configfiler här.


I Xorg.conf kommenterade jag bort allt som handlade om mus eller tangentbord och lade till sektionen med ServerFlags.
Code:
Section "ServerLayout"
   Identifier     "X.org Configured"
   Screen      0  "Screen0" 0 0
   #InputDevice    "Mouse0" "CorePointer"
   #InputDevice    "TouchPad" "AlwaysCore"
   #InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerFlags"
   Option "AutoAddDevices" "on"
   Option "AutoEnableDevices" "on"
   Option "AllowEmptyInput" "on"
EndSection

Section "Files"
   #RgbPath      "/usr/share/X11/rgb"
   ModulePath   "/usr/lib/xorg/modules"
   FontPath    "/usr/share/fonts/misc:unscaled"
#   FontPath    "/usr/share/fonts/Type1"
   FontPath    "/usr/share/fonts/TTF"
   FontPath    "/usr/share/fonts/corefonts"
   FontPath    "/usr/share/fonts/freefont"
   FontPath    "/usr/share/fonts/sharefonts"
   FontPath    "/usr/share/fonts/terminus"
   FontPath    "/usr/share/fonts/ttf-bitstream-vera"
   FontPath    "/usr/share/fonts/unifont"
   FontPath    "/usr/share/fonts/75dpi:unscaled"
   FontPath    "/usr/share/fonts/100dpi:unscaled"
   FontPath    "/usr/share/fonts/artwiz"
   FontPath     "/usr/share/fonts/misc/"
   FontPath     "/usr/share/fonts/TTF/"
   FontPath     "/usr/share/fonts/OTF"
   FontPath     "/usr/share/fonts/Type1/"
   FontPath     "/usr/share/fonts/CID/"
   FontPath     "/usr/share/fonts/100dpi/"
   FontPath     "/usr/share/fonts/75dpi/"
EndSection

Section "Module"
   Load  "glx"
   Load  "extmod"
   Load  "xtrap"
   Load  "record"
   Load  "dbe"
   Load  "GLcore"
   #Load  "dri"
   Load  "freetype"
   Load  "type1"
EndSection

#Section "InputDevice"
#   Identifier  "Keyboard0"
#   Driver      "kbd"
#   Option       "XkbRules" "xorg"
#   Option       "XkbModel" "pc105"
#   Option       "XkbLayout" "se"
#EndSection

#Section "Module"
#   Load "synaptics"
#EndSection

Section "Module"
       SubSection  "extmod"
         Option    "omit xfree86-dga"
       EndSubSection
EndSection


#Section "InputDevice"
#   Driver     "synaptics"
#   Identifier     "TouchPad"
#   Option   "Device"     "/dev/input/mouse1"
#   Option   "Protocol"   "auto-dev"
#   Option   "LeftEdge"      "1700"
#   Option   "RightEdge"     "5300"
#   Option   "TopEdge"       "1700"
#   Option   "BottomEdge"    "4200"
#   Option   "FingerLow"   "25"
#   Option   "FingerHigh"   "30"
#   Option   "MaxTapTime"   "180"
#   Option   "MaxTapMove"   "220"
#   Option   "VertScrollDelta" "100"
#   Option   "MinSpeed"   "0.09"
#   Option   "MaxSpeed"   "0.18"
#   Option   "AccelFactor"   "0.0015"
#   Option   "SHMConfig"   "on"
#EndSection


Section "Monitor"
   Identifier   "Monitor0"
   VendorName   "Monitor Vendor"
   ModelName    "Monitor Model"
EndSection

Section "Device"
   Identifier  "Card0"
   Driver      "nvidia"
   VendorName  "nVidia Corporation"
   BoardName   "GeForce Go 7200"
   BusID       "PCI:1:0:0"
   Option       "NvAGP" "1"
EndSection

Section "Screen"
   Identifier "Screen0"
   Device     "Card0"
   Monitor      "Monitor0"
   DefaultDepth 24
   SubSection "Display"
      Viewport   0 0
      Modes    "1280x800" "1024x768"
      Depth     16
   EndSubSection
   SubSection "Display"
      Viewport   0 0
      Modes    "1280x800" "1024x768"
      Depth     24
   EndSubSection
EndSection

Section "dri"
   Mode 0666
EndSection

Section "Extensions"
   Option "Composite" "Enable"
   Option "RENDER" "Enable"
EndSection





I /etc/hal/fdi/policy har jag följande filer:
Code:

flex policy # cat 10-keymap.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">se</merge>
      <merge key="input.xkb.variant" type="string">sv</merge>
    </match>
  </device>
</deviceinfo>


Code:
flex policy # cat 10-x11-input.fdi
<?xml version="1.0" encoding="UTF-8"?>
   <deviceinfo version="0.2">
      <device>
               <!-- Mouse configuration -->
         <match key="info.capabilities" contains="input.mouse">
               <merge key="input.x11_driver" type="string">evdev</merge>
         </match>

      <!-- Keyboard configuration -->
         <match key="info.capabilities" contains="input.keymap">
               <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
         </match>
         <match key="info.capabilities" contains="input.keys">
               <merge key="input.xkb.model" type="string">evdev</merge>
               <merge key="input.x11_driver" type="string">evdev</merge>
               <merge key="input.xkb.layout" type="string">se</merge>
               <merge key="input.xkb.variant" type="string"></merge>
               <merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle,grp_led:scroll,caps:internal_nocancel</merge>
         </match>
      </device>
   </deviceinfo>


Code:
flex policy # cat 10-xinput-configuration.fdi
<?xml version="1.0" encoding="UTF-8"?>
<!--
Section "InputDevice"
   Driver "evdev"
   Option "XkbLayout" "sv"
EndSection
-->
<deviceinfo version="0.2">
   <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbLayout" type="string">se</merge>
   </match>
</deviceinfo>




Code:
flex policy # cat 11-x11-synaptics.fdi
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.touchpad">
      <match key="info.product" contains="Synaptics TouchPad">
        <merge key="input.x11_driver" type="string">synaptics</merge>
        <merge key="input.x11_options.SHMConfig" type="string">on</merge>
        <!-- Tapping -->
        <merge key="input.x11_options.TapButton1" type="string">1</merge>
        <merge key="input.x11_options.TapButton2" type="string">2</merge>
        <merge key="input.x11_options.TapButton3" type="string">3</merge>
        <!-- Scrolling up/down -->
        <merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
        <merge key="input.x11_options.HorizEdgeScroll" type="string">1</merge>
        <!-- Corner clicks -->
        <merge key="input.x11_options.RBCornerButton" type="string">2</merge>
        <merge key="input.x11_options.RTCornerButton" type="string">3</merge>
      </match>
    </match>
  </device>
</deviceinfo>




Hoppas detta hjälper någon iaf.
_________________
//Nimo
Back to top
View user's profile Send private message
nomme
n00b
n00b


Joined: 29 Apr 2008
Posts: 18

PostPosted: Fri Jun 05, 2009 4:10 pm    Post subject: Reply with quote

keymapen funkar bra.
har problem med touchpaden dock.
ska se vad det beror på.

tackar!

edit:
märkte nu i efterhand att vissa key-combos inte funkar.
alla ctrl + shift-combos verkar va ur funktion.
i firefox går det t.ex. inte att tabba bakåt bland flikarna (ctrl + shift + tab)
går inte att markera ord någonstans (ctrl + shift + <höger/vänster>)

nån som märkt av liknande problem?
Back to top
View user's profile Send private message
nomme
n00b
n00b


Joined: 29 Apr 2008
Posts: 18

PostPosted: Sat Jun 06, 2009 12:46 am    Post subject: Reply with quote

ctrl+shift-combos funkade ju så klart inte för att det låg någon funktion med just de knapparna i filen 10-x11-input.fdi
Code:
<merge key="input.xkb.options" type="string">grp:ctrl_shift_toggle,grp_led:scroll,caps:internal_nocancel</merge>

med detta borttaget så funkade prima igen.

fick igång touchpaden också. såhär ser min 11-x11-synaptics.fdi ut för de som undrar
Code:
 <?xml version="1.0" encoding="ISO-8859-1"?>                                                                       
 <deviceinfo version="0.2">
         <device>
                 <!-- AlpsTouchPad -->
                 <match key="info.capabilities" contains="input.touchpad">
                         <merge key="input.x11_driver" type="string">synaptics</merge>
                         <merge key="input.x11_options.SHMConfig" type="string">on</merge>
                         <!-- Tapping -->
                         <merge key="input.x11_options.TapButton1" type="string">1</merge>
                         <merge key="input.x11_options.TapButton2" type="string">2</merge>
                         <merge key="input.x11_options.TapButton3" type="string">3</merge>
                         <!-- Scrolling up/down -->
                         <merge key="input.x11_options.VertEdgeScroll" type="string">1</merge>
                         <merge key="input.x11_options.HorizEdgeScroll" type="string">1</merge>
                         <!-- Corner clicks -->
                         <merge key="input.x11_options.RBCornerButton" type="string">2</merge>
                         <merge key="input.x11_options.RTCornerButton" type="string">3</merge>

                         <merge key="input.x11_options.SendCoreEvents" type="string"></merge>
                         <merge key="input.x11_options.protocol" type="string">auto-dev</merge>
                         <merge key="input.x11_options.LeftEdge" type="string">130</merge>
                         <merge key="input.x11_options.TopEdge" type="string">150</merge>
                         <merge key="input.x11_options.BottomEdge" type="string">700</merge>
                         <merge key="input.x11_options.RightEdge" type="string">890</merge>
                         <merge key="input.x11_options.FingerLow" type="string">35</merge>
                         <merge key="input.x11_options.FingerHigh" type="string">35</merge>
                         <merge key="input.x11_options.MaxTapTime" type="string">150</merge>
                         <merge key="input.x11_options.MaxTapMove" type="string">20</merge>
                         <merge key="input.x11_options.ClickTime" type="string">0</merge>
                         <merge key="input.x11_options.VertScrollDelta" type="string">20</merge>
                         <merge key="input.x11_options.MinSpeed" type="string">0.40</merge>
                         <merge key="input.x11_options.MaxSpeed" type="string">0.65</merge>
                         <merge key="input.x11_options.AccelFactor" type="string">0.010</merge>
                         <merge key="input.x11_options.UpDownScrolling" type="string">1</merge>
                         <merge key="input.x11_options.VertEdgeScroll" type="string">on</merge>
                 </match>
         </device>
 </deviceinfo>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Scandinavian All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum