oops has asked for the wisdom of the Perl Monks concerning the following question:

Hello. I have a question about how to input an "uparrow" to the program. It seems I can not directly hit the "uparrow"key. Thanks. oops.

Replies are listed 'Best First'.
Re: about input "up arrow" by keyboard
by John M. Dlugosz (Monsignor) on Jan 08, 2003 at 03:04 UTC
    It depends on your platform and environment. If it's a standard-input kind of thing and the up-arrow is doing something on the console line editor and not being passed to the program, you want to put the console into "raw" mode. Tell more about your platform and where you are reading from (e.g STDIN ?), and I'm sure you'll get a specific reply. Raw mode stuff can be seen in the perl faq docs.

      Thank you very much for your help. I am doing perl programming on windows 98. And I want to read an up-arrow from STDIN, keyboard I mean. Thanks again. oops
        OK, check out the Win32::Console module for native access. It includes "complete processing of keyboard and mouse events".

        Skimming the module docs, I see the Input and InputChar functions.