Is there a function (like getch) which I can use, so when I move the cursor, like -> (to move right) an action occurs without pressing the enter key? Thanks!
Printable View
Is there a function (like getch) which I can use, so when I move the cursor, like -> (to move right) an action occurs without pressing the enter key? Thanks!
non-standard console programming in Windows: read this tutorial
non-standard console programming in *nix: NCURSES (or curses)
gg
or, if your compiler has an inline assembler, you can use some assembly language to do the trick; however, that is platform-specific, so it's not the best choise
well this is not a standard method.. but i had done this in console using BGI graphics.... I had a continous loop which checked the position of the mouse (x and y) when the mouse was in a particular area i would call a function to do somehting.. You can work something out on these lines.. But its resource hungry since the loop will be continously checking for the position of the mouse.........