it is not possible with xdotool
because your are linking two keys together.. system will struggle when you say backslash
it reroute to BackSpace
& when you say BackSpace
again it reroutes to backslash
and this loop keep on running
[backslash
-->BackSpace
-->backslash
-->BackSpace
-->backslash
-->so on
-->]
[BackSpace
-->backslash
-->BackSpace
-->backslash
-->BackSpace
-->so on
-->]
your all other keys works if you remove this kind of links..
for example: both of below will work.
"xdotool key space"
Shift + BackSpace + Release
"xdotool key backslash"
BackSpace + Release
or
"xdotool key space"
Shift + BackSpace + Release
"xdotool key BackSpace"
backslash + Release
the best way is to map the keys with this answer..https://askubuntu.com/a/24930/739431
i have tried it on my keybord and easily swapped backslash & BackSpace keys.
Example:
below are the values for the required keys by running xev
command and pressing required keys.
state 0x10. keycode 51 (keysym 0X5c, backslash), same_screen YES,
stat 0X10, keycode 22 (keysym 0xff08, BackSpace), same_screen YES,
$ xmodmap -e "keycode 51 = BackSpace"
$ xmodmap -e "keycode 22 = backslash"