85

Is it possible to move windows from the keyboard itself without touching the mouse?

I know I can do a Alt + Left Click and drag the window, however I am hoping there is something I can use to move it from the keyboard without the mouse.

Kris Harper
  • 13,397
  • 12
  • 56
  • 73

4 Answers4

125

You can move a window by pressing

  • Alt+F7, then moving it around with the arrow keys, and finish by hitting Return.

  • The same goes for resizing, using Alt+F8

You can also press Esc to cancel

Also, while I'm at it:

  • Alt+F9 minimises the window

  • Alt+F10 maximises it

You can also bring up the application's window menu with Alt+space:

alt text


If you want to change those shortcuts, you can go to System → Preferences → Keyboard Shortcuts and find them under Window Management:

alt text

Stefano Palazzo
  • 85,787
  • 45
  • 210
  • 227
  • in ubuntu 18 Alt+F10 toggle the minimization and maximization. – alhelal Jul 25 '18 at 10:02
  • Very handy when adding a display monitor and the window is cut off at the top (making drag and drop hard). Also found I needed to add `Fn` key, sometimes from my laptop (e.g.: `Alt` + `Fn` + `F7`) – yuvilio Jun 01 '19 at 18:50
29

Here is a list of shortcuts:

  • Ctrl+Alt+Num 1 = moves the window to the bottom left corner
  • Ctrl+Alt+Num 2 = moves the window to the bottom half of the screen
  • Ctrl+Alt+Num 3 = moves the window to the bottom right corner
  • Ctrl+Alt+Num 4 = moves the window to the left half of the screen
  • Ctrl+Alt+Num 5 = maximizes the window
  • Ctrl+Alt+Num 6 = moves the window to the right half of the screen
  • Ctrl+Alt+Num 7 = moves the window to the right left corner
  • Ctrl+Alt+Num 8 = moves the window to the top half of the screen
  • Ctrl+Alt+Num 9 = moves the window to the right right coner
Eric Carvalho
  • 53,609
  • 102
  • 137
  • 162
Dustin
  • 2,093
  • 4
  • 47
  • 64
  • I'd like to deactive those shortcuts (overriding shortcuts from software I use) but I don't know where... Do you know where I can edit it ? – Mat Apr 20 '16 at 09:58
  • 2
    I'd like to activate those shortcuts in Debian Jessie. Any idea? – Rodrigo Nov 20 '16 at 06:11
  • 7
    Well, this used to work till Ubuntu 17.04, using ubuntu 17.10 ATM and this doesn't work. I wish it would work though. – Ilgıt Yıldırım Nov 02 '17 at 14:33
  • 1
    Found out where they are? I am looking for it in 18.04 – bobK Jun 13 '18 at 11:00
  • 2
    this used to work but not in 18.04 :( – tibi Aug 01 '18 at 07:28
  • It changes the window of workspaces, great, this is what I was looking for – Marcelo Oct 30 '18 at 07:32
  • @IlgıtYıldırım - just came across this. See here for self-answered question: https://askubuntu.com/questions/1213852/how-do-i-list-absolutely-every-keyboard-shortcut-that-ubuntu-gnome-is-using. In brief, you want to run gsettings list-recursively org.gnome.desktop.wm.keybindings | grep move '@as' means array of strings. Use gsettings set to set shortcuts. See my above post and links for details. – bjohas Mar 19 '20 at 17:26
  • 1
    @Mat : Go into the dconf editor and go to the path /org/gnome/desktop/wm/keybindings/. You will find find all the settings that start with "move-to". – krumpelstiltskin Mar 09 '23 at 12:59
  • @krumpelstiltskin thanks ! – Mat Mar 10 '23 at 08:13
4

Instead of moving windows around by keyboard as if you're moving a mouse, you might just as well use a tiling window manager like awesome or xmonad, where everything is done by keyboard, anyway. In these window managers, windows only exchange places with other windows, and together they cover the whole screen.

hannes
  • 161
  • 1
-1

There is now an application that performs these functions called Window Shuffler Control. I installed it through the Ubuntu Budgie extras.

https://ubuntubudgie.org/2020/09/development-update-on-window-shuffler/

Zanna
  • 69,223
  • 56
  • 216
  • 327