xdotool - how do I select text using shift+Home or shift+End?











up vote
0
down vote

favorite












I'm trying to get text selection working the way I want on my laptop using Ubuntu 16.04. I don't have home/end keys on my laptop, so I installed xdotool and using the keyboard settings I mapped Super+left to xdotool getactivewindow key Home and Super+right to xdotool getactivewindow key End.



This is working as expected. However, I'd also like to have Shift+Super+Left select text from my cursor to the beginning of the line, and similarly Shift+Super+Right select to the end of the line. I tried mapping these combinations to xdotool using xdotool getactivewindow key shift+Home but this doesn't seem to work.



I've also tried running sleep 4 && xdotool key shift+Home in a terminal and then switching to my text editor, and it seems like only the Home key is firing - no text is selected. So it seems like a xdotool problem and not my keyboard. Does anyone know the proper key combination for xdotool to select text to the beginning/end of a line?



Update:



Runningsleep 4 && xdotool key Shift+Home with a capital S for shift works. Text is highlighted in my text editor from my cursor to the beginning of the line. However, it's still not working as a shortcut even with a capital S. So now I'm thinking there is something else wrong with the way I'm inputting the xdotool command into Ubuntu's keyboard settings.










share|improve this question
























  • If I understand correctly, you want to select the line? Is a triple-click an option?
    – Jacob Vlijm
    Dec 22 '16 at 15:42










  • Here goes a resource for you cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
    – Arijit Chatterjee
    Dec 22 '16 at 15:45










  • In my experience, Xdotool is not good for complex keyboard shortcuts.
    – wjandrea
    Dec 22 '16 at 18:03












  • @wjandrea are there better options for what I'm trying to do?
    – greenerr
    Dec 22 '16 at 18:13










  • @wjandrea nevermind, I installed Autokey and managed to get it working using that.
    – greenerr
    Dec 22 '16 at 19:10















up vote
0
down vote

favorite












I'm trying to get text selection working the way I want on my laptop using Ubuntu 16.04. I don't have home/end keys on my laptop, so I installed xdotool and using the keyboard settings I mapped Super+left to xdotool getactivewindow key Home and Super+right to xdotool getactivewindow key End.



This is working as expected. However, I'd also like to have Shift+Super+Left select text from my cursor to the beginning of the line, and similarly Shift+Super+Right select to the end of the line. I tried mapping these combinations to xdotool using xdotool getactivewindow key shift+Home but this doesn't seem to work.



I've also tried running sleep 4 && xdotool key shift+Home in a terminal and then switching to my text editor, and it seems like only the Home key is firing - no text is selected. So it seems like a xdotool problem and not my keyboard. Does anyone know the proper key combination for xdotool to select text to the beginning/end of a line?



Update:



Runningsleep 4 && xdotool key Shift+Home with a capital S for shift works. Text is highlighted in my text editor from my cursor to the beginning of the line. However, it's still not working as a shortcut even with a capital S. So now I'm thinking there is something else wrong with the way I'm inputting the xdotool command into Ubuntu's keyboard settings.










share|improve this question
























  • If I understand correctly, you want to select the line? Is a triple-click an option?
    – Jacob Vlijm
    Dec 22 '16 at 15:42










  • Here goes a resource for you cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
    – Arijit Chatterjee
    Dec 22 '16 at 15:45










  • In my experience, Xdotool is not good for complex keyboard shortcuts.
    – wjandrea
    Dec 22 '16 at 18:03












  • @wjandrea are there better options for what I'm trying to do?
    – greenerr
    Dec 22 '16 at 18:13










  • @wjandrea nevermind, I installed Autokey and managed to get it working using that.
    – greenerr
    Dec 22 '16 at 19:10













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to get text selection working the way I want on my laptop using Ubuntu 16.04. I don't have home/end keys on my laptop, so I installed xdotool and using the keyboard settings I mapped Super+left to xdotool getactivewindow key Home and Super+right to xdotool getactivewindow key End.



This is working as expected. However, I'd also like to have Shift+Super+Left select text from my cursor to the beginning of the line, and similarly Shift+Super+Right select to the end of the line. I tried mapping these combinations to xdotool using xdotool getactivewindow key shift+Home but this doesn't seem to work.



I've also tried running sleep 4 && xdotool key shift+Home in a terminal and then switching to my text editor, and it seems like only the Home key is firing - no text is selected. So it seems like a xdotool problem and not my keyboard. Does anyone know the proper key combination for xdotool to select text to the beginning/end of a line?



Update:



Runningsleep 4 && xdotool key Shift+Home with a capital S for shift works. Text is highlighted in my text editor from my cursor to the beginning of the line. However, it's still not working as a shortcut even with a capital S. So now I'm thinking there is something else wrong with the way I'm inputting the xdotool command into Ubuntu's keyboard settings.










share|improve this question















I'm trying to get text selection working the way I want on my laptop using Ubuntu 16.04. I don't have home/end keys on my laptop, so I installed xdotool and using the keyboard settings I mapped Super+left to xdotool getactivewindow key Home and Super+right to xdotool getactivewindow key End.



This is working as expected. However, I'd also like to have Shift+Super+Left select text from my cursor to the beginning of the line, and similarly Shift+Super+Right select to the end of the line. I tried mapping these combinations to xdotool using xdotool getactivewindow key shift+Home but this doesn't seem to work.



I've also tried running sleep 4 && xdotool key shift+Home in a terminal and then switching to my text editor, and it seems like only the Home key is firing - no text is selected. So it seems like a xdotool problem and not my keyboard. Does anyone know the proper key combination for xdotool to select text to the beginning/end of a line?



Update:



Runningsleep 4 && xdotool key Shift+Home with a capital S for shift works. Text is highlighted in my text editor from my cursor to the beginning of the line. However, it's still not working as a shortcut even with a capital S. So now I'm thinking there is something else wrong with the way I'm inputting the xdotool command into Ubuntu's keyboard settings.







keyboard shortcut-keys xdotool






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 22 '16 at 18:18

























asked Dec 22 '16 at 15:39









greenerr

63




63












  • If I understand correctly, you want to select the line? Is a triple-click an option?
    – Jacob Vlijm
    Dec 22 '16 at 15:42










  • Here goes a resource for you cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
    – Arijit Chatterjee
    Dec 22 '16 at 15:45










  • In my experience, Xdotool is not good for complex keyboard shortcuts.
    – wjandrea
    Dec 22 '16 at 18:03












  • @wjandrea are there better options for what I'm trying to do?
    – greenerr
    Dec 22 '16 at 18:13










  • @wjandrea nevermind, I installed Autokey and managed to get it working using that.
    – greenerr
    Dec 22 '16 at 19:10


















  • If I understand correctly, you want to select the line? Is a triple-click an option?
    – Jacob Vlijm
    Dec 22 '16 at 15:42










  • Here goes a resource for you cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
    – Arijit Chatterjee
    Dec 22 '16 at 15:45










  • In my experience, Xdotool is not good for complex keyboard shortcuts.
    – wjandrea
    Dec 22 '16 at 18:03












  • @wjandrea are there better options for what I'm trying to do?
    – greenerr
    Dec 22 '16 at 18:13










  • @wjandrea nevermind, I installed Autokey and managed to get it working using that.
    – greenerr
    Dec 22 '16 at 19:10
















If I understand correctly, you want to select the line? Is a triple-click an option?
– Jacob Vlijm
Dec 22 '16 at 15:42




If I understand correctly, you want to select the line? Is a triple-click an option?
– Jacob Vlijm
Dec 22 '16 at 15:42












Here goes a resource for you cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
– Arijit Chatterjee
Dec 22 '16 at 15:45




Here goes a resource for you cgit.freedesktop.org/xorg/proto/x11proto/plain/keysymdef.h
– Arijit Chatterjee
Dec 22 '16 at 15:45












In my experience, Xdotool is not good for complex keyboard shortcuts.
– wjandrea
Dec 22 '16 at 18:03






In my experience, Xdotool is not good for complex keyboard shortcuts.
– wjandrea
Dec 22 '16 at 18:03














@wjandrea are there better options for what I'm trying to do?
– greenerr
Dec 22 '16 at 18:13




@wjandrea are there better options for what I'm trying to do?
– greenerr
Dec 22 '16 at 18:13












@wjandrea nevermind, I installed Autokey and managed to get it working using that.
– greenerr
Dec 22 '16 at 19:10




@wjandrea nevermind, I installed Autokey and managed to get it working using that.
– greenerr
Dec 22 '16 at 19:10










2 Answers
2






active

oldest

votes

















up vote
0
down vote













I couldn't get this working with xdotool, I ended up installing Autokey. I got it to work by creating a phrase with the following command: <shift>+<home> and mapping to the hotkey I wanted. I made a similar one for <shift>+<end>.






share|improve this answer





















  • +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
    – dgonzalez
    Dec 23 '16 at 4:32




















up vote
0
down vote













In order to bind Shift+Home/End together with xdotool, please use:



xdotool key --window '$(xdotool getactivewindow)' Shift+Home

xdotool key --window '$(xdotool getactivewindow)' Shift+End


Then, you can customize your shortcut by Shift+Alt+Right Arrow and Shift+Alt+Left Arrow.






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%2f863537%2fxdotool-how-do-i-select-text-using-shifthome-or-shiftend%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








    up vote
    0
    down vote













    I couldn't get this working with xdotool, I ended up installing Autokey. I got it to work by creating a phrase with the following command: <shift>+<home> and mapping to the hotkey I wanted. I made a similar one for <shift>+<end>.






    share|improve this answer





















    • +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
      – dgonzalez
      Dec 23 '16 at 4:32

















    up vote
    0
    down vote













    I couldn't get this working with xdotool, I ended up installing Autokey. I got it to work by creating a phrase with the following command: <shift>+<home> and mapping to the hotkey I wanted. I made a similar one for <shift>+<end>.






    share|improve this answer





















    • +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
      – dgonzalez
      Dec 23 '16 at 4:32















    up vote
    0
    down vote










    up vote
    0
    down vote









    I couldn't get this working with xdotool, I ended up installing Autokey. I got it to work by creating a phrase with the following command: <shift>+<home> and mapping to the hotkey I wanted. I made a similar one for <shift>+<end>.






    share|improve this answer












    I couldn't get this working with xdotool, I ended up installing Autokey. I got it to work by creating a phrase with the following command: <shift>+<home> and mapping to the hotkey I wanted. I made a similar one for <shift>+<end>.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Dec 22 '16 at 19:07









    greenerr

    63




    63












    • +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
      – dgonzalez
      Dec 23 '16 at 4:32




















    • +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
      – dgonzalez
      Dec 23 '16 at 4:32


















    +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
    – dgonzalez
    Dec 23 '16 at 4:32






    +1 to autokey, maybe not the best/exact answer to original question... but i can't live without it!
    – dgonzalez
    Dec 23 '16 at 4:32














    up vote
    0
    down vote













    In order to bind Shift+Home/End together with xdotool, please use:



    xdotool key --window '$(xdotool getactivewindow)' Shift+Home

    xdotool key --window '$(xdotool getactivewindow)' Shift+End


    Then, you can customize your shortcut by Shift+Alt+Right Arrow and Shift+Alt+Left Arrow.






    share|improve this answer

























      up vote
      0
      down vote













      In order to bind Shift+Home/End together with xdotool, please use:



      xdotool key --window '$(xdotool getactivewindow)' Shift+Home

      xdotool key --window '$(xdotool getactivewindow)' Shift+End


      Then, you can customize your shortcut by Shift+Alt+Right Arrow and Shift+Alt+Left Arrow.






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        In order to bind Shift+Home/End together with xdotool, please use:



        xdotool key --window '$(xdotool getactivewindow)' Shift+Home

        xdotool key --window '$(xdotool getactivewindow)' Shift+End


        Then, you can customize your shortcut by Shift+Alt+Right Arrow and Shift+Alt+Left Arrow.






        share|improve this answer












        In order to bind Shift+Home/End together with xdotool, please use:



        xdotool key --window '$(xdotool getactivewindow)' Shift+Home

        xdotool key --window '$(xdotool getactivewindow)' Shift+End


        Then, you can customize your shortcut by Shift+Alt+Right Arrow and Shift+Alt+Left Arrow.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 5 at 18:06









        Gnawnuhs

        1




        1






























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f863537%2fxdotool-how-do-i-select-text-using-shifthome-or-shiftend%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

            Mouse cursor on multiple screens with different PPI

            Agildo Ribeiro

            Sometime when accessing a menu: “Ubuntu 16.04 has experienced an internal error”