{"id":99765,"date":"2018-09-18T07:00:00","date_gmt":"2018-09-18T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=99765"},"modified":"2019-03-13T00:30:02","modified_gmt":"2019-03-13T07:30:02","slug":"20180918-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20180918-00\/?p=99765","title":{"rendered":"Why is Alt+F4 the hotkey for closing a window? Why not Alt+F5 or Alt+F3?"},"content":{"rendered":"<p>In a <a HREF=\"http:\/\/channel9.msdn.com\/Blogs\/One-Dev-Minute\/One-Dev-Question-with-Raymond-Chen-Why-AltF4-Closes-a-Window\">One Dev Question video<\/a>, I discussed why <kbd>Alt<\/kbd>+<kbd>F4<\/kbd> is the hotkey for closing a window. That explains why it&#8217;s a function key rather than an alphabet key, but why <kbd>F4<\/kbd> specifically? Why not <kbd>F5<\/kbd> or <kbd>F3<\/kbd>? <\/p>\n<p>It&#8217;s <kbd>F4<\/kbd> because that was the next key available. <\/p>\n<p>The hotkeys according to <a HREF=\"https:\/\/en.wikipedia.org\/wiki\/Common_User_Access\">CUA<\/a> were as follows: <\/p>\n<ul>\n<li><kbd>Alt<\/kbd>+<kbd>F10<\/kbd>: Maximize<\/li>\n<li><kbd>Alt<\/kbd>+<kbd>F9<\/kbd>: Minimize<\/li>\n<li><kbd>Alt<\/kbd>+<kbd>F8<\/kbd>: Resize<\/li>\n<li><kbd>Alt<\/kbd>+<kbd>F7<\/kbd>: Move<\/li>\n<li><kbd>Alt<\/kbd>+<kbd>F6<\/kbd>: Switch windows within an app<\/li>\n<li><kbd>Alt<\/kbd>+<kbd>F5<\/kbd>: Restore<\/li>\n<li><kbd>Alt<\/kbd>+<kbd>F4<\/kbd>: Close<\/li>\n<\/ul>\n<p>Most of these hotkeys died out over time due to disuse. The ones that remain active today are <kbd>Alt<\/kbd>+<kbd>F6<\/kbd> and <kbd>Alt<\/kbd>+<kbd>F4<\/kbd>. <\/p>\n<p>Wait, what about <kbd>F11<\/kbd> and <kbd>F12<\/kbd>? Why were they skipped over? <\/p>\n<p><a HREF=\"http:\/\/www.epiguru.com\/2012\/09\/ibm-model-f-pc-at-keyboard-my-daily-driver\/\">The original IBM PC keyboard<\/a> didn&#8217;t have <kbd>F11<\/kbd> or <kbd>F12<\/kbd> function keys. The function keys went up to <kbd>F10<\/kbd>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was the next one available.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[2],"class_list":["post-99765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-history"],"acf":[],"blog_post_summary":"<p>It was the next one available.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/99765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=99765"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/99765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=99765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=99765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=99765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}