Print-out of BMTP file

Peter Nicholson 2

2007-04-24 22:19:02

Hi Florian

I have printed out one of my BMTP files, and would like to understand several sections of the translator code.

1.Incoming Keystrokes—KeyDown SHIFT
I have, for example:
Incoming0=KAM11000KSQ10001010
I have been looking at this, and others, to see if I could spot links to KeyNumber and KeyCode, but I couldn’t!

I thought that KAM10000, KAM11000, and KAM12000, might be codes for Key Up/Down, KeyDown and KeyUp, but I’m guessing.

2.KSQxxxxxxxx
When I looked at this, I thought the last two characters might be the KeyCodes in Hex.

I would be most grateful if you would explain these to me Florian.

3.Options
(a)StMa00000001-------what does this mean?


By the way, is there an easy to use ‘utility’ I could use to print out the keycodes for my keyboard?

Regards

Peter

florian

2007-04-26 13:04:35

well, this is really quite internal stuff and not meant for human editing...

Some info:
KAM1 and KAM2 are "magics" to denote the start of key actions: "Key Action Magic". KAM1 is a simple version, KAM2 a more flexible one.

KAM1:
1 byte KeyType: 0: normal, 1: down, 2: up
1 byte Repeat: 1 yes, 0 no
2 bytes reserved (must be 0)
+KeySequence

KAM2:
1 byte KeyType: 0: normal, 1: down, 2: up
1 byte Repeat: 1 yes, 0 no
2 bytes repeat speed (0..255)
4 bytes repeat delay (0..60000)
+KeySequence

KeySequence is the definition of the key(s):
KSQ1 magic
4 bytes: number of following key events
per Key Event 3 bytes:
bit 9: Extended flag,
bit 10: key release
bit 11: use scan code
lower 8 bits: virtual key code, or scan code (depending on bit 11)

All numbers are hexadecimal encoded.

StMa is the magic for the Rules (internally called "Step Math").

Hope that clarifies a little...

Btw, the next version of MT will feature a "human readable" export feature, plus probably a sort of Excel export/import.

Regards,
Florian