KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q46849: During INPUT, CTRL+T Displays Softkeys on Line 25

Article: Q46849
Product(s): See article
Version(s): 4.00 4.00b 4.50
Operating System(s): MS-DOS
Keyword(s): ENDUSER | SR# S890627-171 B_BasicCom | mspl13_basic
Last Modified: 27-DEC-1989

During an INPUT statement, pressing CTRL+T causes a number line to
display on line 25 of the screen. These numbers correspond to the
softkeys that you can define and label with the KEY statement in
BASIC. This behavior is not documented and occurs in all screen modes.

This information applies to Microsoft QuickBASIC Versions 4.00, 4.00b,
and 4.50, to Microsoft BASIC Compiler Versions 6.00 and 6.00b, and to
Microsoft BASIC PDS Version 7.00.

To prevent this behavior, you can trap for CTRL+T using the KEY
statement. The key combination is trapped during the INPUT statement
but is not acted upon until after the INPUT statement is terminated.
This delay allows you to trap for the key and simply RETURN from the
label.

The following sample code prevents display of the softkey line during
the INPUT of the string:

KEY 15, CHR$(&H04) + CHR$(&H14)     'delete these lines
KEY(15) ON                          'to see the softkey
ON KEY(15) GOSUB KeyPressed         'display during input

   PRINT "hit CTRL+T then,"
   PRINT "enter a string"
   INPUT AnyString$

END

KeyPressed:
     RETURN

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.