Modifier keys are not holding but instead repeating

Hello guys!

I’m new here. I just need a simple way to turn one physical keyboard key into 2 modifier keys. In my case I need to make T work as CONTROL+OPTION. However, when I hold down T, it will repeat those modifiers instead of holding them down while I hold T. That behaviour won’t accomplish what I need at all.

Is there a way around that?

This should work:

Note:

I’ve set a timeout to the Pause action to make sure to not get stuck with the keys down, while playing around:

BTW, it works only with the hotkey trigger set to pressed (not down).

Modifier down.kmmacros (3.4 KB)

2 Likes

Hi Tom!!!

Thank you so much for your help. Unfortunately it did not work. Nothing happens actually :frowning:

I’m trying to perform that action inside Photoshop by the way.

Are you sure the macro group where you’ve put the macro in is activated in Photoshop?

What are you seeing when you open the Keyboard Viewer. When you press and hold "T" the two modifiers should be down, without flickering:

What do you want to accomplish with Ctrl-Option in Photoshop?

1 Like

Hey Tom!

I just double clicked the script you made available for download, it installed and that was it. I didnt tweak the settings any more so I should be active. When I press T nothing happens. Keyboard viewer shows I typed T.

What I actually would be able to accomplish in photoshop is the following:

Hold down a random key, which could be T for instance, and have Photoshop activate CONTROL+OPTION+LEFT MOUSE BUTTON DRAG. That actions corresponds to changing the brush size on the fly. Then I could simply hover my stylus on my tablet and brush size could be modified.

If the LEFT MOUSE BUTTON DRAG is out of question, then simply holding any key to activate CONTROL+OPTION would be fine, I would just have to actually press the stylus down the tablet to send the drag command (which I would rather hover but that’s not a big deal)

I didnt tweak the settings any more so I should be active. When I press T nothing happens. Keyboard viewer shows I typed T.

I have no idea what is happening. I just tried it on another Mac and it works there as well.

In case you haven’t already, drop another macro into the same macro group, to see if it’s the macro or the macro group that is not working.

Make sure the macro group is set like this (for testing):

Keyboard Maestro can press and hold a letter.

The key will only be held down until:

  • The macro finishes
  • You type the same key (manually or via Keyboard Maestro)
  • You release it with another Type a Keystroke T action.

And Keyboard Maestro can drag the mouse.

Whether any of this works with Photoshop is anyone's guess. It is highly dependent on exactly how Photoshop behaves and that is far from predictable. Other than trying it and seeing, there is no way to know if it will work.

And Keyboard Maestro can drag the mouse. […]
Whether any of this works with Photoshop is anyone’s guess.

The dragging action works fine here with Photoshop CS6. 20 mouse pixels increase the brush size by about 46px.

@dream3 I just tried the original macro in Photoshop and with dragging the mouse (manually). It works, but after hitting “T” you have to wait for ~0.5s before starting to drag.

Tom, I got the first macro working now. T down equals option+control. I haven’t tried the dragging yet though.

Now about that 0.5 delay, can we do something about it? Why does it have to be there?

peter the way you set up the drag action does work at all. I needed some way to emulate a free 3 finger drag movement, so that I could hold down a key and move one finger over the trackpad.

Now about that 0.5 delay, can we do something about it? Why does it have to be there?

I guess it’s just the accumulated execution time: T down signal > KM macro > appleeventsd(?) > System Events > Ctrl-Opt down.

So it seems plausible to me that pressing directly Ctrl-Opt is a bit faster. On a faster Mac the delay will be shorter probably.

Oh I see. I thought I could get a similar experience to AHK on windows. There’s no perceptible delay there :frowning:

What about the dragging + modifiers, how would you solve that one?

Yes, as said above, it works, but with the small delay. (I only tested it with a mouse, I don’t have a tablet here.)

Hey dream3, were you able to use this or find a different approach? I’m interested in the same thing
Thanks!