Bit Masking

Thanks Nick, thats the way i was doing it, there are 10 keys in total, thats alot of if's, i though switch would be more efficient.

@dhenry

switch ((~REG_KEYINPUT) & (KEY_A | KEY_B)) {
  case KEY_A: //do something
  case KEY_B: //do something else
  case (KEY_A | KEY_B): //then something else
}

Didn't quite have the desired action but it did make me realise what i was doing wrong

This does work, for single keypresses only for now

switch (0x3FF - REG_KEYINPUT)
	{
		case KEY_A: iprintf("\x1b[5;0HA Pressed      ");
		break;
		case KEY_B: iprintf("\x1b[5;0HB Pressed      ");
		break;	 		
		default: iprintf("\x1b[5;0HNothing Pressed ");
		break;
	}

I realised i should be taking the returned value from the default value to give the key pressed

(0x3FF - REG_KEYINPUT)

Thanks again