# How use velocity to trigger keystrokes

**URL:** <https://forum.bome.com/t/how-use-velocity-to-trigger-keystrokes/4157>\
**Category:** Bome Products\
**Tags:** midi-translator\
**Created:** [April 2, 2022, 1:20am UTC](https://forum.bome.com/t/how-use-velocity-to-trigger-keystrokes/4157 "2022-04-02T01:20:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philippe.LORANCHET](https://forum.bome.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@Philippe.LORANCHET](https://forum.bome.com/u/Philippe.LORANCHET)\
**Post date:** [April 2, 2022, 1:20am UTC](https://forum.bome.com/t/how-use-velocity-to-trigger-keystrokes/4157/1 "2022-04-02T01:20:35Z")

</div>

Hello  
I would like to assign two different keyboard shortcuts on the same note input, but depending on the velocity of the “note on”.  
For instance, I would like to have a “Ctrl X” if I strike the note softly (velocity below 40) and a “Ctrl C” if i strike it rapidly (velocity above 100)  
Thank you for your help.

 ![Capture bome](https://forum.bome.com/uploads/default/original/2X/5/5972ae1f028745ee57ca2eaa096ff6ff380f8016.jpeg)

---

<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:** [April 2, 2022, 2:08am UTC](https://forum.bome.com/t/how-use-velocity-to-trigger-keystrokes/4157/2 "2022-04-02T02:08:41Z")

</div>

Hi,

Welcome to the Bome community!

Please find the attached example.  
There are 2 translators,  
The rules in the first translator ensure it only fires if the velocity over 40

```auto
if qq>=40 then exit rules, skip Outgoing Action

```

The rules of the second translator ensure it only fires if the velocity is over 100.

```auto
if qq<=100 then exit rules, skip Outgoing Action

```

If it is in between, nothing will happen.  
[keystroke-depending-on-note-velocity.bmtp](https://forum.bome.com/uploads/short-url/8kdu9i6VXuZHpqwIi7pKbaLZP98.bmtp) (1.4 KB)

Steve Caldwell  
Bome Customer Care

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

---

<div class="post-metadata">

**Author:** ![Philippe.LORANCHET](https://forum.bome.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@Philippe.LORANCHET](https://forum.bome.com/u/Philippe.LORANCHET)\
**Post date:** [April 3, 2022, 10:15am UTC](https://forum.bome.com/t/how-use-velocity-to-trigger-keystrokes/4157/3 "2022-04-03T10:15:34Z")

</div>

Hi Steve  
Thank you very much for your help  
It looks like it is working fine…  
I would like now to add a third rule  
if qq is \>=40 AND qq is \<100  
so I can trigger a third command  
How would you do that ?  
Thank you again …  
Best regards

---

<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:** [April 4, 2022, 1:20am UTC](https://forum.bome.com/t/how-use-velocity-to-trigger-keystrokes/4157/4 "2022-04-04T01:20:51Z")

</div>

Hi,

Something like this should work.

```auto
if qq<40 then skip next rule
if qq<100 then exit rules, execute outgoing action
exit rules, skip outgoing action

```

For other examples see [this post](https://forum.bome.com/t/and-or-and-else-ins-rules/1632/2) under tips and tricks.

Steve Caldwell  
Bome Customer Care

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