How can I make it so keys pressed by users are not echoed on the screen? - Unix

This is a discussion on How can I make it so keys pressed by users are not echoed on the screen? - Unix ; Hi, How can I make it so keys pressed by users are not echoed on the screen? And how can I move the cursor around on the screen?...

+ Reply to Thread
Results 1 to 5 of 5

Thread: How can I make it so keys pressed by users are not echoed on the screen?

  1. How can I make it so keys pressed by users are not echoed on the screen?

    Hi,

    How can I make it so keys pressed by users are not echoed on the
    screen?

    And how can I move the cursor around on the screen?


  2. Re: How can I make it so keys pressed by users are not echoed on the screen?

    Begin <1133387227.863212.162380@z14g2000cwz.googlegroups. com>
    On 2005-11-30, kimso.zhao@gmail.com wrote:
    > How can I make it so keys pressed by users are not echoed on the
    > screen?


    getpass(3).


    > And how can I move the cursor around on the screen?


    ncurses(3).


    These are two, often used, ways to achieve that. There are more.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  3. Re: How can I make it so keys pressed by users are not echoed on the screen?

    Thanks!
    For the first questions, if I want to display "*" after user typing
    each key.
    Can "getpass" do this?

    Any way to disable/enable "echo"?


  4. Re: How can I make it so keys pressed by users are not echoed on the screen?

    Begin <1133387867.839829.12800@g49g2000cwa.googlegroups.c om>
    On 2005-11-30, kimso.zhao@gmail.com wrote:
    [Context missing. You really do want to fix that.]
    > Thanks!
    > For the first questions, if I want to display "*" after user typing
    > each key.
    > Can "getpass" do this?



    The getpass() function turns off character echoing while reading the
    password.


    (You could have read that in the manpage yourself, you know.)


    > Any way to disable/enable "echo"?


    Sure. You just have to put the terminal in raw mode and deal with all
    the silly details yourself. Note that printing anything at all while
    reading passwords is giving away information and as such frowned upon.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  5. Re: How can I make it so keys pressed by users are not echoed on the screen?

    On 2005-11-30, kimso.zhao@gmail.com wrote:
    > Thanks! For the first questions, if I want to display "*" after user
    > typing each key. Can "getpass" do this?


    Why do you want to do this? So people looking over your shoulder can
    tell how long your password is?

    [IOW no, you'd have to do something at a lower level - but why?]

+ Reply to Thread