WorkAround
from the outputs you provided, both the physical keys are with same keycodes, thus changing the keysymbols for each key will result in same keysymbol.
This is the output I get when typing any of the physical keys < or ç
$ xev | grep keycode
state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
$ xev | grep keycode
state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
state 0x2000, keycode 51 (keysym 0xe7, ccedilla), same_screen YES,
So we need to assign different keycode to any of the physical keys < or ç
So decide which physical key keycode to be changed first out of the two.
run xmodmap -pke
and choose any empty keycode
example:
keycode 245 = XF86Bluetooth NoSymbol XF86Bluetooth NoSymbol XF86Bluetooth
keycode 246 = XF86WLAN NoSymbol XF86WLAN NoSymbol XF86WLAN
keycode 247 =
keycode 248 =
keycode 249 =
keycode 250 =
keycode 251 =
keycode 252 =
keycode 253 =
keycode 254 = XF86WWAN NoSymbol XF86WWAN NoSymbol XF86WWAN
keycode 255 = XF86RFKill NoSymbol XF86RFKill NoSymbol XF86RFKill
I will choose 248 here.. now the trick is to deduct 8 from xmodmap keycode to use with setkeycodes
which is 248-8=240
Refer to man setkeycodes
and https://unix.stackexchange.com/a/52949
- logon to any tty and run
showkey --scancodes
press the key and grab the scan code. in my case it is 0x2b but only 2b
to be considered.
Refer to man showkey
run sudo setkeycodes 2b 240
this means when we run xmodmap the physical key which we selected shows keycode of 248
change to Desktop from tty
check with xev | grep keycode
and press the physical key.
Example:
pratap@pratap:~$ xev | grep keycode
state 0x10, keycode 36 (keysym 0xff0d, Return), same_screen YES,
request MappingKeyboard, first_keycode 8, count 248
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
state 0x10, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
pratap@pratap:~$ xmodmap -e "keycode 248 = ccedilla Ccedilla"
pratap@pratap:~$ çççççççççççççç
- Now both the physcial keys have different keycodes which you can map to any keysym you want.. lets say keycode 51 and keycode 248
run below commands:
xmodmap -e "keycode 51 = less greater"
xmodmap -e "keycode 248 = ccedilla Ccedilla"
- All the changes will not stay after a reboot.., So xmodmap commands you can keep in startupapplications preferences and please follow the link provided https://unix.stackexchange.com/a/52949 for
setkeycodes
command.
Note: Tested in Ubuntu 19.04 but not with the keyboard type in the Question.