You are not logged in.

#1 2008-12-01 23:45:18

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

[SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

I apologize if this has already been addressed, but I have read every thread about this I can find, and the wiki page, and I can't find a solution.

I use a standard US keyboard (it's a laptop), but with the Dvorak keymap.  Most things work fine, except for any Ctrl-Alt combinations.  For example, ctrl-alt-left is detected as D.   ctrl-alt-right is C,  ctrl-alt-up is A, and ctrl-alt-down is B.  These are my shortcuts for switching desktops, so I use them constantly.  The Windows key works perfectly, as do ctrl-shift sequences.

There's no problem in the VTs, and in xev, all the keys are detected normally.  I've also discovered that I can temporarily fix the problem by going into system settings, unsetting a shortcut, than resetting it, but this only lasts for that one session.  The next time I start KDE, the problem returns.   

I have removed my input devices from xorg.conf after upgrading to xserver 1.5, and in KDE system settings I've set it to Evdev-managed keyboard, with the us map and dvorak variant.  My /etc/hal/fdi/policy/10-keymap.fdi is as follows:

<?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">dvorak</merge>
      <!-- <merge key="input.xkb.model" type="string">pc105</merge> -->
      <!-- <merge key="input.xkb.options" type="string">altwin:super_win</merge> -->
      <!-- <merge key="input.xkb.variant" type="string">dvorak</merge> -->
    </match>
  </device>
</deviceinfo>

The 3 lines that I've commented out at the end have been on and off at various times - makes no difference.  I've also noticed that in Xorg.0.log, there are 4 keyboards detected and enabled by HAL, as you can see here:

(II) config/hal: Adding input device Video Bus
(II) LoadModule: "evdev"
(II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
        compiled for 1.5.2, module version = 2.0.7
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.1
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event7"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Video Bus: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Video Bus: xkb_model: "evdev"
(**) Option "xkb_layout" "dvorak"
(**) Video Bus: xkb_layout: "dvorak"
(II) config/hal: Adding input device Video Bus
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event6"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Video Bus: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Video Bus: xkb_model: "evdev"
(**) Option "xkb_layout" "dvorak"
(**) Video Bus: xkb_layout: "dvorak"
(II) config/hal: Adding input device Video Bus
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event5"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Video Bus: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Video Bus: xkb_model: "evdev"
(**) Option "xkb_layout" "dvorak"
(**) Video Bus: xkb_layout: "dvorak"
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) AT Translated Set 2 keyboard: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) AT Translated Set 2 keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "dvorak"
(**) AT Translated Set 2 keyboard: xkb_layout: "dvorak"

Any ideas are welcome...I'm totally stumped!!

Last edited by noahsark1126 (2008-12-03 05:32:59)

Offline

#2 2008-12-02 03:36:22

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

Ok, I have found the source of the problem, but I don't know how to fix it.  It's the 3 extra keyboards that HAL keeps detecting every time it starts up.  The HAL udi's are

/org/freedesktop/Hal/devices/computer_logicaldev_input_3
/org/freedesktop/Hal/devices/computer_logicaldev_input_4
/org/freedesktop/Hal/devices/computer_logicaldev_input_5

and they are of type "Video Bus," whatever that means.  So if I simply remove these devices by running

sudo hal-device -r computer_logicaldev_input_3
sudo hal-device -r computer_logicaldev_input_4
sudo hal-device -r computer_logicaldev_input_5

the problem is resolved.  The problem is, these devices return the next time HAL is started.

Does anyone know how to remove them permanently?

Offline

#3 2008-12-02 04:41:56

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

Sorry, scratch that theory.  The problem is now happening even with those devices removed.  I don't know why it seemed to be working...

Offline

#4 2008-12-03 05:32:38

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

I think this is a KDE bug - nothing to do with HAL settings.  Since I use a laptop and it doesn't matter, I just disabled hotplugging in xorg.  Solved.

Offline

#5 2008-12-03 07:48:01

fatblueduck
Member
From: Long Beach
Registered: 2005-04-20
Posts: 39

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

I'm using gnome here and I'm having the same problem. My arrow keys aren't working and I'm experiencing problems with window management. If you haven't upgraded yet, be glad.

Offline

#6 2008-12-03 09:00:56

zyghom
Member
From: Poland/currently Africa
Registered: 2006-05-11
Posts: 432
Website

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

Section "ServerFlags"
    Option "AutoAddDevices" "False"
EndSection

in /etc/X11/xorg.conf


Zygfryd Homonto

Offline

#7 2008-12-04 04:37:18

jackphil
Member
Registered: 2008-12-04
Posts: 21

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

you can use shortcuts with hotplugging:

1. forbiden keyboard layout in KDE system settings (regions and languages).

2. add setxkbmap command in .xinitrc (here is mine):

xmodmap ~/.Xmodmap
synclient TouchpadOff=1
xbindkeys &
setxkbmap -keycodes evdev -model evdev

exec startkde

3. restart hal and X

that's all.

It seems a bug of KDE, I confirmed it at https://bugs.kde.org/show_bug.cgi?id=173140

Offline

#8 2008-12-05 00:28:36

noahsark1126
Member
Registered: 2008-08-28
Posts: 119

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

Adding setxkbmap to my .xinitrc before starting KDE seems to have solved it.  Shortcuts now work with hotplugging enabled.

Offline

#9 2008-12-06 00:59:03

cameel
Member
Registered: 2008-12-06
Posts: 3

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

Executing

setxkbmap -model <model>

with <model> being anything but 'evdev' messes up KDE shortcuts (e.g. (at least in my system) pressing [up arrow] starts KSnapshot, and [right alt] works like [numpad enter] (xev shows KP_ENTER))

Executing   

setxkbmap -model evdev

brings things back to normality.

That's why setting keyboard model to "Evdev-managed keyboard" in System Settings -> Regional & Language -> Keyboard Layout fixes the issue.

I don't know, however, whether it is a bug in KDE (I am using KDEmod 3.5.10) or in xkeyboard-config package which provides setxkbmap and its config files - in particular /usr/share/X11/xkb/symbols/inet which contains definitions for keyboard models.

Offline

#10 2008-12-06 02:21:55

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: [SOLVED] xserver 1.5 and KDE 4 keymaps - strange behavior

cameel wrote:

Executing   

setxkbmap -model evdev

brings things back to normality.

...

I don't know, however, whether it is a bug in KDE (I am using KDEmod 3.5.10) or in xkeyboard-config package which provides setxkbmap and its config files - in particular /usr/share/X11/xkb/symbols/inet which contains definitions for keyboard models.

I don't think this is a bug in KDE, as this fixed a problem I was having with xmodmap on Openbox.

If I used xmodmap to remap my Caps Lock key to Ctrl in my openbox startup scripts, odd things happen to my keymap (Super key stops working, left arrow key stops repeating, etc).  Running setxkbmap before xmodmap seems to fix everything.

Thanks! big_smile

Last edited by tom5760 (2008-12-06 02:22:16)

Offline

Board footer

Powered by FluxBB