I'm sure it's not the problem of keyboard limitation.
and I tested it on my laptop (windows 10) and the result was the same.
Are you sure that the keyboard chipset isn't very similar between these two laptops?
Holding numpad + shift (with numlock) for a while often make the program holds that numpad key forever.
I didn't do that for me. (aside from letting go in a non unencapsulating way)
Using this code (because you didn't include
all of the code required):
#include <SFML/Window.hpp>
#include <iostream>
int main() {
bool kill( false );
while( !kill ) {
bool shift = sf::Keyboard::isKeyPressed( sf::Keyboard::LShift ) || sf::Keyboard::isKeyPressed( sf::Keyboard::RShift );
bool up = sf::Keyboard::isKeyPressed( sf::Keyboard::Up ) || sf::Keyboard::isKeyPressed( sf::Keyboard::Numpad8 );
bool down = sf::Keyboard::isKeyPressed( sf::Keyboard::Down ) || sf::Keyboard::isKeyPressed( sf::Keyboard::Numpad2 );
bool left = sf::Keyboard::isKeyPressed( sf::Keyboard::Left ) || sf::Keyboard::isKeyPressed( sf::Keyboard::Numpad4 );
bool right = sf::Keyboard::isKeyPressed( sf::Keyboard::Right ) || sf::Keyboard::isKeyPressed( sf::Keyboard::Numpad6 );
kill = sf::Keyboard::isKeyPressed( sf::Keyboard::Escape );
std::string string = "";
if( shift )
string += "shift ";
if( up )
string += "up ";
if( down )
string += "down ";
if( left )
string += "left ";
if( right )
string += "right ";
std::cout << std::string( string ) << std::endl;
}
}
And the console window shows to correct information when I pressed the number pad key then the shift key.
Although, retesting it, if I:
Press the number pad key first, then shift = works as expected
Press the shift key first, then number pad = doesn't work as expected
Press the number pad key first, then shift, then release the number pad key (while still holding down the shift key) = the number pad key appears to be continued to be held down, even after letting go of it.
Again:
Have you tried other programs that does this kind of key binding on your system?
Also,
this may be related (because shift keys are involved, although it is using events and here it is using real time, though it still could be related). The differences between when number lock is on/off makes me question this, though.