I have a function where I want to use the delete button.
So I've put:
if(key[SCAN_DEL])
{
blah();
}
inside my while loop.
It doesn't work, because I seem to have a different scancode for delete from the one verge uses.
When I use SCAN_D it works fine, since that scancode does match.
I checked it. My scancode for delete is 211, not 83.
Furthermore:
For 'Insert' it's 210, not 82
For 'Page_Up': it's 201, not 73
For 'Page_Down': 209, not 81
For 'Home': 199, not 71
For 'End': 207, not 79
(Mine are 128 units higher)
So when I use key[211] it works fine, but it may not for other keyboards.
Why's this? Is it because I have a European keyboard? (I think I do anyway).
More importantly: How do I solve this? I'd like a universal interface...