Set window close and maximise shortcuts in Ubuntu 18.04 [duplicate]

On Ubuntu 16.04 LTS I have used simple keyboard shortcut to set property Always on Top (Nautilus window as example):

  1. Alt+Space,

    Alt+Space to show window menu

  2. t

  3. After next Alt+Space or right mouse click I see that window was set to Always on Top.

    window is set to Always on Top

In standard Ubuntu 18.04 LTS with GNOME Shell I can press Alt+Space:

window menu on Alt+Space

but it does not react to t.

Seems to be a real bug 1710421 since 17.10.


How to enable such menu accelerators/mnemonics in standard Ubuntu 18.04 LTS?


Solution 1:

On GNOME Shell it is impossible! Welcome to the new brave world with unpredictable limits and problems!

To get these shortcuts on Ubuntu 18.04 LTS and 20.04 LTS in place you can switch to:

  • Unity - installable with sudo apt-get install ubuntu-unity-desktop:

    Ubuntu 18.04 LTS with Unity desktop

  • GNOME FlashBack - installable with sudo apt-get install gnome-panel:

    GNOME FlashBack on Ubuntu 18.04 LTS

  • MATE Desktop Environment (my favorite, as it avoids GNOMEs Hell) - installable with sudo apt-get install ubuntu-mate-desktop^:

    Ubuntu 18.04 LTS with MATE DE

  • XFCE (xubuntu-desktop^) does not have mnemonic for Always on Top, but usable and looks very nice:

    xUbuntu 18.04 LTS

  • Cinnamon (cinnamon-desktop-environment) have all necessary mnemonics:

    Cinnamon on Ubuntu 18.04 LTS

  • KDE (kubuntu-desktop^) have mnemonics, they may be accessed from Alt+F3 (so called Window Operations Menu) - for example to keep window above others you need to click Alt+F3, M (for More Actions), A (for Keep Above Others) and menu is rich:

    Kubuntu 18.04 LTS

  • Openbox (openbox), LXDE / LXQT / Lubuntu (lubuntu-desktop^, lxqt) have mnemonics, they are accessed with Alt+Space:

    OpenBox, LXDE/Lubuntu/LXQT on 18.04 LTS

  • Budgie (ubuntu-budgie-desktop^) have mnemonics, they are accessed with Alt+Space:

    Ubuntu Budgie

Solution 2:

Unfortunately, there is no mnemonic support anymore for the Alt+Space window menu. There appears to be no intentions to bring it back. The current bug report is two years old. The original issue was filed back in 2014.

Still, keyboard shortcuts are available for the most common actions. These are quicker as they do not require you to see the menu and reduce the effort to a single keystroke.

  • Minimize: Super+h.
  • Maximize: Super+.
  • Restore: Super+. Alt+F10 toggles between maximize and restore.
  • Move: Alt+F7.
  • Resize: Alt+F8.
  • Close window: Alt+F4.

These key assignments can be changed in Settings - Keyboard.

For Always on top, no keyboard combination is defined by default, nor exposed through Settings - Keyboard. You still can define a key combination using dconf-editor, or a gsettings command. For example, to set Super+t for toggling a window on top, issue the command

gsettings set org.gnome.desktop.wm.keybindings always-on-top "['<Super>t']"

Undo with the command

gsettings reset org.gnome.desktop.wm.keybindings always-on-top