Goal
When I press the arrow keys, no matter what application is used/being focused the arrow keys should always be transmitted to the browser. It isn't necessary that only the browser receives the input, if both the focused application and the browser get it simultaneously, that is fine. I'm using Kubuntu 20 & 22.
What I tried
I tried to use the Custom Shortcuts settings app where I created a Send Keyboard Input of the Global Shortcut type. It was triggered by an arrow key and executed the matching arrow action resulting in the proper keypress when I tested it with applications like Dolphin, LibreOffice Calc. If I pressed the arrow keys anywhere, it controlled Dolphin or Calc.
Problem
The solution described above doesn't work with browsers. Even in Dolphin, it didn't work inside fields because they became unfocused which is acceptable for me, but for browsers (I used keyboard testers) it didn't work at all. If I focus the browser it starts to work but even in that case both events are registered. If I create a shortcut that presses K on ← then the event logger shows both keyboard events. How to achieve my goal? I don't insist on using Custom Shortcuts I'm open for any solution.