How to unbind a shortcut in a terminal











up vote
1
down vote

favorite












Ubuntu 18.04



I'm using embedded terminal in my IDE and there is IDE-binding Ctrl8 which is pretty useful and convenient and I would not like to rebind it. However the Ctrl8 shortcut works as Backspace when IDE-embedded terminal is focused which is really annoying. Moreover Ctrl8 for backward character delete seems useless for me.



I tried to open a terminal and then opened to Edit -> Preferences, then Shortcuts but I did not found the Ctrl8 in there. So how to simply disable it? Is there some config file?










share|improve this question
























  • what is your IDE?
    – Mark J. Adams
    Nov 13 at 7:00










  • @MarkJ.Adams VSCode. I use it for C-programming.
    – St.Antario
    Nov 13 at 7:07

















up vote
1
down vote

favorite












Ubuntu 18.04



I'm using embedded terminal in my IDE and there is IDE-binding Ctrl8 which is pretty useful and convenient and I would not like to rebind it. However the Ctrl8 shortcut works as Backspace when IDE-embedded terminal is focused which is really annoying. Moreover Ctrl8 for backward character delete seems useless for me.



I tried to open a terminal and then opened to Edit -> Preferences, then Shortcuts but I did not found the Ctrl8 in there. So how to simply disable it? Is there some config file?










share|improve this question
























  • what is your IDE?
    – Mark J. Adams
    Nov 13 at 7:00










  • @MarkJ.Adams VSCode. I use it for C-programming.
    – St.Antario
    Nov 13 at 7:07















up vote
1
down vote

favorite









up vote
1
down vote

favorite











Ubuntu 18.04



I'm using embedded terminal in my IDE and there is IDE-binding Ctrl8 which is pretty useful and convenient and I would not like to rebind it. However the Ctrl8 shortcut works as Backspace when IDE-embedded terminal is focused which is really annoying. Moreover Ctrl8 for backward character delete seems useless for me.



I tried to open a terminal and then opened to Edit -> Preferences, then Shortcuts but I did not found the Ctrl8 in there. So how to simply disable it? Is there some config file?










share|improve this question















Ubuntu 18.04



I'm using embedded terminal in my IDE and there is IDE-binding Ctrl8 which is pretty useful and convenient and I would not like to rebind it. However the Ctrl8 shortcut works as Backspace when IDE-embedded terminal is focused which is really annoying. Moreover Ctrl8 for backward character delete seems useless for me.



I tried to open a terminal and then opened to Edit -> Preferences, then Shortcuts but I did not found the Ctrl8 in there. So how to simply disable it? Is there some config file?







command-line bash shortcut-keys gnome-terminal






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 at 6:53









muru

134k19283484




134k19283484










asked Nov 13 at 6:47









St.Antario

1084




1084












  • what is your IDE?
    – Mark J. Adams
    Nov 13 at 7:00










  • @MarkJ.Adams VSCode. I use it for C-programming.
    – St.Antario
    Nov 13 at 7:07




















  • what is your IDE?
    – Mark J. Adams
    Nov 13 at 7:00










  • @MarkJ.Adams VSCode. I use it for C-programming.
    – St.Antario
    Nov 13 at 7:07


















what is your IDE?
– Mark J. Adams
Nov 13 at 7:00




what is your IDE?
– Mark J. Adams
Nov 13 at 7:00












@MarkJ.Adams VSCode. I use it for C-programming.
– St.Antario
Nov 13 at 7:07






@MarkJ.Adams VSCode. I use it for C-programming.
– St.Antario
Nov 13 at 7:07












1 Answer
1






active

oldest

votes

















up vote
3
down vote



accepted










Ctrl8 is not a shortcut in the usual sense. Many terminal emulators conventionally send ^? (aka Ctrl?) for Ctrl8 (see this U&L post for details). This is not usually configurable behaviour, short of modifying the source code.



^? is the control code for ASCII Del and ^H (aka CtrlH) for ASCII Backspace (see this informative post for a lot more on that).



So, if you don't want Ctrl8 to delete a character, you may need to change:





  • the control code your terminal sends for the Backspace key. GNOME Terminal usually defaults to ^? (ASCII DEL), IIRC, so you need to set it to ^H. In GNOME Terminal, that's in Edit -> Profile Preferences -> Compatibility:



    enter image description here



    If your terminal doesn't have an option to configure this and sends ^? for Backspace, then the next two steps will break Backspace.




  • the control code that the pseudo-TTY uses for erase



    Check what it is now:



    $ stty -a | grep erase
    intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
    swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;


    If it's erase= ^?, you'll need to change that:



    stty erase '^H'



  • the control code that your shell uses for erasing the previous character. In bash, that defaults to both ^H and ^? if ^? is the erase character for the controlling TTY.



    Check what it is now:



    $ bind -p | grep backward-del
    "C-h": backward-delete-char
    "C-?": backward-delete-char


    Remove the C-? binding, and add a C-h binding if needed:



    bind -r 'C-?'
    bind 'C-h: backward-delete-char'


    Add these to your .bashrc to save these settings.






Or you can change your IDE shortcut.






share|improve this answer





















    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',
    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%2f1092450%2fhow-to-unbind-a-shortcut-in-a-terminal%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    Ctrl8 is not a shortcut in the usual sense. Many terminal emulators conventionally send ^? (aka Ctrl?) for Ctrl8 (see this U&L post for details). This is not usually configurable behaviour, short of modifying the source code.



    ^? is the control code for ASCII Del and ^H (aka CtrlH) for ASCII Backspace (see this informative post for a lot more on that).



    So, if you don't want Ctrl8 to delete a character, you may need to change:





    • the control code your terminal sends for the Backspace key. GNOME Terminal usually defaults to ^? (ASCII DEL), IIRC, so you need to set it to ^H. In GNOME Terminal, that's in Edit -> Profile Preferences -> Compatibility:



      enter image description here



      If your terminal doesn't have an option to configure this and sends ^? for Backspace, then the next two steps will break Backspace.




    • the control code that the pseudo-TTY uses for erase



      Check what it is now:



      $ stty -a | grep erase
      intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
      swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;


      If it's erase= ^?, you'll need to change that:



      stty erase '^H'



    • the control code that your shell uses for erasing the previous character. In bash, that defaults to both ^H and ^? if ^? is the erase character for the controlling TTY.



      Check what it is now:



      $ bind -p | grep backward-del
      "C-h": backward-delete-char
      "C-?": backward-delete-char


      Remove the C-? binding, and add a C-h binding if needed:



      bind -r 'C-?'
      bind 'C-h: backward-delete-char'


      Add these to your .bashrc to save these settings.






    Or you can change your IDE shortcut.






    share|improve this answer

























      up vote
      3
      down vote



      accepted










      Ctrl8 is not a shortcut in the usual sense. Many terminal emulators conventionally send ^? (aka Ctrl?) for Ctrl8 (see this U&L post for details). This is not usually configurable behaviour, short of modifying the source code.



      ^? is the control code for ASCII Del and ^H (aka CtrlH) for ASCII Backspace (see this informative post for a lot more on that).



      So, if you don't want Ctrl8 to delete a character, you may need to change:





      • the control code your terminal sends for the Backspace key. GNOME Terminal usually defaults to ^? (ASCII DEL), IIRC, so you need to set it to ^H. In GNOME Terminal, that's in Edit -> Profile Preferences -> Compatibility:



        enter image description here



        If your terminal doesn't have an option to configure this and sends ^? for Backspace, then the next two steps will break Backspace.




      • the control code that the pseudo-TTY uses for erase



        Check what it is now:



        $ stty -a | grep erase
        intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
        swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;


        If it's erase= ^?, you'll need to change that:



        stty erase '^H'



      • the control code that your shell uses for erasing the previous character. In bash, that defaults to both ^H and ^? if ^? is the erase character for the controlling TTY.



        Check what it is now:



        $ bind -p | grep backward-del
        "C-h": backward-delete-char
        "C-?": backward-delete-char


        Remove the C-? binding, and add a C-h binding if needed:



        bind -r 'C-?'
        bind 'C-h: backward-delete-char'


        Add these to your .bashrc to save these settings.






      Or you can change your IDE shortcut.






      share|improve this answer























        up vote
        3
        down vote



        accepted







        up vote
        3
        down vote



        accepted






        Ctrl8 is not a shortcut in the usual sense. Many terminal emulators conventionally send ^? (aka Ctrl?) for Ctrl8 (see this U&L post for details). This is not usually configurable behaviour, short of modifying the source code.



        ^? is the control code for ASCII Del and ^H (aka CtrlH) for ASCII Backspace (see this informative post for a lot more on that).



        So, if you don't want Ctrl8 to delete a character, you may need to change:





        • the control code your terminal sends for the Backspace key. GNOME Terminal usually defaults to ^? (ASCII DEL), IIRC, so you need to set it to ^H. In GNOME Terminal, that's in Edit -> Profile Preferences -> Compatibility:



          enter image description here



          If your terminal doesn't have an option to configure this and sends ^? for Backspace, then the next two steps will break Backspace.




        • the control code that the pseudo-TTY uses for erase



          Check what it is now:



          $ stty -a | grep erase
          intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
          swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;


          If it's erase= ^?, you'll need to change that:



          stty erase '^H'



        • the control code that your shell uses for erasing the previous character. In bash, that defaults to both ^H and ^? if ^? is the erase character for the controlling TTY.



          Check what it is now:



          $ bind -p | grep backward-del
          "C-h": backward-delete-char
          "C-?": backward-delete-char


          Remove the C-? binding, and add a C-h binding if needed:



          bind -r 'C-?'
          bind 'C-h: backward-delete-char'


          Add these to your .bashrc to save these settings.






        Or you can change your IDE shortcut.






        share|improve this answer












        Ctrl8 is not a shortcut in the usual sense. Many terminal emulators conventionally send ^? (aka Ctrl?) for Ctrl8 (see this U&L post for details). This is not usually configurable behaviour, short of modifying the source code.



        ^? is the control code for ASCII Del and ^H (aka CtrlH) for ASCII Backspace (see this informative post for a lot more on that).



        So, if you don't want Ctrl8 to delete a character, you may need to change:





        • the control code your terminal sends for the Backspace key. GNOME Terminal usually defaults to ^? (ASCII DEL), IIRC, so you need to set it to ^H. In GNOME Terminal, that's in Edit -> Profile Preferences -> Compatibility:



          enter image description here



          If your terminal doesn't have an option to configure this and sends ^? for Backspace, then the next two steps will break Backspace.




        • the control code that the pseudo-TTY uses for erase



          Check what it is now:



          $ stty -a | grep erase
          intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?;
          swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;


          If it's erase= ^?, you'll need to change that:



          stty erase '^H'



        • the control code that your shell uses for erasing the previous character. In bash, that defaults to both ^H and ^? if ^? is the erase character for the controlling TTY.



          Check what it is now:



          $ bind -p | grep backward-del
          "C-h": backward-delete-char
          "C-?": backward-delete-char


          Remove the C-? binding, and add a C-h binding if needed:



          bind -r 'C-?'
          bind 'C-h: backward-delete-char'


          Add these to your .bashrc to save these settings.






        Or you can change your IDE shortcut.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 at 7:27









        muru

        134k19283484




        134k19283484






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1092450%2fhow-to-unbind-a-shortcut-in-a-terminal%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

            How to make a Squid Proxy server?

            Is this a new Fibonacci Identity?

            19世紀