What is the command to close a window?












5















I want to set a keyboard shortcut to close the current window in Ubuntu 16.04. I am aware that alt+f4 already does this and that I can redefine this shortcut if I want to, but what I really want is to add an additional shortcut to perform the same function.



The reason being; I have a keyboard without designated function keys (a 60%). Instead the function keys are activated via a keyboard shortcut that toggles the row of number keys between number and function keys (for example 4 to f4 and vice versa).



I am deep in the habit of quickly closing windows using alt+f4 and want it to work regardless of whether I am in function key or number key mode, but can't seem to find what I should enter in the command field when setting a new keyboard shortcut.



I have found a good workaround to my particular problem and posted it in the answers below. Still open to more elegant solutions.



Edit: To clarify, the machine is running X11.










share|improve this question





























    5















    I want to set a keyboard shortcut to close the current window in Ubuntu 16.04. I am aware that alt+f4 already does this and that I can redefine this shortcut if I want to, but what I really want is to add an additional shortcut to perform the same function.



    The reason being; I have a keyboard without designated function keys (a 60%). Instead the function keys are activated via a keyboard shortcut that toggles the row of number keys between number and function keys (for example 4 to f4 and vice versa).



    I am deep in the habit of quickly closing windows using alt+f4 and want it to work regardless of whether I am in function key or number key mode, but can't seem to find what I should enter in the command field when setting a new keyboard shortcut.



    I have found a good workaround to my particular problem and posted it in the answers below. Still open to more elegant solutions.



    Edit: To clarify, the machine is running X11.










    share|improve this question



























      5












      5








      5








      I want to set a keyboard shortcut to close the current window in Ubuntu 16.04. I am aware that alt+f4 already does this and that I can redefine this shortcut if I want to, but what I really want is to add an additional shortcut to perform the same function.



      The reason being; I have a keyboard without designated function keys (a 60%). Instead the function keys are activated via a keyboard shortcut that toggles the row of number keys between number and function keys (for example 4 to f4 and vice versa).



      I am deep in the habit of quickly closing windows using alt+f4 and want it to work regardless of whether I am in function key or number key mode, but can't seem to find what I should enter in the command field when setting a new keyboard shortcut.



      I have found a good workaround to my particular problem and posted it in the answers below. Still open to more elegant solutions.



      Edit: To clarify, the machine is running X11.










      share|improve this question
















      I want to set a keyboard shortcut to close the current window in Ubuntu 16.04. I am aware that alt+f4 already does this and that I can redefine this shortcut if I want to, but what I really want is to add an additional shortcut to perform the same function.



      The reason being; I have a keyboard without designated function keys (a 60%). Instead the function keys are activated via a keyboard shortcut that toggles the row of number keys between number and function keys (for example 4 to f4 and vice versa).



      I am deep in the habit of quickly closing windows using alt+f4 and want it to work regardless of whether I am in function key or number key mode, but can't seem to find what I should enter in the command field when setting a new keyboard shortcut.



      I have found a good workaround to my particular problem and posted it in the answers below. Still open to more elegant solutions.



      Edit: To clarify, the machine is running X11.







      keyboard shortcut-keys xorg






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 12 hours ago







      FinleyGibson

















      asked 14 hours ago









      FinleyGibsonFinleyGibson

      263




      263






















          4 Answers
          4






          active

          oldest

          votes


















          4














          wmctrl -c <win>




             wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

          -c <WIN>
          Close the window <WIN> gracefully.



          (from man wmctrl. But note: I use XFCE so haven't tested this on Unity as found in default Ubuntu 16.04, and I wouldn't expect it to work if using Wayland on 17.10 upwards)






          share|improve this answer
























          • I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

            – FinleyGibson
            13 hours ago











          • the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

            – guiverc
            13 hours ago











          • For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

            – guiverc
            13 hours ago













          • I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

            – FinleyGibson
            13 hours ago











          • It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

            – guiverc
            12 hours ago



















          2














          Had you try to use CTRL+Q



          I was use to press these keys to close windows, never added a keyboard shortcut, seems to be the default at least in the distros I used(always debian based)



          but I see the point of your question






          share|improve this answer
























          • Nice Idea, but ctrl +Q does nothing for me.

            – FinleyGibson
            13 hours ago



















          0














          I found a good solution to my problem, though it does not exactly answer the question I originally asked, I'm posting it here as a workaround for anyone that encounters a similar issue.



          The solution I found was to use xdotool to execute the alt+f4 shortcut as a command, and to set this as the command for alt+4. To do this first isntall xdotool if you don't have it already:



          sudo apt-get install xdotool


          Then go to keyboard shortcuts in the settings menu, and add a custom shortcut. In the command field enter:



          xdotool key Alt+F4


          And set the shortcut to Alt+4.



          This works well, but I'm leaving the question as is, in case someone has a more elegant solution, using the exact command called by the close window shortcut by default.






          share|improve this answer

































            -1














            Ctrl-q is for closing one event of an app. Ctrl-W is the conventional macOS and Windows hotkey for closing a window in an app. That's why it's not working for you.






            share|improve this answer
























            • macOS uses the Command key (⌘)

              – goetzc
              10 hours ago











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "89"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117353%2fwhat-is-the-command-to-close-a-window%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            wmctrl -c <win>




               wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

            -c <WIN>
            Close the window <WIN> gracefully.



            (from man wmctrl. But note: I use XFCE so haven't tested this on Unity as found in default Ubuntu 16.04, and I wouldn't expect it to work if using Wayland on 17.10 upwards)






            share|improve this answer
























            • I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

              – FinleyGibson
              13 hours ago











            • the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

              – guiverc
              13 hours ago











            • For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

              – guiverc
              13 hours ago













            • I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

              – FinleyGibson
              13 hours ago











            • It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

              – guiverc
              12 hours ago
















            4














            wmctrl -c <win>




               wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

            -c <WIN>
            Close the window <WIN> gracefully.



            (from man wmctrl. But note: I use XFCE so haven't tested this on Unity as found in default Ubuntu 16.04, and I wouldn't expect it to work if using Wayland on 17.10 upwards)






            share|improve this answer
























            • I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

              – FinleyGibson
              13 hours ago











            • the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

              – guiverc
              13 hours ago











            • For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

              – guiverc
              13 hours ago













            • I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

              – FinleyGibson
              13 hours ago











            • It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

              – guiverc
              12 hours ago














            4












            4








            4







            wmctrl -c <win>




               wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

            -c <WIN>
            Close the window <WIN> gracefully.



            (from man wmctrl. But note: I use XFCE so haven't tested this on Unity as found in default Ubuntu 16.04, and I wouldn't expect it to work if using Wayland on 17.10 upwards)






            share|improve this answer













            wmctrl -c <win>




               wmctrl - interact with a EWMH/NetWM compatible X Window Manager.

            -c <WIN>
            Close the window <WIN> gracefully.



            (from man wmctrl. But note: I use XFCE so haven't tested this on Unity as found in default Ubuntu 16.04, and I wouldn't expect it to work if using Wayland on 17.10 upwards)







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 13 hours ago









            guivercguiverc

            4,57721522




            4,57721522













            • I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

              – FinleyGibson
              13 hours ago











            • the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

              – guiverc
              13 hours ago











            • For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

              – guiverc
              13 hours ago













            • I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

              – FinleyGibson
              13 hours ago











            • It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

              – guiverc
              12 hours ago



















            • I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

              – FinleyGibson
              13 hours ago











            • the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

              – guiverc
              13 hours ago











            • For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

              – guiverc
              13 hours ago













            • I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

              – FinleyGibson
              13 hours ago











            • It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

              – guiverc
              12 hours ago

















            I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

            – FinleyGibson
            13 hours ago





            I am using X11, and having installed wmctrl, and applied your suggestion, it does work sort of. But The command does more than close the active window. Entering wmctrl -c WIN in terminal does close the current window, but it also seems to perform some kind of refresh of X11: the screen blinks and all open windows are moved to workspace 1. Is there something I am doing wrong here? Or is there another way to specify the exact functionality of alt+f4?

            – FinleyGibson
            13 hours ago













            the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

            – guiverc
            13 hours ago





            the <win> should be replaced by the window you want to close. I've only used it in shell scripts, and have known what workspaces (i usually use it to effect workspaces more than windows) I want to add/delete/switch-to. It takes some play to get to understand it, and I'd have your shortcut run a shell.script that closed the window (not sure how you'd work out current window, it's a case I never considered in using wmctrl as its not how I use it as the windows I've closed are ones I've opened with my scripts)

            – guiverc
            13 hours ago













            For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

            – guiverc
            13 hours ago







            For example, I have a folder with photos open (in thunar as I'm using XFCE currently), and select one to view so open it. It opens in gpicview (my preferred viewer for that type of file). To close the window I can ctrl+alt+T to open a terminal and enter the command wmctrl -c P1000403.JPG (the P1000403.JPG being the name of the picture I was viewing in this example). On pressing enter the gpicview window containing my photo closes. <win> was replaced by the 'title' of my 'window' in this example. The '<>' characters were copied from the man page representing values you change.

            – guiverc
            13 hours ago















            I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

            – FinleyGibson
            13 hours ago





            I see what you are saying. In order to implement what I want in this way, I would then need a means of getting the name of the currently active window. But I can't seem to find a way.

            – FinleyGibson
            13 hours ago













            It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

            – guiverc
            12 hours ago





            It's after midnight my local time, what you've got is the best I can provide from my tired-brain given I want to go to bed (and don't want to find my scripts to look for clues). the moment I've found the photo I want, it's being posted & I'm off to bed

            – guiverc
            12 hours ago













            2














            Had you try to use CTRL+Q



            I was use to press these keys to close windows, never added a keyboard shortcut, seems to be the default at least in the distros I used(always debian based)



            but I see the point of your question






            share|improve this answer
























            • Nice Idea, but ctrl +Q does nothing for me.

              – FinleyGibson
              13 hours ago
















            2














            Had you try to use CTRL+Q



            I was use to press these keys to close windows, never added a keyboard shortcut, seems to be the default at least in the distros I used(always debian based)



            but I see the point of your question






            share|improve this answer
























            • Nice Idea, but ctrl +Q does nothing for me.

              – FinleyGibson
              13 hours ago














            2












            2








            2







            Had you try to use CTRL+Q



            I was use to press these keys to close windows, never added a keyboard shortcut, seems to be the default at least in the distros I used(always debian based)



            but I see the point of your question






            share|improve this answer













            Had you try to use CTRL+Q



            I was use to press these keys to close windows, never added a keyboard shortcut, seems to be the default at least in the distros I used(always debian based)



            but I see the point of your question







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 13 hours ago









            leselese

            1,695158




            1,695158













            • Nice Idea, but ctrl +Q does nothing for me.

              – FinleyGibson
              13 hours ago



















            • Nice Idea, but ctrl +Q does nothing for me.

              – FinleyGibson
              13 hours ago

















            Nice Idea, but ctrl +Q does nothing for me.

            – FinleyGibson
            13 hours ago





            Nice Idea, but ctrl +Q does nothing for me.

            – FinleyGibson
            13 hours ago











            0














            I found a good solution to my problem, though it does not exactly answer the question I originally asked, I'm posting it here as a workaround for anyone that encounters a similar issue.



            The solution I found was to use xdotool to execute the alt+f4 shortcut as a command, and to set this as the command for alt+4. To do this first isntall xdotool if you don't have it already:



            sudo apt-get install xdotool


            Then go to keyboard shortcuts in the settings menu, and add a custom shortcut. In the command field enter:



            xdotool key Alt+F4


            And set the shortcut to Alt+4.



            This works well, but I'm leaving the question as is, in case someone has a more elegant solution, using the exact command called by the close window shortcut by default.






            share|improve this answer






























              0














              I found a good solution to my problem, though it does not exactly answer the question I originally asked, I'm posting it here as a workaround for anyone that encounters a similar issue.



              The solution I found was to use xdotool to execute the alt+f4 shortcut as a command, and to set this as the command for alt+4. To do this first isntall xdotool if you don't have it already:



              sudo apt-get install xdotool


              Then go to keyboard shortcuts in the settings menu, and add a custom shortcut. In the command field enter:



              xdotool key Alt+F4


              And set the shortcut to Alt+4.



              This works well, but I'm leaving the question as is, in case someone has a more elegant solution, using the exact command called by the close window shortcut by default.






              share|improve this answer




























                0












                0








                0







                I found a good solution to my problem, though it does not exactly answer the question I originally asked, I'm posting it here as a workaround for anyone that encounters a similar issue.



                The solution I found was to use xdotool to execute the alt+f4 shortcut as a command, and to set this as the command for alt+4. To do this first isntall xdotool if you don't have it already:



                sudo apt-get install xdotool


                Then go to keyboard shortcuts in the settings menu, and add a custom shortcut. In the command field enter:



                xdotool key Alt+F4


                And set the shortcut to Alt+4.



                This works well, but I'm leaving the question as is, in case someone has a more elegant solution, using the exact command called by the close window shortcut by default.






                share|improve this answer















                I found a good solution to my problem, though it does not exactly answer the question I originally asked, I'm posting it here as a workaround for anyone that encounters a similar issue.



                The solution I found was to use xdotool to execute the alt+f4 shortcut as a command, and to set this as the command for alt+4. To do this first isntall xdotool if you don't have it already:



                sudo apt-get install xdotool


                Then go to keyboard shortcuts in the settings menu, and add a custom shortcut. In the command field enter:



                xdotool key Alt+F4


                And set the shortcut to Alt+4.



                This works well, but I'm leaving the question as is, in case someone has a more elegant solution, using the exact command called by the close window shortcut by default.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 8 hours ago

























                answered 12 hours ago









                FinleyGibsonFinleyGibson

                263




                263























                    -1














                    Ctrl-q is for closing one event of an app. Ctrl-W is the conventional macOS and Windows hotkey for closing a window in an app. That's why it's not working for you.






                    share|improve this answer
























                    • macOS uses the Command key (⌘)

                      – goetzc
                      10 hours ago
















                    -1














                    Ctrl-q is for closing one event of an app. Ctrl-W is the conventional macOS and Windows hotkey for closing a window in an app. That's why it's not working for you.






                    share|improve this answer
























                    • macOS uses the Command key (⌘)

                      – goetzc
                      10 hours ago














                    -1












                    -1








                    -1







                    Ctrl-q is for closing one event of an app. Ctrl-W is the conventional macOS and Windows hotkey for closing a window in an app. That's why it's not working for you.






                    share|improve this answer













                    Ctrl-q is for closing one event of an app. Ctrl-W is the conventional macOS and Windows hotkey for closing a window in an app. That's why it's not working for you.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 11 hours ago









                    S-WrightS-Wright

                    173




                    173













                    • macOS uses the Command key (⌘)

                      – goetzc
                      10 hours ago



















                    • macOS uses the Command key (⌘)

                      – goetzc
                      10 hours ago

















                    macOS uses the Command key (⌘)

                    – goetzc
                    10 hours ago





                    macOS uses the Command key (⌘)

                    – goetzc
                    10 hours ago


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Ask Ubuntu!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1117353%2fwhat-is-the-command-to-close-a-window%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    what is the purpose of having a “thru cal” on RF PCB?

                    What does Gandalf whisper to the Moth on the Orthanc in Isengard?

                    magento2 creating a lot of catalogrule_product_temp tables