I want it like this:
BackSpace -> backslash
Shift + BackSpace -> bar
backslash -> BackSpace
I tried to use xbindkeys and xdotool, but I couldn't get it to work. This is what I had in my .xbindkeysrc file:
"xdotool key bar"
shift + BackSpace
"xdotool key backslash"
BackSpace
"xdotool key BackSpace"
backslash
However, all this would do is make my keys stop working.
it is not possible with
xdotool
because your are linking two keys together.. system will struggle when you saybackslash
it reroute toBackSpace
& when you sayBackSpace
again it reroutes tobackslash
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.
or
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,