keyboard mappings are totally screwed after updating to kde4

4

2

I recently upgraded from KDE 3.5 to KDE 4, and I have been having weird issues with my keyboard. In one of the virtual consoles e.g. when I press ctrl + alt 1 , I can type perfectly, but in KDE, several of the number keys don't work, the left and right arrows don't work either.

When I press the right arrow key in xev I get this:

KeyRelease event, serial 34, synthetic NO, window 0x3600001,
root 0x6f, subw 0x0, time 903459, (111,55), root:(115,836),
state 0x10, keycode 114 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,                                                                         
XLookupString gives 0 bytes:                                                
XFilterEvent returns: False 

When I press the '3' key it toggles my Bookmarks toolbar in Firefox, in xev I get this:

KeyPress event, serial 34, synthetic NO, window 0x3600001,
root 0x6f, subw 0x0, time 999968, (94,115), root:(98,896),
state 0x10, keycode 12 (keysym 0x1008ff30, XF86Favorites), same_screen YES,
XLookupString gives 0 bytes:                                               
XmbLookupString gives 0 bytes:                                             
XFilterEvent returns: False                                                

KeyRelease event, serial 34, synthetic NO, window 0x3600001,
root 0x6f, subw 0x0, time 1000032, (94,115), root:(98,896),
state 0x10, keycode 12 (keysym 0x1008ff30, XF86Favorites), same_screen YES,
XLookupString gives 0 bytes:                                               
XFilterEvent returns: False                                            

As this is deeper down, changing the type of keyboard in the KDE meun's has no effect. I'm slowly beginning to wade through the mountains of documentation about the X keyboard model, but there has to be a better way. Does anyone no what it is?

Edit:

1234567890 ! after deleting the entire .kde folder.

but only until I change the Keyboard settings from the "system settings" applet, then its hosed full time. Regardless of what I set the settings too. (restore to default settings doesn't)

2nd Edit:

I'm using Gentoo AMD64, I was upgrading from KDE 3.5 > KDE 4.2.
I think I had manual settings before, although I didn't change anything. I was originally running KDE without HAL until that stop working a year or so ago. The only customisation I made was to set the multimedia keys to control Amarok.

3rd Edit

   $ grep xkb /var/log/Xorg.0.log
   (**) Option "xkb_rules" "evdev"
   (**) Option "xkb_model" "evdev"
   (**) Option "xkb_layout" "us"
   (**) Option "xkb_rules" "evdev"
   (**) Option "xkb_model" "evdev"
   (**) Option "xkb_layout" "us"

Xorg.0.log has this to say:

(WW) AllowEmptyInput is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.
(WW) Disabling Mouse1
(WW) Disabling Keyboard1

My Xorg.conf has this in it.

    Identifier  "Keyboard1"
    Driver      "kbd"
    Option      "AutoRepeat" "500 30"
    # Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
    Option      "XkbRules" "xorg"
    Option      "XkbModel" "pc105"
    Option      "XkbLayout" "gb"

user4774

Posted 2009-10-29T20:05:00.150

Reputation: 151

Answers

1

Perhaps you could:

  1. Move these files from ~/.kde/share/config/ .. kxkbrc , khotkeysrc , khotkeys_update , and startupconfigkeys to another location

Then let KDE run defaults on next start up and go re-config your lyaout settings.

When I went from KDE 3.5 to 4.2 I had to remove some old configs to resolve a few issues, not this specifically, but in other K apps. Beyond that, try a new keyboard, just for fun.

SleighBoy

Posted 2009-10-29T20:05:00.150

Reputation: 2 066

not bad, but instead of deleting them, move them to different locations, eg, rename them all to *.bak. if the OP customized functionality in the old config, it would be missing in KDE4's defaults, and having the old config around to compare might help get the functionality back. – quack quixote – 2009-11-05T08:28:22.373

I moved the whole folder, but we are only half way there, see my edit. – user4774 – 2009-11-05T19:44:40.540

Just curious here, what distro and KDE4 version are you using? – SleighBoy – 2009-11-05T21:28:48.940

Also, are you using manual Xkb settings in your xorg.conf or doing it via HAL? – SleighBoy – 2009-11-05T21:43:16.150

answers in question above. – user4774 – 2009-11-06T10:16:45.807

I have two Gentoo AMD64 desktops w/ KDE4. What do you get when running ' grep xkb /var/log/Xorg.0.log ' ? Mine has xkb_layout as 'us'. I have hal in my USE flags in make.conf myself, and xorg uses evdev to load up my xkb rules, I assume from settings in /etc/conf.d/keymaps . just curious if the underlying keymap config is causing you trouble. – SleighBoy – 2009-11-07T00:34:14.027

HAL is in my make.conf too, I have edited the question again. I have also fixed all the revdep-rebuild errors, which makes the system more stable, but sadly doesn't fix this. – user4774 – 2009-11-08T15:57:01.990

As a point of reference, my KDE 4.3.3 setting at System & Settings > Region & Language > Keyboard Layout . Layout is set to "Disable keyboard layouts" and my default model from my system is "pc104" with a layout of "us". I am not sure what to suggest at this point, other than sharing my config with you. My Xorg.0.log output is the same as yours. Have you tried a different physical keyboard? (as silly as that sounds) – SleighBoy – 2009-11-09T06:54:05.750

So did you put [ Option "AllowEmptyInput" "false" ] in your xorg.conf? I see you approved my series of answers, but is it fixed? – SleighBoy – 2009-11-11T02:55:15.533

1

First, create another user account, log in and test if keymap works there. If yes, then the problem is in your private configs. That will localize the problem whether it's system-wide (/etc, /usr/share/kde*) or user (~).

Next, open keyboard preferences, change something, and close it: you'll have some default configuration in the new home folder. After backing up your personal folder, try to move these files: that can help.

kolypto

Posted 2009-10-29T20:05:00.150

Reputation: 2 861

0

Virtual consoles (tty) are completely unrelated to X11 and use a different keyboard mapping mechanism. Did you try starting a different desktop (twm/icewm/gnome whatever)?

wazoox

Posted 2009-10-29T20:05:00.150

Reputation: 1 285

1True, but I need to prove that the 3,4,5 keys on my keyboard are not broken, jam in the switches etc. They work fine in the tty. – user4774 – 2009-11-02T10:26:42.700

0

The 'state 0x10' implies that one of your modifier keys is stuck down. I'm on OSX, but that state corresponds to my command key, which I think is mapped to the logo key on PC keyboards. Try hitting the logo key a few times (or other modifiers, like alt or ctrl) until state returns to 0x00, and see if that makes a difference.

JimG

Posted 2009-10-29T20:05:00.150

Reputation: 206

1I so wanted this to be true, I almost accepted the answer before I tried it out, but sadly it isn't right. 'state 0x10' refers to the fact my num lock key is pressed down. 5 & 6 (the top line) still don't work, sadly. – user4774 – 2009-11-04T19:38:51.727

0

Inspired by o_O Tync answer; Posted in case anyone else has this same issue. I renamed my home directory as 'backup', removed my account, recreated it. Hacked passwd and groups so I have the same uid and gid, then moved all the visible files back. Then I copy other apps hidden files if I think I need them. Strangely it now works perfectly.

user4774

Posted 2009-10-29T20:05:00.150

Reputation: 151