Ctrl+F4 Close document

Good evening
I just noticed something. I have LibreOffice 4.2.4.2 on some Windows
machines and recently also on two Linux (xubuntu 14.04) machines.
Usually on the Windows machines the KB shortcut Ctrl+F4 closes the
current document.
Under Linux it does not do that (I copied the user profile from the
Windows machine, following a tip here on the list).

Under "Tools -> Customize -> Keyboard" the item "Ctrl + F4" is greyed
out, both under Windows and Linux,
and I CAN NOT edit/modify it.

Am I missing something here?
How can I assign the "close document" function to the above key combination?

Thank you.
Thomas

The "close document" behavior you're noticing on windows is not linked to
LibreOffice, but is a feature of the system. It just mean "close the
window, not the app" and work everywhere. You can try it in most tabbed
browser too :slight_smile:

The reason to have this greyed on Linux might be to avoid a clash with a
system shortcut. On some desktop environment, Ctrl+F4 lead to the fourth
desktop.

You can either look around on your system how this keyboard shortcut is
handled, or use another.

@Cley, *,

Cley Faye wrote

The "close document" behavior you're noticing on windows is not linked to
LibreOffice, but is a feature of the system. It just mean "close the
window, not the app" and work everywhere. You can try it in most tabbed
browser too :slight_smile:

Sorry but that is not quite correct. The Key mappings are actually
hard-coded in the vcl modules of LibreOffice core--see the source
http://opengrok.libreoffice.org/xref/core/vcl/source/window/keycod.cxx

On Windows the KEY_MOD1 is the <Ctrl> key, KEY_MOD2 is the <Alt> key, and I
beleive the Windows key is mapped to KEY_MOD3-- on OSX I believe the
KEY_MOD1 is mapped to the <Command> key and KEY_MOD2 is mapped to <Alt> but
I'd have to check that.

So, the reason it is not available to customize in the Writer Tools -->
Customize --> Keyboard is because the key combo is defined for the entire
LibreOffice application--they are reserved. As can be seen in the source,
a <CTRL>+F4 or <CTRL>+W will */Close/* the document. While a <ALT>+F4 or
<CTRL>+Q will */Quit/* LibreOffice.

All that being said, the operating system may have other key-mappings in
place that can conflict or take precedence over LibreOffice mappings. That
does happen on some of the Linux Desktop Environments and is likely what is
affecting Thomas.

Stuart