{"id":7061,"date":"2020-09-29T23:16:16","date_gmt":"2020-09-30T04:16:16","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=7061"},"modified":"2020-09-29T23:16:16","modified_gmt":"2020-09-30T04:16:16","slug":"vscode-shortcut-for-uppercase-and-lowercase-conversion","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=7061","title":{"rendered":"VSCode &#8212; Shortcut for Uppercase and Lowercase Conversion"},"content":{"rendered":"<p>While you can run a command to convert the selected text to upper (or lower) case, there doesn&#8217;t appear to be a <em>quick<\/em> way to do it. Luckily, you can define your own keyboard shortcuts and map those shortcuts to commands. From the File menu, select &#8220;Preferences&#8221; and &#8220;Keyboard Shortcuts&#8221; (or use the Ctrl-K Ctrl-S combo).<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=7062\" rel=\"attachment wp-att-7062\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-7062\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut1.png\" alt=\"\" width=\"585\" height=\"632\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut1.png 585w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut1-278x300.png 278w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/a><\/p>\n<p>In the upper right-hand corner, click this icon to open the custom keyboard shortcut JSON file<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=7063\" rel=\"attachment wp-att-7063\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-7063\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut2.png\" alt=\"\" width=\"316\" height=\"294\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut2.png 316w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut2-300x279.png 300w\" sizes=\"auto, (max-width: 316px) 100vw, 316px\" \/><\/a><\/p>\n<p>Add JSON elements for the shortcuts you want to define &#8212; the key combination, the command to run, and on what to run the command<\/p>\n<p><a href=\"https:\/\/www.rushworth.us\/lisa\/?attachment_id=7064\" rel=\"attachment wp-att-7064\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-7064\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut3.png\" alt=\"\" width=\"724\" height=\"297\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut3.png 724w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2020\/09\/VSCode-UpperCaseShortcut3-300x123.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/a><\/p>\n<p>Sample key command bindings:<\/p>\n<pre><code>[\r\n {\r\n    \"key\": \"ctrl+shift+u\",\r\n    \"command\": \"editor.action.transformToUppercase\",\r\n    \"when\": \"editorTextFocus\"\r\n },\r\n {\r\n    \"key\": \"ctrl+shift+l\",\r\n    \"command\": \"editor.action.transformToLowercase\",\r\n    \"when\": \"editorTextFocus\"\r\n }\r\n]<\/code><\/pre>\n<p>Save &#8230; voila, a keyboard shortcut to change to upper and lower case.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While you can run a command to convert the selected text to upper (or lower) case, there doesn&#8217;t appear to be a quick way to do it. Luckily, you can define your own keyboard shortcuts and map those shortcuts to commands. From the File menu, select &#8220;Preferences&#8221; and &#8220;Keyboard Shortcuts&#8221; (or use the Ctrl-K Ctrl-S &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[1138,778,817],"class_list":["post-7061","post","type-post","status-publish","format-standard","hentry","category-coding","tag-keyboard-shortcuts","tag-vs-code","tag-vscode"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/7061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7061"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/7061\/revisions"}],"predecessor-version":[{"id":7065,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/7061\/revisions\/7065"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}