Why does Shift-right says it is bound to right?How to type Org Mode's `M-` bindings in Emacs for Mac?Global Unset Key: BackspaceHow to avoid typing “space” after “^” for moving up in directory in dired?Unset key “C-;” in Aquamacs, bound to toggle-mac-option-modifierWeird keyboard behaviour by Emacs in a terminalChange key for f90-start-abbrevHow to assign TAB to indentation and to yasnippet expand keyOrg-mode completion: remapping `M-TAB`cannot rebind M-pWhy do local-set-key and local-unset-key not work interactively?

Approximating an expression for a potential

Why wasn't interlaced CRT scanning done back and forth?

Went to a big 4 but got fired for underperformance in a year recently - Now every one thinks I'm pro - How to balance expectations?

How does Rust's 128-bit integer `i128` work on a 64-bit system?

Accurately recalling the key - can everyone do it?

Astable 555 circuit not oscillating

Why do my fried eggs start browning very fast?

Does proof-of-work contribute directly to prevent double-spending?

Is the first page of Novel really that important?

How were x-ray diffraction patterns deciphered before computers?

Is an "are" omitted in this sentence

Search and replace a substring only if another substring is not present

What does "autolyco-sentimental" mean?

Why have both: BJT and FET transistors on IC output?

A verb for when some rights are not violated?

How to call made-up data?

On the expression "sun-down"

Subverting the essence of fictional and/or religious entities; is it acceptable?

Is law enforcement responsible for damages made by a search warrant?

What is a summary of basic Jewish metaphysics or theology?

A criterion for finite abelian group to embed into a symmetric group

Lower bound for the number of lattice points on high dimensional spheres

Export economy of Mars

Does a bard know when a character uses their Bardic Inspiration?



Why does Shift-right says it is bound to right?


How to type Org Mode's `M-` bindings in Emacs for Mac?Global Unset Key: BackspaceHow to avoid typing “space” after “^” for moving up in directory in dired?Unset key “C-;” in Aquamacs, bound to toggle-mac-option-modifierWeird keyboard behaviour by Emacs in a terminalChange key for f90-start-abbrevHow to assign TAB to indentation and to yasnippet expand keyOrg-mode completion: remapping `M-TAB`cannot rebind M-pWhy do local-set-key and local-unset-key not work interactively?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I tried to check what function shift-right is bound to which extends the region right by a character by default. But C-h k says:



<right> (translated from <S-right>) runs the command right-char (found
in global-map), which is an interactive compiled Lisp function in
‘bindings.el’.


If S-right does something else than simple right then why does it say it is bound to right?










share|improve this question
























  • See also stackoverflow.com/a/54591047/324105

    – phils
    1 hour ago

















2















I tried to check what function shift-right is bound to which extends the region right by a character by default. But C-h k says:



<right> (translated from <S-right>) runs the command right-char (found
in global-map), which is an interactive compiled Lisp function in
‘bindings.el’.


If S-right does something else than simple right then why does it say it is bound to right?










share|improve this question
























  • See also stackoverflow.com/a/54591047/324105

    – phils
    1 hour ago













2












2








2








I tried to check what function shift-right is bound to which extends the region right by a character by default. But C-h k says:



<right> (translated from <S-right>) runs the command right-char (found
in global-map), which is an interactive compiled Lisp function in
‘bindings.el’.


If S-right does something else than simple right then why does it say it is bound to right?










share|improve this question














I tried to check what function shift-right is bound to which extends the region right by a character by default. But C-h k says:



<right> (translated from <S-right>) runs the command right-char (found
in global-map), which is an interactive compiled Lisp function in
‘bindings.el’.


If S-right does something else than simple right then why does it say it is bound to right?







key-bindings






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 8 hours ago









TomTom

3842 silver badges9 bronze badges




3842 silver badges9 bronze badges















  • See also stackoverflow.com/a/54591047/324105

    – phils
    1 hour ago

















  • See also stackoverflow.com/a/54591047/324105

    – phils
    1 hour ago
















See also stackoverflow.com/a/54591047/324105

– phils
1 hour ago





See also stackoverflow.com/a/54591047/324105

– phils
1 hour ago










2 Answers
2






active

oldest

votes


















1














Taken from this emacs wiki page:




Emacs is set up so that the keys, particularly all the control-, meta-, alt- keybindings keep working if you inadvertantly leave the shift-lock key on. So it assumes that you were looking for the unshifted one if this is the only keybinding defined on that key. Hence it sees the shifted function key, checks to see if the shifted function key has been bound to a function and if it doesn’t find a keybinding, checks to see if there is anything bound to the unshifted key. If it finds a binding, it gives you that one instead of the one you asked for.







share|improve this answer

























  • So how to find out what function S-right runs which does something else than simple right?

    – Tom
    7 hours ago











  • If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

    – Hubisan
    7 hours ago











  • But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

    – Tom
    7 hours ago







  • 1





    The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

    – lawlist
    7 hours ago



















1














If an input event is not bound and contains the Shift modifier or is an uppercase character, Emacs converts it to the corresponding unshifted or lowercase event. This is discreetly documented in the Emacs Lisp manual under read-key-sequence. Unlike what the docstring of read-key-sequence says, this isn't limited to the first event in a sequence: if KEY1 is bound to a keymap (so it's a prefix key) but S-KEY1 is not bound, pressing S-KEY1 KEY2 results in an event for KEY1 KEY2. However, if S-KEY1 is a prefix key, S-KEY1 KEY2 remains unchanged even if S-KEY1 KEY2 is not bound, regardless of what KEY1 KEY2 might be bound to.



Commands can find out whether such a translation happened by checking the variable this-command-keys-shift-translated. Few commands do. The only ones I can think of are the cursor motion commands that select text when Shift is pressed, like right-char. This mechanism is handled by handle-shift-selection which is triggered for every command that has ^ in its interactive specification.






share|improve this answer



























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "583"
    ;
    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: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2femacs.stackexchange.com%2fquestions%2f51995%2fwhy-does-shift-right-says-it-is-bound-to-right%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









    1














    Taken from this emacs wiki page:




    Emacs is set up so that the keys, particularly all the control-, meta-, alt- keybindings keep working if you inadvertantly leave the shift-lock key on. So it assumes that you were looking for the unshifted one if this is the only keybinding defined on that key. Hence it sees the shifted function key, checks to see if the shifted function key has been bound to a function and if it doesn’t find a keybinding, checks to see if there is anything bound to the unshifted key. If it finds a binding, it gives you that one instead of the one you asked for.







    share|improve this answer

























    • So how to find out what function S-right runs which does something else than simple right?

      – Tom
      7 hours ago











    • If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

      – Hubisan
      7 hours ago











    • But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

      – Tom
      7 hours ago







    • 1





      The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

      – lawlist
      7 hours ago
















    1














    Taken from this emacs wiki page:




    Emacs is set up so that the keys, particularly all the control-, meta-, alt- keybindings keep working if you inadvertantly leave the shift-lock key on. So it assumes that you were looking for the unshifted one if this is the only keybinding defined on that key. Hence it sees the shifted function key, checks to see if the shifted function key has been bound to a function and if it doesn’t find a keybinding, checks to see if there is anything bound to the unshifted key. If it finds a binding, it gives you that one instead of the one you asked for.







    share|improve this answer

























    • So how to find out what function S-right runs which does something else than simple right?

      – Tom
      7 hours ago











    • If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

      – Hubisan
      7 hours ago











    • But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

      – Tom
      7 hours ago







    • 1





      The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

      – lawlist
      7 hours ago














    1












    1








    1







    Taken from this emacs wiki page:




    Emacs is set up so that the keys, particularly all the control-, meta-, alt- keybindings keep working if you inadvertantly leave the shift-lock key on. So it assumes that you were looking for the unshifted one if this is the only keybinding defined on that key. Hence it sees the shifted function key, checks to see if the shifted function key has been bound to a function and if it doesn’t find a keybinding, checks to see if there is anything bound to the unshifted key. If it finds a binding, it gives you that one instead of the one you asked for.







    share|improve this answer













    Taken from this emacs wiki page:




    Emacs is set up so that the keys, particularly all the control-, meta-, alt- keybindings keep working if you inadvertantly leave the shift-lock key on. So it assumes that you were looking for the unshifted one if this is the only keybinding defined on that key. Hence it sees the shifted function key, checks to see if the shifted function key has been bound to a function and if it doesn’t find a keybinding, checks to see if there is anything bound to the unshifted key. If it finds a binding, it gives you that one instead of the one you asked for.








    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered 8 hours ago









    HubisanHubisan

    4032 silver badges6 bronze badges




    4032 silver badges6 bronze badges















    • So how to find out what function S-right runs which does something else than simple right?

      – Tom
      7 hours ago











    • If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

      – Hubisan
      7 hours ago











    • But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

      – Tom
      7 hours ago







    • 1





      The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

      – lawlist
      7 hours ago


















    • So how to find out what function S-right runs which does something else than simple right?

      – Tom
      7 hours ago











    • If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

      – Hubisan
      7 hours ago











    • But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

      – Tom
      7 hours ago







    • 1





      The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

      – lawlist
      7 hours ago

















    So how to find out what function S-right runs which does something else than simple right?

    – Tom
    7 hours ago





    So how to find out what function S-right runs which does something else than simple right?

    – Tom
    7 hours ago













    If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

    – Hubisan
    7 hours ago





    If there is something bound to it, it will show it. In your case there isn't so it gets translated to right. Execute (global-set-key [(shift f1)] 'info) and check again.

    – Hubisan
    7 hours ago













    But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

    – Tom
    7 hours ago






    But you surely realise that S-right does more, it extends the selection even in default emacs 26.2 with -q. So it's not just for me. So the question is what function in emacs performs the shift detection part in this case?

    – Tom
    7 hours ago





    1




    1





    The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

    – lawlist
    7 hours ago






    The intereactive code ^ in the interactive statement of a function is what tells Emacs to do something different if the shift key is depressed; e.g., (interactive "^p") used by right-char and left-char. See the interactive codes section of the Emacs manual for more information: gnu.org/software/emacs/manual/html_node/elisp/… If we were to remove the ^ from the interactive statement in left-char and/or right-char, then the shift (if depressed) would have no effect.

    – lawlist
    7 hours ago














    1














    If an input event is not bound and contains the Shift modifier or is an uppercase character, Emacs converts it to the corresponding unshifted or lowercase event. This is discreetly documented in the Emacs Lisp manual under read-key-sequence. Unlike what the docstring of read-key-sequence says, this isn't limited to the first event in a sequence: if KEY1 is bound to a keymap (so it's a prefix key) but S-KEY1 is not bound, pressing S-KEY1 KEY2 results in an event for KEY1 KEY2. However, if S-KEY1 is a prefix key, S-KEY1 KEY2 remains unchanged even if S-KEY1 KEY2 is not bound, regardless of what KEY1 KEY2 might be bound to.



    Commands can find out whether such a translation happened by checking the variable this-command-keys-shift-translated. Few commands do. The only ones I can think of are the cursor motion commands that select text when Shift is pressed, like right-char. This mechanism is handled by handle-shift-selection which is triggered for every command that has ^ in its interactive specification.






    share|improve this answer





























      1














      If an input event is not bound and contains the Shift modifier or is an uppercase character, Emacs converts it to the corresponding unshifted or lowercase event. This is discreetly documented in the Emacs Lisp manual under read-key-sequence. Unlike what the docstring of read-key-sequence says, this isn't limited to the first event in a sequence: if KEY1 is bound to a keymap (so it's a prefix key) but S-KEY1 is not bound, pressing S-KEY1 KEY2 results in an event for KEY1 KEY2. However, if S-KEY1 is a prefix key, S-KEY1 KEY2 remains unchanged even if S-KEY1 KEY2 is not bound, regardless of what KEY1 KEY2 might be bound to.



      Commands can find out whether such a translation happened by checking the variable this-command-keys-shift-translated. Few commands do. The only ones I can think of are the cursor motion commands that select text when Shift is pressed, like right-char. This mechanism is handled by handle-shift-selection which is triggered for every command that has ^ in its interactive specification.






      share|improve this answer



























        1












        1








        1







        If an input event is not bound and contains the Shift modifier or is an uppercase character, Emacs converts it to the corresponding unshifted or lowercase event. This is discreetly documented in the Emacs Lisp manual under read-key-sequence. Unlike what the docstring of read-key-sequence says, this isn't limited to the first event in a sequence: if KEY1 is bound to a keymap (so it's a prefix key) but S-KEY1 is not bound, pressing S-KEY1 KEY2 results in an event for KEY1 KEY2. However, if S-KEY1 is a prefix key, S-KEY1 KEY2 remains unchanged even if S-KEY1 KEY2 is not bound, regardless of what KEY1 KEY2 might be bound to.



        Commands can find out whether such a translation happened by checking the variable this-command-keys-shift-translated. Few commands do. The only ones I can think of are the cursor motion commands that select text when Shift is pressed, like right-char. This mechanism is handled by handle-shift-selection which is triggered for every command that has ^ in its interactive specification.






        share|improve this answer













        If an input event is not bound and contains the Shift modifier or is an uppercase character, Emacs converts it to the corresponding unshifted or lowercase event. This is discreetly documented in the Emacs Lisp manual under read-key-sequence. Unlike what the docstring of read-key-sequence says, this isn't limited to the first event in a sequence: if KEY1 is bound to a keymap (so it's a prefix key) but S-KEY1 is not bound, pressing S-KEY1 KEY2 results in an event for KEY1 KEY2. However, if S-KEY1 is a prefix key, S-KEY1 KEY2 remains unchanged even if S-KEY1 KEY2 is not bound, regardless of what KEY1 KEY2 might be bound to.



        Commands can find out whether such a translation happened by checking the variable this-command-keys-shift-translated. Few commands do. The only ones I can think of are the cursor motion commands that select text when Shift is pressed, like right-char. This mechanism is handled by handle-shift-selection which is triggered for every command that has ^ in its interactive specification.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        GillesGilles

        14.1k4 gold badges37 silver badges76 bronze badges




        14.1k4 gold badges37 silver badges76 bronze badges






























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Emacs Stack Exchange!


            • 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%2femacs.stackexchange.com%2fquestions%2f51995%2fwhy-does-shift-right-says-it-is-bound-to-right%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

            Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

            Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

            François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480