1

I am using C to write up a program that uses every key on the keyboard for int. In C, I am using ncurses.h and am using cbreak(). cbreak() doesn't work with it. I then used raw() which is apparently is supposed to stop all keyboard input.

I am using

keypad(stdscr, TRUE);

to take all keyboard input, and it still doesn't take print screen as an input value and ignores it

If anyone has answer for this?

Kalana
  • 5,631
  • 7
  • 30
  • 51
Ryan Keough
  • 121
  • 1
  • 8
  • Take a look at this: https://www.gnu.org/software/guile-ncurses/manual/html_node/Getting-characters-from-the-keyboard.html . I think you are looking for the `KEY_PRINT` key. – jwdonahue Feb 27 '20 at 05:59

1 Answers1

0

If you're running it in a desktop environment (Gnome, KDE, etc.) the PrintScreen key is usually intercepted by it and the ncurses application will not receive it. You should test your program in a plain virtual console instead outside the desktop environment.

Nikos C.
  • 50,738
  • 9
  • 71
  • 96