How to capture active windows shortcuts in outgoing message?

synthmusic

2011-05-22 23:56:31

Hi all,

I've done a lot of searching so far, ultimate goal is to get to a particular app, do some stuff, and then come back to original app. Work-arounds found so far:

- send alt-tab.
BUT, I'm trying to capture an alt-tab in the outgoing keystroke emulation, and guess what, my computer goes to another app before MT catches it. In win7, btw.

- add a shortcut key to the properties of the shortcut for the app
same as above, trying to enter the keystroke in MT causes the app to launch with no capture. Sure I can go delete the key shortcut, add to MT then re-add the shortcut, but that's irritating.

In fact, when i come back to MT it still has the key down of the modifier and all other key presses go inside the parentheses. OK I can capture the tab, and it says "Alt(Tab )", but I don't think that's what is actually captured because it doesn't behave like alt-tab every time it's triggered. Further if I want to do other stuff, it's all inside the alt now and it will not exit. "Alt(Tab Page Down )" but i want "Alt(Tab ) Page Down "

How about copying and pasting into notepad and manually typing out what i want? Well i can't paste back in the box. Of course, ctrl-v get's captured as Ctrl(V ), :) but a right click to the context menu and paste is greyed out.

I *could* have a keydown alt event followed by an tab followed by a key up alt followed by what i really want to do, but again, this misses my point with a number of silly events

I am now on to reverse engineering the .bmtp file for keystrokes, and decided to post.

Any ideas?

Or pointers to how to read the keystrokes out of that?

BTW I love that i can assign a button on my BCR to help me work on this, "Shift(Down Down Down )Delete Down " lines up the outgoing code nicely in the file... :)

I'm pretty close to understanding the file and answering my own question I think, i'll post a reply in a minute

synthmusic

2011-05-23 00:29:06

OK, I'm pretty close! Though I am likely missing some nuances...

Keystroke emulation output format for .bmtp files. Not as obfuscated as I had feared.

for ex: Outgoing10=KAM10100KSQ10008011041241211011041241211
- "Ctrl(A )Ctrl(A )"


location
0-7 "KAM10100" - I'm sure this means something, but it doesn't change for what I'm doing, so I don't know.
8-11 "KSQ1" - probably key sequence, doesn't change in this context either.
12-15 "0008" - number of steps about to happen, in hex. I'm guessing it's 4 characters, i don't have time for boundary testing.
16- "011041241211011041241211" - sets of 3 digit action. Some kind of control digit, then 2 digits of ascii and/or windows virtual key codes, though some aren't the same.

The point is key up is + 0x 200 to the key down.

so in above, repeated twice

011 ctrl down
041 a down
241 a up
211 ctrl up



key down up
Ctrl 011 211
Shift 010 210
Left Windows 15B 35B
Alt 012 212
Right Ctrl 111 311
Shift 010 210
Right Windows 15C 35C
Right Alt 112 312
Tab 009 209
Backspace 008 208


Hope that's helpful!

florian

2011-06-13 22:07:09

Hi,

sorry for the problem with entering Windows-taken key strokes. It's quite annoying that Windows 7 does not pass on all keystrokes to the application. Midi Translator should, however, add any missing key releases at the end of the key sequence on its own.

But pretty good reading of the keystroke format! Note that we don't intend to obfuscate, actually -- it's just a format easy to read for the software. We will eventually switch to XML, that'll make it much easier for text editing...

Florian

bframes

2014-02-17 20:15:01

Hi guys, I'm having the same issue trying to enter windows(E) into the incoming field which would open a Windows Explorer. Synthmusic, is that possible by reverse engineering the .bmte file?

synthmusic

2015-10-13 01:17:05

I was doing interesting stuff with BMT today, love it! But was having capture problems again, so I looked this up to remember the pattern.

Florian, didn't catch this:
florian wrote:Hi,

...Midi Translator should, however, add any missing key releases at the end of the key sequence on its own...

Florian
Thought I'd note it does not add missing key releases on its own. For instance an alt-tab (by holding alt and clicking the tab button in the interface) still reads the following after save. v1.8.0 on Win7 physical keys or text
Outgoing1=KAM10100KSQ10003012009209 <- missing 212 to close alt.
...<Keys><Key VK="18"/><Key VK="9"/><Key Release="Y" VK="9"/></Keys>
bframes wrote:Hi guys, I'm having the same issue trying to enter windows(E) into the incoming field which would open a Windows Explorer. Synthmusic, is that possible by reverse engineering the .bmte file?
bframes,
given how long ago this is, don't know if a) you ever figured this out, or b) you still care. :) but for the record the Win(e) would look like the following:
find the outgoing rule you want to fix, and after the '=' change to the following:
KAM10100KSQ1000415B04524535B

it will be after
Name#=Your Translator Name
Incoming#=...
Outgoing#= the above string

It's not too difficult to find, but for the record, please be careful. If you don't know what you're doing editing the file you could well corrupt your hard work. save a copy and try it there first.

florian

2015-10-26 16:42:54

Hi Synthmusic,

thanks for the additional information. Indeed, MT does not add any missing "key release" keys to the project file. But when actually emulating a keystroke sequence, it notices keys that were pressed by the sequence but not released, and releases them at the end.

Thanks,
Florian

jath85

2016-06-08 17:44:26

Hi,

I still want to send an alt-tab, did anyone solve this?

florian

2016-06-09 00:25:40

Hi jath85, you can certainly send Alt-Tab! Where is the problem?
Thanks,
FLorian