Scan Code

From BR Wiki
Jump to navigation Jump to search

A scan code is a two-part or four-part hexadecimal code associated with a keystroke (so called because it comes from scanning the keyboard). See the KStat$ internal function for information about determining the operating system and Business Rules! scan codes.

To determine the standardized Business Rules scancodes, run the following program:

10 LET X$ = KSTAT$(1)
20 PRINT UNHEX$(X$)
30 GOTO 10

Each time you press a key, the scancode for that key is displayed.

Here are a few of the Scan codes:

Key Scan Code
Tab 09
Shift+Tab 07
Down Arrow 0A
Up Arrow 0B
Left Arrow 0E
Right Arrow 0C
F7 0700
Shift+F7 1100
Alt+Down Arrow E300

Here's a complete list:

*The asterisks denotes a change that occurred with version 4.3. Most of the keys in prior versions were unassigned, but a few were assigned differently.

Key Shifted (IBM-PC) Kstat Shifted (qwerty) Control Description
Key Alt
a A 61 41 1E00 01 interrupt/break
b B 62 42 3000 02 page up (back)
c C 63 43 2E00 03 copy to clipboard
d D 64 44 2000 04 delete
e E 65 45 1200 05 end field
f F 66 46 2100 06 page down (forward)
g G 67 47 2200 07 backtab
h H 68 48 2300 08 backspace
i I 69 49 1700 09 tab
j J 6A 4A 2400 0A next field
k K 6B 4B 2500 0B prior field
l L 6C 4C 2600 0C right arrow
m M 6D 4D 3100 0D enter
n N 6E 4E 3200 0E left arrow
o O 6F 4F 1800 0F field minus
p P 70 50 1900 10 print screen
q Q 71 51 1000 11 toggle insert mode
r R 72 52 1300 12 up field (rise)
s S 73 53 1F00 13 togge hold mode (stop)
t T 74 54 1400 14 down field
u U 75 55 1600 15 field plus
v V 76 56 2F00 16 paste clipboard content
w W 77 57 1100 17 home
x X 78 58 2D00 18 cut to clipboard
y Y 79 59 1500 19 help
z Z 7A 5A 2C00 1A restore field contents
1 ! 31 21 7800
2 @ 32 40 7900
3 # 33 23 7A00
4 $ 34 24 7B00
5 % 35 25 7C00
6 ^ 36 5E 7D00
7 & 37 26 7E00
8 * 38 2A 7F00
9 ( 39 28 8000
0 ) 30 29 8100
` ~ 60 7E 8300*
= + 3D 2B 8400*
[ { 5B 7B 8500* 6300 escape
] } 5D 7D 8600* 1D shell call
\ 5C 7C 8700* 1C toggle line draw
; : 3B 3A 8800*
' " 27 22 8900*
, < 2C 3C 8A00*
. > 2E 3E 8B00*
/ ? 2F 3F 8C00*
tab 09 07 B900* B700 - ctrl-shift
field+ 15 15 15 15
field- 0F 0F 0F 0F


Key Shifted (IBM-PC) Kstat Shifted (qwerty) Control Description
Key Alt
enter 0D A400* E400* C400*
home 17 A500* E500* C500*
end 05 A600* E600* C600*
pageUp 02 A700* E700* C700*
pageDn 06 A800* E800* C800*
up-arrow 0B A200* E200* C200*
down-arrow 0A A300* E300* C300*
left arrow 0E A000* E000* C000*
right arrow 0C A100* E100* C100*
up-arrow 0B A200* E200* C200*
down-arrow 0A A300* E300* C300*
left arrow 0E A000* E000* C000*
right arrow 0C A100* E100* C100*
left click B000 B600 - used internally - mouse left up
second left B100
right click B400
second right B500
wheel up 7C00
wheel down 7D00
F1 0100 0B00 0100 1500
F2 0200 0C00 0200 1600
F3 0300 0D00 0300 1700
F4 0400 0E00 5D00 1800
F5 0500 0F00 0500 1900
F6 0600 1000 0600 1A00
F7 0700 1100 0700 1B00
F8 0800 1200 0800 1C00
F9 0900 1300 0900 1D00
F10 0A00 1400 0A00 1E00
F11 0B00 1500 0B00 1F00
F12 0C00 1600 0C00 2000

Note that BR retains select (hilite) status while shift or control remain depressed after a program receives control in navigation mode. When in edit mode, the control key temporarily switches to navigation mode.

This chart was originally found at Key Mappings.

See the KStat$ internal function for more information.