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

emulating typewriter sound

Expand Messages
  • bill lam
    Hi, In (linux, console) vim , is there any way to add audio feedback like typewriter sound whenever a key is pressed (not needed for key released)? -- regards,
    Message 1 of 14 , Oct 3, 2009
    • 0 Attachment
      Hi,

      In (linux, console) vim , is there any way to add audio feedback like
      typewriter sound whenever a key is pressed (not needed for key
      released)?

      --
      regards,
      ====================================================
      GPG key 1024D/4434BAB3 2008-08-24
      gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Gene Kwiecinski
      ... That s a function (if available, naturally) of the keyboard driver and/or console itself, not the app.
      Message 2 of 14 , Oct 5, 2009
      • 0 Attachment
        >In (linux, console) vim , is there any way to add audio feedback like
        >typewriter sound whenever a key is pressed (not needed for key
        >released)?

        That's a function (if available, naturally) of the keyboard driver and/or console itself, not the app.

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Jason Axelson
        ... But does that preclude the possibility of including it in the application itself? --~--~---------~--~----~------------~-------~--~----~ You received this
        Message 3 of 14 , Oct 5, 2009
        • 0 Attachment
          On Mon, Oct 5, 2009 at 7:15 AM, Gene Kwiecinski <gkwiecinski@...> wrote:
          > That's a function (if available, naturally) of the keyboard driver and/or console itself, not the app.

          But does that preclude the possibility of including it in the
          application itself?

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Gary Johnson
          ... No, but it does suggest that doing so would not be a wise design choice. Regards, Gary --~--~---------~--~----~------------~-------~--~----~ You received
          Message 4 of 14 , Oct 5, 2009
          • 0 Attachment
            On 2009-10-05, Jason Axelson wrote:
            > On Mon, Oct 5, 2009 at 7:15 AM, Gene Kwiecinski <gkwiecinski@...> wrote:
            > > That's a function (if available, naturally) of the keyboard driver and/or console itself, not the app.
            >
            > But does that preclude the possibility of including it in the
            > application itself?

            No, but it does suggest that doing so would not be a wise design
            choice.

            Regards,
            Gary



            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Gene Kwiecinski
            ... Uhhh, yeah, let s take a multi-platform multi-OS text editor and include hardware-specific almost-BIOS-level code to turn on keypress noises, on across all
            Message 5 of 14 , Oct 5, 2009
            • 0 Attachment
              >>That's a function (if available, naturally) of the keyboard
              >>driver and/or console itself, not the app.

              >But does that preclude the possibility of including it in the
              >application itself?

              Uhhh, yeah, let's take a multi-platform multi-OS text editor
              and include hardware-specific almost-BIOS-level code to turn on
              keypress noises, on across all platforms and OSes (Winsucks,
              *nix, Mac, etc.).

              *Lot* of work for incredibly small payoff...

              But hey, if you want to write such a critter, the source code's
              available. Grab the getkey() function, any function that
              outputs sound like a beep, and go crazy...

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_use" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • bill lam
              ... FWIW xset c didn t work for me. I ll happy to hear if there are alternative ways to do it other than buying another keyboard. -- regards,
              Message 6 of 14 , Oct 5, 2009
              • 0 Attachment
                On Mon, 05 Oct 2009, Gene Kwiecinski wrote:
                >
                > >In (linux, console) vim , is there any way to add audio feedback like
                > >typewriter sound whenever a key is pressed (not needed for key
                > >released)?
                >
                > That's a function (if available, naturally) of the keyboard driver and/or console itself, not the app.

                FWIW xset c didn't work for me. I'll happy to hear if there are
                alternative ways to do it other than buying another keyboard.

                --
                regards,
                ====================================================
                GPG key 1024D/4434BAB3 2008-08-24
                gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_use" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • Michael Wookey
                ... If you do decide to purchase a new keyboard, I recommend (and use) a Das Keyboard Ultimate[1] (with Dvorak keymap) and its nice and noisy if that is what
                Message 7 of 14 , Oct 6, 2009
                • 0 Attachment
                  2009/10/6 bill lam <cbill.lam@...>:
                  >
                  > On Mon, 05 Oct 2009, Gene Kwiecinski wrote:
                  >>
                  >> >In (linux, console) vim , is there any way to add audio feedback like
                  >> >typewriter sound whenever a key is pressed (not needed for key
                  >> >released)?
                  >>
                  >> That's a function (if available, naturally) of the keyboard driver and/or console itself, not the app.
                  >
                  > FWIW xset c didn't work for me.  I'll happy to hear if there are
                  > alternative ways to do it other than buying another keyboard.

                  If you do decide to purchase a new keyboard, I recommend (and use) a
                  Das Keyboard Ultimate[1] (with Dvorak keymap) and its nice and noisy
                  if that is what you are after.

                  [1] http://www.daskeyboard.com

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_use" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • Gene Kwiecinski
                  ... Don t think it would, unless you had a keyboard which had a built-in clicker (eg, which some dumb terminals had). Dunno if it automagically supports
                  Message 8 of 14 , Oct 6, 2009
                  • 0 Attachment
                    >>>In (linux, console) vim , is there any way to add audio feedback like
                    >>>typewriter sound whenever a key is pressed (not needed for key
                    >>>released)?

                    >>That's a function (if available, naturally) of the keyboard driver and/or
                    >>console itself, not the app.

                    >FWIW xset c didn't work for me. I'll happy to hear if there are
                    >alternative ways to do it other than buying another keyboard.

                    Don't think it would, unless you had a keyboard which had a built-in
                    clicker (eg, which some dumb terminals had). Dunno if it automagically
                    supports "alternative hardware" such as a peecee's speaker, as I never
                    used 'xset'.

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_use" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • Noel Henson
                    ... Bill, What desktop or window manager are you using? I believe you can set keyclicks in KDE3 and above. Perhaps Gnome can do the same. Noel -- ... Noel
                    Message 9 of 14 , Oct 6, 2009
                    • 0 Attachment
                      On Monday 05 October 2009, bill lam wrote:
                      > On Mon, 05 Oct 2009, Gene Kwiecinski wrote:
                      > > >In (linux, console) vim , is there any way to add audio feedback like
                      > > >typewriter sound whenever a key is pressed (not needed for key
                      > > >released)?
                      > >
                      > > That's a function (if available, naturally) of the keyboard driver
                      > > and/or console itself, not the app.
                      >
                      > FWIW xset c didn't work for me. I'll happy to hear if there are
                      > alternative ways to do it other than buying another keyboard.

                      Bill,

                      What desktop or window manager are you using? I believe you can set
                      keyclicks in KDE3 and above. Perhaps Gnome can do the same.

                      Noel

                      --

                      ------------------------------------------------------------------
                      Noel Henson
                      www.noels-lab.com Chips, firmware and embedded systems
                      www.vimoutliner.org Work fast. Think well.


                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_use" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    • bill lam
                      ... Noel, I use dwm and don t use any desktop. AFAICS setting keyclicks in desktops are just graphical frontend for setting xset. Incidentally I googled and
                      Message 10 of 14 , Oct 6, 2009
                      • 0 Attachment
                        On Tue, 06 Oct 2009, Noel Henson wrote:
                        > > FWIW xset c didn't work for me. I'll happy to hear if there are
                        > > alternative ways to do it other than buying another keyboard.
                        >
                        > Bill,
                        >
                        > What desktop or window manager are you using? I believe you can set
                        > keyclicks in KDE3 and above. Perhaps Gnome can do the same.

                        Noel,

                        I use dwm and don't use any desktop. AFAICS setting keyclicks in
                        desktops are just graphical frontend for setting xset. Incidentally I
                        googled and found others said that they cannot turn off that click.

                        --
                        regards,
                        ====================================================
                        GPG key 1024D/4434BAB3 2008-08-24
                        gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

                        --~--~---------~--~----~------------~-------~--~----~
                        You received this message from the "vim_use" maillist.
                        For more information, visit http://www.vim.org/maillist.php
                        -~----------~----~----~----~------~----~------~--~---
                      • Wu, Yue
                        ... I think you can facility with the feature of lmap, binding the key you like to hear the sound to a return-expression type function which produce the sound
                        Message 11 of 14 , Oct 6, 2009
                        • 0 Attachment
                          On Wed, Oct 07, 2009 at 07:59:09AM +0800, bill lam wrote:
                          >
                          > On Tue, 06 Oct 2009, Noel Henson wrote:
                          > > > FWIW xset c didn't work for me. I'll happy to hear if there are
                          > > > alternative ways to do it other than buying another keyboard.
                          > >
                          > > Bill,
                          > >
                          > > What desktop or window manager are you using? I believe you can set
                          > > keyclicks in KDE3 and above. Perhaps Gnome can do the same.
                          >
                          > Noel,
                          >
                          > I use dwm and don't use any desktop. AFAICS setting keyclicks in
                          > desktops are just graphical frontend for setting xset. Incidentally I
                          > googled and found others said that they cannot turn off that click.

                          I think you can facility with the feature of lmap, binding the key you like to
                          hear the sound to a return-expression type function which produce the sound then
                          return the key you typed. It's a bit trivial. I do something similar with my
                          script ywvim[1].

                          :help lmap
                          :help map.txt

                          [1] http://www.vim.org/scripts/script.php?script_id=2662

                          --
                          Hi,
                          Wu, Yue

                          --~--~---------~--~----~------------~-------~--~----~
                          You received this message from the "vim_use" maillist.
                          For more information, visit http://www.vim.org/maillist.php
                          -~----------~----~----~----~------~----~------~--~---
                        • bill lam
                          ... getkey() only appeared inside src/os_msdos.c btw everyone has his/her own preference. -- regards, ==================================================== GPG
                          Message 12 of 14 , Oct 6, 2009
                          • 0 Attachment
                            On Mon, 05 Oct 2009, Gene Kwiecinski wrote:
                            >
                            > >>That's a function (if available, naturally) of the keyboard
                            > >>driver and/or console itself, not the app.
                            >
                            > >But does that preclude the possibility of including it in the
                            > >application itself?
                            >
                            > Uhhh, yeah, let's take a multi-platform multi-OS text editor
                            > and include hardware-specific almost-BIOS-level code to turn on
                            > keypress noises, on across all platforms and OSes (Winsucks,
                            > *nix, Mac, etc.).
                            >
                            > *Lot* of work for incredibly small payoff...
                            >
                            > But hey, if you want to write such a critter, the source code's
                            > available. Grab the getkey() function, any function that
                            > outputs sound like a beep, and go crazy...

                            getkey() only appeared inside src/os_msdos.c

                            btw everyone has his/her own preference.

                            --
                            regards,
                            ====================================================
                            GPG key 1024D/4434BAB3 2008-08-24
                            gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

                            --~--~---------~--~----~------------~-------~--~----~
                            You received this message from the "vim_use" maillist.
                            For more information, visit http://www.vim.org/maillist.php
                            -~----------~----~----~----~------~----~------~--~---
                          • bill lam
                            ... Non-trivial for me. ;-) -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net
                            Message 13 of 14 , Oct 7, 2009
                            • 0 Attachment
                              On Wed, 07 Oct 2009, Wu, Yue wrote:
                              > return the key you typed. It's a bit trivial.

                              Non-trivial for me. ;-)

                              --
                              regards,
                              ====================================================
                              GPG key 1024D/4434BAB3 2008-08-24
                              gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3

                              --~--~---------~--~----~------------~-------~--~----~
                              You received this message from the "vim_use" maillist.
                              For more information, visit http://www.vim.org/maillist.php
                              -~----------~----~----~----~------~----~------~--~---
                            • Tony Mechelynck
                              ... There are the following problems (and possibly others) with this approach: * It doesn t work in Normal mode. * Since it means creating a keymap which
                              Message 14 of 14 , Nov 1, 2009
                              • 0 Attachment
                                On 07/10/09 06:50, Wu, Yue wrote:
                                >
                                > On Wed, Oct 07, 2009 at 07:59:09AM +0800, bill lam wrote:
                                >>
                                >> On Tue, 06 Oct 2009, Noel Henson wrote:
                                >>>> FWIW xset c didn't work for me. I'll happy to hear if there are
                                >>>> alternative ways to do it other than buying another keyboard.
                                >>>
                                >>> Bill,
                                >>>
                                >>> What desktop or window manager are you using? I believe you can set
                                >>> keyclicks in KDE3 and above. Perhaps Gnome can do the same.
                                >>
                                >> Noel,
                                >>
                                >> I use dwm and don't use any desktop. AFAICS setting keyclicks in
                                >> desktops are just graphical frontend for setting xset. Incidentally I
                                >> googled and found others said that they cannot turn off that click.
                                >
                                > I think you can facility with the feature of lmap, binding the key you like to
                                > hear the sound to a return-expression type function which produce the sound then
                                > return the key you typed. It's a bit trivial. I do something similar with my
                                > script ywvim[1].
                                >
                                > :help lmap
                                > :help map.txt
                                >
                                > [1] http://www.vim.org/scripts/script.php?script_id=2662
                                >

                                There are the following problems (and possibly others) with this approach:

                                * It doesn't work in Normal mode.

                                * Since it means creating a keymap which prefixes a BEL character to
                                every possible keypress (including nonprinting ones) and is otherwise a
                                no-op, you cannot use a _different_ keymap.

                                * Hitting a modifier key (Shift, Ctrl, Meta/Alt, Cmd, AltGr, CapsLock,
                                NumLock) never produces a click.

                                * Hitting Ctrl-V U 12345678 will produce zero clicks where the desired
                                amount is twelve. (Similarly, to use a more realistic example, Ctrl-V u
                                4e00 will produce zero clicks instead of seven, and I don't see how to
                                harness it to make at least six clicks and still produce the CJK
                                character meaning "one" without an amount of work totally out of
                                proportion.)

                                * The Ctrl-K key cannot be remapped, at least in Vim builds compiled
                                with +digraphs, unless there's been a change since Vim 6.1. (I've tried,
                                but not recently.)


                                Best regards,
                                Tony.
                                --
                                My pen is at the bottom of a page,
                                Which, being finished, here the story ends;
                                'Tis to be wished it had been sooner done,
                                But stories somehow lengthen when begun.
                                -- Byron

                                --~--~---------~--~----~------------~-------~--~----~
                                You received this message from the "vim_use" maillist.
                                For more information, visit http://www.vim.org/maillist.php
                                -~----------~----~----~----~------~----~------~--~---
                              Your message has been successfully submitted and would be delivered to recipients shortly.