Can key presses be locked to Google Chrome?

Hi, I use GeForce Now in the Google Chrome browser but keyboard shortcuts are still active for the desktop. For example if I press 1 2 or 3 the bar at the bottom of the desktop appears over the game screen.

Is it possible to lock key presses into the browser, if you know what I mean?

If you unset the functionality of those particular shortcuts in Plasma first, then you can have them assigned to Chrome; or to whatever application wishes to use them.

There is a particular order in how key presses are interpreted. First and foremost, a key press is a hardware event, so it is the kernel that interprets the key press. It then forwards this key press to the terminal, and if the terminal has no particular use for this key press, it’ll forward it to whatever application is running in the terminal.

In a graphical environment, this application is either X11 or Wayland. If the key press is not destined for X11 or Wayland, they will forward it to the desktop environment or window manager — in your case, Plasma and kwin. And only if the key press has not been defined as a shortcut within Plasma or kwin will it be forwarded to the application running in the foreground in Plasma, i.e. Chrome in this case.

Therefore, open up the System Settings and navigate to Workspace, and then Shortcuts. Then go over the list of predefined shortcuts and deactivate the ones that you want Chrome to be able to use. :wink:


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.