I was able to resolve my own issue, but not in the way I had been attempting. If somebody wants to help to figure out what I was doing wrong that'd be great.
As far as reading each and every key as a unique 2 byte variable however, I was able to make a work around. I found a question about shifting bits, and used it to combine my two chars. Then I figured out that the numbers were not combining properly, I found that it was because I was using signed chars instead of unsigned chars. I didn't want to use unsigned chars, so I found a new solution using a union.
This is my union solution. It is very simple.
#include <iostream>
#include <conio.h> //getch() & kbhit()
#include "rndgen.h"
#define FN_ESCAPE 27
#define FN_UP_ARROW 18656
#define FN_DOWN_ARROW 20704
#define FN_LEFT_ARROW 19424
#define FN_RIGHT_ARROW 19936
//This union allows for two 8-bit values to be read as one 16-bit value
union wide_char
{
short wide_C;
char C[2];
};
//Function waits for a key to be pressed
inline short key_wait()
{
wchar_t R;
wide_char user_input;
user_input.wide_C = 0;
//Loop twice, or until code causes the loop to exit
//Two times are neccessary for function keys unfortunately
for(int i = 0; i < 2; ++i)
{
//While there isn't a key pressed, loop doing nothing
while(!kbhit()){}
//Grab the next key from the buffer
//Since the loop is done, there must be at least one
user_input.C[i] = getch();
switch(user_input.C[i])
{
case 0:
case -32:
//The key pressed is a Function key because it matches one of these two cases
//This means getch() must be called twice
//Break switch, run the for loop again ++i
break;
default:
R = user_input.wide_C;
return R;
break;
}
}
return -1;
}
The wide_C returns the bits for C[2] in this order {C[1],C[0]} this is great, because it means F1-12 can be read uniquely (the first char return is 0 for F1-12) It could probably stand to have the short replaced with wchar_t, but I figured why fix something that isn't broken. I might do that when/if I decide to re-implement the code in a new solution for a different program.
This also means that a-Z & 0-9 can all be read as their regular char values.