running Autokey from commandline?

385 views
Skip to first unread message

MatthijsG

unread,
Sep 8, 2016, 9:22:17 AM9/8/16
to autokey-users
As a happy user of Autokey (thanks to this group for some help!) i want to take a next step: run commands with a second keyboard (USB). On Ubuntu 16.04 i've installed the daemon actkbd (yes, that's the name ;-) See http://users.softlab.ntua.gr/~thkala/projects/actkbd/

What it does, it can replace a keypress with a command or word. Like, when you're typing 'a', gedit opens. Put a sticker of the gedit icon on the key 'a' and you've a different keyboard :-) 

My question: is it possible to trigger a phrase or a script from command line or by API or something? Otherwise, i've to set hotkeys i want to use for other purposes. 
The GTK is running, but i can't find the documentation to run autokey from command line. Even not sure if this is possible.

Thanks in advance. 

(if you're interested in using a second keyboard, read these links. 

MatthijsG

unread,
Sep 8, 2016, 9:48:29 AM9/8/16
to autokey-users

Apparantely you can run Autokey from CLI with autokey-run

  • the command from CLI
    autokey-run -help
    returns
Usage: autokey-run -[s|p|f] [name]

Options:
  -h, --help            show this help message and exit
  -s SCRIPT, --script=SCRIPT
                        Run a script
  -p PHRASE, --phrase=PHRASE
                        Paste a phrase
  -f FOLDER, --folder=FOLDER
                        Show a folder popup menu

Examples:
  • give folder menu: 
    • autokey-run -f Autokey-test
  • run a script with the name date
    • autokey-run -s date
  • a script with a space in it's name
    • autokey-run -s 'Insert Date'
O wow, just what i needed :-) 

I leave it here for reference. 

Joe

unread,
Sep 8, 2016, 12:45:45 PM9/8/16
to autoke...@googlegroups.com
I knew it was there, but I didn't remember where.

Please post back here with working examples. I don't think we have any.

Thanks.

Joe


On 09/08/2016 09:48 AM, MatthijsG wrote:
>
> Apparantely you can run Autokey from CLI with autokey-run
>
> * the command from CLI
> autokey-run -help
> returns
>
> *Usage: autokey-run -[s|p|f] [name]*
> *
> *
> *Options:*
> * -h, --help show this help message and exit*
> * -s SCRIPT, --script=SCRIPT*
> * Run a script*
> * -p PHRASE, --phrase=PHRASE*
> * Paste a phrase*
> * -f FOLDER, --folder=FOLDER*
> * Show a folder popup menu*
>
> Examples:
>
> * give folder menu:
> o *autokey-run -f Autokey-test*
> * run a script with the name *date*
> o *autokey-run -s date*
> * a script with a space in it's name
> o *autokey-run -s 'Insert Date'*
>
> O wow, just what i needed :-)
>
> I leave it here for reference.
>
>
>
> On Thursday, September 8, 2016 at 3:22:17 PM UTC+2, MatthijsG wrote:
>
> As a happy user of Autokey (thanks to this group for some help!) i
> want to take a next step: run commands with a second keyboard
> (USB). On Ubuntu 16.04 i've installed the daemon */actkbd/* (yes,
> <http://users.softlab.ntua.gr/%7Ethkala/projects/actkbd/>
>
> What it does, it can replace a keypress with a command or word.
> Like, when you're typing 'a', gedit opens. Put a sticker of the
> gedit icon on the key 'a' and you've a different keyboard :-)
>
> My question: is it possible to trigger a phrase or a script from
> command line or by API or something? Otherwise, i've to set
> hotkeys i want to use for other purposes.
> The GTK is running, but i can't find the documentation to run
> autokey from command line. Even not sure if this is possible.
>
> Thanks in advance.
>
> (if you're interested in using a second keyboard, read these links.
>
> * (was enough for me to get it running)
> http://superuser.com/questions/592829/in-linux-remap-keys-from-second-keyboard-to-unicode-characters-and-shortcuts
> <http://superuser.com/questions/592829/in-linux-remap-keys-from-second-keyboard-to-unicode-characters-and-shortcuts>
> * (more info)
> http://unix.stackexchange.com/questions/35649/second-keyboard-to-run-commands
> <http://unix.stackexchange.com/questions/35649/second-keyboard-to-run-commands>
> * (README how to install)
> http://users.softlab.ntua.gr/~thkala/projects/actkbd/latest/README
> <http://users.softlab.ntua.gr/%7Ethkala/projects/actkbd/latest/README>
> )
>
> --
> You received this message because you are subscribed to the Google
> Groups "autokey-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to autokey-user...@googlegroups.com
> <mailto:autokey-user...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages