0

I have been working on a project and have gotten it to the point where I need to be able to send hot key macros to the terminal in order to invoke or stop a process. I have been using python up until now but I don't want to have to install additional modules as most of them are third party and don't come with the python standard library. I know in bash scripts there are ways that you could issue commands such as ls/cd/pwd, but I was wondering if there would be a way of issuing a command like "shift" + O, or "ctl" + C for example. It was also be of tremendous help to know if there were any similar functionalities in windows.

Please note that this question is not asking for help with Python but asking for help with creating a bash script that would include macros if possible.

Thanks so much,

Rick ~

  • 2
    You can do that with autohotkey scripts. – Biswapriyo Nov 5 '18 at 19:20
  • If you want to do ctrl-c as in stopping a process, kill -INT <pid> does exactly the same thing. – Aulis Ronkainen Nov 5 '18 at 20:13
  • Hi Aulis, thanks for the response, however I was hoping that there would be a way to do something like a shift+c as well or ctrl-alt-del, or alt-f2 etc – RickwhoPrograms Nov 5 '18 at 21:07
  • If you're in bash, would an alias work? – Xen2050 Nov 6 '18 at 1:12
  • Sure, You mean assign it to a variable maybe and call on that? – RickwhoPrograms Nov 6 '18 at 4:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.