Wayland Remap grave to another key

I tried various versions yet none did work.

My keycodes were taken from xev, a tool to see which keycode is each and displays information about a key.

I studied arch’ wiki about this X_keyboard_extension (can’t include link)
So, I created this file

/etc/X11/xorg.init.d/90-custom-kbd.conf

Section "InputClass"
	Identifier "keyboard defaults"
	MatchIsKeyboard "on"

	Option "XkbOptions" "apostrophe:grave"
EndSection

Didn’t work.

I edited ~/.Xmodmap and basically switched keys 94 and 48.

keycode  49 = less greater guillemotleft guillemotright bar brokenbar
keycode  94 = grave asciitilde grave asciitilde grave asciitilde

Didn’t work.

Tried running xmodmap -e "keycode 94 = grave" also didnt work.

I’m on Wayland, so I expected Xorg utilities to not work on wayland but a good search told me otherwise and that it still depends on Xmodmap and its yet to develop its own tools for this.

So, how would I remap “less than” symbol (keycode 94) to my grave symbol (keycode 49)?

From what I see running xmodmap ~/.Xmodmap worked (well not exactly, will explain).

  1. But shouldn’t it run xmodmap ~/.Xmodmap on its own? Like it would with Xorg when runnin ~/.xinitrc?
    usermodmap=$HOME/.Xmodmap
    sysmodmap=/etc/X11/xinit/.Xmodmap
    
    DEFAULT_SESSION=gnome-session
    
    # merge in defaults and keymaps
    if [ -f $sysmodmap ]; then
        xmodmap $sysmodmap
    fi
    
    // ...
    
    if [ -f "$usermodmap" ]; then
        xmodmap "$usermodmap"
    fi
    
    Where do I configure it to run it on startup on wayland?
  2. xmodmap ~/.Xmodmap doesn’t work for my terminal. It works for everything else but my gnome-terminal (default Manjaro Gnome configuration). In the means, my terminal still displays “<” when it should type " ` ". No reason I could find for why this would be the case, and didn’t find anything relevant in the terminal’s settings.