Left alt key remap only works with some applications

Hi

I use a particular keyboard layout (bépo, basically french Dvorak), and as I do not have a left alt key due to my physical keyboard’s layout, I need to remap it to another key. I do this using a small script, which is ran on startup with the help of KDE’s “autostart” feature. It used to work just fine, but now only works with some applications such as terminal or Kate. When I use the remapped key in my browser or Discord, it will register as CTRL instead.

Here is the script I run on startup :

#!/bin/bash
setxkbmap "fr(bepo)" -option lv3:ralt_switch
xmodmap /home/leo/.Xmodmap 

I also use Xmodmap to remap a few other keys. This part of the script works perfectly fine with every app.

Do you see anything wrong with the script ? Or have an idea why that particular key remap won’t work properly ?

Thanks for your help :slight_smile:

Instead of launching the script from within Plasma, I would add those commands to ~/.xinitrc — directly, without invoking a script.

Hi, thanks for your suggestion. I have done that but still have the same issue. Have any idea why ?