U
U
Undecided2018-08-09 22:55:15
C++ / C#
Undecided, 2018-08-09 22:55:15

How to do keystroke emulation in C under mac os?

Hello, I just started learning C language and I decided to prank a friend by making a program that opens a program that opens a terminal window many times (we both use mac os), I wrote the main part and got stuck because I don’t know how to do it the code emulated the cmd and n key presses, is there any library for this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Cherny, 2018-08-11
@Undecided

In bash:
$ open -a Terminal `pwd`

A
aleaksah, 2018-08-13
@aleaksah

I won’t tell you about the emulation of keystrokes under the macos, you need to look at the macos api, and your task can probably be solved through system() .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question