Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moving cursor with AutoKey script

Tags:

autokey

Is it possible to write an AutoKey script to insert a string and then move the cursor to a position within the imported script? For example, I would like a script that inserts console.log(); and then moves the cursor so that it it between the parentheses.

Also, are there any code references for writing scripts for AutoKey, all I've been able to locate are about a dozen example scripts.

like image 693
Art Ianuzzi Avatar asked Jul 19 '26 06:07

Art Ianuzzi


1 Answers

In autokey-gtk 0.90.4 and later (Don't know about older versions), you can insert "<cursor>" where you want to position the cursor.

So for example, in your case:

console.log(<cursor>);
like image 163
Omri Caspi Avatar answered Jul 20 '26 23:07

Omri Caspi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!