Set Context Menu key to function as Right Control

Dell notebooks in Brazil and possibly other countries no longer ship with a right control key.

This is bad for ergonomics, so I would like to set the context menu key to function as right control.

How may this be done?


Enter System Settings > Keyboard Layout (in Personal group). Open Layouts tab (if you have multiple layouts), press Options... button. There you can find Ctrl key position group. Check Menu as Right Control button, then apply new settings.
For KDE: run System Settings, open Input devices in Hardware group and in Keyboard section open Advanced tab. There you can find the same Ctrl key position group with Menu as Right Control button checkbox.


Write to ~/.Xmodmap:

! dell removed the right control: change context menu to right control
!keycode 135 = Menu NoSymbol Menu
remove Control = Control_R
keycode 105 = Control_R NoSymbol Control_R
keycode 135 = Control_R NoSymbol Control_R
add Control = Control_R

And to ~/.xinitrc:

if [ -f $HOME/.Xmodmap ]; then
  /usr/bin/xmodmap $HOME/.Xmodmap
fi

Based on remap right alt to behave as right ctrl and https://wiki.archlinux.org/index.php/Xmodmap.