# Emulated keystrokes don't work in games

**URL:** <https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906>\
**Category:** Bome Products\
**Tags:** midi-translator, keystroke\
**Created:** [January 29, 2024, 9:48pm UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906 "2024-01-29T21:48:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![farlandu](https://forum.bome.com/user_avatar/forum.bome.com/farlandu/32/5298_2.png) [@farlandu](https://forum.bome.com/u/farlandu)\
**Post date:** [January 29, 2024, 9:48pm UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906/1 "2024-01-29T21:48:28Z")

</div>

I have four translators set up to take MIDI input from my Akai MPK Mini’s drum pads and emulate a keystroke depending on the pad that is pressed. This works as intended in most programs (Notepad, Visual Studio, my browser, really any program that involves using keystrokes to type something.) However, when I try to use it with a game (which is my ultimate goal), the keystrokes do not go through. They are being translated and emulated, so I doubt this is a fault of the MIDI translator, but I thought the forums would be worth a try anyway.  
[mania.bmtp](https://forum.bome.com/uploads/short-url/gVVsWwFkPelA0x2NiIlUwGQ5wsT.bmtp) (436 Bytes)

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 29, 2024, 11:04pm UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906/2 "2024-01-29T23:04:08Z")

</div>

Hi and welcome to the Bome community!

Well first you do not have any default input ports so I created an alias as follows:

![image](https://forum.bome.com/uploads/default/original/2X/4/4cdf5b2929fffba1fb75ad45492dc04f3c9c547a.png)

You can learn more about aliases from [this tutorial](https://youtu.be/CrE391VJL0s).

Then I set up the preset to monitor that alias for incoming messages.

 ![image](https://forum.bome.com/uploads/default/original/2X/e/e9e52fc07b3957fd616dd12e042f8bc2ecc38ec2.png)

For more information about device selection, see [this tutorial](https://youtu.be/KunN2A1rKMY).

Finally I added two more 3 more translators as follows.

Perform Focus - Has an outgoing action to focus my selected application. I’m using EdipPlus but you should select your game application executable here.

![image](https://forum.bome.com/uploads/default/original/2X/a/a4e8316cc42c413bbb95dc8b66423668a97f8f80.png)

Application Focused

This triggers when the application is focused and sets the global variable ga to 1 in the rules

Application Unfocused

This triggers when the application is not focused and sets the global variable of ga to 0 in rules.

Again, for incoming application you need to select the game application executable that your are using for both of these translators.  
 ![image](https://forum.bome.com/uploads/default/original/2X/b/b26a1057226af943343e6cf0839f9ed3356b0f19.png)

Finally I set up these rules in each of your translators to call the translator ‘Perform Focus’. They will ensure your application is focused before sending the keystroke. If your application is already focused (ga=1), there is no need to trigger the the event.

```auto
if ga==0 then Perform "Focus"

```

If this doesn’t work, it is possible that the gaming application is bypassing Windows drivers and accessing your keyboard at the HID (Human Interface Device) level. This is often done in games to stop players from cheating the system.

Good Luck!

[mania-sjc.bmtp](https://forum.bome.com/uploads/short-url/35vbru2T4VhrYfYUA9imfkJcBGI.bmtp) (1.6 KB)

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 18, 2025, 3:35am UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906/3 "2025-01-18T03:35:41Z")

</div>

@farlandu,

Did you ever get this working? If so, what did you do?

Steve Caldwell  
Bome Customer Care

* * *
_Also available for paid consulting services: bome@sniz.biz_

---

<div class="post-metadata">

**Author:** ![farlandu](https://forum.bome.com/user_avatar/forum.bome.com/farlandu/32/5298_2.png) [@farlandu](https://forum.bome.com/u/farlandu)\
**Post date:** [January 18, 2025, 4:09am UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906/4 "2025-01-18T04:09:31Z")

</div>

@SteveC ,

Hey there, thanks for following up! Admittedly, I haven’t actually tried the file you provided, since it requires the paid version. But, I did download it, and I intend to continue this project one day. Again, thank you for your help. Cheers.

---

<div class="post-metadata">

**Author:** ![SteveC](https://forum.bome.com/user_avatar/forum.bome.com/stevec/32/8250_2.png) [@SteveC](https://forum.bome.com/u/SteveC)\
**Post date:** [January 18, 2025, 5:14am UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906/5 "2025-01-18T05:14:03Z")

</div>

It doesn’t require a paid version to test it but it will time out every 20 minutes with the test version. The reason I asked is because I’m afraid some games bypass keyboard drivers and I was curious if it ever worked with your game.

---

<div class="post-metadata">

**Author:** ![farlandu](https://forum.bome.com/user_avatar/forum.bome.com/farlandu/32/5298_2.png) [@farlandu](https://forum.bome.com/u/farlandu)\
**Post date:** [January 18, 2025, 9:03pm UTC](https://forum.bome.com/t/emulated-keystrokes-dont-work-in-games/5906/6 "2025-01-18T21:03:38Z")

</div>

Ohh, I see. I was using the classic version, which I’m assuming is why I’d get hit with a bunch of errors when I loaded it up. Anyway, it still seems to only work for typing things instead of actually playing the game, so it must be (like you said) some HID-level shenanigans that the game is pulling. Probably just needs more research into the game itself, unless Bome has a way of getting around this that I’m unaware of?
