Keyboard shortcut without modifier


Would it be possible to implement an option to create a keyboard shortcut without a modifier. For example a 'j' of a 'k' that would trigger a page down or a page up event in a particular app on a Mac (for example Twitter), but that would behave normal in a text window so that one can normally type.

As an example look at the Vimari extension for Safari.

Would love to see this functionality.


What you can do is set up two actions.

"j" normal/short pressed = "j".

"j" long pressed = what you want.

I launch web pages in the browser like this.

In theory you can use conditional activation groups that only activate if text fields are active (matching for "Focused Element Role" AXTextField and AXTextArea). You could then add the shortcuts to these conditional activation groups.

In practice however, many apps don't expose the focused element role - especially browser based apps.

@Andreas_Hegenberg Ah, interesting, I will try it out.

But "advocatus diaboli" what if the cursor is in a text field, but you want the other command? short/long pressed always works :slight_smile:

Can you already say approximately when you will implement your queue idea for single key trigger? So that there is no (less) wrong order of letters when writing fast.

Ah, works! Kinda... How would I proceed using this method? For example for an app like Twitter

What works for me now (but more like a strange hack is the following. I have two keyboard shortcuts defined for the app Twitter: "j" for page down and "k" for page up.
Next, I have defined a Conditional Activation Group the conditions you've described. I also included some conditions which are checking the name of some known windows in which I could input text (To bypass the issue you've described). I associated the keys "j" and "k" with it and defined a random action for them. Next I have disabled both keyboard shortcuts:

the disabling of the keyboard shortcuts have as a (weird?) result that when the conditions of the group is met the keys "k" and "j" will output as "k" and "j". Thereby overwriting the keyboard shortcuts that I have defined for Twitter.

This works, but a) it seems kinda strange that disabling the keyboard shortcuts under the Conditional Activation group results in the behavior I described. and b) Unfortunately it the Conditional Activation group is operating system wide and is not tied to a particular app like Twitter.

What would be a better way to do this?

Ah sorry the screenshot above was just a basic example for conditional activation groups.

For your use case you'd specify multiple conditions:

1.) Currently NO text field is active
2.) The current app is Twitter

To create such sub condition groups hold opt while pressing the plus icon. It would then look like this:

// edit: thinking about it, you don't really need sub conditions:

Ahrr :slight_smile: … off course. Thanks.