So as I bought a laptop with a foreign keyboard (qwerty but I type in azerty most of the time) I don't have any dedicated key for chevrons (<>). That's annoying, so I want to remap my right control key (which I never use anyway) as a key for chevrons. I am running on Ubuntu, so I used xev to detect which key is where, and did the xmodmap thing as described here which is basically outputing the current keyboard layout in a .Xmodmap file with xmodmap pke > .Xmodmap, modifying the keys where they need to be modified, saving and closing the file and running xmodmap .Xmodmap in the shell.
The problem I currently have is that it doesn't seem to be detected by other applications. Xev detects it just fine, but I can't make a chevron when using firefox for example, the key still works as a control key anywhere but in xev. I have tried googling. This question looked like it was exactly what I was looking for but the lack of answers was unhelpful, and I have not encountered other similar problems, it seems to just work fine for everyone.
Here is the xev output when I press my right control key, I include it in case it would contain any clue as to why it's not detected by other apps (I only included the KeyPress events to ease reading, the KeyRelease event looks the same):
KeyPress event, serial 37, synthetic NO, window 0x2000001,
root 0x49d, subw 0x0, time 1612206, (1243,666), root:(1355,775),
state 0x2011, keycode 59 (keysym 0x3c, less), same_screen YES,
XKeysymToKeycode returns keycode: 94
XLookupString gives 1 bytes: (3c) "<"
XmbLookupString gives 1 bytes: (3c) "<"
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2000001, # this is the left shift key
root 0x49d, subw 0x0, time 1613158, (1243,666), root:(1355,775),
state 0x2010, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x2000001,
root 0x49d, subw 0x0, time 1613404, (1243,666), root:(1355,775),
state 0x2011, keycode 60 (keysym 0x3e, greater), same_screen YES,
XKeysymToKeycode returns keycode: 94
XLookupString gives 1 bytes: (3e) ">"
XmbLookupString gives 1 bytes: (3e) ">"
XFilterEvent returns: False
I have not yet tried to automate the behavior as it doesn't even work when not automated.
Does anyone know why this might happen and how to solve it ? Thank you for your time.
Edit :
The line I modified in my .Xmodmap file is this one :
keycode 105 = less greater less greater Control_R NoSymbol Control_R NoSymbol Control_R
(I added the less greater the beginning)
The command setxkbmap -query
outputs this :
rules: evdev
model: pc105
layout: us