Annotation of researchv10dc/630/man/src/p_man/man3/keyboard.3r, revision 1.1

1.1     ! root        1: .ds ZZ DEVELOPMENT PACKAGE
        !             2: .TH KEYBOARD 3R "630 MTG"
        !             3: .XE "keyboard"
        !             4: .XE "NOPFEXPAND"
        !             5: .XE "NOCURSEXPAND"
        !             6: .XE "NOPADEXPAND"
        !             7: .XE "NOTRANSLATE"
        !             8: .XE "reqkbdID()"
        !             9: .SH NAME
        !            10: keyboard: P->state, SCRLOCKREQD, SCR_LOCK, NOPFEXPAND, NOCURSEXPAND, NOPADEXPAND, NOTRANSLATE, reqkbdID( ) \- per process keyboard states, keyboard ID
        !            11: 
        !            12: .SH SYNOPSIS
        !            13: .B #include <dmd.h>
        !            14: .sp
        !            15: .B long P->state;
        !            16: .sp
        !            17: .B void reqkbdID ( )
        !            18: 
        !            19: .SH DESCRIPTION
        !            20: .I P->state
        !            21: is the state variable for an application running in the 630
        !            22: MTG.
        !            23: .PP
        !            24: An application can give different interpretations on 
        !            25: groups of 630 MTG supported keyboard keys by
        !            26: setting corresponding bits in the process state variable.
        !            27: The groups are Scroll Lock key, programmable function keys, arrow keys,
        !            28: numerical keypad keys, or the whole keyboard. If
        !            29: the bits are not set, when a key is depressed, the
        !            30: keyboard will send to the process the ASCII/hexadecimal code(s) as specified 
        !            31: by the \fI630 MTG Terminal User's Guide\fR.
        !            32: An exception is the Scroll Lock key
        !            33: which is a "dead" key (no special processing) if it is not requested
        !            34: and processed by the application itself.
        !            35: .PP
        !            36: If an application program wishes to implement local 
        !            37: terminal flow control with the
        !            38: keyboard Scroll Lock key, it must request the use of the Scroll Lock key
        !            39: by setting the \s-1SCRLOCKREQD\s+1 in the state variable as follows:
        !            40: .sp
        !            41: .ft CM
        !            42: .ce
        !            43: P->state |= SCRLOCKREQD;
        !            44: .ft R
        !            45: .PP
        !            46: The application program can then determine if the Scroll Lock key has been
        !            47: depressed by checking the SCR_LOCK bit as follows:
        !            48: .sp
        !            49: .ft CM
        !            50: .ce
        !            51: P->state & SCR_LOCK;
        !            52: .ft R
        !            53: .PP
        !            54: The SCR_LOCK bit is set whenever the Scroll Lock key is depressed. It is 
        !            55: automatically cleared by the keyboard when the Scroll Lock key is depressed a second time.
        !            56: .PP
        !            57: The programmable function (PF) keys, 
        !            58: when depressed are expanded by default,
        !            59: i.e., the corresponding character strings (minus the \s-1NULL\s+1 character)
        !            60: stored in the non-volatile BRAM memory will be sent to the process as would
        !            61: be typed from the keyboard. If an application prefers to have its own interpretation
        !            62: of the programmable function keys,
        !            63: it is necessary to set a bit in the process state variable:
        !            64: .sp
        !            65: .nf
        !            66: .ft CM
        !            67: .ce
        !            68: P->state |= NOPFEXPAND;
        !            69: .ft R
        !            70: .fi
        !            71: .sp
        !            72: In this case, the keyboard will only send to the process the PF key keycode
        !            73: which is 0x80 for PF key F1, 0x81 for PF key F2, and so forth.
        !            74: .PP
        !            75: 
        !            76: If a program wants to interpret the arrow keys without having to parse
        !            77: their entire sequence, it can set a bit in the process state variable:
        !            78: .sp
        !            79: .nf
        !            80: .ft CM
        !            81: .ce
        !            82: P->state |= NOCURSEXPAND;
        !            83: .ft R
        !            84: .fi
        !            85: .sp
        !            86: When an arrow key is then depressed, it will have the value:
        !            87: .sp
        !            88: .DS
        !            89: .TS
        !            90: center, tab(~);
        !            91: lp10 lp10.
        !            92: up arrow~0xE0
        !            93: down arrow~0xE1
        !            94: right arrow~0xE2
        !            95: left arrow~0xE3
        !            96: home key~0xE4
        !            97: .TE
        !            98: .DE
        !            99: .PP
        !           100: If a program wants to have its own interpretation of the numerical
        !           101: keypad keys,
        !           102: it is necessary to set a bit in the process state variable:
        !           103: .sp
        !           104: .ft CM
        !           105: .ce
        !           106: P->state |= NOPADEXPAND;
        !           107: .ft R
        !           108: .sp
        !           109: When a numerical keypad key is then depressed, it will have the value:
        !           110: .sp
        !           111: .DS
        !           112: .TS
        !           113: center, tab(~);
        !           114: lp10 lp10.
        !           115: Enter~0xC0
        !           116: \\=~0xC1
        !           117: *~0xC2
        !           118: /~0xC3
        !           119: +~0xC4
        !           120: 7~0xC5
        !           121: 8~0xC6
        !           122: 9~0xC7
        !           123: -~0xC8
        !           124: 4~0xC9
        !           125: 5~0xCA
        !           126: 6~0xCB
        !           127: ,~0xCC
        !           128: 1~0xCD
        !           129: 2~0xCE
        !           130: 3~0xCF
        !           131: 0~0xD0
        !           132: \\\.~0xD1
        !           133: .TE
        !           134: .DE
        !           135: .PP
        !           136: If a program wants to remap the entire keyboard, it must
        !           137: set a bit in the state variable:
        !           138: .sp
        !           139: .ft CM
        !           140: .ce
        !           141: P->state |= NOTRANSLATE;
        !           142: .ft R
        !           143: .sp
        !           144: The application will then receive from the keyboard the raw keycodes 
        !           145: as listed in the \fI630 MTG Terminal User's Guide\fR. 
        !           146: Also, the keyboard LEDs will no longer be automatically updated.
        !           147: At this point, calling the
        !           148: .I reqkbdID
        !           149: function will ask the keyboard for its identity (ID).
        !           150: The keyboard will send back its ID and all keys currently depressed,
        !           151: followed again by the ID. Refer to the \f2630 MTG
        !           152: Software Development Guide\f1 for more information.
        !           153: 
        !           154: .SH SEE ALSO
        !           155: kbdchar(3R), state(3R), pfkey(3R), resources(3R), setled(3L).
        !           156: .br
        !           157: \fI630 MTG Terminal User's Guide\fR.
        !           158: .br
        !           159: \f2630 MTG Software Development Guide\f1.
        !           160: .SH WARNING
        !           161: If the process has not requested the keyboard (see \fIresources(3r)\fR),
        !           162: all per process keyboard states will be ignored, and the key's
        !           163: ASCII/hexadecimal code(s) as specified in the
        !           164: \fI630 MTG Terminal User's Guide\fR will be
        !           165: sent to the host (if the process is connected) or ignored (if the process
        !           166: runs locally).
        !           167: .PP
        !           168: The exception is the Scroll Lock key which does not require the application
        !           169: to request the whole keyboard. However in order to process that key, the
        !           170: application has to set the SCRLOCKREQD bit in \fIP->state\fR.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.