Disable ALT+F4

Opensuse 13.2 with it’s accompanying KDE

How does one configure or remove any behavior of ALT+F4?

I am trying to disable the functionality of ALT+F4. I need these keys to trigger the shutdown menu when I RDP into Windows machines. I’m quite surprised that the developers would use this combination of keys to close windows. I know that a lot of people use Linux as an RDP server. Having ALT+F4 close windows breaks a good part of this functionality because you can not trigger shutdown on remote windows machines without reinventing the wheel. I’ve checked Applications>Configure Desktop>Keyboard Shortcuts. ALT+F4 is not present to be configured. Having ALT+F4 close windows by default is no big deal. Not being able to change it in the same place as you would all other hotkeys is a pain in the neck. I must be missing something here.

On Fri, 17 Apr 2015 01:16:01 +0000, jamesinsandiego wrote:

> Opensuse 13.2 with it’s accompanying KDE
>
> How does one configure or remove any behavior of ALT+F4?
>
> I am trying to disable the functionality of ALT+F4. I need these keys to
> trigger the shutdown menu when I RDP into Windows machines. I’m quite
> surprised that the developers would use this combination of keys to
> close windows. I know that a lot of people use Linux as an RDP server.
> Having ALT+F4 close windows breaks a good part of this functionality
> because you can not trigger shutdown on remote windows machines without
> reinventing the wheel. I’ve checked Applications>Configure
> Desktop>Keyboard Shortcuts. ALT+F4 is not present to be configured.
> Having ALT+F4 close windows by default is no big deal. Not being able to
> change it in the same place as you would all other hotkeys is a pain in
> the neck. I must be missing something here.

Alt+F4 is a fairly standard UI keystroke for closing application windows
across multiple platforms.

What remote desktop client are you using? Rather than look to disable
the functionality in KDE, maybe look to see how you capture the keystroke
so it’s not processed by your system but sent to the remote system.

Many RDP clients have functionality to do just that - I use remmina, for
example, and it has that functionality built in.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

The correct procedure to correctly shutdown a remote system running Windows is to go to the command prompt.

If nobody else is connected to the computer, you can use:

shutdown /p

This will shutdown the remote Windows computer without a timeout or any warning messages.

shutdown /s

will shutdown the remote machine using a default 30 seconds timeout before the shutdown begins.

During this timeout, if you change your mind,

shutdown /a

will abort the shutdown and you can continue working.

For other options, such as messaging anyone else connected to the machine to warn them the machine will shut down, simply type:

shutdown

to get a list of the various parameters. In fact, it would be a good idea for you to do that and read the various options, so you understand what you can do for special situations.

Note that you can also reboot the machine that way with the correct parameter.

Microsoft (and system administrators) prefer that you use the command prompt shutdown procedure for remote shutdowns, so you properly message anyone else connected at the time.

And to answer the actual question:

Look into “Configure Desktop” (systemsettings)->Shortcuts and Gestures->Global Shortcuts, and choose “KWin” as component.
You can modify or disable the “Close Window” shortcut (Alt+F4 by default) there, as well as many others.

Thank you very much to all who have replied. I now have several methods to use. You guys are all awesome. How do I thank everyone and close this thread as answered to my satisfaction?

On 2015-05-15 01:36, jamesinsandiego wrote:
> and close this
> thread as answered to my satisfaction?

You can not.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On Thu, 14 May 2015 23:36:01 +0000, jamesinsandiego wrote:

> How do I thank everyone and close this
> thread as answered to my satisfaction?

You just did by saying “thank you”. :slight_smile: We don’t mark threads solved or
close them when done - so this is more than sufficient. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C