Sie sind auf Seite 1von 38

ThinkPad T460 Keyboard function specification

Version 0.01 Edition

Lenovo Japan Ltd.


Published May 1, 2015
Copyright © 2009 Lenovo Ltd.

Edited by Tetsuji Nakamura

This document contains information of proprietary nature. All Information contained herein shall be kept
in confidence. None of this information shall be divulged to persons other than Lenovo employees au-
thorized by the nature of their duties to receive such information, or individuals or organizations autho-
rized by the Lenovo Ltd. in accordance with existing policy regarding to release of company information.
ThinkPad T460 Keyboard function specification
Lenovo Japan Ltd.
by Tetsuji Nakamura

Published May 1, 2015


Copyright © 2009 Lenovo Ltd.
Lenovo Confidential

Table of Contents
Preface ....................................................................................................................... xi
1. Sequential Key-Code Scanning ................................................................................... 1
2. Power-On Routine .................................................................................................... 3
3. Commands from the system ....................................................................................... 5
4. Commands to the System ........................................................................................... 9
5. Scan Codes ............................................................................................................. 11
5.1. Set 1 Scan-Code Tables ................................................................................. 11
5.2. Set 2 Scan-Code Tables ................................................................................. 13
6. Hotkey ................................................................................................................... 17
6.1. Sticky Fn key function ................................................................................... 17
6.2. Scan codes of Fn key ..................................................................................... 18
A. Keyboard Layouts and key positions .......................................................................... 21
A.1. Keyboard Key Number and Layout .................................................................. 21
A.2. US Keyboard Image ..................................................................................... 21
B. Multiple Key Operation ............................................................................................ 23
C. Key Matrix ............................................................................................................ 25

iii
iv
Lenovo Confidential

List of Figures
6.1. Fn State Diagram .................................................................................................. 18
6.2. Fn Scan code Generation State Diagram .................................................................... 18
A.1. Keyboard Key Number and Layout ......................................................................... 21
A.2. sample US keyboard image .................................................................................... 21

v
vi
Lenovo Confidential

List of Tables
3.1. Command from the system ....................................................................................... 5
3.2. Bit assignments of the option byte of Set/Reset Indicators ............................................. 6
3.3. Typematic Rate ...................................................................................................... 7
4.1. Commands to the system ......................................................................................... 9
5.1. Scan Codes of Scan-code Set 1 ............................................................................... 11
5.2. Scan Codes of Scan-code Set 1 ............................................................................... 12
5.3. Scan Codes of Scan-code Set 1 ............................................................................... 12
5.4. Scan Codes of Scan-code Set 1 ............................................................................... 12
5.5. Scan Codes of Scan-code Set 1 ............................................................................... 13
5.6. Scan Codes of Scan-code Set 2 ............................................................................... 13
5.7. Scan Codes of Scan-code Set 1 ............................................................................... 13
5.8. Scan Codes of Scan-code Set 2 ............................................................................... 13
5.9. Scan Codes of Scan-code Set 2 .............................................................................. 14
5.10. Scan Codes of Scan-code Set 2 .............................................................................. 15
5.11. Scan Codes of Scan-code Set 2 .............................................................................. 15
5.12. Scan Codes of Scan-code Set 2 .............................................................................. 15
5.13. Scan Codes of Scan-code Set 2 .............................................................................. 15
5.14. Scan Codes of Scan-code Set 2 .............................................................................. 15
B.1. Valid 3-key combination ........................................................................................ 23
C.1. Key Matrix .......................................................................................................... 25

vii
viii
Lenovo Confidential

List of Equations
3.1. Typematic period .................................................................................................... 7

ix
x
Lenovo Confidential

Preface
There is much type of keyboards for many countries. Major differences among them are characters
printed on keys. Keyboards will send one or several binary data to the system that are used to identify
which key is pressed or released. OS will translate identified key to a character depending on location
information (US, French, German and so on) and the keyboard type.

There are three scan code sets and ThinkPad supports scan code set 1 and 2 only. Scan code set 3 is
not supported because there is no application nor OS uses this scan code set.

xi
xii
Lenovo Confidential

Chapter 1. Sequential Key-Code Scanning


The keyboard detects all keys pressed and sends each scan code in the correct sequence. When not
being serviced by the system, the keyboard stores the scan codes in its buffer.

Buffer

A 17-byte first-in-first-out (FIFO) buffer in the keyboard stores the scan codes until the system is
ready to receive them. A buffer-overrun condition occurs when more than 16 bytes are placed in the
keyboard buffer. An overrun code replaces the 17th byte. If more keys are pressed before the system
allows keyboard output, the additional data is lost.

When the keyboard is allowed to send data, the bytes in the buffer are sent as in normal operation, and
new data entered is detected and sent. Response codes do not occupy a buffer position.

If keystrokes generate a multiple-byte sequence, the entire sequence must fit into the available buffer
space, or the keystroke is discarded and a buffer-overrun condition occurs.

Keys

Except for the pause key, all keys generate make/break scan codes. The make scan code of a key is sent
to the keyboard controller when the key is pressed. When the key is released, its break scan code is sent.

Also, except for the pause key, all keys are typematic. When a key is pressed and held down, the
keyboard sends the make code for that key, delays 500 milliseconds +- 20%, and begins sending a
make scan code for that at a rate of 10.9 characters per seconds +-20%. The typematic rate and delay
is programmable (see "Set Typematic rate/Delay (Hex F3)").

If two or more keys are held down, only the make scan code for the last key pressed repeats to generate
at the typematic rate. Typematic operation stops when the last key pressed is released, even if other
keys are still held down. If a key is pressed and held down while keyboard transmission is inhibited,
only the first make scan code is stored in the buffer. This prevents buffer overflow because of typematic
action.

1
2
Lenovo Confidential

Chapter 2. Power-On Routine


When EC recognizes the system is powered on, following actions take place.

At the first, keyboard indicators, NumLk and CapsLock indicators are turned on.

EC waits 2.5 seconds for something comes from external devices connected by PS/2 ports. If a com-
pletion code of BAT (hex AA) has come, a Read ID command is issued to ensure a keyboard is at-
tached. If a completion code and 00 has come, a pointing device is assumed to be attached. When a
BAT failure (hex FC) has come or a keyboard is recognized, a completion code or a failure code is sent
to the system. When nothing has come within 2.5 seconds, a completion code is sent to the system.

After a completion code or a failure code is sent, keyboard indicators are turned off.

When a completion code is sent to the system, keyboard scanning begins. Completion codes are sent
about 500ms after a Reset command acknowledged if any keyboard is attached to PS/2 port. If a
keyboard is attached, period depends on attached keyboard.

3
4
Lenovo Confidential

Chapter 3. Commands from the system


The following table shows the commands that the system may send and their hexadecimal values.

Table 3.1. Command from the system


Command Hex Value
Set/Reset Status Indicators ED
Echo EE
Invalid Command EF
Select Alternate Scan Codes F0
Invalid Command F1
Read ID F2
Set Typematic Rate/Delay F3
Enable F4
Default Disable F5
Set Default F6
Set All Keys - Typematic F7
Set All Keys - Make/Break F8
Set All Keys - Make F9
Set All Keys - Typematic/Make/break FA
Set Key - Typematic FB
Set Key - Make/Break FC
Set Key - Make FD
Resend FE
Reset FF

These commands can be sent to the keyboard at any time. The keyboard responds within 20 millisec-
onds, except when performing the BAT, or executing a RESET command.

The following commands are in alphabetic order. They have different meanings when issued by the
keyboard (see "Commands to the System").

Default Disable (Hex F5): The Default Disable command resets all conditions to the power-on default
state. The keyboard responds with ACK, clears its output buffer, and typematic rate/delay, and clears
the last typematic key. The keyboard stops scanning and awaits further instructions.

Echo (Hex EE): Echo is diagnostic aid. When the keyboard receives this command, it issues a hex
EE response if previously enabled, it continue scanning.

Enable (Hex F4): On receipt of this command, the keyboard responds with ACK, clears its output
buffer, clears the last typematic key, and starts scanning.

Invalid Command (Hex EF and F1): Hex EF and F1 are invalid commands and are not supported. If
one of these is sent, the key board does not acknowledge the command but returns a Resend command
and continues in its prior scanning state. No other activities occur.

Read ID (Hex F2): This command requests identification information from the keyboard. The key-
board responds with ACK, stops scanning, and sends the two keyboard ID bytes. The second byte
must follow completion of the first by no more than 500 microseconds. After the output of the second
ID byte, the keyboard resumes scanning.

5
Lenovo Confidential

Resend (Hex FE): The system sends this command when it detects an error in any transmission from
the keyboard. It is sent only after a keyboard transmission and before the system allows the next
keyboard output. When a Resend command is received, the keyboard sends the previous output again
(unless the previous output was Resend command, in which case the keyboard sends the last byte
before the Resend command).

Reset (Hex FF): The system issues a Reset command to start a program reset and a keyboard internal
self-test. The keyboard acknowledges the command with an ACK and ensures the system accepts
ACK before executing the command. The system signals acceptance of ACK by raising the 'clock' and
'data' lines for a minimum of 500 milliseconds. The keyboard disabled from the time it receives the
Reset command until ACK is accepted, or until another command is sent that overrides the previous
command.

Following acceptance of ACK, the keyboard is reinitialized and performs the BAT. After returning
the completion code, the keyboard defaults to scan-code set 2.

Select Alternate Scan Codes (Hex F0): This command instructs the keyboard to select one of three
sets of scan codes. The keyboard acknowledges receipt of this command with ACK and clears both
the output buffer and the typematic key (if one is active). The system then sends the option byte and
the keyboard responds with another ACK. An option byte value of hex 01 selects scan code set 1 and
hex 02 selects scan code set 2.

An option byte value of hex 00 causes the keyboard to acknowledge with an ACK and send a byte
telling the systems which scan code set is currently in use. To prevent the controller from translating
this byte, disable the keyboard controller translate mode.

After establishing the new scan code set, the keyboard returns to the scanning state it was in before
receiving the Select Alternate Scan Code command.

Set All Keys (Hex F7, F8, F9,FA): These commands are valid but not supported. The keyboard
responds with ACK, clears its output buffer, and continues scanning (if it was previously enabled).

Set Default (Hex F6): The Set Default command resets all conditions to the power-on default state.
The keyboard responds with ACK, clears its output buffer, sets the default key types (scan-code set 3
operations only) and typematic rate/delay, clears the last typematic key, and continues scanning.

Set Key Type (Hex FB, FC, FD): These commands are valid but not supported. The keyboard re-
sponds with ACK, clears its output buffer, and prepares to receive an option byte. The system then
sends the option byte and the keyboard responds with another ACK. The keyboard returns to the scan-
ning state it was in before receiving the Set Key Type commands.

Set/Reset Status Indicators (Hex ED): Three status indicators on the keyboard - Num Lock, Caps
Lock, and Scroll Lock- are accessible by the system. The keyboard activates or deactivates these
indicators when it receives a valid command-code sequence from the system. The command sequence
begins with the command byte (Hex ED). The keyboard responds with ACK, stops scanning, and
waits fro the option byte from the system. The bit assignments for this option byte are as follows.

Table 3.2. Bit assignments of the option byte of Set/Reset Indicators


Bit Function
7-3 Reserved (must be 0's)
2 Caps Lock indicator
1 Num Lock indicator a
0 Scroll Lock indicator a
a
This indicator is not existing on the keyboard of ThinkPad. External keyboards have this indicator.

If a bit for an indicator is set to 1, the indicator is turned on. If a bit is set to 0, the indicator is turn off.

6
Lenovo Confidential

The keyboard responds to the option byte with ACK, sets the indicators and, if the keyboard was
previously enabled, continues scanning. The state of the indicators reflects the bits in the option byte
and can be activated or deactivated in any combination. Another command is received in place of the
option byte, execution of the Set/Reset Mode Indicators command is stopped, with no change to the
indicator states, and the new command is processed.

When any Keypad and keyboard is not attached through a PS/2 connector, keys of 10 keypad printed
on right lower side of keys of the embedded keyboard (NumPad) are become usable if bit 1 of the
option byte (Num Lock indicator) is one. NumPad is disappeared when this command is received if
bit 1 of the option byte is 0.

Immediately after power-on, the lights default to the off state. If the Set Default and Default Disable
commands are received, the lamps remain in the state they were before the command was received.

Set Typematic Rate/Delay (Hex F3): The system issues the Set Typematic Rate/Delay command
to change the typematic rate and delay. The keyboard responds to the command with ACK, stops
scanning, and waits for the system to issue the rate/delay value byte. The keyboard responds to the
rate/delay value byte with another ACK, sets the rate and delays to the values indicated, and continues
scanning (if it was previously enabled). Bit 6 and 5 indicate the delay, and bits 4, 3, 2, 1, and 0 (the
least-significant bit) in rate. Bit 7, the most significant bit is always 0. The delay is equal to 1 plus the
binary value of bit 6 and 5, multiplied by 250 milliseconds ± 20%.

The period (interval from one typematic output to the next) is determined by the following equation:

Equation 3.1. Typematic period


Period = (8 + A) × (2 B ) × 0.00417 seconds ± 20% A = binary value of bit 2, 1, and 0. B = binary
value of bit 4 and 3.

The typematic rate (make codes per second) is 1 for each period.

Table 3.3. Typematic Rate


Bit Typematic Bit Typematic
Rate ± 20% Rate ± 20%

00000 30.0 10000 7.5


00001 26.7 10001 6.7
00010 24.0 10010 6.0
00011 21.8 10011 5.5
00100 20.0 10100 5.0
00101 18.5 10101 4.6
00110 17.1 10110 4.3
00111 16.0 10111 4.0
01000 15.0 11000 3.7
01001 13.3 11001 3.3
01010 12.0 11010 3.0
01011 10.9 11011 2.7
01100 10.0 11100 2.5
01101 9.2 11101 2.3
01110 8.6 11110 2.1
01111 8.0 11111 2.0

The default values for the system keyboard are as follows:

7
Lenovo Confidential

Typematic rate = 10.9 characters per seconds ±20%Delay = 500 milliseconds ±20%

The execution of this command stops without change to the existing rate if another command is re-
ceived instead of the rate/delay value byte.

8
Lenovo Confidential

Chapter 4. Commands to the System


The following table shows the commands that the keyboard may send to the system, and their hex-
adecimal values.

Table 4.1. Commands to the system


Command Hex Value

Key Detection Error/Overrun 00 (Code Sets 2 and 3)


Keyboard ID 83AB/84AB
BAT Completion Code AA
BAT Failure Code FC
Echo EE
Acknowledge (ACK) FA
Resend FE
Key Detection Error/Overrun FF (Code Sets 1)

The commands the keyboard sends to the system are described in alphabetic order. They have different
meanings when issued by the system.

Acknowledge (Hex FA): The keyboard issues ACK to any valid input other than an Echo, or Re-
send command. If the keyboard is interrupted while sending ACK, it discards ACK and accepts and
responds to the new command.

BAT Completion Code (Hex AA): Following satisfactory completion of the BAT, the keyboard
sends hex AA. Another code indicates a failure of the keyboard.

BAT Failure Code (Hex FC): If a BAT failure occurs, the keyboard sends this code, stops scanning,
and waits fro a system response or reset.

Echo (Hex EE): The keyboard sends this code in response to an Echo command.

Keyboard ID (Hex 83AB/84AB): The Keyboard ID consists of 2 bytes, hex 83AB or 84AB. The
keyboard responds to the Read ID command with ACK, stops scanning, and sends the 2 ID bytes.
The low byte is sent first followed by the high byte. Following the output of the Keyboard ID, the
keyboard begins scanning. Because of keyboard controller translation, the keyboard ID may not be
returned to the system as hex 83AB or 84AB.

When a KeyPad is attached, the Keyboard ID is hex 83AB. Otherwise it is hex 84AB.

Key Detection Error (Hex 00 or FF): The keyboard sends a key detection error character if conditions
in the keyboard make it impossible to identify a switch closure. If the keyboard is using scan code set
1, the code is hex FF. For sets 2 and 3, the code is hex 00.

Overrun (Hex 00 or FF): An overrun character is placed in the keyboard buffer and replaces the last
scan code when the buffer capacity has need exceeded. The code is sent to the system when it reaches
the top of the buffer queue. If the keyboard is using scan code set 1, the code is hex FF. For sets 2
and 3, the code is hex 00.

Resend (hex FE): The keyboard issues a Resend command following receipt of an invalid input, or
any input with incorrect parity. If the system sends nothing to the keyboard, no response is required.

9
10
Lenovo Confidential

Chapter 5. Scan Codes


The following tables list the key numbers of the two scan code sets and their hexadecimal values.
The system defaults to scan code set 2, but can be switched to set 1 (see "Select Alternate Scan Code
(Hex F0)").

5.1. Set 1 Scan-Code Tables


In scan-code set 1, each key is assigned a base scan code and sometimes extra codes to generate
artificial shift states in the system. The typematic scan codes are identical to the base scan code for
each key.

The following table shows the codes sent for the keys, regardless of any shift states in the keyboard
or system. Refer to "Keyboard Layouts" to determine the character associated with each key number.

Table 5.1. Scan Codes of Scan-code Set 1


Key Number Make Code Break code Key Number Make Code Break Code
e
1 29 A9 45 56 D6
2 02 82 46 2C AC
3 03 83 47 2D AD
4 04 84 48 2E AE
5 05 85 49 2F AF
6 06 86 51 31 B1
7 07 87 52 32 B2
8 08 88 53 33 B3
9 09 89 54 34 B4
10 0A 8A 55 35 B5
11 0B 8B 57 36 B6
12 0C 8C 58 1D 9D
13 0D 8D 60 38 B8
b
14 7D FD 61 39 B9
15 0E 8E 62 E0 38 E0 B8
16 0F 8F 64 E0 1D E0 9D
17 10 90 110 01 81
a
18 11 91 115 3E BE
a
19 12 92 116 3F BF
a
20 13 93 117 40 C0
a
21 14 94 118 41 C1
a
22 15 95 119 42 C2
a
23 16 96 120 43 C3
a
24 17 97 121 44 C4
a
25 18 98 122 57 D7
a
27 1A 9A 123 58 D8
b
28 1B 9B 131 7B FB
c b
29 2B AB 132 79 F9
b
30 3A BA 133 70 F0
31 1E 9E 138 E0 69 E0 E9

11
Lenovo Confidential Set 1 Scan-Code Tables

Key Number Make Code Break code Key Number Make Code Break Code
d
33 20 A0 150 E0 63 E0 E3
34 21 A1 137 E0 6A E0 EA
35 22 A2 152 E0 20 E0 A0
36 23 A3 153 E0 2E E0 AE
37 24 A4 154 E0 30 E0 B0
39 26 A6 155 E0 5B E0 DB
40 27 A7
41 28 A8
e
42 2B AB
43 1C 9C
44 2A AA
a
scan codes are generate while the Fn key is held down or in Fn Lock state.
b
90-key keyboard only.
c
86-key keyboard only
d
Fn key may act as a wakeup key in some operating system like windows XP and generates these scan codes. Also see "Scan
codes of Fn key" on Page 19.
e
87-key keyboard only

The remaining keys sends a series of codes that are dependent on the state of the various shift keys
(Ctrl, Alt, and Shift), and the state of Num Lock (On or Off). Because the base scan code is identical
to another key, an extra code (hex E0) has been added to the base code to make it unique.

Table 5.2. Scan Codes of Scan-code Set 1


Key No. Base Case Shift Case Make/Breaka NumLock on Make/Break
75 E0 52 /E0 D2 E0 AA E0 52 /E0 D2 E0 2A E0 2A E0 52 /E0 D2 E0 AA
76 E0 53 /E0 CB E0 AA E0 53 /E0 CB E0 2A E0 2A E0 53 /E0 CB E0 AA
80 E0 47 /E0 C7 E0 AA E0 47 /E0 C7 E0 2A E0 2A E0 47 /E0 C7 E0 AA
81 E0 4F /E0 CF E0 AA E0 4F /E0 CF E0 2A E0 2A E0 4F /E0 CF E0 AA
85 E0 49 /E0 C9 E0 AA E0 49 /E0 C9 E0 2A E0 2A E0 49 /E0 C9 E0 AA
86 E0 51 /E0 D1 E0 AA E0 51 /E0 D1 E0 2A E0 2A E0 51 /E0 D1 E0 AA
a
If the left Shift key is held down, the AA/2A shift make and break are sent with the other scan codes. If the right Shift key is
held down, B6/36 is sent. If both Shift keys are down, both codes are sent with other scan code.

Table 5.3. Scan Codes of Scan-code Set 1


Key No. Base Case, or Shift + Shift Case Num Lock on Make/Break
Num Lock Make/Breaka
79 E0 4B /E0 CB E0 AA E0 4B /E0 CB E0 2A
83 E0 48 /E0 C8 E0 AA E0 48 /E0 C8 E0 2A
84 E0 50 /E0 D0 E0 AA E0 50 /E0 D0 E0 2A
89 E0 4D /E0 CD E0 AA E0 4D /E0 CD E0 2A
a
If the left Shift key is held down, the AA/2A shift make and break are sent with the other scan codes. If the right Shift key is
held down, B6/36 is sent. If both Shift keys are down, both codes are sent with other scan code.

Table 5.4. Scan Codes of Scan-code Set 1


Key No. Scan Code Make/Break Shift Case Make/Breaka
95 E0 35/E0 B5 E0 AA E0 35/E0 B5 E0 2A
a
If the left Shift key is held down, the AA/2A shift make and break are sent with the other scan codes. If the right Shift key is
held down, B6/36 is sent. If both Shift keys are down, both codes are sent with other scan code.

12
Lenovo Confidential Set 2 Scan-Code Tables

Table 5.5. Scan Codes of Scan-code Set 1


Key No. Scan Code Make/Break Ctrl Case, Shift Alt Case Make/Break
Case Make/Break
124 E0 2A E0 37 /E0 B7 E0 AA E0 37/ E0 B7 54/D4

Table 5.6. Scan Codes of Scan-code Set 2


Key No. Scan Code Make/Break Fn Case Make/Break note
a
26 19/ 99 E1 1D 45 E1 9D C5 Fn+P -> Pause (126)
32 1F/ 9F 38 54/ D4 B8 Fn+S -> SysReq (124 +
ALT)
38 25/ A5 46/ C6 Fn+K -> ScrLk (125)
a
50 30/ B0 1D E0 46 E0 C6 9D Fn+B - Break (126 +
Ctrl)
a
This is not typematic. Associated scan codes occur on the make of the key.

Table 5.7. Scan Codes of Scan-code Set 1


Key Base Case Make/Break Fn or Fn Lock Fn + Fn Lock
No. on Make/Break on Make/Break
112 E0 20/ E0 A0 3B/ BB E0 20/ E0 A0
113 E0 2E/ E0 AE 3C/ BC E0 2E/ E0 AE
114 E0 5B/ E0 DB 3D/ BD E0 5B/ E0 DB

5.2. Set 2 Scan-Code Tables


In scan-code set 2, each key is assigned a unique 8-bit make scan code, which is sent when the key
is pressed. Each key also sends a break code when the key is released. The break code consists of 2
bytes, the first of which is break code prefix, hex F0; the second byte is the same as the make scan
code for that key. The typematic scan code for a key is the same as the key's make code.

The following table shows the codes sent for the keys, regardless of any shift states in the keyboard
or system. Refer to "Keyboard Layouts" to determine the character associated with each key number.

Table 5.8. Scan Codes of Scan-code Set 2


Key Number Make Code Break code Key Number Make Code Break Code
e
1 0E F0 0E 45 61 F0 61
2 16 F0 16 46 1A F0 1A
3 1E F0 1E 47 22 F0 22
4 26 F0 26 48 21 F0 21
5 25 F0 25 49 2A F0 2A
6 2E F0 2E 51 31 F0 31
7 36 F0 36 52 3A F0 3A
8 3D F0 3D 53 41 F0 41
9 3E F0 3E 54 49 F0 49
10 46 F0 46 55 4A F0 4A
11 45 F0 45 57 59 F0 59
12 4E F0 4E 58 14 F0 14
13 55 F0 55 60 11 F0 11

13
Lenovo Confidential Set 2 Scan-Code Tables

Key Number Make Code Break code Key Number Make Code Break Code
b
14 6A F0 6A 61 29 F0 29
15 66 F0 66 62 E0 11 E0 F0 11
16 0D F0 0D 64 E0 14 E0 F0 14
17 15 F0 15 110 76 F0 76
a
18 1D F0 1D 115 0C F0 0C
a
19 24 F0 24 116 03 F0 03
a
20 2D F0 2D 117 0B F0 0B
a
21 2C F0 2C 118 83 F0 83
a
22 35 F0 35 119 0A F0 0A
a
23 3C F0 3C 120 01 F0 01
a
24 43 F0 43 122 78 F0 78
a
25 44 F0 44 123 07 F0 07
a
27 54 F0 54 121 09 F0 09
b
28 5B F0 5B 131 67 F0 67
b b
29 5D F0 5D 132 64 F0 64
b
30 58 F0 58 133 13 F0 13
31 1C F0 1C 137 E0 38 E0 F0 38
33 23 F0 23 138 E0 30 E0 F0 30
d
34 2B F0 2B 150 E0 5E E0 F0 5E
35 34 F0 34 152 E0 23 E0 F0 23
36 33 F0 33 153 E0 21 E0 F0 21
37 3B F0 3B 154 E0 32 E0 F0 32
39 4B F0 4B 155 E0 1F E0 F0 1F
40 4C F0 4C
41 52 F0 52
e
42 5D F0 5D
43 5A F0 5A
44 12 F0 12
a
scan codes are generate while the Fn key is held down or in Fn Lock state.

The remaining keys sends a series of codes that are dependent on the state of the various shift keys
(Ctrl, Alt, and Shift), and the state of Num Lock (On or Off). Because the base scan code is identical
to another key, an extra code (hex E0) has been added to the base code to make it unique

Table 5.9. Scan Codes of Scan-code Set 2


Key No. Base Case, or Shift + Shift Case Make/Breaka NumLock on Make/Break
NumLock Make/Break
75 E0 70 /E0 F0 70 E0 F0 12 E0 70 / E0 12 E0 70 /E0
E0 F0 70 E0 12 F0 70 E0 F0 12
76 E0 71 /E0 F0 71 E0 F0 12 E0 71 / E0 12 E0 71 /E0
E0 F0 71 E0 12 F0 71 E0 F0 12
80 E0 6C /E0 F0 6C E0 F0 12 E0 6C / E0 12 E0 6C /E0
E0 F0 6C E0 12 F0 6C E0 F0 12
81 E0 69 /E0 F0 69 E0 F0 12 E0 69 / E0 12 E0 69 /E0
E0 F0 69 E0 12 F0 69 E0 F0 12

14
Lenovo Confidential Set 2 Scan-Code Tables

Key No. Base Case, or Shift + Shift Case Make/Breaka NumLock on Make/Break
NumLock Make/Break
85 E0 7D /E0 F0 7D E0 F0 12 E0 7D / E0 12 E0 7D /E0
E0 F0 7D E0 12 F0 7D E0 F0 12
86 E0 7A /E0 F0 7A E0 F0 12 E0 7A / E0 12 E0 7A /E0
E0 F0 7A E0 12 F0 7A E0 F0 12
a
If the left Shift key is held down, the F0 12/12 shift make and break are sent with the other scan codes. If the right Shift key
is held down, F0 59/59 is sent. If both Shift keys are down, both codes are sent with other scan code.

Table 5.10. Scan Codes of Scan-code Set 2


Key No. Base Case, or Shift + Shift Case Num Lock on Make/Break
Num Lock Make/Breaka
79 E0 6B /E0 F0 6B E0 F0 12 E0 6B /E0 F0 6B E0 12
83 E0 75 /E0 F0 75 E0 F0 12 E0 75 /E0 F0 75 E0 12
84 E0 72 /E0 F0 72 E0 F0 12 E0 72 /E0 F0 72 E0 12
89 E0 74 /E0 F0 7A E0 F0 12 E0 74 /E0 F0 74 E0 12
a
If the left Shift key is held down, the F0 12/12 shift make and break are sent with the other scan codes. If the right Shift key
is held down, F0 59/59 is sent. If both Shift keys are down, both codes are sent with other scan code.

Table 5.11. Scan Codes of Scan-code Set 2


Key No. Scan Code Make/Break Shift Case Make/Breaka
95 95 E0 4A/E0 F0 4A E0 F0 12 E0 4A/E0 F0 4A E0 12
a
If the left Shift key is held down, the F0 12/12 shift make and break are sent with the other scan codes. If the right Shift key
is held down, F0 59/59 is sent. If both Shift keys are down, both codes are sent with other scan code.

Table 5.12. Scan Codes of Scan-code Set 2


Key No. Scan Code Make/Break Ctrl Case, Shift Alt Case Make/Break
Case Make/Break
124 E0 12 E0 7C /E0 E0 7C /E0 F0 7C 84 /F0 84
F0 7C E0 F0 12

Table 5.13. Scan Codes of Scan-code Set 2


Key No. Scan Code Make/Break Fn Case Make/Break note
a
26 4D/ F0 4D E1 14 77 E1 F0 14 F0 77 Fn+P -> Pause (126)
32 1B/ F0 1B 11 84/ F0 84 F0 11 Fn+S -> SysReq (124 +
ALT)
38 42/ F0 42 7E/ F0 7E Fn+K -> ScrLk (125)
a
50 32/ F0 32 14 E0 7E E0 F0 7E F0 14 Fn+B - Break (126 +
Ctrl)

Table 5.14. Scan Codes of Scan-code Set 2


Key Base Case Make/Break Fn or Fn Lock Fn + Fn Lock
No. on Make/Break on Make/Break
112 E0 23/ E0 F0 23 05/ F0 05 E0 23/ E0 F0 23
113 E0 21/ E0 F0 21 06/ F0 06 E0 21/ E0 F0 21
114 E0 32/ E0 F0 32 04/ F0 04 E0 32/ E0 F0 32

15
16
Lenovo Confidential

Chapter 6. Hotkey
Fn key is an unique key of notebooks. This key is a trigger to resume from suspend even if the Ctrl
key and the Fn key swap feature is enabled. When Fn key is held down, some keys will associate
with notebook unique functions, suspend, display switching, stand-by, hibernation and etc.. These
keys are called "Hotkey". Some keys act as other normal keys when Fn key is held down to reduce
number of physical keys. There are four buttons on the keyboard, ThinkVantage, audio volume up/
down and audio mute button. They are also hotkeys while Fn key is released. Power switch is also on
the keyboard but this is only used to power on and off (this may cause an interrupt to UEFI BIOS/OS
but this is a chip set function). So there are four types of keys;

• Keys with Fn key become hotkeys (Hotkey function key)


• Buttons without Fn key become hotkey (Button)
• Keys act as other keys with Fn key (Fn alt key)
• Others (normal key)

Hotkey will cause following actions;

• SCI/SMI with event codes


• Turn on/off or control peripherals of the embedded controller, the keyboard light, audio volume
and so on.

Some events of hotkeys are created periodically while hotkeys are held down, for example audio
volume up. Some of hotkey events are informed to applications and device drivers through UEFI
BIOS. They will handle events, for example video drivers change active displays every when Fn+F7
key is pressed on Windows.

Fn key can generate scan codes of one of keys defined by Microsoft but not assigned to the embedded
keyboard. ThinkPad assigns "Wake" key to wake up from stand-by state.

All normal keys are ignored when the Fn key is held down as default. It can be changed not to ignore
them.

6.1. Sticky Fn key function


Sticky Fn key function is used to be able to use hotkeys without holding Fn key down. When a key
is pressed after Fn key is pressed and release, it is treated as a hotkey. Fn sticky state is turned on
when Fn key is pressed and it is turned off when a key is pressed and released. If Fn key is pressed
again in Fn sticky state, Fn key state is transited to Fn lock state. In Fn lock state all keys are treated as
they are pressed with Fn key held down until Fn key is pressed and released again. Fn state diagram
is as follows;

17
Lenovo Confidential Scan codes of Fn key

Figure 6.1. Fn State Diagram

6.2. Scan codes of Fn key


Fn key can be set to generate scan codes when it is pressed and released. If it is used for a Hotkey,
scan codes of Fn key may cause problems. For example Fn+F3 is assigned to the standby function.
Keys are used as follows;

1. Press Fn
2. Press F3
3. Release F3
4. Release Fn

If break scan codes are generated in step 4, the system will return to normal state, turn on the display.
For above case, Fn key should not generate scan codes. In other word, Fn key will act as Fn key or
the assigned normal key depends on which key is pressed next.

Figure 6.2. Fn Scan code Generation State Diagram

18
Lenovo Confidential Scan codes of Fn key

Scan codes are generated in following cases;

• When state is changed to "Act as assigned key" state, make scan codes are generated.
• When state is changed from "Act as assigned key" state to Fn off state, break scan codes are gen-
erated.
• When state is changed from "Act as Fn key with Time out" state to Fn off state, make and break
scan codes are generated.

19
20
Lenovo Confidential

Appendix A. Keyboard Layouts and key


positions
There are some embedded keyboards of ThinkPad. Keyboard Layouts of ThinkPad X230 series and
key position number are showed in this section

A.1. Keyboard Key Number and Layout


Figure A.1. Keyboard Key Number and Layout

A.2. US Keyboard Image


Figure A.2. sample US keyboard image

21
22
Lenovo Confidential

Appendix B. Multiple Key Operation


Any two keys on the keyboards can be recognized properly. And three keys, two keys in following
table and a key of all keys except ALT, CTRL, SHIFT, Fn, Caps Lock and Numlock keys, can be
recognized correctly. For each row in the table below, an “X” indicates that key is selected (holding
down).

Table B.1. Valid 3-key combination


WIN LCTRL RCTRL LSHIFT RSHIFT LALT RALT Fn
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X
X X

23
24
Lenovo Confidential

Appendix C. Key Matrix


Following table is ThinkPad key matrix. Left side column is drive number and first row is sense line
number. Line 14 and 15 is used another purpose so there is no key on these lines.

Table C.1. Key Matrix


1 2 3 4 5 6 7 8
1 110 16 17 1 31 2 46 131
2 115 114 19 113 33 4 48
3 45 30 18 112 32 3 47
a
4 58 64b
5 35 21 20 6 34 5 49 50
6 36 22 23 7 37 8 52 51
7 117 28 24 13 38 9 53 56
8 132 118 25 119 39 10 54 133
9 41 27 26 12 40 11 42 55
c d
10 44 57
11 116 15 14 120 29 121 43 61
e f g h
12 151 153 154 76 152 122 84
i
13 60 124 62j
14
15
16 155k 75 123 89
17 83 80 (Fn) 81 79
18 156 85 86
a
Left CTRL
b
Right CTRL
c
Left SHIFT
d
Right SHIFT
e
ThinkVantage button
f
Volume down button
g
Volume up button
h
Mute button
i
Left Alt
j
Right Alt
k
Windows key

25
26

Das könnte Ihnen auch gefallen