## Physical Device Driver Reference

[prev][next][parent][TOC]

### KBD_SETTRANSTABLE (50h) - Code Page Translation Table

Code Page Translation Table Has the following format when there are 127 copies of the KeyDef record shown below (includes one for each possible scan code that can be returned from the keyboard). Not all entries are used; unused entries are zero. The entries are in scan code order, based on the remapped scan codes returned by the keyboard controller.

            XlateTable:

                XHeader          : XHeader

                KeyDef1          : KeyDef

                KeyDef2          : KeyDef

                KeyDef3          : KeyDef

                   .                  .

                   .                  .

                   .                  .

                KeyDef127        : KeyDef

                AccentTbl        : AccentTable

            End XlateTable

            XHeader:

                XTableID         : WORD [Code PageNumber]

            XTableFlags1         : Rec  [Word Width]

                                 : The following three bits determine which shift key

                                 : or key combination affects CHAR3 of each KeyDef.

                ShiftAlt         : Bit 0 [Use Shift+Alt instead of Ctrl+Alt]

                AltGrafL         : Bit 1 [Use left Alt key as Alt+Graphics]

                AltGrafR         : Bit 2 [Use right Alt key as Alt+Graphics]

                ShiftLock        : Bit 3 [Treat Caps Lock as ShiftLock]

                DefaultTable     : Bit 4 [Default table for the Lang.]

                ShiftToggle      : Bit 5 [Toggle or LatchShiftLock]

                                 :       When 1 toggle, else latch

                AccentPass       : Bit 6 [Pass accent and non-accent key through]

                                 :       When 1 pass on accent keys and beep, else beep

                                 :        only.

                                 : The following four bits determine which shift key or

                                 : key combination causes Char5 to be used in each

                                 :        KeyDef.

                CapsShift        : Bit 7 [Caps+Shift uses CHAR5]

                MachDep          : Bit 8 [Machine-dependent table]

                Reserved         : Bits  9-10

                Reserved         : Bits 11-15

            EndRec XtableFlags1

            XTableFlags2         : Rec[WORD Width]

                Reserved         : Bits 0-15

            EndRec XtableFlags2

                KbdType          : WORD [Keyboard type, see below]

                KbdSubType       : WORD [Reserved]

                XtableLen        : WORD [Length of table]

                EntryCount       : WORD [Number of KeyDef entries]

                EntryWidth       : WORD [Width of KeyDef entries]

                Country          : WORD [Language ID]

                TableTypeID      : WORD [Identifies the table type]

                                        1st byte (type)     : 01X  00X

                                        2nd byte (sub-type) : 00X  Reserved

                SubCountryID     : 4 Bytes [Sub-language Identifier]

                Reserved         : 8 WORDS [Reserved]

            End XHeader

            KeyDef = Rec           [127 copies of this record.]

                XlateOp = Rec      [WORD field] [Translate operation specifier.]

                    AccentFlags  : 7 Bits [See Notes 1 and 8.]

                    KeyType      : 9 bits [See Note 2.]

                Char1            : Byte [Use depends on KeyType, see below.]

                Char2            : Byte [Use depends on KeyType, see below.]

                Char3            : Byte [Use depends on KeyType, see below.]

                Char4            : Byte [Use depends on KeyType, see below.]

                Char5            : Byte [Use depends on KeyType, see below.]

            EndRec KeyDef

            AccentTable = Rec      [Table of accent key definitions.]

                AccentEntry1     : AccentEntry

                AccentEntry2     : AccentEntry

                     .                  .

                     .                  .

                     .                  .

                AccentEntry7     : AccentEntry

            EndRec AccentTable

            AccentEntry = Rec     [Accent entry definition. See Notes 1 and 9.]

                NonAccent       : 2 Bytes [Char/scan code when not used as accent]

                CtlAccent       : 2 Bytes [Char/scan code when used with CTL.]

                AltAccent       : 2 Bytes [Char/scan code when used with Alt.]

                Map1            : 2 Bytes [From char-to-char for translation.]

                Map2            : 2 Bytes   "  "  "  "

                  .                   .     "  "  "  "

                  .                   .     "  "  "  "

                  .                   .     "  "  "  "

                Map20           : 2 Bytes   "  "  "  "

            EndRec AccentEntry

            TableTypeID

                                   1st Byte     2nd Byte

                                   type         sub-type

                                   00X          Reserved

            OS/2                   01X          00X