Software⏱️ 3 min read📅 2026-06-19

How to Fix: error on xmodmap modifier for Control_R

Fix Xmodmap modifier issue for Control_R key on Linux with GNOME.

Quick Answer: Check if the keycode is correct and try using a different method to bind the Insert key to Ctrl, such as using xbindkeys or adding a custom keyboard layout.

This error affects users who are trying to map the Insert key as a Control key on their keyboard, but it's frustrating because the mapping is not working despite setting up the ~/.Xmodmap file correctly.

The issue can be resolved by troubleshooting the Xmodmap settings and applying alternative fixes if necessary.

🛑 Root Causes of the Error

  • The primary reason for this error is that the keycode 118 for Insert key is not being recognized as a Control key in the Xmodmap settings. This could be due to the incorrect mapping of the keycode or an issue with the Xmodmap configuration file.
  • An alternative cause could be that the Xmodmap settings are not being applied correctly, which might be due to the logout/login cycle not updating the settings.

🚀 How to Resolve This Issue

Re-configure the Xmodmap settings

  1. Step 1: Run the command `xmodmap -pm` and verify the Control key mapping.
  2. Step 2: Check if the keycode 118 for Insert key is correctly mapped to Control_R by running `grep 'Control_R' ~/.Xmodmap` in the terminal.
  3. Step 3: If necessary, edit the ~/.Xmodmap file to correct any typos or incorrect mappings.
  4. Step 4: Save the changes to the Xmodmap file and try mapping the Insert key again.
  5. Step 5: Verify that the Xmodmap settings are being applied correctly by running `xev` on the Insert key press event.
  6. Step 6: Repeat the steps until the Insert key is mapped as a Control key.

Use the `xset -r` command to reset Xmodmap settings

  1. Step 1: Run the command `xset -r` in the terminal to reset all Xmodmap settings.
  2. Step 2: Check if the keycode 118 for Insert key is correctly mapped to Control_R by running `grep 'Control_R' ~/.Xmodmap` in the terminal.
  3. Step 3: If necessary, edit the ~/.Xmodmap file to correct any typos or incorrect mappings.
  4. Step 4: Save the changes to the Xmodmap file and try mapping the Insert key again.
  5. Step 5: Verify that the Xmodmap settings are being applied correctly by running `xev` on the Insert key press event.

💡 Conclusion

If none of the above steps resolve the issue, it may be necessary to seek further assistance from a Linux administrator or the openSUSE community. In any case, updating the Xmodmap file and verifying its correctness is essential for resolving this error.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions