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

caps lock

Expand Messages
  • Rimon Barr
    Hi, I was using Vim, hit the Caps Lock by accident, and that actually (believe, it or not!) got me thinking... Wouldn t it be nice if VIM could have an option
    Message 1 of 12 , Aug 1, 2002
    • 0 Attachment
      Hi,

      I was using Vim, hit the Caps Lock by accident, and that actually
      (believe, it or not!) got me thinking... Wouldn't it be nice if VIM could
      have an option to ignore Caps Lock in the normal, visual and
      operator-pending modes, but not in Command-line and Insert modes? It seems
      like the right thing to do. Caps Lock, in essence, was designed to affect
      typing, not commands. And, it is possible (in GUI mode, at least) to
      detect whether Caps Lock is down, and shift/unShift as necessary.
      Currently, Vim becomes all but unusable in non-Insert with Caps Lock down.
      It's a small thing, but VIM is vi **improved**. Opinions?

      All the best,
      Rimon.
    • Tim Hammerquist
      ... Back when I used my standard PC keyboard, I used xmodmap on my linux box to remap to . Now my key is in the place of , and I use
      Message 2 of 12 , Aug 1, 2002
      • 0 Attachment
        Rimon Barr wrote:
        > I was using Vim, hit the Caps Lock by accident, and that actually
        > (believe, it or not!) got me thinking... Wouldn't it be nice if VIM
        > could have an option to ignore Caps Lock in the normal, visual and
        > operator-pending modes, but not in Command-line and Insert modes? It
        > seems like the right thing to do. Caps Lock, in essence, was designed
        > to affect typing, not commands. And, it is possible (in GUI mode, at
        > least) to detect whether Caps Lock is down, and shift/unShift as
        > necessary. Currently, Vim becomes all but unusable in non-Insert with
        > Caps Lock down. It's a small thing, but VIM is vi **improved**.
        > Opinions?

        Back when I used my standard PC keyboard, I used xmodmap on my linux box
        to remap <Caps> to <Esc>. Now my <Ctrl> key is in the place of <Caps>,
        and I use <Ctrl-[> to simulate the <Esc>.

        ...

        Of course, I never use the <Caps>, even when typing text. YMMV.

        Cheers,
        Tim
        --
        His ignorance is painful.
        -- Cell, Dragonball Z
      • Antoine J. Mechelynck
        AFAIK, the CapsLock key affects how your OS s keyboard driver interprets the keys you type, it is outside the range of Vim -- so you re out of luck. Tony ...
        Message 3 of 12 , Aug 1, 2002
        • 0 Attachment
          AFAIK, the CapsLock key affects how your OS's keyboard driver interprets the
          keys you type, it is outside the range of Vim -- so you're out of luck.

          Tony
          ----- Original Message -----
          From: "Rimon Barr" <barr@...>
          To: <vim@...>
          Sent: Friday, August 02, 2002 3:11 AM
          Subject: caps lock


          >
          > Hi,
          >
          > I was using Vim, hit the Caps Lock by accident, and that actually
          > (believe, it or not!) got me thinking... Wouldn't it be nice if VIM could
          > have an option to ignore Caps Lock in the normal, visual and
          > operator-pending modes, but not in Command-line and Insert modes? It seems
          > like the right thing to do. Caps Lock, in essence, was designed to affect
          > typing, not commands. And, it is possible (in GUI mode, at least) to
          > detect whether Caps Lock is down, and shift/unShift as necessary.
          > Currently, Vim becomes all but unusable in non-Insert with Caps Lock down.
          > It's a small thing, but VIM is vi **improved**. Opinions?
          >
          > All the best,
          > Rimon.
          >
          >
          >
        • Anthony Campbell
          ... This is a recurrent question on the list. I hate Caps Lock but don t find it useful to reassign it either to Esc or Ctrl as commonly suggested. I prefer to
          Message 4 of 12 , Aug 2, 2002
          • 0 Attachment
            On 01 Aug 2002, Tim Hammerquist wrote:
            > Rimon Barr wrote:
            > > I was using Vim, hit the Caps Lock by accident, and that actually
            > > (believe, it or not!) got me thinking... Wouldn't it be nice if VIM
            > > could have an option to ignore Caps Lock in the normal, visual and
            > > operator-pending modes, but not in Command-line and Insert modes? It
            > > seems like the right thing to do. Caps Lock, in essence, was designed
            > > to affect typing, not commands. And, it is possible (in GUI mode, at
            > > least) to detect whether Caps Lock is down, and shift/unShift as
            > > necessary. Currently, Vim becomes all but unusable in non-Insert with
            > > Caps Lock down. It's a small thing, but VIM is vi **improved**.
            > > Opinions?
            >
            > Back when I used my standard PC keyboard, I used xmodmap on my linux box
            > to remap <Caps> to <Esc>. Now my <Ctrl> key is in the place of <Caps>,
            > and I use <Ctrl-[> to simulate the <Esc>.
            >
            > ...
            >
            > Of course, I never use the <Caps>, even when typing text. YMMV.
            >

            This is a recurrent question on the list. I hate Caps Lock but don't
            find it useful to reassign it either to Esc or Ctrl as commonly
            suggested. I prefer to have it as a second leftShift key since the
            ordinary left Shift key is too small.

            Anthony

            --
            ac@... || http://www.acampbell.org.uk
            using Linux GNU/Debian || for book reviews, electronic
            Windows-free zone || books and skeptical articles
          • Sven Brueggemann
            ... Quite a faq... There are only three problems: - Caps lock can not be detected on all systems VIM supports - noone s willing to implement this feature - I m
            Message 5 of 12 , Aug 7, 2002
            • 0 Attachment
              > Wouldn't it be nice if VIM could
              > have an option to ignore Caps Lock in the normal, visual and
              > operator-pending modes, but not in Command-line and Insert modes?

              Quite a faq... There are only three problems:

              - Caps lock can not be detected on all systems VIM supports
              - noone's willing to implement this feature
              - I'm not (yet) able to code that :-)

              Since I sometimes have to code in all UPPERCASE I help myself by imapping uppercase to lowercase and the other way round.

              Kinds regards

              Sven
            • Rimon Barr
              ... Hi Sven, Thank you. I didn t even realise that this such a frequent request. It just seemed logical to me. I believe that detecting the caps lock is
              Message 6 of 12 , Aug 7, 2002
              • 0 Attachment
                >> Wouldn't it be nice if VIM could
                >> have an option to ignore Caps Lock in the normal, visual and
                >> operator-pending modes, but not in Command-line and Insert modes?
                >
                >Quite a faq... There are only three problems:
                >
                >- Caps lock can not be detected on all systems VIM supports
                >- noone's willing to implement this feature
                >- I'm not (yet) able to code that :-)
                >
                >Since I sometimes have to code in all UPPERCASE I help myself by imapping
                >uppercase to lowercase and the other way round.

                Hi Sven,

                Thank you. I didn't even realise that this such a frequent request. It
                just seemed logical to me. I believe that detecting the caps lock is
                possible both on Windows, and under X11. I do not think that it's possible
                under terminal mode, and I have no idea under other systems. Would this be
                the first platform specific feature? Just make it unavailable or inactive
                on the platforms that don't support it.

                It would take me a while to figure out how to code up a new option in VIM.
                For someone that's done that before, the implementation itself should be
                straightforward. If there is some central event loop, one can simply
                toggle the capitalization of the key event based on the current editing
                mode (and the option setting) and pass things onward for processing as
                usual. It should not be prone to many bugs. Of course, this design really
                depends on whether such a central location for the change exists, and I
                haven't looked at the VIM source, so I don't know that.

                Also, I can help find the caps lock detection code on both Windows and
                X11. There are lots of those little screen-keyboard diode programs, that
                may come with source code, for example. Moreover, the API for something
                like this should be documented.

                All the best,
                Rimon.
                --
                * Rimon Barr Ph.D. candidate, Computer Science, Cornell University
                | barr@... - http://www.cs.cornell.edu/barr - Y!IM: batripler
                |
                | Understanding is a kind of ecstasy.
                +---- -- Carl Sagan
              • sinbad
                how to turn on/off the caps lock while in insert mode. i want to turn off the caps lock while leaving out of the insert mode. how can i do that. i googled
                Message 7 of 12 , Jun 1, 2012
                • 0 Attachment
                  how to turn on/off the caps lock while in insert mode.
                  i want to turn off the caps lock while leaving out of the insert mode.
                  how can i do that. i googled first, didn't get any convincing answer.

                  --
                  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
                  ... AFAIK, CapsLock on/off status is handled by the keyboard driver transparently to Vim. I don t think Vim can simulate that action. You might build a lot of
                  Message 8 of 12 , Jun 1, 2012
                  • 0 Attachment
                    On 01/06/12 10:04, sinbad wrote:
                    > how to turn on/off the caps lock while in insert mode.
                    > i want to turn off the caps lock while leaving out of the insert mode.
                    > how can i do that. i googled first, didn't get any convincing answer.
                    >


                    AFAIK, CapsLock on/off status is handled by the keyboard driver
                    transparently to Vim. I don't think Vim can simulate that action.

                    You might build a lot of mappings, such as

                    inoremap a A
                    inoremap b B
                    inoremap c C
                    ...
                    inoremap x X
                    inoremap y Y
                    inoremap z Z
                    inoremap A a
                    inoremap B b
                    ...
                    inoremap Z z

                    but there would still be the question of determining when to turn them
                    on/off.


                    Best regards,
                    Tony.
                    --
                    Fine day to work off excess energy. Steal something heavy.

                    --
                    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
                  • Christian Brabandt
                    ... If you find a way, to turn on/off caps-lock via a script, you could call that script from an InsertEnter/Leave autocommand. Apart from that, there is
                    Message 9 of 12 , Jun 1, 2012
                    • 0 Attachment
                      On Fri, June 1, 2012 10:04, sinbad wrote:
                      > how to turn on/off the caps lock while in insert mode.
                      > i want to turn off the caps lock while leaving out of the insert mode.
                      > how can i do that. i googled first, didn't get any convincing answer.

                      If you find a way, to turn on/off caps-lock via a script, you could call
                      that script from an InsertEnter/Leave autocommand.

                      Apart from that, there is nothing more an editor can do for you, besides
                      maybe remapping a whole bunch of keys.

                      regards,
                      Christian

                      --
                      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
                    • Tim Chase
                      ... Just a caveat that InsertLeave doesn t execute if you re leaving Insert mode via control+C -tim -- You received this message from the vim_use maillist.
                      Message 10 of 12 , Jun 1, 2012
                      • 0 Attachment
                        On 06/01/12 04:11, Christian Brabandt wrote:
                        > If you find a way, to turn on/off caps-lock via a script, you could call
                        > that script from an InsertEnter/Leave autocommand.

                        Just a caveat that InsertLeave doesn't execute if you're leaving
                        Insert mode via control+C

                        -tim


                        --
                        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
                      • Michael van Schaik
                        ... Hi Sinbad, Check out this article: http://vim.wikia.com/wiki/Avoid_the_escape_key it links to two seperate instructions for remapping the Caps Lock to Esc
                        Message 11 of 12 , Jun 1, 2012
                        • 0 Attachment
                          Op vrijdag 1 juni 2012 10:04:35 UTC+2 schreef sinbad het volgende:
                          > how to turn on/off the caps lock while in insert mode.
                          > i want to turn off the caps lock while leaving out of the insert mode.
                          > how can i do that. i googled first, didn't get any convincing answer.

                          Hi Sinbad,

                          Check out this article: http://vim.wikia.com/wiki/Avoid_the_escape_key it links to two seperate instructions for remapping the Caps Lock to Esc for different environments. Maybe this will help you to get to what you want.

                          Good luck.

                          --
                          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
                        • Ben Fritz
                          ... http://vim.wikia.com/wiki/Insert-mode_only_Caps_Lock I think it solves some of the problems brought up by the others in this thread. -- You received this
                          Message 12 of 12 , Jun 1, 2012
                          • 0 Attachment
                            On Friday, June 1, 2012 3:04:35 AM UTC-5, sinbad wrote:
                            > how to turn on/off the caps lock while in insert mode.
                            > i want to turn off the caps lock while leaving out of the insert mode.
                            > how can i do that. i googled first, didn't get any convincing answer.

                            http://vim.wikia.com/wiki/Insert-mode_only_Caps_Lock

                            I think it solves some of the problems brought up by the others in this thread.

                            --
                            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.