vscode: Is it possible to make (not remap) `caps lock` as one of the modifier keys?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I am not asking to remap Caps Lock to other modifier keys but I want to configure Caps Lock as one of modifier key for my own usage. Any ideas? :D










share|improve this question

























  • Are you using Windows?

    – PanJunjie潘俊杰
    Jan 16 '17 at 1:57











  • @PanJunjie潘俊杰 Yes I am. But suggestions for os x or linux are also welcomed :D

    – spacegoing
    Jan 16 '17 at 4:30




















0















I am not asking to remap Caps Lock to other modifier keys but I want to configure Caps Lock as one of modifier key for my own usage. Any ideas? :D










share|improve this question

























  • Are you using Windows?

    – PanJunjie潘俊杰
    Jan 16 '17 at 1:57











  • @PanJunjie潘俊杰 Yes I am. But suggestions for os x or linux are also welcomed :D

    – spacegoing
    Jan 16 '17 at 4:30
















0












0








0


1






I am not asking to remap Caps Lock to other modifier keys but I want to configure Caps Lock as one of modifier key for my own usage. Any ideas? :D










share|improve this question
















I am not asking to remap Caps Lock to other modifier keys but I want to configure Caps Lock as one of modifier key for my own usage. Any ideas? :D







visual-studio-code vscode-settings






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 23 '18 at 14:42









Gama11

13.1k52652




13.1k52652










asked Jan 16 '17 at 1:45









spacegoingspacegoing

1,53621227




1,53621227













  • Are you using Windows?

    – PanJunjie潘俊杰
    Jan 16 '17 at 1:57











  • @PanJunjie潘俊杰 Yes I am. But suggestions for os x or linux are also welcomed :D

    – spacegoing
    Jan 16 '17 at 4:30





















  • Are you using Windows?

    – PanJunjie潘俊杰
    Jan 16 '17 at 1:57











  • @PanJunjie潘俊杰 Yes I am. But suggestions for os x or linux are also welcomed :D

    – spacegoing
    Jan 16 '17 at 4:30



















Are you using Windows?

– PanJunjie潘俊杰
Jan 16 '17 at 1:57





Are you using Windows?

– PanJunjie潘俊杰
Jan 16 '17 at 1:57













@PanJunjie潘俊杰 Yes I am. But suggestions for os x or linux are also welcomed :D

– spacegoing
Jan 16 '17 at 4:30







@PanJunjie潘俊杰 Yes I am. But suggestions for os x or linux are also welcomed :D

– spacegoing
Jan 16 '17 at 4:30














2 Answers
2






active

oldest

votes


















2














On Windows you can use AutoHotKey(usually briefly as ahk) with the WinActive function to make the ahk script only work when you're in vscode, mapping CapsLock+* keys to usually-not-used combinations like ctrl+shift+alt+* and write the ctrl+shift+alt+* keys to vscode's key configs.



It would roughly look like this:



; comment: the class used here is made up
; right click a running script in the system tray and go to "window spy" to get the right class name
; there are also usual `if`s but this one applies the condition to all the code following it
#If WinActive("ahk_class VSCode")

CapsLock & a::
SendInput, ^+!a
return


And of course if you want to get the function of capslock in the editor, you can easily use a combination like CapsLock & Shift to acomplish it like above.






share|improve this answer
























  • Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

    – spacegoing
    Jan 16 '17 at 6:27











  • Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

    – Alex
    Nov 4 '17 at 5:19











  • Nevermind, I simply looped through alphabet with js.

    – Alex
    Nov 4 '17 at 5:59



















0














For x11 OSes like most Linux distros, use xmodmap. Something like



keycode 66 = Alt_L Meta_L
clear mod1
add mod1 = Alt_L Meta_L


in your .Xmodmap file should suffice.



Then run:



xmodmap .Xmodmap





share|improve this answer


























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    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%2fstackoverflow.com%2fquestions%2f41668372%2fvscode-is-it-possible-to-make-not-remap-caps-lock-as-one-of-the-modifier-ke%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    On Windows you can use AutoHotKey(usually briefly as ahk) with the WinActive function to make the ahk script only work when you're in vscode, mapping CapsLock+* keys to usually-not-used combinations like ctrl+shift+alt+* and write the ctrl+shift+alt+* keys to vscode's key configs.



    It would roughly look like this:



    ; comment: the class used here is made up
    ; right click a running script in the system tray and go to "window spy" to get the right class name
    ; there are also usual `if`s but this one applies the condition to all the code following it
    #If WinActive("ahk_class VSCode")

    CapsLock & a::
    SendInput, ^+!a
    return


    And of course if you want to get the function of capslock in the editor, you can easily use a combination like CapsLock & Shift to acomplish it like above.






    share|improve this answer
























    • Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

      – spacegoing
      Jan 16 '17 at 6:27











    • Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

      – Alex
      Nov 4 '17 at 5:19











    • Nevermind, I simply looped through alphabet with js.

      – Alex
      Nov 4 '17 at 5:59
















    2














    On Windows you can use AutoHotKey(usually briefly as ahk) with the WinActive function to make the ahk script only work when you're in vscode, mapping CapsLock+* keys to usually-not-used combinations like ctrl+shift+alt+* and write the ctrl+shift+alt+* keys to vscode's key configs.



    It would roughly look like this:



    ; comment: the class used here is made up
    ; right click a running script in the system tray and go to "window spy" to get the right class name
    ; there are also usual `if`s but this one applies the condition to all the code following it
    #If WinActive("ahk_class VSCode")

    CapsLock & a::
    SendInput, ^+!a
    return


    And of course if you want to get the function of capslock in the editor, you can easily use a combination like CapsLock & Shift to acomplish it like above.






    share|improve this answer
























    • Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

      – spacegoing
      Jan 16 '17 at 6:27











    • Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

      – Alex
      Nov 4 '17 at 5:19











    • Nevermind, I simply looped through alphabet with js.

      – Alex
      Nov 4 '17 at 5:59














    2












    2








    2







    On Windows you can use AutoHotKey(usually briefly as ahk) with the WinActive function to make the ahk script only work when you're in vscode, mapping CapsLock+* keys to usually-not-used combinations like ctrl+shift+alt+* and write the ctrl+shift+alt+* keys to vscode's key configs.



    It would roughly look like this:



    ; comment: the class used here is made up
    ; right click a running script in the system tray and go to "window spy" to get the right class name
    ; there are also usual `if`s but this one applies the condition to all the code following it
    #If WinActive("ahk_class VSCode")

    CapsLock & a::
    SendInput, ^+!a
    return


    And of course if you want to get the function of capslock in the editor, you can easily use a combination like CapsLock & Shift to acomplish it like above.






    share|improve this answer













    On Windows you can use AutoHotKey(usually briefly as ahk) with the WinActive function to make the ahk script only work when you're in vscode, mapping CapsLock+* keys to usually-not-used combinations like ctrl+shift+alt+* and write the ctrl+shift+alt+* keys to vscode's key configs.



    It would roughly look like this:



    ; comment: the class used here is made up
    ; right click a running script in the system tray and go to "window spy" to get the right class name
    ; there are also usual `if`s but this one applies the condition to all the code following it
    #If WinActive("ahk_class VSCode")

    CapsLock & a::
    SendInput, ^+!a
    return


    And of course if you want to get the function of capslock in the editor, you can easily use a combination like CapsLock & Shift to acomplish it like above.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 16 '17 at 6:17









    PanJunjie潘俊杰PanJunjie潘俊杰

    2,2931016




    2,2931016













    • Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

      – spacegoing
      Jan 16 '17 at 6:27











    • Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

      – Alex
      Nov 4 '17 at 5:19











    • Nevermind, I simply looped through alphabet with js.

      – Alex
      Nov 4 '17 at 5:59



















    • Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

      – spacegoing
      Jan 16 '17 at 6:27











    • Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

      – Alex
      Nov 4 '17 at 5:19











    • Nevermind, I simply looped through alphabet with js.

      – Alex
      Nov 4 '17 at 5:59

















    Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

    – spacegoing
    Jan 16 '17 at 6:27





    Thanks for your answer. However I'd prefer to use pure vscode functions rather than dependencies :D

    – spacegoing
    Jan 16 '17 at 6:27













    Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

    – Alex
    Nov 4 '17 at 5:19





    Is there any way to use a variable on input and make all CapsLock+%letter% auto remap to Ctrl+Shift+Alt+%letter%?

    – Alex
    Nov 4 '17 at 5:19













    Nevermind, I simply looped through alphabet with js.

    – Alex
    Nov 4 '17 at 5:59





    Nevermind, I simply looped through alphabet with js.

    – Alex
    Nov 4 '17 at 5:59













    0














    For x11 OSes like most Linux distros, use xmodmap. Something like



    keycode 66 = Alt_L Meta_L
    clear mod1
    add mod1 = Alt_L Meta_L


    in your .Xmodmap file should suffice.



    Then run:



    xmodmap .Xmodmap





    share|improve this answer






























      0














      For x11 OSes like most Linux distros, use xmodmap. Something like



      keycode 66 = Alt_L Meta_L
      clear mod1
      add mod1 = Alt_L Meta_L


      in your .Xmodmap file should suffice.



      Then run:



      xmodmap .Xmodmap





      share|improve this answer




























        0












        0








        0







        For x11 OSes like most Linux distros, use xmodmap. Something like



        keycode 66 = Alt_L Meta_L
        clear mod1
        add mod1 = Alt_L Meta_L


        in your .Xmodmap file should suffice.



        Then run:



        xmodmap .Xmodmap





        share|improve this answer















        For x11 OSes like most Linux distros, use xmodmap. Something like



        keycode 66 = Alt_L Meta_L
        clear mod1
        add mod1 = Alt_L Meta_L


        in your .Xmodmap file should suffice.



        Then run:



        xmodmap .Xmodmap






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 17 '18 at 2:43









        Stephen Rauch

        30.4k153759




        30.4k153759










        answered Nov 17 '18 at 2:24









        Pedro CiambraPedro Ciambra

        11




        11






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • 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%2fstackoverflow.com%2fquestions%2f41668372%2fvscode-is-it-possible-to-make-not-remap-caps-lock-as-one-of-the-modifier-ke%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

            List item for chat from Array inside array React Native

            Thiostrepton

            Caerphilly