Not fully sure what you are asking...but it seems the first two are easily covered with the code you posted (not that long). For the last, the VK_* are sequential numbers, so just use a >= VK_A && <=...