Ok, in that case, for a while (until I bought myself a new keyboard and installed it in my laptop), I had a very intermittent "i" key so reprogrammed the F9 key to produce "i"'s in a Linux Mint 19 system. Here's how I did it:
I first ran the following command and pressed the relevant keys to find out the keycodes for the "i" key and the "F9" key:
Code:
xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
This resulted in "i": 31 and "F9": 75. In your case, on my system, "Escape" is 9.
I then ran the following to determine the exact text in the lines relating to both these keys:
After that, I ran the following command to create a file to override the specific xmodmap setting for F9, populating it with the "i" line obtained above but replacing its keycode with the keycode for F9. I then saved and closed the file.
Code:
sudo xed ~/.Xmodmap
I tested this with:
This setting gets lost on reboot/shutdown so in order to change it on every system startup, I added the following command to my startup applications:
Code:
bash -c "sleep 10 && /usr/bin/xmodmap /home/$USER/.Xmodmap"
Let me know how you get on.