Can you please pass on the SKU/model number for your HP laptop inclusive of the OS you're on? If the issue is not with sticky keys then you should look into seeing if you've got any drivers for your keyboard that need updating. In fact try and locate the keyboard in Device Manager and uninstall it and then click on scan for Hardware changes(provided you're on Microsoft's Windows OS).
From your description it sounds like you hold a key for four seconds and the key then gets stuck down. Does this happen with all the keys? If so that sounds like a software fault. Deleting the keyboard driver and restarting may fix it. It's also possible your keyboard has developed a hardware fault. You can check that by plugging in an external USB keyboard.If it happens with only some of the keys then I suspect at some point something has been spilt on the keyboard, possibly a soft drink. Alternatively you may have damaged the keyboard playing games. The W key and spacebar are particularly prone to this. This would make the keys physically tacky and liable to stick down.
If the latter is the case then short of removing the keyboard and washing it in deionized or distilled water and then drying it for several days in a desiccator, your keyboard is ruined. Buy another one. Look for replacement instructions on Internet.