How to enable Windows Key + number in gnome to switch to a window in the taskbar or panel

GNOME 3 does not have this functionality built-in, as you have discovered.

As a workaround, create a keyboard shortcut for a RaiseOrRun.sh script

  1. Create /home/<username>/RaiseOrRun.sh script
  2. Run chmod +x /home/<username>/RaiseOrRun.sh to make it executable.
  3. Open GNOME Settings, Keyboard
  4. For each application "Added to Favorites":
    1. Scroll to the bottom and press the + button to add a Custom Shortcut
      • Name: Choose any name
      • Command: /home/<username>/RaiseOrRun.sh <WM_CLASS> <EXECUTABLE>
      • Example: /home/<username>/RaiseOrRun.sh chromium chromium-browser
    2. Click the Edit button and press the Shortcut Key you want (ie: Super+1)
    3. Click Add to confirm

Notes:

  1. This solution knows nothing of the GNOME 3 Dash. If you want to maintain the Super+1 for first app in Favorites, you will have to keep the shortcut key and Dash position in sync manually.

  2. Display the WM_CLASS for each open application with wmctrl -l -x

  3. See also: Alt+Tab sucks; here's a solution - Exploits of a Programmer - Vicky Chijwani (explains why "run-or-raise" is better than workspaces).


Script: RaiseOrRun.sh

#!/bin/bash

# $1 - case insensitive word in WM_CLASS
# $2 - command to start application

# wmctrl 
# -a <WIN> Activate the window <WIN> by switching to its desktop and raising it.
# -x Include WM_CLASS in the window list or interpret <WIN> as the WM_CLASS name

wmctrl -x -a "$1" || "$2"

Gnome doesn't have a way to do that specifically, but here are some other ways to switch applications quickly.

  1. You can use Gnome's features for switching applications. Gnome has a video and tutorial on the subject here. Some highlights include typing (if you want to switch to Firefox, you can hit "super" then type "fir" and then press enter) and using the activities overview (bump the top-left corner of the screen with your mouse, then click the window you want).

  2. You can use workspaces. Gnome does offer shortcut keys for switching to specific workspaces, but they're not set by default. You can put your windows fullscreen in different workspaces and use these shortcuts for switching between them.

    For example, you could bind Super+1 to "Switch to workspace 1" and so on. Then you could put Firefox in workspace 1, Libreoffice in workspace 2, a music player in workspace 3, and then switch between them with your shortcuts.

    You can find these keyboard shortcuts and others in Settings > Keyboard. I've set some possible shortcuts in the image below.

    Gnome keyboard settings with possible workspace shortcuts set