Hotkey to Close the Current Window
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Hotkey to Close the Current Window
Let's say I have sessions of Terminal, xed, Thunar, and Firefox open currently. This would be comparable to having a command window, Notepad, Windows Explorer, and Firefox open in Windows. In Windows, Ctrl-W has relatively desirable behavior, for my purposes: it closes the Windows Explorer session and the current Firefox tab. It has no effect on the command window or Notepad, unfortunately.
I switch back and forth between the two operating systems. How close can I come to setting Ctrl-W or Super-W to close any of the foregoing? So far, I'm not finding a single universal (or even semi-universal) command that I could assign to a hotkey to close the currently selected window, dialog, or tab in LMX.
This is not a high priority for me. It is a bell or whistle that I would ideally add. In part, I'm just curious. But if I could get that functionality, it would help. TIA.
I switch back and forth between the two operating systems. How close can I come to setting Ctrl-W or Super-W to close any of the foregoing? So far, I'm not finding a single universal (or even semi-universal) command that I could assign to a hotkey to close the currently selected window, dialog, or tab in LMX.
This is not a high priority for me. It is a bell or whistle that I would ideally add. In part, I'm just curious. But if I could get that functionality, it would help. TIA.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Hotkey to Close the Current Window
I'm not on Xfce but Ctrl+W already seems to be the default for closing tabs in those apps (Ctrl+Shift+W in the terminals)? Either way, a hotkey for closing a tab has to be provided by each application individually, you cannot configure that globally. So check the respective application setings/preferences.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Hotkey to Close the Current Window
Nonsense.gm10 wrote: ⤴Mon Jun 25, 2018 7:49 pm I'm not on Xfce but Ctrl+W already seems to be the default for closing tabs in those apps (Ctrl+Shift+W in the terminals)? Either way, a hotkey for closing a tab has to be provided by each application individually, you cannot configure that globally. So check the respective application setings/preferences.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Hotkey to Close the Current Window
Alt-F4 is the standard method for closing windows. In Xfce, go to Window Manager, and on the keyboard tab, select 'Close window', double-click to clear, then set Ctrl-w as the action for F4. However on my xfce, ctrl-w closes windows without changing the setting.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: Hotkey to Close the Current Window
Thank you for your helpful contribution. Then explain to me (or rather the OP) how a global hotkey from the window manager can interact with tabs in an application. Your explanation about closing the whole application window down, while correct, will hardly help him with that.catweazel wrote: ⤴Mon Jun 25, 2018 8:13 pmNonsense.gm10 wrote: ⤴Mon Jun 25, 2018 7:49 pm I'm not on Xfce but Ctrl+W already seems to be the default for closing tabs in those apps (Ctrl+Shift+W in the terminals)? Either way, a hotkey for closing a tab has to be provided by each application individually, you cannot configure that globally. So check the respective application setings/preferences.
- AZgl1800
- Level 20
- Posts: 11184
- Joined: Thu Dec 31, 2015 3:20 am
- Location: Oklahoma where the wind comes Sweeping down the Plains
- Contact:
Re: Hotkey to Close the Current Window
I'm using 18.3 Cinnamon,
and ALT-F4 will close everything period, no problems including Terminal.
and ALT-F4 will close everything period, no problems including Terminal.
Re: Hotkey to Close the Current Window
Greetings! I have been using Mint's xfce-editions for over 4+ years (and have tested a number of other distro's exploring how they have tweaked xfce, i.e. xubuntu's spin), and never had a problem using the ALT-F4 key to close open windows (except, of course, when an app has crashed or hangs) just as catweazel indicated above. Just to be sure, i opened ~10 different apps, incl. Terminal, on top of each other, then used ALT-F4 to close each of those "open" windows with the last one bringing up the logout popup. Afaict, no problem at all. Note: any minimized apps remain in xfce's window list, btw.
Just in case one needs to tweak something, there's more info available about typical linux shortcuts @ https://help.ubuntu.com/community/KeyboardShortcuts and @ https://en.wikipedia.org/wiki/Magic_SysRq_key ... Hope this helps.
-
- Level 6
- Posts: 1491
- Joined: Fri Feb 22, 2013 5:18 pm
- Location: United States
Re: Hotkey to Close the Current Window
In linux, too? I had been assuming that it was the standard method in Microsoft OS (for many years, at least), but wasn't sure about linux. I had been privately assuming (there I go, assuming again ) that this was another example of "The linux experience is like dealing with 1,000 rabid cats" in that there wasn't really a standard. CTRL Q seems to exit most applications I use, even ones that aren't "linux onlu" (such as Firefox). One notable exception being mint-Update, but as it still occasionally fails to display a changelog for the files it wishes to upgrade, I figure that anything else that it fails at is, realistically, pretty minor as long as it doesn't actually cause a fire . But with most apps, CTRL Q performs an exit and CTRL W closes a tab (if present) or window (ditto, if the application supports multiple windows), without actually exiting.
But if ALT F4 is the correct way to immediately exit an application and/or popup window, then I will attempt to train myself to use this combination instead of CTRL Q.
Regards,
MDM
Mint 18 Xfce 4.12.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
- AZgl1800
- Level 20
- Posts: 11184
- Joined: Thu Dec 31, 2015 3:20 am
- Location: Oklahoma where the wind comes Sweeping down the Plains
- Contact:
Re: Hotkey to Close the Current Window
In Mint Cinnamon and some of the other distros,
ALT-F4 closes every app I have tried it on, including Terminal.
ALT-F4 closes every app I have tried it on, including Terminal.
Re: Hotkey to Close the Current Window
The more mainstream distros have just picked it up to make the transition from Windows easier. Personally I use Ctrl+Q mostly, easier to reach. On the other hand, I configured Win+E to open the file browser, blatantly copied from the Windows world, but it's a good combination.MtnDewManiac wrote: ⤴Mon Jul 02, 2018 3:43 pm But if ALT F4 is the correct way to immediately exit an application and/or popup window, then I will attempt to train myself to use this combination instead of CTRL Q.
To go with the old Perl motto, there's more than one way to do it. Use whatever suits your work flow best.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Hotkey to Close the Current Window
I'm not sure that's correct. It's been in UX design guidelines since the year dot. Consistency in UX is a golden rule.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: Hotkey to Close the Current Window
Probably a hen/egg problem, but I'm good with either, makes no difference at the end of the day.
Re: Hotkey to Close the Current Window
Fwiw ... You're looking at 25+ years of keyboarding tradition. The ALT+F4 combo (afaicr) was introduced by IBM in ther "CUA" (common user access) specification which was adopted by MS in Windows 3.1 (ca. 1992) & IBM in OS/2. You can find that old keyboard shortcut map @ http://allhotkeys.com/os_2_hotleys.html ... Funny how history repeats itself, eh?
Re: Hotkey to Close the Current Window
Wow OS/2, now that's a blast from the past. Also interesting (mostly the fact that somebody would go to the trouble of creating this): https://en.wikipedia.org/wiki/Table_of_ ... _shortcuts
Re: Hotkey to Close the Current Window
Time was when the only keyboard shortcut you needed to know was the old "three finger salute" or <Ctrl> <Alt> <Del> to terminate a process when Windows wouldn't behave. Haven't needed that since the move to Linux.
Fully mint Household
Out of my mind - please leave a message
Out of my mind - please leave a message
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Hotkey to Close the Current Window
KDE uses it to offer logout/shutdown options. Presumably other DEs do the same.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
-
- Level 6
- Posts: 1491
- Joined: Fri Feb 22, 2013 5:18 pm
- Location: United States
Re: Hotkey to Close the Current Window
I just tried it in Xfce (I believe this is my Mint 17.3 partition). The screen slowly faded to black. I waited a few more seconds, then pressed any key (lol) - and some archaic-looking window popped up, which required me to enter my password. After doing so, I got my system back. I assume, in Xfce, this keyboard combination is a shortcut for locking the computer without logging out or something?
I had previously thought that I could use that combination to run the task manager application included with Xfce. Apparently, I was mistaken.
Regards,
MDM
Mint 18 Xfce 4.12.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.
If guns kill people, then pencils misspell words, cars make people drive drunk, and spoons made Rosie O'Donnell fat.