Most of the other solutions load xmodmap on session startup (or earlier), but then your settings get wiped when you plug a new keyboard (or switch your KVM switch). Here is a solution that reinstalls the xmodmap after you plug a USB device. I have been using it ever since Linux introduced all the Alt/Meta confusion (in about 2006).
! ~/.Xmodmap file
! Part ...
Steps mentioned in the accepted answer(also described here) is a persistent solution, but didn't work for me in case of altering alphabetical keys.
If you got frustrated by trying other options or want to save your time, try the steps mentioned in the article - https://medium.com/@saplos123456/persistent-keyboard-mapping-on-ubuntu-using-xmodmap-cd01ad828fcd
pactl list short sinks
0 SymbolicNameHere value value value valueHz RUNNING
To increase volume:
pactl set-sink-volume SymbolicNameHere value%
Supporting Answer: https://unix.stackexchange.com/a/565397/430146