Free 14-Day Evaluations    
Product Downloads    

Sign in     


DESKTOP MOBILE DOWNLOAD PURCHASE SUPPORT INFO COMPANY
 Home  >>  Support  >>  Knowledge Base

The SETKEY Command

The SETKEY command redefines a key on the keyboard. The key then sends a different character of string of characters when pressed. SETKEY can also be used to cause a key to run a TinyTERM script or call one of TinyTERM’s internal functions.

The syntax for SETKEY is:

setkey keyname value

The keyname may be any of the following:

  • F1 – F12 (Function keys 1 – 12)
  • AF1 – AF12 (Alt-Function keys: hold the Alt key and hit F1 – F12)
  • SF1 – SF12 (Shift-Function keys)
  • CF1 – CF12 (Ctrl-Function keys)
  • CSF1 – CSF12 (Ctrl-Shift-Function keys)
  • “a” – “z” (Lower-case letters a-z, must be in quotation marks)
  • “A” – “Z” (Capital letters A-Z)
  • “^a” – “^z” (Ctrl- keys a-z)
  • AltA – AltZ (Alt keys a-z, Windows may override)
  • “0” – “9” (Top row number keys)
  • kp0 – kp9, kp+, … (keypad number and symbol keys, NumLock must be on)
  • c-kp0 – c-kp9, … (Ctrl-keypad number and symbol keys)
  • “#”, “$”, … (Any symbol)
  • up, home, end, … (Named keys)
  • c-up, c-right, … (Named Ctrl-keys)

Only the letter keys are case-sensitive. The other keys can be typed upper- or lower-case for the SETKEY command.

The value may be one of the following:

  • A single character or string of characters in quotation marks. This may include:
    • a special string character
    • \x42 – a hex value preceded by \x
    • \072 – an octal value preceded by \
    • ^M – a control character
    • or any other valid TERM string sequence
  • the name of a pre-defined TERM function key such as PRINT or BREAK
  • “@@command” – A valid TERM Script Language command

Examples

  • setkey f1 “MyLoginName”
    causes the F1 key to send MyLoginName down the comm line.
  • setkey “b” “MyPassword”
    causes the lower-case b key to send MyPassword down the comm line.
  • setkey kp* abort
    causes the keypad * key to send the standard abort, usually ^C.
  • setkey pgup “@@cls”
    causes the PageUp key to run TERM’s cls (clear screen) command.
  • setkey SF1 “@@do myfile”
    causes the Shift-F1 key to run the TERM script myfile.cmd.
  • setkey F11 “@@do wtermus@w_file_quit
    causes the F11 key to run the w_file_quit procedure within the TERM script wtermus.cmd.

Comments are closed.

  Copyright © 2024 Century Software, Inc. All Rights Reserved999 TERMS OF USE PRIVACY POLICY EULA