Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: Blaazen on 25 May 2023, 17:58:28

Title: [SOLVED] Xmodmap
Post by: Blaazen on 25 May 2023, 17:58:28
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
Title: Re: Xmodmap
Post by: Blaazen on 25 May 2023, 19:08:39
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.
Title: Re: Xmodmap
Post by: ####### on 25 May 2023, 20:40:11
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.
Title: Re: Xmodmap
Post by: lq on 26 May 2023, 10:35:03
... but does not work in Artix + LXQt + OpenBox.

RTFM:

https://wiki.archlinux.org/title/Openbox#Autostart
https://wiki.archlinux.org/title/LXQt#Autostart
Title: Re: Xmodmap
Post by: Blaazen on 26 May 2023, 23:59:33
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 (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 (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/ (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").