To illustrate the problem more clearly than the above ramblings;
Holding down shift and hitting h,e,l,l,o
results in:
H:16
D:16
H:72
D:72
H:69
D:69
H:76
D:76
H:76
D:76
H:79
D:79
with this code
for( int i=0; i < 256; i++ ){
if ( window->keyhitstate[i] )
std::cerr << "H:" << std::to_string(i) << std::endl;
if ( window->keydownstate[i] )
std::cerr << "D:" << std::to_string(i) << std::endl;
}
Where each new letter should also have a D:16