Multiple Monitor Shortcut Keys move window to other monitors

A simple hotkey to move the active window to another monitor.
If we have more than two monitors, You can assign a key to the top, right, etc. and assign the appropriate monitor number.
We make changes to the file ~/.config/openbox/rc.xml by adding the line below.

<keybind key="W-S-Left">
  <action name="MoveResizeTo">
    <!-- move the window to the second monitor -->
    <monitor>2</monitor>
  </action>
</keybind>
4 Likes

Nice, thank you! :grinning:

Question, my keyboard has a “Fn” function control-key. What would that be? key="?-Left"

Hmm, this may not be possible. Doing the following,

systemctl enable acpid
systemctl start acpid
sudo acpi_listen

and pressing Fn-Left and just Left, results in the same scan codes:

button/left LEFT 00000080 00000000 K
button/left LEFT 00000080 00000000 K

Well wait a minute, it’s showing identical scan codes for these with Super and Control and Alt.

Not all keys can be modified by Fn.
xev
helps to find out the name of key combinations pressed

1 Like

From what I can gather, Fn key combinations are controlled by the BIOS, and it doesn’t seem to register as a modifier-key at all, so cannot be used generically; unfortunate. Thanks for the xev tip! :slight_smile: