All Questions
Tagged with cursor-position c
11 questions
1
vote
2
answers
88
views
Question about printing: displaying value reflecting change
I have some question about printing on C. Here is my code.
while(1)
{
if(Button == 32)
{
break;
}
else
{
if(Button == 1)
count += 1;
if(...
1
vote
1
answer
108
views
Difference between Active data position & Active presentation position
What is the key output difference between Active data position and Active presentation position defined separately in ECMA-48 in 4.2.5 and 4.2.6 ?
I tried to move my cursor to a different coordinate ...
1
vote
1
answer
278
views
SetConsoleCursorPosition : Getting black rows in console upon use
Following my previous question about making a snake program more fluid, I went and tried ANSI escape sequences and console functions to put back the text cursor on the top left corner.
I want to get ...
0
votes
0
answers
285
views
Interference between the escape sequence to find cursor position and `stdin()` in raw mode
I am writing a shell emulator in C, and put the terminal in raw mode. To get the cursor position and move using termcaps when necessary, I printed the escape sequence \033[6n and parsed its return.
...
5
votes
2
answers
2k
views
GLFW Mouse event lag with window drag
I am trying to drag an undecorated window in GLFW but am encountering some event lag, even though I am using glfwWaitEvents()
I have a cursor position callback, and a simple loop:
// register a ...
0
votes
1
answer
1k
views
Disable all Emacs c-mode reformatting, insertion/refusal, cursor jumps
I want to keep all syntax highlighting, autocomplete, commands etc. of Emacs c-mode (and I'll add in company-mode or similar shortly) but I want to disable everything in c-mode which:
Reformats other ...
1
vote
2
answers
1k
views
ncurses mvaddch() cursor movement a possible bug?
Code:
#include <ncurses.h>
int main(int argc, char **argv)
{
initscr();
noecho();
cbreak();
mvprintw(0, 0, curses_version());
mvprintw(1, 0, "Hello World");
mvaddch(...
1
vote
1
answer
7k
views
how to position the cursor on the screen?
I'm new in programming and currently learning about arrays in C. I'm making a puzzle that contains 15 numbered square pieces mounted on a frame and one piece is empty.It allow the user to hit any of ...
0
votes
1
answer
820
views
Cursor positioning in Terminal using C program
My program will open a file and print the contents in the terminal. As the file is large, the terminal goes two or more page. I'll have to slide up to the first line of the file to read from the ...
2
votes
2
answers
5k
views
Why does XWarpPointer only work once (while in a loop)?
Why does XWarpPointer only work once?
When I run:
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
int main()
{
Display *dpy = ...
10
votes
4
answers
16k
views
Moving the cursor to the beginning of the current line
I want to print current time (by using printf) in same place, but i want to do it in infinite loop eg:
while(1) {printf("Date and Time are %s", asctime(localtime(¤t))); }
So ...