Loading ...
Sorry, an error occurred while loading the content.

Mapping Shift-space: how to tell if its possible?

Expand Messages
  • Britton Kerin
    I d like to map shift-space to or something. After a lot of googling I find several mentions that some setups are st vim differentiates
    Message 1 of 6 , Apr 28, 2010
    • 0 Attachment

      I'd like to map shift-space <S-Space> to <PageDown> or something.

      After a lot of googling I find several mentions that some setups are st
      vim differentiates between <Space> and <S-Space> and some not.
      It seems not for me since :<C-v><S-Space> outputs only a space.

      I didn't find any mention what in the setup makes the difference?
      I'm using gvim not console.

      I tried setting gnome configuration option Keyboard Preferences->Keyboard Layout Options->Using space key to input non-breakable space character->Space key outputs non-breakable space character at second level in the hope that this would generated a different characters that vim could detect.  But if it does, it isn't <S-Space> apparently.  And that solution seems undesirable for other reasons, since I don't ever really want unbreakable spaces creeping in.

      Advice?

      Thanks,
      Britton

      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • John Beckett
      ... In insert mode in gvim, press Ctrl-K then Shift-Space. On my system, it shows indicating that it knows what the key was. ... Then, in normal
      Message 2 of 6 , Apr 28, 2010
      • 0 Attachment
        Britton Kerin wrote:
        > I'd like to map shift-space <S-Space> to <PageDown> or something.
        >
        > After a lot of googling I find several mentions that some
        > setups are st vim differentiates between <Space> and
        > <S-Space> and some not.
        > It seems not for me since :<C-v><S-Space> outputs only a space.
        >
        > I didn't find any mention what in the setup makes the difference?
        > I'm using gvim not console.

        In insert mode in gvim, press Ctrl-K then Shift-Space. On my
        system, it shows <S-Space> indicating that it knows what the key
        was.

        Try entering this test:

        :map <S-Space> :echo 'You pressed Shift-Space'<CR>

        Then, in normal mode, press Shift-Space.

        John

        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      • Britton Kerin
        ... Both these tests seem to indicate that my machine doesn t see Shift-Space. Any idea why some systems do this and some not, or what I might do to fix this
        Message 3 of 6 , Apr 29, 2010
        • 0 Attachment
          On Wed, Apr 28, 2010 at 7:55 PM, John Beckett <johnb.beckett@...> wrote:
          Britton Kerin wrote:
          > I'd like to map shift-space <S-Space> to <PageDown> or something.
          >
          > After a lot of googling I find several mentions that some
          > setups are st vim differentiates between <Space> and
          > <S-Space> and some not.
          > It seems not for me since :<C-v><S-Space> outputs only a space.
          >
          > I didn't find any mention what in the setup makes the difference?
          > I'm using gvim not console.

          In insert mode in gvim, press Ctrl-K then Shift-Space. On my
          system, it shows <S-Space> indicating that it knows what the key
          was.

          Try entering this test:

             :map <S-Space> :echo 'You pressed Shift-Space'<CR>

          Then, in normal mode, press Shift-Space.

          Both these tests seem to indicate that my machine doesn't see Shift-Space.
          Any idea why some systems  do this and some not, or what I might do to
          fix this problem?

          Britton
           

          --
          You received this message from the "vim_use" maillist.
          Do not top-post! Type your reply below the text you are replying to.
          For more information, visit http://www.vim.org/maillist.php
        • John Little
          ... We d need to know which version, OS, and maybe which gui you are using; the first four lines output by :version would be a start. My gvim (7.2.411, Linux,
          Message 4 of 6 , Apr 29, 2010
          • 0 Attachment
            > Both these tests seem to indicate that my machine doesn't see Shift-Space.
            > Any idea why some systems  do this and some not, or what I might do to
            > fix this problem?

            We'd need to know which version, OS, and maybe which gui you are
            using; the first four lines output by :version would be a start. My
            gvim (7.2.411, Linux, GTK2 gui) sees Shift-space.

            Regards, John

            --
            You received this message from the "vim_use" maillist.
            Do not top-post! Type your reply below the text you are replying to.
            For more information, visit http://www.vim.org/maillist.php
          • Tony Mechelynck
            ... Gvim usually knows keys and keychords for what they are. In particular, it usually recognizes Shift-Space as different from Space. However, gvim is still
            Message 5 of 6 , Apr 29, 2010
            • 0 Attachment
              On 29/04/10 20:23, Britton Kerin wrote:
              >
              >
              > On Wed, Apr 28, 2010 at 7:55 PM, John Beckett <johnb.beckett@...
              > <mailto:johnb.beckett@...>> wrote:
              >
              > Britton Kerin wrote:
              > > I'd like to map shift-space <S-Space> to <PageDown> or something.
              > >
              > > After a lot of googling I find several mentions that some
              > > setups are st vim differentiates between <Space> and
              > > <S-Space> and some not.
              > > It seems not for me since :<C-v><S-Space> outputs only a space.
              > >
              > > I didn't find any mention what in the setup makes the difference?
              > > I'm using gvim not console.
              >
              > In insert mode in gvim, press Ctrl-K then Shift-Space. On my
              > system, it shows <S-Space> indicating that it knows what the key
              > was.
              >
              > Try entering this test:
              >
              > :map <S-Space> :echo 'You pressed Shift-Space'<CR>
              >
              > Then, in normal mode, press Shift-Space.
              >
              >
              > Both these tests seem to indicate that my machine doesn't see Shift-Space.
              > Any idea why some systems do this and some not, or what I might do to
              > fix this problem?
              >
              > Britton
              >
              > --
              > You received this message from the "vim_use" maillist.
              > Do not top-post! Type your reply below the text you are replying to.
              > For more information, visit http://www.vim.org/maillist.php

              Gvim usually knows keys and keychords for what they are. In particular,
              it usually recognizes Shift-Space as different from Space. However, gvim
              is still somewhat dependent on whatever the Windows / X11 / Mac keyboard
              driver is doing to the key events. It may be an advantage to run in a
              Unicode "system locale" if you can (gvim with GTK2 GUI always does it;
              I've heard conflicting reports about gvim for Windows).

              When Vim is run in a terminal (i.e., in console mode), it's at the mercy
              of the terminal's keyboard logic. Some keys or key combos will not be
              passed at all. Others will be "translated" according to the current
              locale. For some keys, Shift and/or Ctrl and/or Alt may get lost,
              jointly or severally. And so on.

              IMHO, the easiest way to fix that kind of problem is to run gvim;
              however, if your usual terminal is mlterm, the disadvantage is that you
              lose the true-bidi capabilities (which mlterm has, and Vim knows it, but
              gvim doesn't have).


              Best regards,
              Tony.
              --
              Stult's Report:
              Our problems are mostly behind us. What we have to do now is
              fight the solutions.

              --
              You received this message from the "vim_use" maillist.
              Do not top-post! Type your reply below the text you are replying to.
              For more information, visit http://www.vim.org/maillist.php
            • Britton Kerin
              I assumed 7.2 but I guess this debian is still on 7.1. 7.2 works fine, thanks. Britton ... -- You received this message from the vim_use maillist. Do not
              Message 6 of 6 , May 1 10:36 PM
              • 0 Attachment
                I assumed 7.2 but I guess this debian is still on 7.1.  7.2 works fine, thanks.

                Britton

                On Thu, Apr 29, 2010 at 6:41 PM, John Little <john.b.little@...> wrote:

                > Both these tests seem to indicate that my machine doesn't see Shift-Space.
                > Any idea why some systems  do this and some not, or what I might do to
                > fix this problem?

                We'd need to know which version, OS, and maybe which gui you are
                using; the first four lines output by :version would be a start.  My
                gvim (7.2.411, Linux, GTK2 gui) sees Shift-space.

                Regards, John

                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php

                --
                You received this message from the "vim_use" maillist.
                Do not top-post! Type your reply below the text you are replying to.
                For more information, visit http://www.vim.org/maillist.php
              Your message has been successfully submitted and would be delivered to recipients shortly.