I am writing ncurses programs in C and C++. I have not found a way to conceal the cursor to the user. I have looked around on the internet a bit, but most of the information that I have found either concerns Python/Ruby implementations of (n)curses or doesn't actually concern the hiding of the cursor. How may I accomplish my goal?
            Asked
            
        
        
            Active
            
        
            Viewed 4.8k times
        
    73
            
            
        1 Answers
112
            You need curs_set(0)
To quote the man page (with some added formatting):
The
curs_setroutine sets the cursor state to invisible, normal, or very visible for visibility equal to 0, 1, or 2 respectively. If the terminal supports the visibility requested, the previous cursor state is returned; otherwise,ERRis returned.
        Per Lundberg
        
- 3,837
 - 1
 - 36
 - 46
 
        parkydr
        
- 7,596
 - 3
 - 32
 - 42
 
- 
                    16Thanks! just so we know :) `import curses` then `curses.curs_set(0)` – Aziz Alto Apr 01 '20 at 01:08