LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How do I get xmodmap to work in LXDE? (http://www.linuxquestions.org/questions/linux-desktop-74/how-do-i-get-xmodmap-to-work-in-lxde-884528/)

nokangaroo 06-04-2011 02:18 PM

How do I get xmodmap to work in LXDE?
 
As I have a Mac, I'd like to map the cauliflower keys to ctrl, as in GNOME. I created an .xmodmap file, and it was loaded, but the remapping did not work. The xmodmap file is:

keycode 133 = Control_L NoSymbol Control_L
keycode 134 = Control_R NoSymbol Control_R

I got the keycodes from running xmodmap -pke.
So how do I get this to work?

MTK358 06-05-2011 08:46 AM

Try adding this line to your ~/.xinitrc:

Code:

xmodmap ~/.xmodmap
(this assumes that your xmodmap file is called ".xmodmap", like you said in your post)

nokangaroo 06-05-2011 12:01 PM

Thank you; I'll try that. I don't have a .xinitrc, (just did a fresh install of lubuntu on a new disk), but I'll create one.

nokangaroo 06-05-2011 01:51 PM

Sorry - did not work. I think .xinitrc only makes sense when you don't use a display manager but login to the console and use startx.

MTK358 06-05-2011 02:35 PM

I thought that LXDE probably ignored it, but I thought it was worth a try.

I couldn't find anything about how to run a script on LXDE startup. Maybe someone else knows.

nokangaroo 06-05-2011 03:16 PM

I just modified my .xmodmap to read

keycode 133 = 0xffe3
keycode 134 = 0xffe4

and the modified keycodes are correctly displayed by the xev command - both Apple keys show the keycodes of the corresponding ctrl keys - but the desktop is not responding. I had the same problem in xfce. I'll have a look at the xfce forums next.

P.S. I also created a file $HOME/.config/autostart/xmodmap.desktop (with lxshortcut) that runs the command xmodmap ~/.xmodmap. This may be useful to some people but my problem does not seem to be xmodmap related. xmodmap seems to be working correctly, but LXDE does not recognize the keys.

Updating X with the xswat repo and installing console-tools did not help either. Maybe this is a Lubuntu issue. I'll try Openbox in Debian.

nokangaroo 06-15-2011 05:19 PM

Solved - but not with xmodmap. There is another solution that actually works, and I have posted it here:

http://www.linuxquestions.org/questi...penbox-885949/


All times are GMT -5. The time now is 07:39 PM.