Is it possible to tell BTT that a key should do nothing if a specific other key was pressed immediately before it?
Specifically: The right arrow key should do nothing if the right Shift key was pressed immediately before it.
Is it possible to tell BTT that a key should do nothing if a specific other key was pressed immediately before it?
Specifically: The right arrow key should do nothing if the right Shift key was pressed immediately before it.
I think that is currently hard to achieve. While you can set some variable when pressing shift, and make the arrow key execution dependent on that, there is currently no good way to reset that variable once another key is pressed.
I could solve this by somehow introducing a "any key" in key sequences (I had thought about this in the past, probably also due to some feature request you made
)
That's quite possible ![]()
Before I try it: I could see this as a workaround.
Hold down the right Shift key a little longer (this locks the keyboard), then swipe one finger down to the right arrow key --> this triggers something. Without the arrow key doing what it normally does. And finally, reactivate the keyboard.
If it shall be happening fast you could start a timer when pressing shift that would block the arrow key for example for 1 second. This should be doable, if this would be fine I can post an example tomorrow (need to sleep now :-))
Well then, good night. And yes, please post an example tomorrow. Thank you very much!
Thanks, Andreas! That works perfectly... even though I don't understand why.
I don't understand what a “variable” is in this context. Variable is the weather and my mood, when I have to think of variables.
What’s important here, and why? The name, the value?
How can I learn this? The BTT manual lists all the variables, but if I don’t understand the basics, that doesn’t help, unfortunately. Sorry for the silly questions from an old man... I’d really like to learn this.
I’ll definitely use your solution, of course :-). In the meantime, I’ve come up with this. It almost works, without any variables at all. And I understand what I’m doing. If it worked.
Shift is the last trigger. If the arrow key is pressed shortly after that, something is triggered. If Shift wasn’t pressed shortly before, the arrow key is just the arrow key … but that only works a bit.
For the variables, it's not hard:
Variables are mostly just containers for storing text or numbers. And these can be checked in if conditions or CAGs.
Conditional Activation Groups have only a few "variables" that can be used in CAGs. These are named customVariable1, customVariable2, customVariable3, customVariable4 and customVariable5.
A CAG can check whether a variable contains something specific. For example "customVariable1 contains Frank" could be a condition. By default that would be false and the CAG would not be active, because obviously the customVariable1 does not contain "Frank" by default.
However using the "set variable value" action you can e.g. assign some text, for example "hello my name is Frank" to customVariable1. Now the CAG would be active because customVariable1 now contains Frank ![]()
The action sequence above sets customVariable1 to "shift-pressed" when pressing right-shift. The CAG checks for "contains shift-pressed" and becomes true. After 1.20 seconds the action resets the variable to "" (empty), so the CAG is now false again.
What a lovely explanation with my name in it
All right, when I have a quiet moment, I’ll try to really understand that. Thank you!
I also really like this:
I bet you could do a lot of cool stuff with this
If you have time, please implement it ![]()
@Andreas_Hegenberg I've updated to 6.360. Now this variable stuff isn't working anymore. Can you please help?
Edit: Ah, wait, sorry, I restarted BTT, and now it seems to be working again.
Edit 2: No, it doesn't work anymore ![]()