For the record, Xy4's scan code is the same as the key code for
unshifted keys, and equals the key code plus 256*(2^n), where n ranges
from 0 to the number of TABLEs in the loaded KBD file minus 1, for
shifted keys. The value of n depends on the ordering of the TABLEs in
the KBD file (n = 0 corresponds to the *last* TABLE). The scan codes
for shifted-key combinations, like Alt-Shift, are calculated
additively, so that if, for example, the scan code of unshifted Esc is
1, the scan code of Ctrl-Esc is 513 (1 + 256*(2^1)) and the scan code
of Alt-Esc is 1025 (1 + 256*(2^2), then the scan code of Ctrl-Alt-Esc
is 1538 (513 + 1025).
But XyWrite's concept of scan code (and thus U2 frame SCAN) is
irrelevant to the conversation you're having with Wengier.
--
Carl Distefano
cld@xxxxxxxx