Sometimes it is useful to re-map some keys (e.g. Ctrl, Alt) to make shortcut keys easy to use. We can employ "gsettings" command to do that.
localectl list-x11-keymap-options
localectl list-x11-keymap-options | grep caps:
Takes CapsLock as example. Vim users may want to swap CapsLock key and Esc key, so that they can easily press Esc in some key combinations.
Notice: following commands will take effects immediately. No reboot is needed.
gsettings set com.deepin.dde.keybinding.mediakey capslock '[]'
gsettings set com.deepin.dde.keyboard layout-options '["caps:swapescape"]'
gsettings set com.deepin.dde.keyboard layout-options '["caps:none"]'
You can either restore settings for CapsLock only:
gsettings reset com.deepin.dde.keybinding.mediakey capslock
gsettings reset com.deepin.dde.keyboard layout-options
or restore setttings for all mappings:
gsettings reset-recursively com.deepin.dde.keybinding.mediakey
gsettings reset-recursively com.deepin.dde.keyboard