I need to replicate a key press twice so that the action assocated with key press occurs in a single shot. the belwo code i have implemented for the same.
but while running i am getting error after the ioctl command that "A file descriptor does not represent an open file"
Thanks in advance
Code:
fd = open("/dev/pts/10", O_RDONLY); if(fd==-1) { return(0); } simulate_key = -K_F2; rc = ioctl(fd, TIOCSTI,simulate) close(fd);
Thanks in advance