Skip to main content
Topic: [SOLVED] Xmodmap (Read 545 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

[SOLVED] Xmodmap

Hi,
I got some simple configuration in $HOME/.Xmodmap which worked in Manjaro but does not work in Artix + LXQt + OpenBox.

Questions:
Is it intention or bug?
If bug - should I report it somewhere?
If intention - where should I place my Xmodmap (or the setting from it)?

Thanks

Content:
Code: [Select]
! -*- coding: utf-8 -*-
! print semicolon instead of section {;, ยง}

! keycode  48 = section exclam section exclam apostrophe ssharp apostrophe

keycode  48 = semicolon exclam semicolon exclam apostrophe ssharp apostrophe

Re: Xmodmap

Reply #1
This should be activated by /etc/X11/xinit/xinitrc. The .Xresources in $HOME is activated but .Xmodmap in the same location isn't.
If I run "xmodmap .Xmodmap" manually latrer it works.

Re: Xmodmap

Reply #2
I run an xmodmap command as a desktop startup command, although I currently use a 5 second delay on the command otherwise the keymap gets reloaded or something. This has worked for me in XFCE and Mate. This doesn't exactly answer your question but it's an alternative approach that does work.


Re: Xmodmap

Reply #4
Thanks. After some digging I found a reason and a solution. The reason why .Xmodmap does not work is OpenBox, i.e. mapping is done but is immediatelly reset by OpenBox (OB probably run setxkbmap - https://wiki.archlinux.org/title/xmodmap).

One solution would be to perform xmodmap later - after start of LXQt, as recommended above. I did not try but this solution does not have to be permanent as observed in this (old) thread: https://bbs.archlinux.org/viewtopic.php?pid=1651662#p1651662 - OpenBox reset this after while.

I used another solution: https://rlog.rgtti.com/2014/05/01/how-to-modify-a-keyboard-layout-in-linux/
It's quite simple: backup original file from /usr/share/X11/xkb/symbols and modify it (replacing keycode "section" by "semicolon").