1

I added a shortcut key to start my browser(Ctrl+F) but later found it was used by another program.

Is there a way to get a list of shortcuts already in use?

Firefox is my browser.

vanadium
  • 88,010
fixit7
  • 3,127
  • Is Keyboard Shortcuts program sufficient ? Control Centre --> Keyboard Shortcuts – Liso Mar 26 '19 at 03:27
  • 1
    Why don't you mention the browser? It would save unnecessary back-and-forth. Many, many programs use Ctrl+F to open a dialog to find something! – DK Bose Mar 26 '19 at 03:35
  • 1
    Possibly helpful: https://askubuntu.com/questions/265159/how-to-find-why-i-cant-bind-some-keyboard-shortcut-or-which-app-took-it?rq=1 & https://askubuntu.com/questions/101226/where-does-ubuntu-store-its-keyboard-shortcut-configuration – DK Bose Mar 26 '19 at 05:52

1 Answers1

3

It is not possible to have one comprehensive list of keyboard shortcuts that are in use. That is because keyboard shortcuts may be defined and act on different levels.

  1. Keyboard shortcuts used in an application are defined by the developers of the application. In some cases, the application allows to reconfigure these definitions, in other cases, it doesn't.

  2. Keyboard combinations can defined by your desktop environment. These are active throughout and have preference over the shortcut defined in an application. For example, if you define Ctrl+f to launch your browser, then the same shortcut defined at the level of an application, i.e. Ctrl+f in your browser or word processor to find something, will not work anymore.

For (1), there may be a list of the shortcuts in the manual, or on a help page, or there might be no documentation. It depends on the software. For (2), you can typically see these in the Keyboard settings of your desktop environment (Gnome, Mate, Budgie, KDE, ...), or in the configuration manual of window managers (openbox, i3wm, ...).

There are some conventions on the use of certain keyboard combinations. Typically, programmers will attempt to define their hotkeys as to not conflict with combinations that find general use (otherwise they will hear it from the users!). You thus need to have the same care in choosing your hotkeys. If at some point, you discover that your choice of Ctrl+f to open a browser conflicts with an important hotkey in an application, then you will need to consider whether to keep that combination or not.

vanadium
  • 88,010
  • Already checked GNOME Keyboard Shortcuts and my key combination "Ctrl+`" was not listed, but somehow Guake still says it is in use, so there must be some better method than manual review. – Pysis Dec 20 '21 at 16:24
  • A program detecting if a key is in use is different than retrieving a list of what is used. As I said, the latter is defined in different places. I (and likely also not you) do not know about one comprehensive way to retrieve the information from the different places where it is defined (if not hardcoded). – vanadium Dec 20 '21 at 16:38
  • fixit has the same issue I do with no other obvious way to find the answer. I am looking through DK's commented links now as there must be a more efficient method since the program is already capable of it.. – Pysis Dec 20 '21 at 16:41
  • The program is capable of detecting whether a key is used or not. It is not capable of generating a list. Perhaps such program exists, but I am not aware of one. So my current answer is valid until someone comes up with another method to get a list. – vanadium Dec 20 '21 at 16:48
  • Well from those links I'm doing some settings searches on the CLI which is easier like anything programmatic against manual review equivalent to what you mentioned. I've seen hints of tools like xdotool and evtest that may reveal the problem more focused to the shared resource in conflict but haven't gotten those to work yet. – Pysis Dec 20 '21 at 17:17
  • Let us know where you get, and if you find it, then please post in detail here or one of the other threads. – vanadium Dec 20 '21 at 17:49
  • xev | grep -iP 'keycode' was another useful program to mention. (evemu-* and xte too) I also have the key mapper application running that only modifies a few keys. Checking that and GNOME settings manually earlier did no show an issue, using gsettings list-recursively | grep -i '...' | less more efficiently. xbindkeys_show also helps, but I disable that from my ~/.xinitrc file. Found that the problematic application Guake may have larger issues using any key combination that I gave to it that I chronicled in an issue over there: https://github.com/Guake/guake/issues/1642 – Pysis Dec 21 '21 at 17:40