Score:0

Use AutoKey to open the terminal locally

cn flag

I have just recently installed Autokey.

The first thing I would like to do if to create a shortcut for openning the terminal in a folder.

By hand this is achieved with Shift + F10 + E.

In autokey I have the following script:

keyboard.press_key('<shift>')
keyboard.press_key('<f10>')
keyboard.release_key('<f10>')
keyboard.release_key('<shift>')
keyboard.press_key('<e>')
keyboard.release_key('<e>')

But this is not working. I would appreciate some help!

Best Regards

CrazyTux avatar
us flag
Does this answer your question? [Keyboard shortcut for "open a terminal here"](https://askubuntu.com/questions/68078/keyboard-shortcut-for-open-a-terminal-here)
Manuel Oliveira avatar
cn flag
Thanks for the information, but I would like to do this with autokey
vanadium avatar
cn flag
Any good reason why you want to go the less direct and thus less reliable way of an Autokey macro? Beware that, for Shift+F10 to work, a folder must be selected.
Gounou avatar
us flag
Try changing `'<e>'` for `'e'`. Also in AutoKey go to Settings and check Show log view. Did you set a Hotkey for the shortcut? If so use the Hotkey and check the log. Running your script (with `'e'`) I had the following error : `RuntimeError: release unlocked lock`. If I use `<e>` the log also show `Unknown key name <e>`. You can try keyboard remapping with `My Phrases`. For example : I use the <home> key (Hotkey) to select all. For this I write `<ctrl>+a` in the edit box. Try <shift>+<f10>+e. I've tested the version 0.96.0-beta.9 (actual release is 0.95.10).Your script doesn't work here too.
Manuel Oliveira avatar
cn flag
I was able to do it with `keyboard.send_keys('<menu> + e')`. Would you be so kind as to also try it on your side?
Gounou avatar
us flag
In my Ubuntu 21.04 Gnome the shortcut to open a terminal here is `<menu>+t`. I try with `send_keys <menu>+t` but it doesn't work. In Ubuntu 19.10 Gnome the shortcut is `menu +e` but I can't install AutoKey (it's on VirtualBox and the installation is broken). I had the same error `RuntimeError: release unlocked lock` with `send_keys` on Linux Mint 20.02.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.