1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-26 08:35:52 +00:00
QB64-PE/internal/help/KEY_LIST.txt
SMcNeill 6e01fc8dce Altered string compare routines (<,<=,>,>=) so they don't give false results with CHR$(0).
Added new _STRCMP and _STRICMP commands for quick string comparisons.
Cleaned up QB64 to finish removing the QUI (quick user insert) code and folders.
Altered UCASE and LCASE routines to be faster in some situations for us.
2014-09-22 08:19:03 -04:00

87 lines
2.5 KiB
Plaintext

The '''KEY LIST''' statement lists the softkey strings assigned to each of the function keys down the left side of the screen.
{{PageSyntax}}
:: KEY LIST
:: KEY {ON|OFF}
''Description:''
* Instead of using an [[ON KEY(n)]] [[GOSUB]] statement, Function keys F1 to F12 can be assigned a &quot;soft key&quot; string value to return.
* '''[[KEY n]], text$''' defines a literal or variable [[STRING]] &quot;soft key&quot; Function key return value.
{{WhiteStart}} '''KEY 1, &quot;Help&quot;''' 'will return the string &quot;Help&quot; to an [[INPUT]] variable when F1 is pressed{{WhiteEnd}}
* ''n%'' is the number 1 to 10(F1 to F10), 30 or 31(F11 or F12) of the function key to assign the soft key string.
* [[KEY LIST]] displays each of the 12 softkey '''function key'''(F1 to F12) string values going down the screen.
* '''KEY {ON|OFF}''' turns the softkey Function key display of F1 to F10 at the bottom of the screen ON or OFF.
* '''Note: Soft key values cannot be assigned to KEY numbers 11 through 29 or an [[ERROR Codes|&quot;Illegal Function call&quot; error]] will occur!'''
''Example 1:'' Displaying the current '''KEY LIST''' string assignments to the Function keys.
{{CodeStart}} '' ''
{{Cl|KEY n|KEY}} 1, &quot;Help&quot;
{{Cl|KEY n|KEY}} 5, &quot;Compile&quot;
{{Cl|KEY n|KEY}} 10, &quot;Quit&quot;
{{Cl|PRINT}} &quot;Press any key!&quot;
K$ = {{Cl|INPUT$}}(1)
{{Cl|KEY LIST}}
{{Cl|END}} '' ''
{{CodeEnd}}
{{OutputStart}}Press any key!
F1 Help
F2
F3
F4
F5 Compile
F6
F7
F8
F9
F10 Quit
F11
F12
{{OutputEnd}}
''Example 2:'' Displaying the function key assignments for F1 to F10 at the bottom of the screen with '''KEY ON''' and '''KEY OFF'''.
{{CodeStart}} '' ''
{{Cl|KEY n|KEY}} 1, &quot;Help&quot; + {{Cl|CHR$}}(13) 'add Return character to complete the input
{{Cl|KEY n|KEY}} 5, &quot;Compile&quot; + {{Cl|CHR$}}(13)
{{Cl|KEY n|KEY}} 10, &quot;Quit&quot; + {{Cl|CHR$}}(13)
'''KEY ON'''
DO
{{Cl|INPUT}} &quot;Press F10 to turn display off! &quot;, M$
LOOP UNTIL M$ = &quot;Quit&quot;
'''KEY OFF'''
K$ = {{Cl|INPUT$}}(1)
{{Cl|KEY LIST}}
{{Cl|END}} '' ''
{{CodeEnd}}
{{OutputStart}}Press F10 to turn display off! Help
Press F10 to turn display off! Compile
1 {{WBG|Help←}} 2 3 4 5 {{WBG|Compil}} 6 7 8 9 10 {{WBG|Quit←}}
{{OutputEnd}}
:''Explanation:'' The [[INPUT]] variable will hold the string value as if it was typed in and entered. &quot;Quit&quot; will KEY OFF bottom display.
''See also:''
* [[KEY n]], [[KEY(n)]],
* [[ON KEY(n)]]
* [[_KEYHIT]], [[_KEYDOWN]]
{{PageNavigation}}