tools

Shortcuts stop working when Opera is running [FIXED]

Reading time: 2 minutes

The bad side of leaving annoying bugs to be fixed later is that at some point you forget important intel about them. For some reason, my Ctrl+Shift+Arrow shortcut wasn’t working. Sometimes, while using gedit or LibreOffice Writer, I would try to select a few words with Ctrl+Shift+Arrow and it would fail. The cursor wouldn’t move 😡

I use RStudio with vim keybindings so if I want to select a few words I would use b or w in visual mode but it would also happen that I would try to use Ctrl+Shift+Arrow in edit mode and the cursor would be there, stuck 🙄 I edited so much the configuration of my Openbox that I thought it could have been me. I backed up my configuration file, brought the “factory configuration”, closed everything, restarted it and it was fixed! After a while, I noticed it wasn’t. At some point, I remembered the source of the issue: Opera! Whenever Opera is running, some shortcuts stop working.

After some search, I found this website explaining why this happens and suggesting a dirty workaround. Honestly, this is ridiculous. And to think that some people accept to kill twice a built-in extension every time they run Opera so that system-wide (or other applications) shortcuts can work as they should… Come on, Opera! Fortunately, I found a permanent solution, much better than the recurrent double homicide of the built-in extension. In GNU/Linux, or at least in Ubuntu, the Preferences file can be found in $HOME/.config/opera/Preferences. In my case, it’s /home/mribeirodantas/.config/opera/Preferences. I used an online JSON Editor to load my Preferences file from my machine and remove the command sub-tree inside extensions as the solution suggests. You will see a small box on the left of each row. Click on the box with the left button of your mouse and go to remove it, just like in the image below.

After that, click on save to save this file to your machine. Now comes the part that the solution did not mention! When you close your Opera browser, it rewrites the Preferences file. So if you replace the original Preferences file with the new one, with the commands row removed, when you close Opera it will change it back. So save the new file in a different place, close Opera and only then you replace the Preferences file with your new file. The JSON Editor I used adds .json to the end of the filename so you have to rename it to “Preferences” (not Preferences.json) and replace the file in the .config/opera folder. Then, open your Opera browser and it should be fixed 😉

I really like Opera. Otherwise, I think I would have abandoned it after a few attempts to fix this bug. For now, I will stick to it 🙂