I'm writing a software and for user input I need to avoid the use of some keys, my actual function is this
In this code is only reported VK_INSERT to not work, but it's the same with VK_PRIOR, VK_NEXT, VK_HOME, VK_DEL, VK_END, VK_LEFT, VK_RIGHT, VK_UP, VK_DOWNCode:char * UserInput(int max, int tipo) { ... while(!EndInput) { current = getch(); switch(current) { case VK_RETURN: //ok, capture enter key and do its job ... break; case VK_BACK: //ok, capture backspace and do its job ... break; case VK_TAB: //ok, makes TAB key do nothing break; case VK_INSERT: //Don't capture INS key returns òR as output //getch(); break; case 0: //ok, makes functions keys do nothing getch(); case VK_ESCAPE: //ok, capture ESC and do its job ... default: ... break; } } return buff; }
How could I capture these keys to let them do nothing?


LinkBack URL
About LinkBacks




Reply With Quote


Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum