Jump to content

Allow typing while Alfred Hotkey modifier is still pressed


basteln

Recommended Posts

Hi! First off, thanks for Alfred, it's a great app and I've already used it 57308 times.

 

There's a little problem: I have the Alfred Hotkey set to Ctrl+Space. Often when I fire up Alfred and start typing, I press the first 1-2 letters while I'm still holding Ctrl. So if I type "Mail", Alfred only gets "ail", and the Accessibility Inspector app is the first match. I often press Return very quickly without looking, so I end up opening the wrong apps.

 

It would be awesome if Alfred received all the letters I typed, even while Ctrl was still pressed.

Link to comment
Share on other sites

If you type "ail" a few times, and select Mail, Alfred will remember, and Mail will then be the top result for "ail".

 

Repeat for any other apps you regularly fat-finger. 

 

Fundamentally, it's not a good idea to interpret <MOD+letter> as just <letter>. Alfred has no way of knowing if it is intentional or not, and it would be confusing, as no other application behaves this way.

 

Link to comment
Share on other sites

13 minutes ago, deanishe said:

Fundamentally, it's not a good idea to interpret <MOD+letter> as just <letter>. Alfred has no way of knowing if it is intentional or not, and it would be confusing, as no other application behaves this way.

 

I wouldn't generally interpret <MOD+letter> as just <letter>. Only if MOD is the Alfred Hotkey modifier and it's still the same modifier keypress that was used to open Alfred.

 

Binding "ail" to "Mail" is a bad workaround because it clashes if you want "ail" to open something else. For example, I use "Saf" to open Safari. If I bind "af" to Safari, it clashes with Affinity Photo.

Edited by basteln
Link to comment
Share on other sites

40 minutes ago, basteln said:

a bad workaround

 

What you're suggesting would break standard OS behaviour.

 

CTRL is used for certain default macOS text navigation shortcuts. If I've set Alfred to remember my last query, I might pop Alfred open with CTRL+SPACE and then immediately hit D or K (i.e. CTRL+D/CTRL+K) to clear the query. Your suggestion would break this behaviour.

 

Link to comment
Share on other sites

Or a solution would be to change your hotkey to something else... I first thought about setting your hotkey to shift+space, but on my system it seems Alfred doesn't allow it (I may have already used it somewhere so that would be why Alfred doesn't allow it, or it doesn't allow it in general... but you may have better luck on your side if you try). Alternatively, I think you would have less trouble by using a hotkey that use a double tap on modifier, since I think it would be more natural to release the key, before typing... Maybe shift+shift would be best since that if you keep shift while typing, you would get a uppercase letter instead of nothing or a special character.

 

Or a last solution would be to create a workflow with a hotkey object that the action is set to "Show Alfred" and that the Trigger behaviour is set to "Wait until modifier keys are released" so you are sure that when you see Alfred, everything is released and you shouldn't have any problem to type anything you want. Look in the attachment for a picture to show you how to set the hotkey trigger. However, if you want to keep ctrl+space, you would need to change it first on the Alfred Hotkey (just put something that won't interfere with anything else, since the workflow trigger would be your new Alfred Hotkey). If you are wondering, I thought at first that it may work by setting the Trigger behaviour to "Simulate modifier keys release" so the ctrl key is released programmatically, but it didn't work.

Capture d’écran 2017-09-21 à 13.38.01.png

Link to comment
Share on other sites

5 minutes ago, GuiB said:

Or a last solution would be to create a workflow with a hotkey object that the action is set to "Show Alfred" and that the Trigger behaviour is set to "Wait until modifier keys are released"

 

I thought there was a way to do this, but I couldn't find the damn setting. Bravo.

Link to comment
Share on other sites

  • 4 years later...

@GuiB or @deanishe - By chance, do you guys know if there's a way to get Alfred to wait for a modifier release to occur when used with keywords (or script filters, for that matter)? In other words, is there a way to achieve what Alfred is doing with its hotkey trigger behavior (pictured above - wherein it will wait to kick things off until the keys are released), when configuring the connection from a keyword or script filter that's run via action modifier?

 

I have a couple of GUI-based workflows for handling things that aren't scriptable, which are run from keywords via a modifier (e.g., ⌘↩︎). However, they have a tendency to break when the command modifier is still being held (sometimes my thumb is a little lazy, ha). I've inserted some delays and things, but these can be finicky. I was hoping that Alfred - or some other scriptable solution - could check to see if any keys are being held down, and then just run the rest of the workflow once everything's been released (like Alfred's hotkey settings).

 

Thanks for your help!

Link to comment
Share on other sites

On 9/14/2022 at 10:19 AM, Jasondm007 said:

@GuiB or @deanishe - By chance, do you guys know if there's a way to get Alfred to wait for a modifier release to occur when used with keywords (or script filters, for that matter)? In other words, is there a way to achieve what Alfred is doing with its hotkey trigger behavior (pictured above - wherein it will wait to kick things off until the keys are released), when configuring the connection from a keyword or script filter that's run via action modifier?

 

I have a couple of GUI-based workflows for handling things that aren't scriptable, which are run from keywords via a modifier (e.g., ⌘↩︎). However, they have a tendency to break when the command modifier is still being held (sometimes my thumb is a little lazy, ha). I've inserted some delays and things, but these can be finicky. I was hoping that Alfred - or some other scriptable solution - could check to see if any keys are being held down, and then just run the rest of the workflow once everything's been released (like Alfred's hotkey settings).

 

Thanks for your help!

 

@Andrew Would you consider adding this configure connection option at some point down the road (see above explanation)? For instance, here's one way it could be implemented on the UI side of things:

 

setting.png.fd483fb2e553627640c5536e98146131.png

 

Thanks for your consideration!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...