A problem with keys on the keyboard sticking. Is there a cheap fix?

I have this problem when I play games on my console that the keys seem to lag behind when I'm pressing them, and sometimes if I tab out quickly to access skype for example and type, the problem will then persist and follow onto that, the screen then freezes and then when it reacts the keys start typing in, then works fine when I'm typing (for the record it is working fine now)

I was wondering if their is a fix, I suspect it might be the ram in my computer as I'm currently running 4gb on gaming Desktop (not the best I must admit, but Working the keys seem to be lagging even now(not really necessary but I thought I would say as I tabbed out to a skype chat) I'm wondering if there's a cheap fix, as I really am worried that I will need to buy a new keyboard which since my savings are currently going into the new Ram for my computer… I wouldn't like to spend much money on fixing a keyboard problem. The mouse works fine and after looking up solutions on the internet, I have found none that seem to work… I'll try and give a full example of the problem when it mostly happens.

It mostly happens when I'm playing the game Minecraft. It will work for about 10 minutes to an hour sometimes and when it stops working, the character will stop moving if I'm holding the walk button, or will stop rising if pressing the space bar. The mouse works fine, and then after pressing the buttons to try and move the character will stay still, 5 seconds - a minute latet (at the extreme) it moves as if i just lightly tapped it and begins to move on the keys that I have pressed. The game doesn't seem to lag, apart from it freezes slightly when it "bugs" out as i tested it with moving enemies (base ones that spawned) below a block. This problem also persists into other games like the game Magicka where I use the keys (qwer, asdf) and the mouse and as these are mostly the keys that are sticking or bugging, it makes play difficult or even impossible. Is there a fix?

Press the left-Shift key five times in quick succession, then turn off sticky keys.