I also use EXWM, and made good experiences with setting keyboard remapping options directly in my system's config.scm (via the :options of keyboard-layout, which sets XKB options; see the manual for examples: https://guix.gnu.org/de/manual/en/html_node/Keyboard-Layout.html). However, I just use it to remap capslock to escape (for vim/evil-mode), so if you need more, I'm not sure if it'll work for you — I've never used xmodmap, I'm not sure if you can do everything using XKB options that xmodmap can do — at first glance xmodmap seems more general. ~stuebinm On 18.07.21 16:41, Akib Azmain Turja wrote: > I have setup my Emacs iwth EXWM. I am trying to remap several keys to > avoid repetitive strain injury (RSI), also known as Emacs pinky. To > accomplish that, I am using xmodmap. It works perfectly when I invoke > the command directly. However it doesn't work when I put it in Emacs > startup files. After several days of research, I discovered that > xmodmap only works when I have pressed atleast one key in my keyboard. > Any solutions? >