Expand Blocking the Keyboard

@Andreas_Hegenberg Despite your admirable efforts, unfortunately, virtually pressing and releasing modifier keys has never worked reliably. Even the improvements you recently introduced don’t solve the problem for me.

What does work reliably, however, is using the keyboard block as a virtual modifier. I’m wondering if it would be possible to expand this “mode.”

I imagine there could be “block 1” and “block 2.”

“block 1” + A would trigger something different than “block 2” + A, just as Cmd + A triggers something different than Opt + A.

Ideally, “block 1” + “block 2” + A would trigger something else entirely, just like Cmd + Opt + A.

Would something like this be possible? Thanks!

You can easily do that by assigning a custom variable after you start blocking the keyboard

Then in your CAG check for that variable as well as for the keyboard blocking:

Great and so simple. Why didn't you tell me before? Thanks :wink:

I'm probably doing something wrong, but unfortunately, this isn't working for me.

I have an existing CAG “Keyboard is Locked” (without a variable), and I created a second CAG (with a variable).

So I have “Block” and “Block2,” with a variable

but both triggers are triggered when the keyboard is blocked.

in your other one you need a condition „custom variable 1 is not block1“

I would recommend to write both values into the same custom variable 1, I think for your usecase there is no need to use multiple variables

Unfortunately, I don't understand how to do that. Would you be so kind as to post a screenshot?

So you probably have two triggers that both start the blocking, right?

Then in the first one you set value "block1" to customVariable1:

And in the second one you set value "block2" to customVariable1:

Then the conditions for the two groups can look like that:

CAG1:

CAG2:

Okay, thank you very much!

It's probably my fault, but this just isn't working here. To make things worse, I don't really understand what I'm doing when I use variables :joy:

In any case, I've found a much simpler solution, more my style, that doesn't use any variables at all.

In this context, I’ve noticed once again that the conditions in CAG and Advanced Conditions aren’t the same. For example, “Currently Pressed Keyboard Key” is missing in CAG.

That’s a condition I use often and would prefer to have in a CAG because it makes setting up things much easier.

Would it be possible to have this condition in CAG as well?

this leads to the discussion we have had many times. CAG's need to be very performant advanced trigger conditions do not. If currently pressed keyboard key was added to the CAG's they would need to reevaluate on every key press causing pretty high cpu usage while typing.

It would not be as bad as some other variables because it does not need to be polled, but it would still use a lot of resources. I could add it with that warning, but I would not recommend to do it like this.

Of course, I still remembered your argument. But sometimes the result is different if something is repeated (question) :wink:

Everything's fine. The Advanced Conditions are very good, too. :smiley:

Maybe for the variable approach, can you post an example of how you start the blocking? (which triggers)
Then I can create a base preset you can import. Variables are nothing fancy here, basically just names for the blocks.

That's very kind of you, but for my purposes, blocking the keyboard isn't necessary. There's a much easier way.

For example, I want to trigger something with x + j. This works by holding down x (long press, no action) j triggers something other than the letter when x is held down at the same time.

The question is: How should “x” be typed? A short press (when releasing the key) doesn’t work because “x” is usually typed after “j” anyway. So the “x” shortcut most do nothing.

A key sequence (x down/up) is needed. If "j" is pressed in between, x isn’t typed because the key sequence was interrupted.

However, for the capital X, Xx is typed instead. Can you tell me how to avoid that?

Sorry, I hope you understand what I mean. :innocent:

Edit:

The Key Sequence requires an “Advanced Condition” that checks whether the Shift key is already pressed or not.