Jump to content

Simulate arrow keystrokes

Recommended Posts

To simulate a left or right arrow key press you can use the Dispatch Key Combo action inside the Output > Dispatch Key Combo menu.


Alternatively, you can use AppleScript, for example:

-- To execute a left arrow key press
tell application "System Events" to key code 123

-- To execute a right arrow key press
tell application "System Events" to key code 124

You can have a look here for some reference on key code: https://eastmanreference.com/complete-list-of-applescript-key-codes

Edited by GuiB
Link to comment
1 hour ago, Noffica said:

So, a Dispatch Key Combo connected to a Run NSApple Script containing the above code?


No. One or the other. They do the same thing.


1 hour ago, Noffica said:

What if I want the '1' num pad key to trigger the left arrow keystroke?


Alfred won't let you create a Hotkey for that key, so you'll have to use a different app and the AppleScript if you want to bind to a numpad key without a modifier.

Link to comment

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...