summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-04-11 16:47:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-11 16:47:13 +0000
commitdfc9d31c88a30f4d006b3adf7d368be02c27521d (patch)
treea9bd7f89dbe705f6f9122a7f53ca7a29977d578f /pod
parent464b4c8d97ede987434b15aaa96f0985b96b413e (diff)
downloadperl-dfc9d31c88a30f4d006b3adf7d368be02c27521d.tar.gz
FAQ (and AUTHORS) update from Dan Carson: the information
was several years obsolete, Term::Readkey has been updated to have the functionality. p4raw-id: //depot/perl@9684
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfaq5.pod46
1 files changed, 0 insertions, 46 deletions
diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod
index 4ae7407e96..7491baaac7 100644
--- a/pod/perlfaq5.pod
+++ b/pod/perlfaq5.pod
@@ -955,52 +955,6 @@ include also support for non-portable systems as well.
printf "\nYou said %s, char number %03d\n",
$key, ord $key;
-For legacy DOS systems, Dan Carson <dbc@tc.fluke.COM> reports the following:
-
-To put the PC in "raw" mode, use ioctl with some magic numbers gleaned
-from msdos.c (Perl source file) and Ralf Brown's interrupt list (comes
-across the net every so often):
-
- $old_ioctl = ioctl(STDIN,0,0); # Gets device info
- $old_ioctl &= 0xff;
- ioctl(STDIN,1,$old_ioctl | 32); # Writes it back, setting bit 5
-
-Then to read a single character:
-
- sysread(STDIN,$c,1); # Read a single character
-
-And to put the PC back to "cooked" mode:
-
- ioctl(STDIN,1,$old_ioctl); # Sets it back to cooked mode.
-
-So now you have $c. If C<ord($c) == 0>, you have a two byte code, which
-means you hit a special key. Read another byte with C<sysread(STDIN,$c,1)>,
-and that value tells you what combination it was according to this
-table:
-
- # PC 2-byte keycodes = ^@ + the following:
-
- # HEX KEYS
- # --- ----
- # 0F SHF TAB
- # 10-19 ALT QWERTYUIOP
- # 1E-26 ALT ASDFGHJKL
- # 2C-32 ALT ZXCVBNM
- # 3B-44 F1-F10
- # 47-49 HOME,UP,PgUp
- # 4B LEFT
- # 4D RIGHT
- # 4F-53 END,DOWN,PgDn,Ins,Del
- # 54-5D SHF F1-F10
- # 5E-67 CTR F1-F10
- # 68-71 ALT F1-F10
- # 73-77 CTR LEFT,RIGHT,END,PgDn,HOME
- # 78-83 ALT 1234567890-=
- # 84 CTR PgUp
-
-This is all trial and error I did a long time ago; I hope I'm reading the
-file that worked...
-
=head2 How can I tell whether there's a character waiting on a filehandle?
The very first thing you should do is look into getting the Term::ReadKey