Bug 118980 - xmodmap settings are being resetted
Summary: xmodmap settings are being resetted
Status: RESOLVED WORKSFORME
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-25 12:00 UTC by Luboš Doležel
Modified: 2020-09-29 03:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luboš Doležel 2005-12-25 12:00:05 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4.5 
OS:                Linux

I am using xmodmap to set names for special keys on my keyboard.
This is an example part of my ~/.Xmodmap:

...
keycode 232 = XF86Stop
keycode 233 = XF86Forward
keycode 234 = XF86Back
keycode 229 = XF86Search
keycode 231 = XF86Refresh
keycode 178 = XF86HomePage
...

My Xmodmap settings are being set at X startup automatically.
When I use xmodmap -pke, correct values are printed:

...
keycode 229 = XF86Search
keycode 230 = XF86Favorites
keycode 231 = XF86Refresh
keycode 232 = XF86Stop
keycode 233 = XF86Forward
keycode 234 = XF86Back
keycode 235 = XF86MyComputer
keycode 236 = XF86Mail
keycode 237 = XF86AudioMedia
...

I have assigned some functions to these keys...example: KCalc is executed when I press XF86Calculator. But there is a problem: whenever I use some of *assigned* keys, Xmodmap settings are resetted and special keys stop working.

xmodmap -pke
...
keycode 229 =
keycode 230 =
keycode 231 =
keycode 232 =
keycode 233 =
keycode 234 =
keycode 235 =
keycode 236 =
keycode 237 =
...
Comment 1 Médéric Boquien 2008-11-09 03:54:30 UTC
Hello,

Can you still reproduce the bug with the latest KDE 4 release?

Thanks.
Comment 2 Igor Poboiko 2009-01-31 23:45:06 UTC
I have same bug in KDE 4.2.0 (Debian Lenny; KDE was installed from Debian experimental repo).. I installs XModmap using script in /etc/X11
/Xsession.d: 

 SYSMODMAP="/etc/X11/Xmodmap"
 USRMODMAP="$HOME/.Xmodmap"

if [ -x /usr/bin/X11/xmodmap ]; then
        if [ -f "$SYSMODMAP" ]; then
                xmodmap "$SYSMODMAP"
        fi
fi

if [ -x /usr/bin/X11/xmodmap ]; then
        if [ -f "$USRMODMAP" ]; then
                xmodmap "$USRMODMAP"
        fi
fi

Here is my /etc/X11/Xmodmap ($SYSMODMAP):

keycode 139 = XF86HomePage

keycode 144 = XF86AudioPrev
keycode 164 = XF86AudioStop
keycode 162 = XF86AudioPlay
keycode 153 = XF86AudioNext

keycode 160 = XF86AudioMute
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume


And after loading KDE this keys stop working (checked xmodmap -pke | grep 144 and so on). But when i disables kxkb (in System settings -> Regional and Lanuage -> Layout -> Disable keyboard layouts OR Indicator only), all works fine - so i think, it's because kxkb overrides my keymap, which was set by XModmap

PS sorry for my bad english
Comment 3 Unknown 2010-11-23 13:02:22 UTC
Hello,

I have exactly the same bug. I do not use KDE keyboard layouts (that means, that I have disable this option in systemsettings). At the moment I can not reproduce this bug.
Comment 4 Nate Graham 2020-09-29 03:33:01 UTC
Multimedia keys are now handled automatically and no longer require xmodmap, and you can likewise re-bind keys using the shortcuts KCM.