In Windows I use sharpkeys to remap keys. On Mac I use Karabiner Elements to remap keys.
Is there a preferably built in way to remap keys based on scan code?
The advantage of this is that VirtualBox, and remote applications like TeamViewer work correctly.
Xmodmap does not work to my knowledge do to a bug in Ubuntu(I am going to call it this) https://askubuntu.com/questions/458245/unable-to-get-xmodmap-working-after-suspend
EDIT: I type in Dvorak on JIS(Japanese Keyboard). Only mentioning the Japanese keyboard because it changes a couple keys not pure Dvorak.