BIOS Key Codes

Top  Previous  Next

The GetScanCode intrinsic returns a BIOS Key code that is identical to the key codes returned by BIOS Interrupt call 16h, function 0. The key code is 16-bit value with the high byte being a scan code and the low byte being the ASCII equivalent.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Key

 

Normal

 

Shifted

 

 

w/Ctrl

 

 

w/Alt

 

 

 

 

 

High

Low

 

High

Low

 

High

Low

 

High

Low

 

 

A

 

$1E

$61

 

$1E

$41

 

$1E

$01

 

$1E

$00

 

 

B

 

$30

$62

 

$30

$42

 

$30

$02

 

$30

$00

 

 

C

 

$2E

$63

 

$2E

$42

 

$2E

$03

 

$2E

$00

 

 

D

 

$20

$64

 

$20

$44

 

$20

$04

 

$20

$00

 

 

E

 

$12

$65

 

$12

$45

 

$12

$05

 

$12

$00

 

 

F

 

$21

$66

 

$21

$46

 

$21

$06

 

$21

$00

 

 

G

 

$22

$67

 

$22

$47

 

$22

$07

 

$22

$00

 

 

H

 

$23

$68

 

$23

$48

 

$23

$08

 

$23

$00

 

 

I

 

$17

$69

 

$17

$49

 

$17

$09

 

$17

$00

 

 

J

 

$24

$6A

 

$24

$4A

 

$24

$0A

 

$24

$00

 

 

K

 

$25

$6B

 

$25

$4B

 

$25

$0B

 

$25

$00

 

 

L

 

$26

$6C

 

$26

$4C

 

$26

$0C

 

$26

$00

 

 

M

 

$32

$6D

 

$32

$4D

 

$32

$0D

 

$32

$00

 

 

N

 

$31

$6E

 

$31

$4E

 

$31

$0E

 

$31

$00

 

 

O

 

$18

$6F

 

$18

$4F

 

$18

$0F

 

$18

$00

 

 

P

 

$19

$70

 

$19

$50

 

$19

$10

 

$19

$00

 

 

Q

 

$10

$71

 

$10

$51

 

$10

$11

 

$10

$00

 

 

R

 

$13

$72

 

$13

$52

 

$13

$12

 

$13

$00

 

 

S

 

$1F

$73

 

$1F

$53

 

$1F

$13

 

$1F

$00

 

 

T

 

$14

$74

 

$14

$54

 

$14

$14

 

$14

$00

 

 

U

 

$16

$75

 

$16

$55

 

$16

$15

 

$16

$00

 

 

V

 

$2F

$76

 

$2F

$56

 

$2F

$16

 

$2F

$00

 

 

W

 

$11

$77

 

$11

$57

 

$11

$17

 

$11

$00

 

 

X

 

$2D

$78

 

$2D

$58

 

$2D

$18

 

$2D

$00

 

 

Y

 

$15

$79

 

$15

$59

 

$15

$19

 

$15

$00

 

 

Z

 

$2C

$7A

 

$2C

$5A

 

$2C

$1A

 

$2C

$00

 

 

1

 

$02

$31

 

$02

$21

 

 

 

 

$78

$00

 

 

2

 

$03

$32

 

$03

$40

 

$03

$00

 

$79

$00

 

 

3

 

$04

$33

 

$04

$23

 

 

 

 

$7A

$00

 

 

4

 

$05

$34

 

$05

$24

 

 

 

 

$7B

$00

 

 

5

 

$06

$35

 

$06

$25

 

 

 

 

$7C

$00

 

 

6

 

$07

$36

 

$07

$5E

 

$07

$1E

 

$7D

$00

 

 

7

 

$08

$37

 

$08

$26

 

 

 

 

$7E

$00

 

 

8

 

$09

$38

 

$09

$2A

 

 

 

 

$7F

$00

 

 

9

 

$0A

$39

 

$0A

$28

 

 

 

 

$80

$00

 

 

0

 

$0B

$30

 

$0B

$29

 

 

 

 

$81

$00

 

 

-

 

$0C

$2D

 

$0C

$5F

 

$0C

$1F

 

$82

$00

 

 

=

 

$0D

$3D

 

$0D

$2B

 

 

 

 

$83

$00

 

 

[

 

$1A

$5B

 

$1A

$7B

 

$1A

$1B

 

$1A

$00

 

 

]

 

$1B

$5D

 

$1B

$7D

 

$1B

$1D

 

$1B

$00

 

 

;

 

$27

$3B

 

$27

$3A

 

 

 

 

$27

$00

 

 

'

 

$28

$27

 

 

 

 

 

 

 

 

 

 

 

`

 

$29

$60

 

 

 

 

 

 

 

 

 

 

 

\

 

$2B

$5C

 

$2B

$7C

 

$2B

$1C

 

$26

$00

 

 

,

 

$33

$2C

 

 

 

 

 

 

 

 

 

 

 

.

 

$34

$2E

 

 

 

 

 

 

 

 

 

 

 

/

 

$35

$2F

 

 

 

 

 

 

 

 

 

 

 

F1

 

$3B

$00

 

$54

$00

 

$5E

$00

 

$68

$00

 

 

F2

 

$3C

$00

 

$55

$00

 

$5F

$00

 

$69

$00

 

 

F3

 

$3D

$00

 

$56

$00

 

$60

$00

 

$6A

$00

 

 

F4

 

$3E

$00

 

$57

$00

 

$61

$00

 

$6B

$00

 

 

F5

 

$3F

$00

 

$58

$00

 

$62

$00

 

$6C

$00

 

 

F6

 

$40

$00

 

$59

$00

 

$63

$00

 

$6D

$00

 

 

F7

 

$41

$00

 

$5A

$00

 

$64

$00

 

$6E

$00

 

 

F8

 

$42

$00

 

$5B

$00

 

$65

$00

 

$6F

$00

 

 

F9

 

$43

$00

 

$5C

$00

 

$66

$00

 

$70

$00

 

 

F10

 

$44

$00

 

$5D

$00

 

$67

$00

 

$71

$00

 

 

F11

 

$85

$00

 

$87

$00

 

$89

$00

 

$8B

$00

 

 

F12

 

$86

$00

 

$88

$00

 

$8A

$00

 

$8C

$00

 

 

Back Space

 

$0E

$08

 

$0E

$08

 

$0E

$7F

 

$0E

$00

 

 

Del

 

$53

$00

 

$53

$2E

 

$93

$00

 

$A3

$00

 

 

Down Arrow

 

$50

$00

 

$50

$32

 

$91

$00

 

$A0

$00

 

 

End

 

$4F

$00

 

$4F

$31

 

$75

$00

 

$9F

$00

 

 

Enter

 

$1C

$0D

 

$1C

$0D

 

$1C

$0A

 

$A6

$00

 

 

Esc

 

$01

$1B

 

$01

$1B

 

$01

$1B

 

$01

$00

 

 

Home

 

$47

$00

 

$47

$37

 

$77

$00

 

$97

$00

 

 

Ins

 

$52

$00

 

$52

$30

 

$92

$00

 

$A2

$00

 

 

Keypad-(5)

 

$4C

 

 

$4C

$35

 

$8F

$00

 

 

 

 

 

Keypad-(*)

 

$37

$2A

 

$37

 

 

$96

$00

 

$37

$00

 

 

Keypad-(-)

 

$4A

$2D

 

$4A

$2D

 

$8E

$00

 

$4A

$00

 

 

Keypad-(+)

 

$4E

$2B

 

$4E

$2B

 

 

 

 

$4E

$00

 

 

Keypad-(/)

 

$35

$2F

 

$35

$2F

 

$95

$00

 

$A4

$00

 

 

Left Arrow

 

$4B

$00

 

$4B

$34

 

$73

$00

 

$9B

$00

 

 

Pg Dn

 

$51

$00

 

$51

$33

 

$76

$00

 

$A1

$00

 

 

Pg Up

 

$49

$00

 

$49

$39

 

$84

$00

 

$99

$00

 

 

Prt Sc

 

 

 

 

 

 

 

$72

$00

 

 

 

 

 

Right Arrow

 

$4D

$00

 

$4D

$36

 

$74

$00

 

$9D

$00

 

 

Space Bar

 

$39

$20

 

$39

$20

 

$39

$20

 

$39

$20

 

 

Tab

 

$0F

$09

 

$0F

$00

 

$94

$00

 

$A5

$00

 

 

Up Arrow

 

$48

$00

 

$48

$38

 

$8D

$00

 

$98

$00