Score:0

fgetc(stdin) does not read xdotool press key

us flag

I am trying to write a program that automatically presses a key at specific times, and then another program will read the input key (possibly using fgetc(stdin)). However, it seems like xdotool doesn't write to that program's stdin. I am sshed into a server (Ubuntu 18.0.4, and both programs (the keystroke simulator and the program reading the keystrokes) are running in a terminal. I was wondering if anyone can give me some hints on how to make such a process work?

waltinator avatar
it flag
Read `man expect`. Or take the `fgetc` stream out of "line buffered" mode.
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.